@tanstack/react-store
Advanced tools
Comparing version 0.0.1-beta.84 to 0.0.1-beta.85
@@ -14,7 +14,7 @@ { | ||
"name": "store/build/esm/index.js", | ||
"uid": "5b7b-10" | ||
"uid": "cbf4-6" | ||
}, | ||
{ | ||
"name": "react-store/src/index.tsx", | ||
"uid": "5b7b-12" | ||
"uid": "cbf4-8" | ||
} | ||
@@ -29,20 +29,20 @@ ] | ||
"nodeParts": { | ||
"5b7b-10": { | ||
"renderedLength": 1288, | ||
"gzipLength": 497, | ||
"cbf4-6": { | ||
"renderedLength": 1326, | ||
"gzipLength": 498, | ||
"brotliLength": 0, | ||
"mainUid": "5b7b-9" | ||
"mainUid": "cbf4-5" | ||
}, | ||
"5b7b-12": { | ||
"cbf4-8": { | ||
"renderedLength": 754, | ||
"gzipLength": 343, | ||
"brotliLength": 0, | ||
"mainUid": "5b7b-11" | ||
"mainUid": "cbf4-7" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"5b7b-9": { | ||
"cbf4-5": { | ||
"id": "/packages/store/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "5b7b-10" | ||
"index.production.js": "cbf4-6" | ||
}, | ||
@@ -52,17 +52,17 @@ "imported": [], | ||
{ | ||
"uid": "5b7b-11" | ||
"uid": "cbf4-7" | ||
} | ||
] | ||
}, | ||
"5b7b-11": { | ||
"cbf4-7": { | ||
"id": "/packages/react-store/src/index.tsx", | ||
"moduleParts": { | ||
"index.production.js": "5b7b-12" | ||
"index.production.js": "cbf4-8" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "5b7b-13" | ||
"uid": "cbf4-9" | ||
}, | ||
{ | ||
"uid": "5b7b-9" | ||
"uid": "cbf4-5" | ||
} | ||
@@ -73,3 +73,3 @@ ], | ||
}, | ||
"5b7b-13": { | ||
"cbf4-9": { | ||
"id": "use-sync-external-store/shim/with-selector", | ||
@@ -80,3 +80,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "5b7b-11" | ||
"uid": "cbf4-7" | ||
} | ||
@@ -83,0 +83,0 @@ ], |
@@ -59,2 +59,3 @@ /** | ||
batch = cb => { | ||
if (this.batching) return cb(); | ||
this.batching = true; | ||
@@ -61,0 +62,0 @@ cb(); |
@@ -21,3 +21,3 @@ /** | ||
* @license MIT | ||
*/function s(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!1;for(let i=0;i<s.length;i++)if(!Object.prototype.hasOwnProperty.call(e,s[i])||!Object.is(t[s[i]],e[s[i]]))return!1;return!0}t.Store=class{listeners=new Set;batching=!1;queue=[];constructor(t,e){this.state=t,this.options=e}subscribe=t=>{this.listeners.add(t);const e=this.options?.onSubscribe?.(t,this);return()=>{this.listeners.delete(t),e?.()}};setState=t=>{const e=this.state;this.state=this.options?.updateFn?this.options.updateFn(e)(t):t(e),this.state!==e&&(this.options?.onUpdate?.(this.state,e),this.queue.push((()=>{this.listeners.forEach((t=>t(this.state,e)))})),this.#t())};#t=()=>{this.batching||(this.queue.forEach((t=>t())),this.queue=[])};batch=t=>{this.batching=!0,t(),this.batching=!1,this.#t()}},t.shallow=s,t.useStore=function(t,i=(t=>t)){return e.useSyncExternalStoreWithSelector(t.subscribe,(()=>t.state),(()=>t.state),i,s)},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
*/function s(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!1;for(let i=0;i<s.length;i++)if(!Object.prototype.hasOwnProperty.call(e,s[i])||!Object.is(t[s[i]],e[s[i]]))return!1;return!0}t.Store=class{listeners=new Set;batching=!1;queue=[];constructor(t,e){this.state=t,this.options=e}subscribe=t=>{this.listeners.add(t);const e=this.options?.onSubscribe?.(t,this);return()=>{this.listeners.delete(t),e?.()}};setState=t=>{const e=this.state;this.state=this.options?.updateFn?this.options.updateFn(e)(t):t(e),this.state!==e&&(this.options?.onUpdate?.(this.state,e),this.queue.push((()=>{this.listeners.forEach((t=>t(this.state,e)))})),this.#t())};#t=()=>{this.batching||(this.queue.forEach((t=>t())),this.queue=[])};batch=t=>{if(this.batching)return t();this.batching=!0,t(),this.batching=!1,this.#t()}},t.shallow=s,t.useStore=function(t,i=(t=>t)){return e.useSyncExternalStoreWithSelector(t.subscribe,(()=>t.state),(()=>t.state),i,s)},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/react-store", | ||
"author": "Tanner Linsley", | ||
"version": "0.0.1-beta.84", | ||
"version": "0.0.1-beta.85", | ||
"license": "MIT", | ||
@@ -39,7 +39,10 @@ "repository": "tanstack/react-store", | ||
"use-sync-external-store": "^1.2.0", | ||
"@tanstack/store": "0.0.1-beta.84" | ||
"@tanstack/store": "0.0.1-beta.85" | ||
}, | ||
"devDependencies": { | ||
"@types/use-sync-external-store": "^0.0.3" | ||
}, | ||
"scripts": { | ||
"build": "rollup --config rollup.config.js" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164239
352
+ Added@tanstack/store@0.0.1-beta.85(transitive)
- Removed@tanstack/store@0.0.1-beta.84(transitive)