@wix/bex-core 2.145.0 → 2.146.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_mobx","useSyncProps","props","annotations","syncedProps","useState","makeObservable","deep","useEffect","runInAction","Object","assign"],"sources":["../../../src/hooks/useSyncProps.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { makeObservable, runInAction } from 'mobx';\nimport { type AnnotationsMap } from 'mobx/dist/internal';\n\ntype NoInfer<T> = [T][T extends any ? 0 : never];\n\nexport function useSyncProps<\n P extends object,\n AdditionalKeys extends PropertyKey = never,\n>(props: P, annotations?: AnnotationsMap<P, NoInfer<AdditionalKeys>>) {\n const [syncedProps] = useState(() =>\n makeObservable(props, annotations, {\n deep: false,\n }),\n );\n\n // sync all props using Object.assign on every render (as not passing deps to useEffect)\n useEffect(() => {\n runInAction(() => {\n Object.assign(syncedProps, props);\n });\n });\n\n return syncedProps;\n}"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKO,SAASE,YAAYA,CAG1BC,KAAQ,EAAEC,WAAwD,EAAE;EACpE,MAAM,CAACC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAC7B,IAAAC,oBAAc,EAACJ,KAAK,EAAEC,WAAW,EAAE;IACjCI,IAAI,EAAE;EACR,CAAC,CACH,CAAC;;EAED;EACA,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAAC,iBAAW,EAAC,MAAM;MAChBC,MAAM,CAACC,MAAM,CAACP,WAAW,EAAEF,KAAK,CAAC;IACnC,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOE,WAAW;AACpB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","require","_mobx","useSyncProps","props","annotations","syncedProps","useState","makeObservable","deep","useEffect","runInAction","Object","assign"],"sources":["../../../src/hooks/useSyncProps.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { makeObservable, runInAction } from 'mobx';\nimport { type AnnotationsMap } from 'mobx/dist/internal';\n\ntype NoInfer<T> = [T][T extends any ? 0 : never];\n\nexport function useSyncProps<\n P extends object,\n AdditionalKeys extends PropertyKey = never,\n>(props: P, annotations?: AnnotationsMap<P, NoInfer<AdditionalKeys>>) {\n const [syncedProps] = useState(() =>\n makeObservable(props, annotations, {\n deep: false,\n }),\n );\n\n // sync all props using Object.assign on every render (as not passing deps to useEffect)\n useEffect(() => {\n runInAction(() => {\n Object.assign(syncedProps, props);\n });\n });\n\n return syncedProps;\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKO,SAASE,YAAYA,CAG1BC,KAAQ,EAAEC,WAAwD,EAAE;EACpE,MAAM,CAACC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAC7B,IAAAC,oBAAc,EAACJ,KAAK,EAAEC,WAAW,EAAE;IACjCI,IAAI,EAAE;EACR,CAAC,CACH,CAAC;;EAED;EACA,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAAC,iBAAW,EAAC,MAAM;MAChBC,MAAM,CAACC,MAAM,CAACP,WAAW,EAAEF,KAAK,CAAC;IACnC,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOE,WAAW;AACpB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/bex-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.146.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kobi",
|
|
@@ -161,5 +161,5 @@
|
|
|
161
161
|
"wallaby": {
|
|
162
162
|
"autoDetect": true
|
|
163
163
|
},
|
|
164
|
-
"falconPackageHash": "
|
|
164
|
+
"falconPackageHash": "0d25b3c570b8512cbd0ef3ccb563ea71be815168ac76f040f15151c5"
|
|
165
165
|
}
|