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

@tamagui/use-window-dimensions

Package Overview
Dependencies
Maintainers
1
Versions
977
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/use-window-dimensions - npm Package Compare versions

Comparing version 1.108.0 to 1.108.1

16

dist/cjs/index.js

@@ -0,5 +1,6 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -14,3 +15,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};

@@ -22,3 +30,3 @@ __export(src_exports, {

module.exports = __toCommonJS(src_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_react_native = require("react-native-web");
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_react_native = require("react-native-web");
const initialValue = {

@@ -41,3 +49,3 @@ height: 800,

} = {}) {
return (0, import_react.useSyncExternalStore)(
return import_react.default.useSyncExternalStore(
subscribe,

@@ -44,0 +52,0 @@ () => import_react_native.Dimensions.get("window"),

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {

@@ -15,3 +16,10 @@ for (var name in all)

};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
mod
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};

@@ -23,3 +31,3 @@ __export(src_exports, {

module.exports = __toCommonJS(src_exports);
var import_constants = require("@tamagui/constants"), import_react = require("react"), import_react_native = require("react-native"), initialValue = {
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_react_native = require("react-native"), initialValue = {
height: 800,

@@ -44,3 +52,3 @@ width: 600

var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_serverValue = _ref.serverValue, serverValue = _ref_serverValue === void 0 ? initialValue : _ref_serverValue;
return (0, import_react.useSyncExternalStore)(subscribe, function() {
return import_react.default.useSyncExternalStore(subscribe, function() {
return import_react_native.Dimensions.get("window");

@@ -47,0 +55,0 @@ }, function() {

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

import React from "react";
import { isWeb } from "@tamagui/constants";
import { useSyncExternalStore } from "react";
import { Dimensions } from "react-native-web";

@@ -21,3 +21,3 @@ const initialValue = {

} = {}) {
return useSyncExternalStore(
return React.useSyncExternalStore(
subscribe,

@@ -24,0 +24,0 @@ () => Dimensions.get("window"),

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

import React from "react";
import { isWeb } from "@tamagui/constants";
import { useSyncExternalStore } from "react";
import { Dimensions } from "react-native";

@@ -24,3 +24,3 @@ var initialValue = {

var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_serverValue = _ref.serverValue, serverValue = _ref_serverValue === void 0 ? initialValue : _ref_serverValue;
return useSyncExternalStore(subscribe, function() {
return React.useSyncExternalStore(subscribe, function() {
return Dimensions.get("window");

@@ -27,0 +27,0 @@ }, function() {

{
"name": "@tamagui/use-window-dimensions",
"version": "1.108.0",
"version": "1.108.1",
"types": "./types/index.d.ts",

@@ -30,6 +30,6 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/constants": "1.108.0"
"@tamagui/constants": "1.108.1"
},
"devDependencies": {
"@tamagui/build": "1.108.0",
"@tamagui/build": "1.108.1",
"react": "^18.2.0 || ^19.0.0",

@@ -36,0 +36,0 @@ "react-native": "0.74.1"

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

import React from 'react'
import { isWeb } from '@tamagui/constants'
import { useSyncExternalStore } from 'react'
import type { ScaledSize } from 'react-native'

@@ -40,3 +41,3 @@ import { Dimensions } from 'react-native'

}: { serverValue?: Size } = {}) {
return useSyncExternalStore(
return React.useSyncExternalStore(
subscribe,

@@ -43,0 +44,0 @@ () => Dimensions.get('window'),

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

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