seitu 0.10.2 → 0.10.3
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.
- package/dist/react/hooks.d.ts +2 -2
- package/dist/utils.js +9 -0
- package/package.json +1 -1
package/dist/react/hooks.d.ts
CHANGED
|
@@ -79,12 +79,12 @@ export interface UseSubscriptionOptions<S extends Subscribable<any> & Readable<a
|
|
|
79
79
|
* 'use client'
|
|
80
80
|
*
|
|
81
81
|
* import * as React from 'react'
|
|
82
|
-
* import {
|
|
82
|
+
* import { createScrollState } from 'seitu/web'
|
|
83
83
|
* import { useSubscription } from 'seitu/react'
|
|
84
84
|
*
|
|
85
85
|
* export default function Page() {
|
|
86
86
|
* const ref = React.useRef<HTMLDivElement>(null)
|
|
87
|
-
* const state = useSubscription(() =>
|
|
87
|
+
* const state = useSubscription(() => createScrollState({ element: () => ref.current, direction: 'vertical' }))
|
|
88
88
|
*
|
|
89
89
|
* return (
|
|
90
90
|
* <div ref={ref}>
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/validation.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return {
|
|
4
|
+
...e.defaultValue,
|
|
5
|
+
...typeof e.value == "object" && e.value !== null ? Object.fromEntries(Object.entries(e.value).filter(([t]) => t in e.defaultValue)) : {}
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as repairWebStorageValueObjectWithDefault };
|