@solid-primitives/resize-observer
Advanced tools
Comparing version 2.0.26 to 2.0.27
@@ -21,4 +21,3 @@ import { makeEventListener } from '@solid-primitives/event-listener'; | ||
function createResizeObserver(targets, onResize, options) { | ||
if (isServer) | ||
return; | ||
if (isServer) return; | ||
const previousMap = /* @__PURE__ */ new WeakMap(), { observe, unobserve } = makeResizeObserver((entries) => { | ||
@@ -41,4 +40,3 @@ for (const entry of entries) { | ||
function getWindowSize() { | ||
if (isServer) | ||
return { ...WINDOW_SIZE_FALLBACK }; | ||
if (isServer) return { ...WINDOW_SIZE_FALLBACK }; | ||
return { | ||
@@ -45,0 +43,0 @@ width: window.innerWidth, |
{ | ||
"name": "@solid-primitives/resize-observer", | ||
"version": "2.0.26", | ||
"version": "2.0.27", | ||
"description": "Reactive primitives for observing resizing of HTML elements.", | ||
@@ -36,2 +36,3 @@ "author": "Moshe Udimar", | ||
"exports": { | ||
"@solid-primitives/source": "./src/index.ts", | ||
"import": { | ||
@@ -55,3 +56,3 @@ "types": "./dist/index.d.ts", | ||
"@solid-primitives/rootless": "^1.4.5", | ||
"@solid-primitives/static-store": "^0.0.8", | ||
"@solid-primitives/static-store": "^0.0.9", | ||
"@solid-primitives/utils": "^6.2.3" | ||
@@ -58,0 +59,0 @@ }, |
@@ -14,6 +14,6 @@ <p> | ||
- [`makeResizeObserver`](#makeResizeObserver) — Instantiate a new ResizeObserver that automatically get's disposed on cleanup. | ||
- [`createResizeObserver`](#createResizeObserver) — Create resize observer instance, listening for changes to size of reactive element targets array. | ||
- [`createWindowSize`](#createWindowSize) — Creates a reactive store-like object of current width and height dimensions of the browser window. | ||
- [`createElementSize`](#createElementSize) — Creates a reactive store-like object of current width and height dimensions of html element. | ||
- [`makeResizeObserver`](#makeresizeobserver) — Instantiate a new ResizeObserver that automatically get's disposed on cleanup. | ||
- [`createResizeObserver`](#createresizeobserver) — Create resize observer instance, listening for changes to size of reactive element targets array. | ||
- [`createWindowSize`](#createwindowsize) — Creates a reactive store-like object of current width and height dimensions of the browser window. | ||
- [`createElementSize`](#createelementsize) — Creates a reactive store-like object of current width and height dimensions of html element. | ||
@@ -20,0 +20,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
22641
266
+ Added@solid-primitives/static-store@0.0.9(transitive)
- Removed@solid-primitives/static-store@0.0.8(transitive)