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

@faceless-ui/window-info

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@faceless-ui/window-info - npm Package Compare versions

Comparing version 2.0.4 to 2.1.0

dist/WindowInfoProvider/context.d.ts

2

dist/index.d.ts
export { default as useWindowInfo } from './useWindowInfo';
export { default as WindowInfo } from './WindowInfo';
export { default as WindowInfoContext } from './WindowInfoContext';
export { default as WindowInfoContext } from './WindowInfoProvider/context';
export { default as WindowInfoProvider } from './WindowInfoProvider';
export { default as withWindowInfo } from './withWindowInfo';

@@ -11,4 +11,4 @@ "use strict";

Object.defineProperty(exports, "WindowInfo", { enumerable: true, get: function () { return __importDefault(WindowInfo_1).default; } });
var WindowInfoContext_1 = require("./WindowInfoContext");
Object.defineProperty(exports, "WindowInfoContext", { enumerable: true, get: function () { return __importDefault(WindowInfoContext_1).default; } });
var context_1 = require("./WindowInfoProvider/context");
Object.defineProperty(exports, "WindowInfoContext", { enumerable: true, get: function () { return __importDefault(context_1).default; } });
var WindowInfoProvider_1 = require("./WindowInfoProvider");

@@ -15,0 +15,0 @@ Object.defineProperty(exports, "WindowInfoProvider", { enumerable: true, get: function () { return __importDefault(WindowInfoProvider_1).default; } });

@@ -1,3 +0,3 @@

export declare type Breakpoints = {
[key: string]: string;
};
export { WindowInfoProviderProps, Breakpoints } from './WindowInfoProvider';
export { WindowInfoProps } from './WindowInfo';
export { IWindowInfoContext } from './WindowInfoProvider/context';

@@ -1,3 +0,3 @@

import { IWindowInfoContext } from '../WindowInfoContext';
import { IWindowInfoContext } from '../WindowInfoProvider/context';
declare const useWindowInfo: () => IWindowInfoContext;
export default useWindowInfo;

@@ -7,5 +7,5 @@ "use strict";

var react_1 = require("react");
var WindowInfoContext_1 = __importDefault(require("../WindowInfoContext"));
var useWindowInfo = function () { return (0, react_1.useContext)(WindowInfoContext_1.default); };
var context_1 = __importDefault(require("../WindowInfoProvider/context"));
var useWindowInfo = function () { return (0, react_1.useContext)(context_1.default); };
exports.default = useWindowInfo;
//# sourceMappingURL=index.js.map
import React from 'react';
import { IWindowInfoContext } from '../WindowInfoContext';
import { IWindowInfoContext } from '../WindowInfoProvider/context';
export declare type ChildFunction = (context: IWindowInfoContext) => React.ReactNode;
declare const WindowInfo: React.FC<{
export declare type WindowInfoProps = {
children?: React.ReactNode | ChildFunction;
}>;
};
declare const WindowInfo: React.FC<WindowInfoProps>;
export default WindowInfo;
import React from 'react';
import { Breakpoints } from '../types';
declare const WindowInfoProvider: React.FC<{
export declare type Breakpoints = {
[key: string]: string;
};
export declare type WindowInfoProviderProps = {
breakpoints: Breakpoints;
children?: React.ReactNode;
}>;
};
declare const WindowInfoProvider: React.FC<WindowInfoProviderProps>;
export default WindowInfoProvider;

@@ -41,3 +41,3 @@ "use strict";

var react_1 = __importStar(require("react"));
var WindowInfoContext_1 = __importDefault(require("../WindowInfoContext"));
var context_1 = __importDefault(require("./context"));
var reducer = function (state, action) {

@@ -54,3 +54,3 @@ var _a = action.payload, breakpoints = _a.breakpoints, animationRef = _a.animationRef;

return (__assign(__assign({}, matchMediaBreakpoints), (_a = {}, _a[key] = window.matchMedia(breakpoints[key]).matches, _a)));
}, {}) : undefined;
}, {}) : {};
var newState = {

@@ -80,3 +80,3 @@ width: windowWidth,

'--vh': '',
breakpoints: undefined,
breakpoints: {},
eventsFired: 0,

@@ -131,5 +131,5 @@ }), state = _a[0], dispatch = _a[1];

]);
return (react_1.default.createElement(WindowInfoContext_1.default.Provider, { value: __assign({}, state) }, children && children));
return (react_1.default.createElement(context_1.default.Provider, { value: __assign({}, state) }, children && children));
};
exports.default = WindowInfoProvider;
//# sourceMappingURL=index.js.map
{
"name": "@faceless-ui/window-info",
"version": "2.0.4",
"version": "2.1.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage:": "https://faceless-ui/docs/window-info",
"homepage:": "https://facelessui.com/docs/window-info",
"repository": "git@github.com:faceless-ui/window-info.git",
"description": "A React Context library for subscribing to window events",
"author": "<dev@trbl.design>",
"license": "MIT",
"keywords": [
"react",
"react-component",
"window",
"viewport",
"breakpoints",
"responsive",
"media queries",
"ui",
"ux"
"description": "A React library for subscribing to window events",
"author": {
"email": "jacobsfletch@gmail.com",
"name": "Jacob Fletcher",
"url": "https://jacobsfletch.com"
},
"bugs": {
"url": "https://github.com/faceless-ui/window-info/issues",
"email": "dev@facelessui.com"
},
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/jacobsfletch"
}
],
"contributors": [],
"scripts": {

@@ -23,0 +26,0 @@ "build": "yarn lint && tsc",

[![NPM](https://img.shields.io/npm/v/@faceless-ui/window-info)](https://www.npmjs.com/@faceless-ui/window-info)
![Bundle Size](https://img.shields.io/bundlephobia/minzip/@faceless-ui/window-info?label=zipped)
[![Supported by TRBL](https://img.shields.io/badge/supported_by-TRBL-black)](https://github.com/trouble)
# React Window Info
Read the full documentation [here](https://faceless-ui.com/docs/window-info).
Read the full documentation [here](https://facelessui.com/docs/window-info).
## Quick Start
## Installation
### Installation
```bash

@@ -19,5 +16,5 @@ $ npm i @faceless-ui/window-info

## Demo
## Development
For working examples, spin up the [demo app](./demo/App.demo.js):
To develop this module locally, spin up the [demo app](./demo/App.demo.js):

@@ -31,8 +28,4 @@ ```bash

## Contribution
[Help us,](https://github.com/faceless-ui/.github/blob/master/CONTRIBUTING.md) or let us [help you help us](https://github.com/faceless-ui/.github/blob/master/SUPPORT.md).
## License
[MIT](https://github.com/faceless-ui/window-info/blob/master/LICENSE) Copyright (c) TRBL, LLC
[MIT](https://github.com/faceless-ui/window-info/blob/master/LICENSE) Copyright (c) Faceless UI

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

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