New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opensea/react-media

Package Overview
Dependencies
Maintainers
9
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opensea/react-media - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

8

dist/index.modern.js

@@ -1,2 +0,2 @@

import { useReducer, useEffect, useState } from 'react';
import React$1, { useReducer, useEffect, useState } from 'react';
import { useContextSelector, createContext } from 'use-context-selector';

@@ -87,5 +87,5 @@ import throttle from 'lodash.throttle';

if (typeof children === 'function') {
return h(Fragment, null, children(mediaClassName));
return /*#__PURE__*/React$1.createElement(Fragment, null, children(mediaClassName));
} else {
return h("div", {
return /*#__PURE__*/React$1.createElement("div", {
className: mediaClassName

@@ -136,3 +136,3 @@ }, children);

const windowSize = useWindowSize(initialWindowSize);
return h(SizeContext.Provider, {
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
value: windowSize

@@ -139,0 +139,0 @@ }, children);

@@ -1,2 +0,2 @@

import { useReducer, useEffect, useState } from 'react';
import React$1, { useReducer, useEffect, useState } from 'react';
import { useContextSelector, createContext } from 'use-context-selector';

@@ -93,5 +93,5 @@ import throttle from 'lodash.throttle';

if (typeof children === 'function') {
return h(Fragment, null, children(mediaClassName));
return /*#__PURE__*/React$1.createElement(Fragment, null, children(mediaClassName));
} else {
return h("div", {
return /*#__PURE__*/React$1.createElement("div", {
className: mediaClassName

@@ -147,3 +147,3 @@ }, children);

var windowSize = useWindowSize(initialWindowSize);
return h(SizeContext.Provider, {
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
value: windowSize

@@ -150,0 +150,0 @@ }, children);

@@ -5,5 +5,6 @@ (function (global, factory) {

(global = global || self, factory(global.reactMedia = {}, global.react, global.useContextSelector, global.throttle));
})(this, (function (exports, react, useContextSelector, throttle) {
})(this, (function (exports, React$1, useContextSelector, throttle) {
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
var throttle__default = /*#__PURE__*/_interopDefaultLegacy(throttle);

@@ -13,7 +14,7 @@

var useIsHydrated = function useIsHydrated() {
var _useReducer = react.useReducer(function (x) {
var _useReducer = React$1.useReducer(function (x) {
return x + 1;
}, 0),
forceUpdate = _useReducer[1];
react.useEffect(function () {
React$1.useEffect(function () {
if (!isHydrated) {

@@ -100,5 +101,5 @@ isHydrated = true;

if (typeof children === 'function') {
return h(Fragment, null, children(mediaClassName));
return /*#__PURE__*/React__default["default"].createElement(Fragment, null, children(mediaClassName));
} else {
return h("div", {
return /*#__PURE__*/React__default["default"].createElement("div", {
className: mediaClassName

@@ -118,6 +119,6 @@ }, children);

}
var _useState = react.useState(initialWindowSize),
var _useState = React$1.useState(initialWindowSize),
windowSize = _useState[0],
setWindowSize = _useState[1];
react.useEffect(function () {
React$1.useEffect(function () {
var handleResize = function handleResize() {

@@ -155,3 +156,3 @@ setWindowSize({

var windowSize = useWindowSize(initialWindowSize);
return h(SizeContext.Provider, {
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
value: windowSize

@@ -158,0 +159,0 @@ }, children);

{
"name": "@opensea/react-media",
"version": "1.0.2",
"version": "1.0.3",
"description": "Javascript library to deal with media queries in isomorphic React applications.",

@@ -19,3 +19,3 @@ "license": "MIT",

"scripts": {
"build": "microbundle --no-compress --sourcemap false",
"build": "microbundle --no-compress --sourcemap false --jsx 'React.createElement'",
"check-types": "tsc --noEmit",

@@ -22,0 +22,0 @@ "lint": "concurrently \"npm run check-types\" \"npm run prettier:check\" \"npm run prettier:package.json:check\"",

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