Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solid-primitives/resize-observer

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/resize-observer - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

25

dist/index.js

@@ -0,11 +1,7 @@

import { onCleanup, $PROXY, createEffect, on, onMount, $TRACK } from 'solid-js';
import { asArray, handleDiffArray, createStaticStore, access } from '@solid-primitives/utils';
import { createSharedRoot } from '@solid-primitives/rootless';
import { makeEventListener } from '@solid-primitives/event-listener';
// src/index.ts
import { createEffect, onCleanup, on, $PROXY, $TRACK, onMount } from "solid-js";
import {
asArray,
handleDiffArray,
createStaticStore,
access
} from "@solid-primitives/utils";
import { createSharedRoot } from "@solid-primitives/rootless";
import { makeEventListener } from "@solid-primitives/event-listener";
function makeResizeObserver(callback, options) {

@@ -80,10 +76,3 @@ const resizeObserver = new ResizeObserver(callback);

}
export {
createElementSize,
createResizeObserver,
createWindowSize,
getElementSize,
getWindowSize,
makeResizeObserver,
useWindowSize
};
export { createElementSize, createResizeObserver, createWindowSize, getElementSize, getWindowSize, makeResizeObserver, useWindowSize };

@@ -1,30 +0,41 @@

// src/server.ts
import { noop } from "@solid-primitives/utils";
var makeResizeObserver = () => ({
observe: noop,
unobserve: noop
});
var createResizeObserver = noop;
var getWindowSize = () => ({
height: 0,
width: 0
});
var createWindowSize = getWindowSize;
var useWindowSize = getWindowSize;
var getElementSize = () => ({
height: 0,
width: 0
});
var createElementSize = () => ({
height: 0,
width: 0
});
export {
createElementSize,
createResizeObserver,
createWindowSize,
getElementSize,
getWindowSize,
makeResizeObserver,
useWindowSize
};
import 'solid-js';
import '@solid-primitives/utils';
import { createSharedRoot } from '@solid-primitives/rootless';
import '@solid-primitives/event-listener';
// src/index.ts
function makeResizeObserver(callback, options) {
{
return {
observe: () => {
},
unobserve: () => {
}
};
}
}
function createResizeObserver(targets, onResize, options) {
return;
}
function getWindowSize() {
return { width: 0, height: 0 };
}
function createWindowSize() {
{
return getWindowSize();
}
}
var useWindowSize = /* @__PURE__ */ createSharedRoot(createWindowSize);
function getElementSize(target) {
return {
width: null,
height: null
};
}
function createElementSize(target) {
{
return { width: null, height: null };
}
}
export { createElementSize, createResizeObserver, createWindowSize, getElementSize, getWindowSize, makeResizeObserver, useWindowSize };
{
"name": "@solid-primitives/resize-observer",
"version": "2.0.4",
"version": "2.0.5",
"description": "Reactive primitives for observing resizing of HTML elements.",

@@ -32,5 +32,21 @@ "author": "Moshe Udimar",

"main": "./dist/server.cjs",
"module": "./dist/index.js",
"module": "./dist/server.js",
"types": "./dist/index.d.ts",
"browser": {
"./dist/server.cjs": "./dist/index.cjs",
"./dist/server.js": "./dist/index.js"
},
"exports": {
"worker": {
"import": "./dist/server.js",
"require": "./dist/server.cjs"
},
"browser": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"deno": {
"import": "./dist/server.js",
"require": "./dist/server.cjs"
},
"node": {

@@ -49,31 +65,19 @@ "import": "./dist/server.js",

],
"dependencies": {
"@solid-primitives/event-listener": "^2.2.3",
"@solid-primitives/rootless": "^1.2.0",
"@solid-primitives/utils": "^3.1.0"
},
"devDependencies": {
"jsdom": "^20.0.0",
"prettier": "^2.7.1",
"solid-js": "^1.5.1",
"solid-register": "^0.2.5",
"tslib": "^2.4.0",
"tsup": "^6.2.2",
"typescript": "^4.7.4",
"unocss": "^0.44.7",
"uvu": "^0.5.6",
"vite": "^3.0.7",
"vite-plugin-solid": "^2.3.0",
"watchlist": "^0.3.1"
"solid-js": "^1.5.0"
},
"dependencies": {
"@solid-primitives/event-listener": "^2.2.2",
"@solid-primitives/rootless": "^1.1.3",
"@solid-primitives/utils": "^3.0.2"
},
"peerDependencies": {
"solid-js": "^1.4.0"
"solid-js": "^1.5.0"
},
"scripts": {
"start": "vite serve dev --host",
"dev": "npm run start",
"build": "tsup",
"test": "uvu -r solid-register",
"test:watch": "watchlist src test -- npm test"
"dev": "vite serve dev",
"build": "jiti ../../scripts/build.ts --ssr",
"test": "vitest -c ../../configs/vitest.config.ts",
"test:ssr": "pnpm run test --mode ssr"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc