@tamagui/use-did-finish-ssr
Advanced tools
Comparing version 1.108.0 to 1.108.1
@@ -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 = {}; | ||
@@ -23,3 +31,3 @@ __export(src_exports, { | ||
module.exports = __toCommonJS(src_exports); | ||
var import_react = require("react"); | ||
var React = __toESM(require("react")); | ||
const emptyFn = () => { | ||
@@ -29,3 +37,3 @@ }, emptyFnFn = () => emptyFn; | ||
if (options?.sync) | ||
return (0, import_react.useSyncExternalStore)( | ||
return React.useSyncExternalStore( | ||
emptyFnFn, | ||
@@ -35,4 +43,4 @@ () => value ?? !0, | ||
); | ||
const [cur, setCur] = (0, import_react.useState)(value); | ||
return (0, import_react.useEffect)(() => { | ||
const [cur, setCur] = React.useState(value); | ||
return React.useEffect(() => { | ||
setCur(value ?? !0); | ||
@@ -39,0 +47,0 @@ }, []), cur ?? !1; |
"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 = {}; | ||
@@ -24,3 +32,3 @@ __export(src_exports, { | ||
module.exports = __toCommonJS(src_exports); | ||
var import_react = require("react"); | ||
var React = __toESM(require("react")); | ||
function _array_like_to_array(arr, len) { | ||
@@ -73,3 +81,3 @@ (len == null || len > arr.length) && (len = arr.length); | ||
return value ?? !0; | ||
var _useState, cur, setCur; | ||
var _React_useState, cur, setCur; | ||
} | ||
@@ -76,0 +84,0 @@ function useDidFinishSSRSync(value) { |
@@ -1,2 +0,2 @@ | ||
import { useEffect, useState, useSyncExternalStore } from "react"; | ||
import * as React from "react"; | ||
const emptyFn = () => { | ||
@@ -6,3 +6,3 @@ }, emptyFnFn = () => emptyFn; | ||
if (options?.sync) | ||
return useSyncExternalStore( | ||
return React.useSyncExternalStore( | ||
emptyFnFn, | ||
@@ -12,4 +12,4 @@ () => value ?? !0, | ||
); | ||
const [cur, setCur] = useState(value); | ||
return useEffect(() => { | ||
const [cur, setCur] = React.useState(value); | ||
return React.useEffect(() => { | ||
setCur(value ?? !0); | ||
@@ -16,0 +16,0 @@ }, []), cur ?? !1; |
@@ -1,2 +0,2 @@ | ||
import { useEffect, useState, useSyncExternalStore } from "react"; | ||
import * as React from "react"; | ||
function _array_like_to_array(arr, len) { | ||
@@ -49,3 +49,3 @@ (len == null || len > arr.length) && (len = arr.length); | ||
return value ?? !0; | ||
var _useState, cur, setCur; | ||
var _React_useState, cur, setCur; | ||
} | ||
@@ -52,0 +52,0 @@ function useDidFinishSSRSync(value) { |
{ | ||
"name": "@tamagui/use-did-finish-ssr", | ||
"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 @@ }, |
@@ -1,2 +0,2 @@ | ||
import { useEffect, useState, useSyncExternalStore } from 'react' | ||
import * as React from 'react' | ||
@@ -18,3 +18,3 @@ const emptyFn = () => {} | ||
if (options?.sync) { | ||
return useSyncExternalStore( | ||
return React.useSyncExternalStore( | ||
emptyFnFn, | ||
@@ -26,4 +26,4 @@ () => (value == undefined ? true : value), | ||
const [cur, setCur] = useState<any>(value) | ||
useEffect(() => { | ||
const [cur, setCur] = React.useState<any>(value) | ||
React.useEffect(() => { | ||
setCur(value ?? true) | ||
@@ -30,0 +30,0 @@ }, []) |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17153
308
+ Added@tamagui/constants@1.108.1(transitive)
- Removed@tamagui/constants@1.108.0(transitive)
Updated@tamagui/constants@1.108.1