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

@chiragrupani/fullscreen-react

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chiragrupani/fullscreen-react - npm Package Compare versions

Comparing version 1.1.1 to 1.2.1

2

build/FullScreenPropType.d.ts

@@ -0,4 +1,6 @@

/// <reference types="react" />
export default interface FullScreenPropType {
onChange: (isFullScreenEnabled: boolean) => void;
isFullScreen: boolean;
children?: React.ReactNode;
}

50

build/index.esm.js
import * as React from 'react';
/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -170,3 +170,3 @@

return __awaiter(this, void 0, void 0, function () {
var isFullScreenEnabled;
var isFullScreenEnabled, error_1;
return __generator(this, function (_a) {

@@ -181,14 +181,22 @@ switch (_a.label) {

isFullScreenEnabled = FSUtility.fullscreenElement === this.docElement;
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 2];
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 5];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, FSUtility.requestFullscreen(this.docElement)];
case 1:
case 2:
_a.sent();
return [3 /*break*/, 4];
case 2:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
console.log(error_1);
return [3 /*break*/, 4];
case 4: return [3 /*break*/, 7];
case 5:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 7];
return [4 /*yield*/, FSUtility.exitFullscreen()];
case 3:
case 6:
_a.sent();
_a.label = 4;
case 4: return [2 /*return*/];
_a.label = 7;
case 7: return [2 /*return*/];
}

@@ -231,3 +239,3 @@ });

return __awaiter(this, void 0, void 0, function () {
var isFullScreenEnabled;
var isFullScreenEnabled, error_1;
return __generator(this, function (_a) {

@@ -241,14 +249,22 @@ switch (_a.label) {

isFullScreenEnabled = FSUtility.fullscreenElement === this.currentElement.current;
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 2];
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 5];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, FSUtility.requestFullscreen(this.currentElement.current)];
case 1:
case 2:
_a.sent();
return [3 /*break*/, 4];
case 2:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
console.log(error_1);
return [3 /*break*/, 4];
case 4: return [3 /*break*/, 7];
case 5:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 7];
return [4 /*yield*/, FSUtility.exitFullscreen()];
case 3:
case 6:
_a.sent();
_a.label = 4;
case 4: return [2 /*return*/];
_a.label = 7;
case 7: return [2 /*return*/];
}

@@ -255,0 +271,0 @@ });

@@ -16,5 +16,3 @@ 'use strict';

enumerable: true,
get: function () {
return e[k];
}
get: function () { return e[k]; }
});

@@ -24,3 +22,3 @@ }

}
n['default'] = e;
n["default"] = e;
return Object.freeze(n);

@@ -31,3 +29,3 @@ }

/*! *****************************************************************************
/******************************************************************************
Copyright (c) Microsoft Corporation.

@@ -199,3 +197,3 @@

return __awaiter(this, void 0, void 0, function () {
var isFullScreenEnabled;
var isFullScreenEnabled, error_1;
return __generator(this, function (_a) {

@@ -210,14 +208,22 @@ switch (_a.label) {

isFullScreenEnabled = FSUtility.fullscreenElement === this.docElement;
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 2];
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 5];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, FSUtility.requestFullscreen(this.docElement)];
case 1:
case 2:
_a.sent();
return [3 /*break*/, 4];
case 2:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
console.log(error_1);
return [3 /*break*/, 4];
case 4: return [3 /*break*/, 7];
case 5:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 7];
return [4 /*yield*/, FSUtility.exitFullscreen()];
case 3:
case 6:
_a.sent();
_a.label = 4;
case 4: return [2 /*return*/];
_a.label = 7;
case 7: return [2 /*return*/];
}

@@ -260,3 +266,3 @@ });

return __awaiter(this, void 0, void 0, function () {
var isFullScreenEnabled;
var isFullScreenEnabled, error_1;
return __generator(this, function (_a) {

@@ -270,14 +276,22 @@ switch (_a.label) {

isFullScreenEnabled = FSUtility.fullscreenElement === this.currentElement.current;
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 2];
if (!(this.props.isFullScreen && !isFullScreenEnabled)) return [3 /*break*/, 5];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, FSUtility.requestFullscreen(this.currentElement.current)];
case 1:
case 2:
_a.sent();
return [3 /*break*/, 4];
case 2:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
console.log(error_1);
return [3 /*break*/, 4];
case 4: return [3 /*break*/, 7];
case 5:
if (!(isFullScreenEnabled && !this.props.isFullScreen)) return [3 /*break*/, 7];
return [4 /*yield*/, FSUtility.exitFullscreen()];
case 3:
case 6:
_a.sent();
_a.label = 4;
case 4: return [2 /*return*/];
_a.label = 7;
case 7: return [2 /*return*/];
}

@@ -284,0 +298,0 @@ });

{
"name": "@chiragrupani/fullscreen-react",
"version": "1.1.1",
"version": "1.2.1",
"description": "Library to use full screen in ReactJS",

@@ -9,4 +9,4 @@ "main": "build/index.js",

"scripts": {
"build": "tsc --emitDeclarationOnly && rollup -c",
"build:prod": "set NODE_ENV=production && tsc --emitDeclarationOnly && rollup -c"
"build": "rollup -c",
"build:prod": "set NODE_ENV=production && rollup -c"
},

@@ -27,3 +27,4 @@ "files": [

"react fullscreen",
"fullscreen reactjs"
"fullscreen reactjs",
"react fullscreen"
],

@@ -33,19 +34,19 @@ "author": "Chirag",

"devDependencies": {
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"@rollup/plugin-typescript": "^8.2.1",
"@types/react": "^17.0.13",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"rollup": "^2.52.7",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-typescript": "^8.3.2",
"@types/react": "^17.0.45",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"rollup": "^2.75.6",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.3.0",
"typescript": "^4.3.5"
"tslib": "^2.4.0",
"typescript": "^4.7.3"
},
"peerDependencies": {
"react": "^17.0",
"react-dom": "^17.0"
"react": ">=17.0",
"react-dom": ">=17.0"
}
}

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