@contember/react-utils 2.1.0-alpha.3 → 2.1.0-alpha.35

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 +9 -5
  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 -2
  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 +0,0 @@
1
- {"version":3,"file":"useOnElementMouseEnterDelayedCallback.js","sources":["../../../../../packages/react-utils/src/hooks/useOnElementMouseEnterDelayedCallback.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\n\n/**\n * Calls the callback when the mouse enters the element, but only after a timeout, e.g. for tooltips or dropdown menus.\n *\n * Calls the callback immediately if the mouse is pressed down with `event.type` of `mousedown`. This is useful for\n * dropdown menus, where the user may click on the menu item before the callback is called resulting in the menu\n * opening and closing immediately.\n *\n * @param refOrElement - The element or ref to the element to attach the event listener to.\n * @param callback - The callback to call when the mouse enters the element.\n * @param timeoutMs - The timeout in milliseconds to wait before calling the callback.\n */\nexport function useOnElementMouseEnterDelayedCallback(\n\trefOrElement: RefObjectOrElement<HTMLElement>,\n\tcallback: (event: MouseEvent) => void,\n\ttimeoutMs: number = 300,\n): void {\n\tuseEffect(() => {\n\t\tconst refValue = unwrapRefValue(refOrElement)\n\n\t\tif (refValue) {\n\t\t\tlet timeoutID: ReturnType<typeof setTimeout> | undefined = undefined\n\n\t\t\tfunction handleMouseEnter(event: MouseEvent) {\n\t\t\t\tclearTimeout(timeoutID)\n\n\t\t\t\ttimeoutID = setTimeout(() => {\n\t\t\t\t\tcallback(event)\n\t\t\t\t}, timeoutMs)\n\t\t\t}\n\n\t\t\tfunction handleMouseLeave() {\n\t\t\t\tclearTimeout(timeoutID)\n\t\t\t}\n\n\t\t\tfunction handleMouseDown(event: MouseEvent) {\n\t\t\t\tclearTimeout(timeoutID)\n\t\t\t\tcallback(event)\n\t\t\t}\n\n\t\t\trefValue.addEventListener('mouseenter', handleMouseEnter)\n\t\t\trefValue.addEventListener('mouseleave', handleMouseLeave)\n\t\t\trefValue.addEventListener('mousedown', handleMouseDown)\n\n\t\t\treturn () => {\n\t\t\t\trefValue.removeEventListener('mouseover', handleMouseEnter)\n\t\t\t\trefValue.removeEventListener('mouseleave', handleMouseLeave)\n\t\t\t\trefValue.removeEventListener('mousedown', handleMouseDown)\n\t\t\t}\n\t\t}\n\t}, [callback, refOrElement, timeoutMs])\n}\n"],"names":[],"mappings":";;AAcO,SAAS,sCACf,cACA,UACA,YAAoB,KACb;AACP,YAAU,MAAM;AACT,UAAA,WAAW,eAAe,YAAY;AAE5C,QAAI,UAAU;AAGJ,UAAA,mBAAT,SAA0B,OAAmB;AAC5C,qBAAa,SAAS;AAEtB,oBAAY,WAAW,MAAM;AAC5B,mBAAS,KAAK;AAAA,WACZ,SAAS;AAAA,MACb,GAES,mBAAT,WAA4B;AAC3B,qBAAa,SAAS;AAAA,MAAA,GAGd,kBAAT,SAAyB,OAAmB;AAC3C,qBAAa,SAAS;AACtB,iBAAS,KAAK;AAAA,MACf;AAjBA,UAAI,YAAuD;AAmBlD,eAAA,iBAAiB,cAAc,gBAAgB;AAC/C,eAAA,iBAAiB,cAAc,gBAAgB;AAC/C,eAAA,iBAAiB,aAAa,eAAe;AAEtD,aAAO,MAAM;AACH,iBAAA,oBAAoB,aAAa,gBAAgB;AACjD,iBAAA,oBAAoB,cAAc,gBAAgB;AAClD,iBAAA,oBAAoB,aAAa,eAAe;AAAA,MAC1D;AAAA,IAAA;AAAA,EAEC,GAAA,CAAC,UAAU,cAAc,SAAS,CAAC;AACvC;"}
@@ -1,42 +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 Context = require("../debug-context/Context.cjs");
6
- function useOnElementResize(refOrElement, callback, options = {}, timeout = 300) {
7
- const scopedConsoleRef = Context.useScopedConsoleRef("useOnElementResize");
8
- const { box = "border-box" } = options;
9
- const callbackRef = React.useRef(callback);
10
- callbackRef.current = callback;
11
- const lastTimeStamp = React.useRef(0);
12
- React.useLayoutEffect(() => {
13
- const element = unwrapRefValue.unwrapRefValue(refOrElement);
14
- if (!element) {
15
- return;
16
- }
17
- if (!(element instanceof HTMLElement)) {
18
- throw new Error("Exhaustive error: Expecting element to be instance of HTMLElement");
19
- }
20
- let timeoutID;
21
- function debouncedOnChange([entry]) {
22
- const timeStamp = Date.now();
23
- const delta = timeStamp - lastTimeStamp.current;
24
- clearTimeout(timeoutID);
25
- const timeoutFinal = delta > timeout ? 0 : timeout;
26
- timeoutID = setTimeout(() => {
27
- const message = timeoutFinal > 0 ? "element.resize:debounced" : "element.resize:immediate";
28
- scopedConsoleRef.current.warned(message, null);
29
- callbackRef.current(entry);
30
- lastTimeStamp.current = timeStamp;
31
- }, timeoutFinal);
32
- }
33
- const resizeObserver = new ResizeObserver(debouncedOnChange);
34
- resizeObserver.observe(element, { box });
35
- return () => {
36
- clearTimeout(timeoutID);
37
- resizeObserver.unobserve(element);
38
- };
39
- }, [box, refOrElement, scopedConsoleRef, timeout]);
40
- }
41
- exports.useOnElementResize = useOnElementResize;
42
- //# sourceMappingURL=useOnElementResize.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnElementResize.cjs","sources":["../../../../../packages/react-utils/src/hooks/useOnElementResize.ts"],"sourcesContent":["import { useLayoutEffect, useRef } from 'react'\nimport { useScopedConsoleRef } from '../debug-context'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\n\nexport function useOnElementResize(\n\trefOrElement: RefObjectOrElement<HTMLElement | null> | null,\n\tcallback: (entries: ResizeObserverEntry) => void,\n\toptions: ResizeObserverOptions = {},\n\ttimeout: number = 300,\n): void {\n\tconst scopedConsoleRef = useScopedConsoleRef('useOnElementResize')\n\n\tconst { box = 'border-box' } = options\n\tconst callbackRef = useRef(callback); callbackRef.current = callback\n\tconst lastTimeStamp = useRef<number>(0)\n\n\tuseLayoutEffect(() => {\n\t\tconst element = unwrapRefValue(refOrElement)\n\t\tif (!element) {\n\t\t\treturn\n\t\t}\n\t\tif (!(element instanceof HTMLElement)) {\n\t\t\tthrow new Error('Exhaustive error: Expecting element to be instance of HTMLElement')\n\t\t}\n\n\t\tlet timeoutID: ReturnType<typeof setTimeout>\n\n\t\tfunction debouncedOnChange([entry]: ResizeObserverEntry[]) {\n\t\t\tconst timeStamp = Date.now()\n\t\t\tconst delta = timeStamp - lastTimeStamp.current\n\n\t\t\tclearTimeout(timeoutID)\n\t\t\tconst timeoutFinal = delta > timeout ? 0 : timeout\n\n\t\t\ttimeoutID = setTimeout(() => {\n\t\t\t\tconst message = timeoutFinal > 0 ? 'element.resize:debounced' : 'element.resize:immediate'\n\t\t\t\tscopedConsoleRef.current.warned(message, null)\n\t\t\t\tcallbackRef.current(entry)\n\t\t\t\tlastTimeStamp.current = timeStamp\n\t\t\t}, timeoutFinal)\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver(debouncedOnChange)\n\n\t\tresizeObserver.observe(element, { box })\n\n\t\treturn () => {\n\t\t\tclearTimeout(timeoutID)\n\t\t\tresizeObserver.unobserve(element)\n\t\t}\n\t}, [box, refOrElement, scopedConsoleRef, timeout])\n}\n"],"names":["useScopedConsoleRef","useRef","useLayoutEffect","unwrapRefValue"],"mappings":";;;;;AAIO,SAAS,mBACf,cACA,UACA,UAAiC,CAAC,GAClC,UAAkB,KACX;AACD,QAAA,mBAAmBA,4BAAoB,oBAAoB;AAE3D,QAAA,EAAE,MAAM,aAAA,IAAiB;AACzB,QAAA,cAAcC,aAAO,QAAQ;AAAG,cAAY,UAAU;AACtD,QAAA,gBAAgBA,aAAe,CAAC;AAEtCC,QAAAA,gBAAgB,MAAM;AACf,UAAA,UAAUC,8BAAe,YAAY;AAC3C,QAAI,CAAC,SAAS;AACb;AAAA,IAAA;AAEG,QAAA,EAAE,mBAAmB,cAAc;AAChC,YAAA,IAAI,MAAM,mEAAmE;AAAA,IAAA;AAGhF,QAAA;AAEK,aAAA,kBAAkB,CAAC,KAAK,GAA0B;AACpD,YAAA,YAAY,KAAK,IAAI;AACrB,YAAA,QAAQ,YAAY,cAAc;AAExC,mBAAa,SAAS;AAChB,YAAA,eAAe,QAAQ,UAAU,IAAI;AAE3C,kBAAY,WAAW,MAAM;AACtB,cAAA,UAAU,eAAe,IAAI,6BAA6B;AAC/C,yBAAA,QAAQ,OAAO,SAAS,IAAI;AAC7C,oBAAY,QAAQ,KAAK;AACzB,sBAAc,UAAU;AAAA,SACtB,YAAY;AAAA,IAAA;AAGV,UAAA,iBAAiB,IAAI,eAAe,iBAAiB;AAE3D,mBAAe,QAAQ,SAAS,EAAE,IAAA,CAAK;AAEvC,WAAO,MAAM;AACZ,mBAAa,SAAS;AACtB,qBAAe,UAAU,OAAO;AAAA,IACjC;AAAA,KACE,CAAC,KAAK,cAAc,kBAAkB,OAAO,CAAC;AAClD;;"}
@@ -1,42 +0,0 @@
1
- import { useRef, useLayoutEffect } from "react";
2
- import { unwrapRefValue } from "./unwrapRefValue.js";
3
- import { useScopedConsoleRef } from "../debug-context/Context.js";
4
- function useOnElementResize(refOrElement, callback, options = {}, timeout = 300) {
5
- const scopedConsoleRef = useScopedConsoleRef("useOnElementResize");
6
- const { box = "border-box" } = options;
7
- const callbackRef = useRef(callback);
8
- callbackRef.current = callback;
9
- const lastTimeStamp = useRef(0);
10
- useLayoutEffect(() => {
11
- const element = unwrapRefValue(refOrElement);
12
- if (!element) {
13
- return;
14
- }
15
- if (!(element instanceof HTMLElement)) {
16
- throw new Error("Exhaustive error: Expecting element to be instance of HTMLElement");
17
- }
18
- let timeoutID;
19
- function debouncedOnChange([entry]) {
20
- const timeStamp = Date.now();
21
- const delta = timeStamp - lastTimeStamp.current;
22
- clearTimeout(timeoutID);
23
- const timeoutFinal = delta > timeout ? 0 : timeout;
24
- timeoutID = setTimeout(() => {
25
- const message = timeoutFinal > 0 ? "element.resize:debounced" : "element.resize:immediate";
26
- scopedConsoleRef.current.warned(message, null);
27
- callbackRef.current(entry);
28
- lastTimeStamp.current = timeStamp;
29
- }, timeoutFinal);
30
- }
31
- const resizeObserver = new ResizeObserver(debouncedOnChange);
32
- resizeObserver.observe(element, { box });
33
- return () => {
34
- clearTimeout(timeoutID);
35
- resizeObserver.unobserve(element);
36
- };
37
- }, [box, refOrElement, scopedConsoleRef, timeout]);
38
- }
39
- export {
40
- useOnElementResize
41
- };
42
- //# sourceMappingURL=useOnElementResize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnElementResize.js","sources":["../../../../../packages/react-utils/src/hooks/useOnElementResize.ts"],"sourcesContent":["import { useLayoutEffect, useRef } from 'react'\nimport { useScopedConsoleRef } from '../debug-context'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\n\nexport function useOnElementResize(\n\trefOrElement: RefObjectOrElement<HTMLElement | null> | null,\n\tcallback: (entries: ResizeObserverEntry) => void,\n\toptions: ResizeObserverOptions = {},\n\ttimeout: number = 300,\n): void {\n\tconst scopedConsoleRef = useScopedConsoleRef('useOnElementResize')\n\n\tconst { box = 'border-box' } = options\n\tconst callbackRef = useRef(callback); callbackRef.current = callback\n\tconst lastTimeStamp = useRef<number>(0)\n\n\tuseLayoutEffect(() => {\n\t\tconst element = unwrapRefValue(refOrElement)\n\t\tif (!element) {\n\t\t\treturn\n\t\t}\n\t\tif (!(element instanceof HTMLElement)) {\n\t\t\tthrow new Error('Exhaustive error: Expecting element to be instance of HTMLElement')\n\t\t}\n\n\t\tlet timeoutID: ReturnType<typeof setTimeout>\n\n\t\tfunction debouncedOnChange([entry]: ResizeObserverEntry[]) {\n\t\t\tconst timeStamp = Date.now()\n\t\t\tconst delta = timeStamp - lastTimeStamp.current\n\n\t\t\tclearTimeout(timeoutID)\n\t\t\tconst timeoutFinal = delta > timeout ? 0 : timeout\n\n\t\t\ttimeoutID = setTimeout(() => {\n\t\t\t\tconst message = timeoutFinal > 0 ? 'element.resize:debounced' : 'element.resize:immediate'\n\t\t\t\tscopedConsoleRef.current.warned(message, null)\n\t\t\t\tcallbackRef.current(entry)\n\t\t\t\tlastTimeStamp.current = timeStamp\n\t\t\t}, timeoutFinal)\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver(debouncedOnChange)\n\n\t\tresizeObserver.observe(element, { box })\n\n\t\treturn () => {\n\t\t\tclearTimeout(timeoutID)\n\t\t\tresizeObserver.unobserve(element)\n\t\t}\n\t}, [box, refOrElement, scopedConsoleRef, timeout])\n}\n"],"names":[],"mappings":";;;AAIO,SAAS,mBACf,cACA,UACA,UAAiC,CAAC,GAClC,UAAkB,KACX;AACD,QAAA,mBAAmB,oBAAoB,oBAAoB;AAE3D,QAAA,EAAE,MAAM,aAAA,IAAiB;AACzB,QAAA,cAAc,OAAO,QAAQ;AAAG,cAAY,UAAU;AACtD,QAAA,gBAAgB,OAAe,CAAC;AAEtC,kBAAgB,MAAM;AACf,UAAA,UAAU,eAAe,YAAY;AAC3C,QAAI,CAAC,SAAS;AACb;AAAA,IAAA;AAEG,QAAA,EAAE,mBAAmB,cAAc;AAChC,YAAA,IAAI,MAAM,mEAAmE;AAAA,IAAA;AAGhF,QAAA;AAEK,aAAA,kBAAkB,CAAC,KAAK,GAA0B;AACpD,YAAA,YAAY,KAAK,IAAI;AACrB,YAAA,QAAQ,YAAY,cAAc;AAExC,mBAAa,SAAS;AAChB,YAAA,eAAe,QAAQ,UAAU,IAAI;AAE3C,kBAAY,WAAW,MAAM;AACtB,cAAA,UAAU,eAAe,IAAI,6BAA6B;AAC/C,yBAAA,QAAQ,OAAO,SAAS,IAAI;AAC7C,oBAAY,QAAQ,KAAK;AACzB,sBAAc,UAAU;AAAA,SACtB,YAAY;AAAA,IAAA;AAGV,UAAA,iBAAiB,IAAI,eAAe,iBAAiB;AAE3D,mBAAe,QAAQ,SAAS,EAAE,IAAA,CAAK;AAEvC,WAAO,MAAM;AACZ,mBAAa,SAAS;AACtB,qBAAe,UAAU,OAAO;AAAA,IACjC;AAAA,KACE,CAAC,KAAK,cAAc,kBAAkB,OAAO,CAAC;AAClD;"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const Context = require("../debug-context/Context.cjs");
5
- function useOnWindowResize(callback, interval = 300) {
6
- const scopedConsoleRef = Context.useScopedConsoleRef("useOnWindowResize");
7
- const callbackRef = React.useRef(callback);
8
- callbackRef.current = callback;
9
- const lastTimeStamp = React.useRef(0);
10
- React.useLayoutEffect(() => {
11
- let timeoutID;
12
- function debouncedHandler(event) {
13
- clearTimeout(timeoutID);
14
- const delta = event.timeStamp - lastTimeStamp.current;
15
- scopedConsoleRef.current.logged("window.resize:delta", delta);
16
- if (delta > interval) {
17
- scopedConsoleRef.current.warned("event:window.resize:immediately", null);
18
- callbackRef.current(event);
19
- lastTimeStamp.current = event.timeStamp;
20
- } else {
21
- timeoutID = setTimeout(() => {
22
- scopedConsoleRef.current.warned("event:window.resize:debounced", null);
23
- lastTimeStamp.current = event.timeStamp;
24
- callbackRef.current(event);
25
- }, interval);
26
- }
27
- }
28
- window.addEventListener("resize", debouncedHandler);
29
- return () => {
30
- clearTimeout(timeoutID);
31
- window.removeEventListener("resize", debouncedHandler);
32
- };
33
- }, [callbackRef, interval, scopedConsoleRef]);
34
- }
35
- exports.useOnWindowResize = useOnWindowResize;
36
- //# sourceMappingURL=useOnWindowResize.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnWindowResize.cjs","sources":["../../../../../packages/react-utils/src/hooks/useOnWindowResize.ts"],"sourcesContent":["import { useLayoutEffect, useRef } from 'react'\nimport { useScopedConsoleRef } from '../debug-context'\n\nexport function useOnWindowResize(\n\tcallback: (event: Event) => void,\n\tinterval: number = 300,\n) {\n\tconst scopedConsoleRef = useScopedConsoleRef('useOnWindowResize')\n\n\tconst callbackRef = useRef(callback); callbackRef.current = callback\n\tconst lastTimeStamp = useRef<number>(0)\n\n\tuseLayoutEffect(() => {\n\t\tlet timeoutID: ReturnType<typeof setTimeout>\n\n\t\tfunction debouncedHandler(event: Event) {\n\t\t\tclearTimeout(timeoutID)\n\n\t\t\tconst delta = event.timeStamp - lastTimeStamp.current\n\t\t\tscopedConsoleRef.current.logged('window.resize:delta', delta)\n\n\t\t\tif (delta > interval) {\n\t\t\t\tscopedConsoleRef.current.warned('event:window.resize:immediately', null)\n\t\t\t\tcallbackRef.current(event)\n\t\t\t\tlastTimeStamp.current = event.timeStamp\n\t\t\t} else {\n\t\t\t\ttimeoutID = setTimeout(() => {\n\t\t\t\t\tscopedConsoleRef.current.warned('event:window.resize:debounced', null)\n\t\t\t\t\tlastTimeStamp.current = event.timeStamp\n\t\t\t\t\tcallbackRef.current(event)\n\t\t\t\t}, interval)\n\t\t\t}\n\t\t}\n\n\t\twindow.addEventListener('resize', debouncedHandler)\n\n\t\treturn () => {\n\t\t\tclearTimeout(timeoutID)\n\t\t\twindow.removeEventListener('resize', debouncedHandler)\n\t\t}\n\t}, [callbackRef, interval, scopedConsoleRef])\n}\n"],"names":["useScopedConsoleRef","useRef","useLayoutEffect"],"mappings":";;;;AAGgB,SAAA,kBACf,UACA,WAAmB,KAClB;AACK,QAAA,mBAAmBA,4BAAoB,mBAAmB;AAE1D,QAAA,cAAcC,aAAO,QAAQ;AAAG,cAAY,UAAU;AACtD,QAAA,gBAAgBA,aAAe,CAAC;AAEtCC,QAAAA,gBAAgB,MAAM;AACjB,QAAA;AAEJ,aAAS,iBAAiB,OAAc;AACvC,mBAAa,SAAS;AAEhB,YAAA,QAAQ,MAAM,YAAY,cAAc;AAC7B,uBAAA,QAAQ,OAAO,uBAAuB,KAAK;AAE5D,UAAI,QAAQ,UAAU;AACJ,yBAAA,QAAQ,OAAO,mCAAmC,IAAI;AACvE,oBAAY,QAAQ,KAAK;AACzB,sBAAc,UAAU,MAAM;AAAA,MAAA,OACxB;AACN,oBAAY,WAAW,MAAM;AACX,2BAAA,QAAQ,OAAO,iCAAiC,IAAI;AACrE,wBAAc,UAAU,MAAM;AAC9B,sBAAY,QAAQ,KAAK;AAAA,WACvB,QAAQ;AAAA,MAAA;AAAA,IACZ;AAGM,WAAA,iBAAiB,UAAU,gBAAgB;AAElD,WAAO,MAAM;AACZ,mBAAa,SAAS;AACf,aAAA,oBAAoB,UAAU,gBAAgB;AAAA,IACtD;AAAA,EACE,GAAA,CAAC,aAAa,UAAU,gBAAgB,CAAC;AAC7C;;"}
@@ -1,36 +0,0 @@
1
- import { useRef, useLayoutEffect } from "react";
2
- import { useScopedConsoleRef } from "../debug-context/Context.js";
3
- function useOnWindowResize(callback, interval = 300) {
4
- const scopedConsoleRef = useScopedConsoleRef("useOnWindowResize");
5
- const callbackRef = useRef(callback);
6
- callbackRef.current = callback;
7
- const lastTimeStamp = useRef(0);
8
- useLayoutEffect(() => {
9
- let timeoutID;
10
- function debouncedHandler(event) {
11
- clearTimeout(timeoutID);
12
- const delta = event.timeStamp - lastTimeStamp.current;
13
- scopedConsoleRef.current.logged("window.resize:delta", delta);
14
- if (delta > interval) {
15
- scopedConsoleRef.current.warned("event:window.resize:immediately", null);
16
- callbackRef.current(event);
17
- lastTimeStamp.current = event.timeStamp;
18
- } else {
19
- timeoutID = setTimeout(() => {
20
- scopedConsoleRef.current.warned("event:window.resize:debounced", null);
21
- lastTimeStamp.current = event.timeStamp;
22
- callbackRef.current(event);
23
- }, interval);
24
- }
25
- }
26
- window.addEventListener("resize", debouncedHandler);
27
- return () => {
28
- clearTimeout(timeoutID);
29
- window.removeEventListener("resize", debouncedHandler);
30
- };
31
- }, [callbackRef, interval, scopedConsoleRef]);
32
- }
33
- export {
34
- useOnWindowResize
35
- };
36
- //# sourceMappingURL=useOnWindowResize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnWindowResize.js","sources":["../../../../../packages/react-utils/src/hooks/useOnWindowResize.ts"],"sourcesContent":["import { useLayoutEffect, useRef } from 'react'\nimport { useScopedConsoleRef } from '../debug-context'\n\nexport function useOnWindowResize(\n\tcallback: (event: Event) => void,\n\tinterval: number = 300,\n) {\n\tconst scopedConsoleRef = useScopedConsoleRef('useOnWindowResize')\n\n\tconst callbackRef = useRef(callback); callbackRef.current = callback\n\tconst lastTimeStamp = useRef<number>(0)\n\n\tuseLayoutEffect(() => {\n\t\tlet timeoutID: ReturnType<typeof setTimeout>\n\n\t\tfunction debouncedHandler(event: Event) {\n\t\t\tclearTimeout(timeoutID)\n\n\t\t\tconst delta = event.timeStamp - lastTimeStamp.current\n\t\t\tscopedConsoleRef.current.logged('window.resize:delta', delta)\n\n\t\t\tif (delta > interval) {\n\t\t\t\tscopedConsoleRef.current.warned('event:window.resize:immediately', null)\n\t\t\t\tcallbackRef.current(event)\n\t\t\t\tlastTimeStamp.current = event.timeStamp\n\t\t\t} else {\n\t\t\t\ttimeoutID = setTimeout(() => {\n\t\t\t\t\tscopedConsoleRef.current.warned('event:window.resize:debounced', null)\n\t\t\t\t\tlastTimeStamp.current = event.timeStamp\n\t\t\t\t\tcallbackRef.current(event)\n\t\t\t\t}, interval)\n\t\t\t}\n\t\t}\n\n\t\twindow.addEventListener('resize', debouncedHandler)\n\n\t\treturn () => {\n\t\t\tclearTimeout(timeoutID)\n\t\t\twindow.removeEventListener('resize', debouncedHandler)\n\t\t}\n\t}, [callbackRef, interval, scopedConsoleRef])\n}\n"],"names":[],"mappings":";;AAGgB,SAAA,kBACf,UACA,WAAmB,KAClB;AACK,QAAA,mBAAmB,oBAAoB,mBAAmB;AAE1D,QAAA,cAAc,OAAO,QAAQ;AAAG,cAAY,UAAU;AACtD,QAAA,gBAAgB,OAAe,CAAC;AAEtC,kBAAgB,MAAM;AACjB,QAAA;AAEJ,aAAS,iBAAiB,OAAc;AACvC,mBAAa,SAAS;AAEhB,YAAA,QAAQ,MAAM,YAAY,cAAc;AAC7B,uBAAA,QAAQ,OAAO,uBAAuB,KAAK;AAE5D,UAAI,QAAQ,UAAU;AACJ,yBAAA,QAAQ,OAAO,mCAAmC,IAAI;AACvE,oBAAY,QAAQ,KAAK;AACzB,sBAAc,UAAU,MAAM;AAAA,MAAA,OACxB;AACN,oBAAY,WAAW,MAAM;AACX,2BAAA,QAAQ,OAAO,iCAAiC,IAAI;AACrE,wBAAc,UAAU,MAAM;AAC9B,sBAAY,QAAQ,KAAK;AAAA,WACvB,QAAQ;AAAA,MAAA;AAAA,IACZ;AAGM,WAAA,iBAAiB,UAAU,gBAAgB;AAElD,WAAO,MAAM;AACZ,mBAAa,SAAS;AACf,aAAA,oBAAoB,UAAU,gBAAgB;AAAA,IACtD;AAAA,EACE,GAAA,CAAC,aAAa,UAAU,gBAAgB,CAAC;AAC7C;"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const usePreviousValue = (value) => {
5
- const ref = React.useRef(value);
6
- React.useEffect(() => {
7
- ref.current = value;
8
- });
9
- return ref.current;
10
- };
11
- exports.usePreviousValue = usePreviousValue;
12
- //# sourceMappingURL=usePreviousValue.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePreviousValue.cjs","sources":["../../../../../packages/react-utils/src/hooks/usePreviousValue.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport const usePreviousValue = <Value>(value: Value) => {\n\tconst ref = useRef<Value>(value)\n\tuseEffect(() => {\n\t\tref.current = value\n\t})\n\treturn ref.current\n}\n"],"names":["useRef","useEffect"],"mappings":";;;AAEa,MAAA,mBAAmB,CAAQ,UAAiB;AAClD,QAAA,MAAMA,aAAc,KAAK;AAC/BC,QAAAA,UAAU,MAAM;AACf,QAAI,UAAU;AAAA,EAAA,CACd;AACD,SAAO,IAAI;AACZ;;"}
@@ -1,12 +0,0 @@
1
- import { useRef, useEffect } from "react";
2
- const usePreviousValue = (value) => {
3
- const ref = useRef(value);
4
- useEffect(() => {
5
- ref.current = value;
6
- });
7
- return ref.current;
8
- };
9
- export {
10
- usePreviousValue
11
- };
12
- //# sourceMappingURL=usePreviousValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePreviousValue.js","sources":["../../../../../packages/react-utils/src/hooks/usePreviousValue.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport const usePreviousValue = <Value>(value: Value) => {\n\tconst ref = useRef<Value>(value)\n\tuseEffect(() => {\n\t\tref.current = value\n\t})\n\treturn ref.current\n}\n"],"names":[],"mappings":";AAEa,MAAA,mBAAmB,CAAQ,UAAiB;AAClD,QAAA,MAAM,OAAc,KAAK;AAC/B,YAAU,MAAM;AACf,QAAI,UAAU;AAAA,EAAA,CACd;AACD,SAAO,IAAI;AACZ;"}
@@ -1,100 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const urlStateStorage = {
5
- getItem(key) {
6
- const searchParams = new URLSearchParams(window.location.search);
7
- const value = searchParams.get(key[1]);
8
- return value !== null && value !== void 0 ? JSON.parse(value) : null;
9
- },
10
- setItem(key, value) {
11
- const searchParams = new URLSearchParams(window.location.search);
12
- searchParams.set(key[1], JSON.stringify(value));
13
- const newUrl = `${window.location.pathname}?${searchParams.toString()}`;
14
- window.history.replaceState({}, "", newUrl);
15
- }
16
- };
17
- const createStateStorageFromNativeStorage = (getStorage) => {
18
- return {
19
- getItem(key) {
20
- const value = getStorage().getItem(key.join("-"));
21
- return value !== null ? JSON.parse(value) : null;
22
- },
23
- setItem(key, value) {
24
- getStorage().setItem(key.join("-"), JSON.stringify(value));
25
- }
26
- };
27
- };
28
- const sessionStateStorage = createStateStorageFromNativeStorage(() => sessionStorage);
29
- const localStateStorage = createStateStorageFromNativeStorage(() => localStorage);
30
- const nullStorage = {
31
- getItem() {
32
- return null;
33
- },
34
- setItem() {
35
- }
36
- };
37
- const builtInStorages = {
38
- url: urlStateStorage,
39
- session: sessionStateStorage,
40
- local: localStateStorage,
41
- null: nullStorage
42
- };
43
- const useStoredState = (storageOrName, key, initializeValue) => {
44
- const storage = React.useMemo(() => {
45
- return getStateStorage(storageOrName);
46
- }, [storageOrName]);
47
- const [value, setValue] = React.useState(() => {
48
- const value2 = storage.getItem(key);
49
- return initializeValue(value2);
50
- });
51
- return [
52
- value,
53
- React.useCallback((value2) => {
54
- setValue((current) => {
55
- const newValue = typeof value2 === "function" ? value2(current) : value2;
56
- storage.setItem(key, newValue);
57
- return newValue;
58
- });
59
- }, [key, storage])
60
- ];
61
- };
62
- const useSessionStorageState = (key, initializeValue) => {
63
- return useStoredState(sessionStateStorage, key, initializeValue);
64
- };
65
- const useLocalStorageState = (key, initializeValue) => {
66
- return useStoredState(localStateStorage, key, initializeValue);
67
- };
68
- const getStateStorage = (storageOrName) => {
69
- if (Array.isArray(storageOrName)) {
70
- return createFallbackStorage(storageOrName.map((it) => typeof it === "string" ? builtInStorages[it] : it));
71
- }
72
- return typeof storageOrName === "string" ? builtInStorages[storageOrName] : storageOrName;
73
- };
74
- const createFallbackStorage = (storageTypes) => {
75
- return {
76
- getItem(key) {
77
- for (const storage of storageTypes) {
78
- const value = storage.getItem(key);
79
- if (value !== null) {
80
- return value;
81
- }
82
- }
83
- return null;
84
- },
85
- setItem(key, value) {
86
- for (const storage of storageTypes) {
87
- storage.setItem(key, value);
88
- }
89
- }
90
- };
91
- };
92
- exports.getStateStorage = getStateStorage;
93
- exports.localStateStorage = localStateStorage;
94
- exports.nullStorage = nullStorage;
95
- exports.sessionStateStorage = sessionStateStorage;
96
- exports.urlStateStorage = urlStateStorage;
97
- exports.useLocalStorageState = useLocalStorageState;
98
- exports.useSessionStorageState = useSessionStorageState;
99
- exports.useStoredState = useStoredState;
100
- //# sourceMappingURL=useStoredState.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useStoredState.cjs","sources":["../../../../../packages/react-utils/src/hooks/useStoredState.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport { Serializable } from '../types'\n\nexport type SetState<V extends Serializable> = (value: V | ((current: V) => V)) => void\nexport type StateStorageKey = [uniquePrefix: string, key: string]\n\nexport type ValueInitializer<V extends Serializable> = (storedValue: V | undefined) => V\n\nexport interface StateStorage {\n\tgetItem(key: StateStorageKey): Serializable\n\n\tsetItem(key: StateStorageKey, value: Serializable): void\n}\n\n\nexport const urlStateStorage: StateStorage = {\n\tgetItem(key) {\n\t\tconst searchParams = new URLSearchParams(window.location.search)\n\t\tconst value = searchParams.get(key[1])\n\t\treturn value !== null && value !== undefined ? JSON.parse(value) : null\n\t},\n\tsetItem(key, value) {\n\t\tconst searchParams = new URLSearchParams(window.location.search)\n\t\tsearchParams.set(key[1], JSON.stringify(value))\n\t\tconst newUrl = `${window.location.pathname}?${searchParams.toString()}`\n\t\twindow.history.replaceState({}, '', newUrl)\n\t},\n}\n\nconst createStateStorageFromNativeStorage = (getStorage: () => Storage): StateStorage => {\n\treturn {\n\t\tgetItem(key) {\n\t\t\tconst value = getStorage().getItem(key.join('-'))\n\t\t\treturn value !== null ? JSON.parse(value) : null\n\t\t},\n\t\tsetItem(key, value) {\n\t\t\tgetStorage().setItem(key.join('-'), JSON.stringify(value))\n\t\t},\n\t}\n}\n\nexport const sessionStateStorage = createStateStorageFromNativeStorage(() => sessionStorage)\nexport const localStateStorage = createStateStorageFromNativeStorage(() => localStorage)\nexport const nullStorage: StateStorage = {\n\tgetItem() {\n\t\treturn null\n\t},\n\tsetItem() {\n\t},\n}\n\nconst builtInStorages = {\n\turl: urlStateStorage,\n\tsession: sessionStateStorage,\n\tlocal: localStateStorage,\n\tnull: nullStorage,\n}\n\nexport type StateStorageOrName = StateStorage | 'url' | 'session' | 'local' | 'null'\n\nexport const useStoredState = <V extends Serializable>(storageOrName: StateStorageOrName | StateStorageOrName[], key: StateStorageKey, initializeValue: ValueInitializer<V>): [V, SetState<V>] => {\n\tconst storage = useMemo(() => {\n\t\treturn getStateStorage(storageOrName)\n\t}, [storageOrName])\n\n\tconst [value, setValue] = useState<V>(() => {\n\t\tconst value = storage.getItem(key)\n\t\treturn initializeValue(value as V)\n\t})\n\treturn [\n\t\tvalue,\n\t\tuseCallback(value => {\n\t\t\tsetValue(current => {\n\t\t\t\tconst newValue = typeof value === 'function' ? (value as (current: V) => V)(current) : value\n\t\t\t\tstorage.setItem(key, newValue)\n\t\t\t\treturn newValue\n\t\t\t})\n\t\t}, [key, storage]),\n\t]\n}\n\nexport const useSessionStorageState = <V extends Serializable>(key: StateStorageKey, initializeValue: ValueInitializer<V>): [V, SetState<V>] => {\n\treturn useStoredState<V>(sessionStateStorage, key, initializeValue)\n}\n\nexport const useLocalStorageState = <V extends Serializable>(key: StateStorageKey, initializeValue: ValueInitializer<V>): [V, SetState<V>] => {\n\treturn useStoredState<V>(localStateStorage, key, initializeValue)\n}\n\nexport const getStateStorage = (storageOrName: StateStorageOrName | StateStorageOrName[]) => {\n\tif (Array.isArray(storageOrName)) {\n\t\treturn createFallbackStorage(storageOrName.map(it => typeof it === 'string' ? builtInStorages[it] : it))\n\t}\n\treturn typeof storageOrName === 'string' ? builtInStorages[storageOrName] : storageOrName\n}\n\n\nconst createFallbackStorage = (storageTypes: StateStorage[]): StateStorage => {\n\treturn {\n\t\tgetItem(key) {\n\t\t\tfor (const storage of storageTypes) {\n\t\t\t\tconst value = storage.getItem(key)\n\t\t\t\tif (value !== null) {\n\t\t\t\t\treturn value\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\t\tsetItem(key, value) {\n\t\t\tfor (const storage of storageTypes) {\n\t\t\t\tstorage.setItem(key, value)\n\t\t\t}\n\t\t},\n\t}\n}\n"],"names":["useMemo","useState","value","useCallback"],"mappings":"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"}
@@ -1,100 +0,0 @@
1
- import { useMemo, useState, useCallback } from "react";
2
- const urlStateStorage = {
3
- getItem(key) {
4
- const searchParams = new URLSearchParams(window.location.search);
5
- const value = searchParams.get(key[1]);
6
- return value !== null && value !== void 0 ? JSON.parse(value) : null;
7
- },
8
- setItem(key, value) {
9
- const searchParams = new URLSearchParams(window.location.search);
10
- searchParams.set(key[1], JSON.stringify(value));
11
- const newUrl = `${window.location.pathname}?${searchParams.toString()}`;
12
- window.history.replaceState({}, "", newUrl);
13
- }
14
- };
15
- const createStateStorageFromNativeStorage = (getStorage) => {
16
- return {
17
- getItem(key) {
18
- const value = getStorage().getItem(key.join("-"));
19
- return value !== null ? JSON.parse(value) : null;
20
- },
21
- setItem(key, value) {
22
- getStorage().setItem(key.join("-"), JSON.stringify(value));
23
- }
24
- };
25
- };
26
- const sessionStateStorage = createStateStorageFromNativeStorage(() => sessionStorage);
27
- const localStateStorage = createStateStorageFromNativeStorage(() => localStorage);
28
- const nullStorage = {
29
- getItem() {
30
- return null;
31
- },
32
- setItem() {
33
- }
34
- };
35
- const builtInStorages = {
36
- url: urlStateStorage,
37
- session: sessionStateStorage,
38
- local: localStateStorage,
39
- null: nullStorage
40
- };
41
- const useStoredState = (storageOrName, key, initializeValue) => {
42
- const storage = useMemo(() => {
43
- return getStateStorage(storageOrName);
44
- }, [storageOrName]);
45
- const [value, setValue] = useState(() => {
46
- const value2 = storage.getItem(key);
47
- return initializeValue(value2);
48
- });
49
- return [
50
- value,
51
- useCallback((value2) => {
52
- setValue((current) => {
53
- const newValue = typeof value2 === "function" ? value2(current) : value2;
54
- storage.setItem(key, newValue);
55
- return newValue;
56
- });
57
- }, [key, storage])
58
- ];
59
- };
60
- const useSessionStorageState = (key, initializeValue) => {
61
- return useStoredState(sessionStateStorage, key, initializeValue);
62
- };
63
- const useLocalStorageState = (key, initializeValue) => {
64
- return useStoredState(localStateStorage, key, initializeValue);
65
- };
66
- const getStateStorage = (storageOrName) => {
67
- if (Array.isArray(storageOrName)) {
68
- return createFallbackStorage(storageOrName.map((it) => typeof it === "string" ? builtInStorages[it] : it));
69
- }
70
- return typeof storageOrName === "string" ? builtInStorages[storageOrName] : storageOrName;
71
- };
72
- const createFallbackStorage = (storageTypes) => {
73
- return {
74
- getItem(key) {
75
- for (const storage of storageTypes) {
76
- const value = storage.getItem(key);
77
- if (value !== null) {
78
- return value;
79
- }
80
- }
81
- return null;
82
- },
83
- setItem(key, value) {
84
- for (const storage of storageTypes) {
85
- storage.setItem(key, value);
86
- }
87
- }
88
- };
89
- };
90
- export {
91
- getStateStorage,
92
- localStateStorage,
93
- nullStorage,
94
- sessionStateStorage,
95
- urlStateStorage,
96
- useLocalStorageState,
97
- useSessionStorageState,
98
- useStoredState
99
- };
100
- //# sourceMappingURL=useStoredState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useStoredState.js","sources":["../../../../../packages/react-utils/src/hooks/useStoredState.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport { Serializable } from '../types'\n\nexport type SetState<V extends Serializable> = (value: V | ((current: V) => V)) => void\nexport type StateStorageKey = [uniquePrefix: string, key: string]\n\nexport type ValueInitializer<V extends Serializable> = (storedValue: V | undefined) => V\n\nexport interface StateStorage {\n\tgetItem(key: StateStorageKey): Serializable\n\n\tsetItem(key: StateStorageKey, value: Serializable): void\n}\n\n\nexport const urlStateStorage: StateStorage = {\n\tgetItem(key) {\n\t\tconst searchParams = new URLSearchParams(window.location.search)\n\t\tconst value = searchParams.get(key[1])\n\t\treturn value !== null && value !== undefined ? JSON.parse(value) : null\n\t},\n\tsetItem(key, value) {\n\t\tconst searchParams = new URLSearchParams(window.location.search)\n\t\tsearchParams.set(key[1], JSON.stringify(value))\n\t\tconst newUrl = `${window.location.pathname}?${searchParams.toString()}`\n\t\twindow.history.replaceState({}, '', newUrl)\n\t},\n}\n\nconst createStateStorageFromNativeStorage = (getStorage: () => Storage): StateStorage => {\n\treturn {\n\t\tgetItem(key) {\n\t\t\tconst value = getStorage().getItem(key.join('-'))\n\t\t\treturn value !== null ? JSON.parse(value) : null\n\t\t},\n\t\tsetItem(key, value) {\n\t\t\tgetStorage().setItem(key.join('-'), JSON.stringify(value))\n\t\t},\n\t}\n}\n\nexport const sessionStateStorage = createStateStorageFromNativeStorage(() => sessionStorage)\nexport const localStateStorage = createStateStorageFromNativeStorage(() => localStorage)\nexport const nullStorage: StateStorage = {\n\tgetItem() {\n\t\treturn null\n\t},\n\tsetItem() {\n\t},\n}\n\nconst builtInStorages = {\n\turl: urlStateStorage,\n\tsession: sessionStateStorage,\n\tlocal: localStateStorage,\n\tnull: nullStorage,\n}\n\nexport type StateStorageOrName = StateStorage | 'url' | 'session' | 'local' | 'null'\n\nexport const useStoredState = <V extends Serializable>(storageOrName: StateStorageOrName | StateStorageOrName[], key: StateStorageKey, initializeValue: ValueInitializer<V>): [V, SetState<V>] => {\n\tconst storage = useMemo(() => {\n\t\treturn getStateStorage(storageOrName)\n\t}, [storageOrName])\n\n\tconst [value, setValue] = useState<V>(() => {\n\t\tconst value = storage.getItem(key)\n\t\treturn initializeValue(value as V)\n\t})\n\treturn [\n\t\tvalue,\n\t\tuseCallback(value => {\n\t\t\tsetValue(current => {\n\t\t\t\tconst newValue = typeof value === 'function' ? (value as (current: V) => V)(current) : value\n\t\t\t\tstorage.setItem(key, newValue)\n\t\t\t\treturn newValue\n\t\t\t})\n\t\t}, [key, storage]),\n\t]\n}\n\nexport const useSessionStorageState = <V extends Serializable>(key: StateStorageKey, initializeValue: ValueInitializer<V>): [V, SetState<V>] => {\n\treturn useStoredState<V>(sessionStateStorage, key, initializeValue)\n}\n\nexport const useLocalStorageState = <V extends Serializable>(key: StateStorageKey, initializeValue: ValueInitializer<V>): [V, SetState<V>] => {\n\treturn useStoredState<V>(localStateStorage, key, initializeValue)\n}\n\nexport const getStateStorage = (storageOrName: StateStorageOrName | StateStorageOrName[]) => {\n\tif (Array.isArray(storageOrName)) {\n\t\treturn createFallbackStorage(storageOrName.map(it => typeof it === 'string' ? builtInStorages[it] : it))\n\t}\n\treturn typeof storageOrName === 'string' ? builtInStorages[storageOrName] : storageOrName\n}\n\n\nconst createFallbackStorage = (storageTypes: StateStorage[]): StateStorage => {\n\treturn {\n\t\tgetItem(key) {\n\t\t\tfor (const storage of storageTypes) {\n\t\t\t\tconst value = storage.getItem(key)\n\t\t\t\tif (value !== null) {\n\t\t\t\t\treturn value\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\t\tsetItem(key, value) {\n\t\t\tfor (const storage of storageTypes) {\n\t\t\t\tstorage.setItem(key, value)\n\t\t\t}\n\t\t},\n\t}\n}\n"],"names":["value"],"mappings":"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"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- function useUpdatedRef(value) {
5
- const ref = React.useRef(value);
6
- ref.current = value;
7
- return ref;
8
- }
9
- exports.useUpdatedRef = useUpdatedRef;
10
- //# sourceMappingURL=useUpdatedRef.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUpdatedRef.cjs","sources":["../../../../../packages/react-utils/src/hooks/useUpdatedRef.ts"],"sourcesContent":["import { useRef } from 'react'\n\n/**\n * Returns a stable mutable object with value that is updated upon each call\n *\n * @param value - Value that could update after initial call\n * @returns Mutable ref object with updated value\n */\nexport function useUpdatedRef<T>(value: T) {\n\tconst ref = useRef(value)\n\tref.current = value\n\n\treturn ref\n}\n"],"names":["useRef"],"mappings":";;;AAQO,SAAS,cAAiB,OAAU;AACpC,QAAA,MAAMA,aAAO,KAAK;AACxB,MAAI,UAAU;AAEP,SAAA;AACR;;"}
@@ -1,10 +0,0 @@
1
- import { useRef } from "react";
2
- function useUpdatedRef(value) {
3
- const ref = useRef(value);
4
- ref.current = value;
5
- return ref;
6
- }
7
- export {
8
- useUpdatedRef
9
- };
10
- //# sourceMappingURL=useUpdatedRef.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUpdatedRef.js","sources":["../../../../../packages/react-utils/src/hooks/useUpdatedRef.ts"],"sourcesContent":["import { useRef } from 'react'\n\n/**\n * Returns a stable mutable object with value that is updated upon each call\n *\n * @param value - Value that could update after initial call\n * @returns Mutable ref object with updated value\n */\nexport function useUpdatedRef<T>(value: T) {\n\tconst ref = useRef(value)\n\tref.current = value\n\n\treturn ref\n}\n"],"names":[],"mappings":";AAQO,SAAS,cAAiB,OAAU;AACpC,QAAA,MAAM,OAAO,KAAK;AACxB,MAAI,UAAU;AAEP,SAAA;AACR;"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const useOnWindowResize = require("./useOnWindowResize.cjs");
5
- function useWindowSize() {
6
- const [width, setWidth] = React.useState(window.innerWidth);
7
- const [height, setHeight] = React.useState(window.innerHeight);
8
- useOnWindowResize.useOnWindowResize(() => {
9
- const { innerHeight, innerWidth } = window;
10
- if (innerHeight !== height) {
11
- setHeight(innerHeight);
12
- }
13
- if (innerWidth !== width) {
14
- setWidth(innerWidth);
15
- }
16
- });
17
- return React.useMemo(() => ({ height, width }), [height, width]);
18
- }
19
- exports.useWindowSize = useWindowSize;
20
- //# sourceMappingURL=useWindowSize.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWindowSize.cjs","sources":["../../../../../packages/react-utils/src/hooks/useWindowSize.ts"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useOnWindowResize } from './useOnWindowResize'\n\nexport function useWindowSize() {\n\tconst [width, setWidth] = useState(window.innerWidth)\n\tconst [height, setHeight] = useState(window.innerHeight)\n\n\tuseOnWindowResize(() => {\n\t\tconst { innerHeight, innerWidth } = window\n\t\tif (innerHeight !== height) {\n\t\t\tsetHeight(innerHeight)\n\t\t}\n\n\t\tif (innerWidth !== width) {\n\t\t\tsetWidth(innerWidth)\n\t\t}\n\t})\n\n\treturn useMemo(() => ({ height, width }), [height, width])\n}\n"],"names":["useState","useOnWindowResize","useMemo"],"mappings":";;;;AAGO,SAAS,gBAAgB;AAC/B,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAS,OAAO,UAAU;AACpD,QAAM,CAAC,QAAQ,SAAS,IAAIA,MAAAA,SAAS,OAAO,WAAW;AAEvDC,oBAAAA,kBAAkB,MAAM;AACjB,UAAA,EAAE,aAAa,WAAA,IAAe;AACpC,QAAI,gBAAgB,QAAQ;AAC3B,gBAAU,WAAW;AAAA,IAAA;AAGtB,QAAI,eAAe,OAAO;AACzB,eAAS,UAAU;AAAA,IAAA;AAAA,EACpB,CACA;AAEM,SAAAC,MAAA,QAAQ,OAAO,EAAE,QAAQ,MAAU,IAAA,CAAC,QAAQ,KAAK,CAAC;AAC1D;;"}
@@ -1,20 +0,0 @@
1
- import { useState, useMemo } from "react";
2
- import { useOnWindowResize } from "./useOnWindowResize.js";
3
- function useWindowSize() {
4
- const [width, setWidth] = useState(window.innerWidth);
5
- const [height, setHeight] = useState(window.innerHeight);
6
- useOnWindowResize(() => {
7
- const { innerHeight, innerWidth } = window;
8
- if (innerHeight !== height) {
9
- setHeight(innerHeight);
10
- }
11
- if (innerWidth !== width) {
12
- setWidth(innerWidth);
13
- }
14
- });
15
- return useMemo(() => ({ height, width }), [height, width]);
16
- }
17
- export {
18
- useWindowSize
19
- };
20
- //# sourceMappingURL=useWindowSize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWindowSize.js","sources":["../../../../../packages/react-utils/src/hooks/useWindowSize.ts"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useOnWindowResize } from './useOnWindowResize'\n\nexport function useWindowSize() {\n\tconst [width, setWidth] = useState(window.innerWidth)\n\tconst [height, setHeight] = useState(window.innerHeight)\n\n\tuseOnWindowResize(() => {\n\t\tconst { innerHeight, innerWidth } = window\n\t\tif (innerHeight !== height) {\n\t\t\tsetHeight(innerHeight)\n\t\t}\n\n\t\tif (innerWidth !== width) {\n\t\t\tsetWidth(innerWidth)\n\t\t}\n\t})\n\n\treturn useMemo(() => ({ height, width }), [height, width])\n}\n"],"names":[],"mappings":";;AAGO,SAAS,gBAAgB;AAC/B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,OAAO,UAAU;AACpD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,OAAO,WAAW;AAEvD,oBAAkB,MAAM;AACjB,UAAA,EAAE,aAAa,WAAA,IAAe;AACpC,QAAI,gBAAgB,QAAQ;AAC3B,gBAAU,WAAW;AAAA,IAAA;AAGtB,QAAI,eAAe,OAAO;AACzB,eAAS,UAAU;AAAA,IAAA;AAAA,EACpB,CACA;AAEM,SAAA,QAAQ,OAAO,EAAE,QAAQ,MAAU,IAAA,CAAC,QAAQ,KAAK,CAAC;AAC1D;"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const emptyArray = Object.freeze([]);
4
- exports.emptyArray = emptyArray;
5
- //# sourceMappingURL=emptyArray.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emptyArray.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyArray.ts"],"sourcesContent":["export const emptyArray = Object.freeze<any>([]) as any[]\n"],"names":[],"mappings":";;AAAO,MAAM,aAAa,OAAO,OAAY,CAAE,CAAA;;"}
@@ -1,5 +0,0 @@
1
- const emptyArray = Object.freeze([]);
2
- export {
3
- emptyArray
4
- };
5
- //# sourceMappingURL=emptyArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emptyArray.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyArray.ts"],"sourcesContent":["export const emptyArray = Object.freeze<any>([]) as any[]\n"],"names":[],"mappings":"AAAO,MAAM,aAAa,OAAO,OAAY,CAAE,CAAA;"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const emptyObject = Object.freeze({});
4
- exports.emptyObject = emptyObject;
5
- //# sourceMappingURL=emptyObject.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emptyObject.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyObject.ts"],"sourcesContent":["export const emptyObject = Object.freeze({})\n"],"names":[],"mappings":";;AAAO,MAAM,cAAc,OAAO,OAAO,CAAE,CAAA;;"}
@@ -1,5 +0,0 @@
1
- const emptyObject = Object.freeze({});
2
- export {
3
- emptyObject
4
- };
5
- //# sourceMappingURL=emptyObject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emptyObject.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/emptyObject.ts"],"sourcesContent":["export const emptyObject = Object.freeze({})\n"],"names":[],"mappings":"AAAO,MAAM,cAAc,OAAO,OAAO,CAAE,CAAA;"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const identityFunction = (value) => value;
4
- exports.identityFunction = identityFunction;
5
- //# sourceMappingURL=identityFunction.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identityFunction.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/identityFunction.ts"],"sourcesContent":["export const identityFunction = <Value>(value: Value) => value\n"],"names":[],"mappings":";;AAAa,MAAA,mBAAmB,CAAQ,UAAiB;;"}
@@ -1,5 +0,0 @@
1
- const identityFunction = (value) => value;
2
- export {
3
- identityFunction
4
- };
5
- //# sourceMappingURL=identityFunction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identityFunction.js","sources":["../../../../../packages/react-utils/src/referentiallyStable/identityFunction.ts"],"sourcesContent":["export const identityFunction = <Value>(value: Value) => value\n"],"names":[],"mappings":"AAAa,MAAA,mBAAmB,CAAQ,UAAiB;"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const noop = () => void 0;
4
- exports.noop = noop;
5
- //# sourceMappingURL=noop.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"noop.cjs","sources":["../../../../../packages/react-utils/src/referentiallyStable/noop.ts"],"sourcesContent":["export const noop = () => undefined\n"],"names":[],"mappings":";;AAAO,MAAM,OAAO,MAAM;;"}