@yamada-ui/utils
Advanced tools
Comparing version 1.5.4 to 1.6.0-dev-20241127015414
@@ -12,4 +12,4 @@ export { filterEmpty } from './array.js'; | ||
export { FlattenObjectOptions, assignAfter, filterObject, filterUndefined, flattenObject, getMemoizedObject, getObject, keysFormObject, memoizeObject, merge, objectFromEntries, omitObject, pickObject, replaceObject, splitObject } from './object.js'; | ||
export { AsyncFnReturn, AsyncState, AsyncStateRetry, FunctionReturningPromise, MaybeRenderProp, PromiseType, UseIsMountedProps, UseIsMountedReturn, assignRef, createContext, createId, cx, findChild, findChildren, getValidChildren, includesChildren, isRefObject, isSomeElement, isValidElement, mergeRefs, omitChildren, pickChildren, useAsync, useAsyncFunc, useAsyncRetry, useCallbackRef, useIsMounted, useMergeRefs, useSafeLayoutEffect, useUnmountEffect, useUpdateEffect } from './react.js'; | ||
export { AsyncFnReturn, AsyncState, AsyncStateRetry, FunctionReturningPromise, MaybeRenderProp, PromiseType, UseIsMountedProps, UseIsMountedReturn, assignRef, createContext, createId, cx, findChild, findChildren, getValidChildren, includesChildren, isRefObject, isSomeElement, isValidElement, mergeRefs, omitChildren, pickChildren, useAsync, useAsyncFunc, useAsyncRetry, useCallbackRef, useIsMounted, useIsSsr, useMergeRefs, useSafeLayoutEffect, useUnmountEffect, useUpdateEffect } from './react.js'; | ||
export { antonym, escape, toCamelCase, toKebabCase, toPascalCase, toTitleCase, transformSize } from './string.js'; | ||
import 'react'; |
@@ -162,2 +162,3 @@ "use strict"; | ||
useIsMounted: () => useIsMounted, | ||
useIsSsr: () => useIsSsr, | ||
useMergeRefs: () => useMergeRefs, | ||
@@ -1060,2 +1061,11 @@ useSafeLayoutEffect: () => useSafeLayoutEffect, | ||
} | ||
function useIsSsr() { | ||
if (typeof React.useSyncExternalStore === "function") | ||
return React.useSyncExternalStore( | ||
() => noop, | ||
() => false, | ||
() => true | ||
); | ||
return false; | ||
} | ||
function getValidChildren(children) { | ||
@@ -1447,2 +1457,3 @@ return React.Children.toArray(children).filter( | ||
useIsMounted, | ||
useIsSsr, | ||
useMergeRefs, | ||
@@ -1449,0 +1460,0 @@ useSafeLayoutEffect, |
@@ -25,2 +25,3 @@ import * as React from 'react'; | ||
type UseIsMountedReturn = ReturnType<typeof useIsMounted>; | ||
declare function useIsSsr(): boolean; | ||
declare function getValidChildren(children: React.ReactNode): React.ReactElement[]; | ||
@@ -103,2 +104,2 @@ declare function isValidElement(child: any): child is React.ReactNode; | ||
export { type AsyncFnReturn, type AsyncState, type AsyncStateRetry, type FunctionReturningPromise, type MaybeRenderProp, type PromiseType, type UseIsMountedProps, type UseIsMountedReturn, assignRef, createContext, createId, cx, findChild, findChildren, getValidChildren, includesChildren, isRefObject, isSomeElement, isValidElement, mergeRefs, omitChildren, pickChildren, useAsync, useAsyncFunc, useAsyncRetry, useCallbackRef, useIsMounted, useMergeRefs, useSafeLayoutEffect, useUnmountEffect, useUpdateEffect }; | ||
export { type AsyncFnReturn, type AsyncState, type AsyncStateRetry, type FunctionReturningPromise, type MaybeRenderProp, type PromiseType, type UseIsMountedProps, type UseIsMountedReturn, assignRef, createContext, createId, cx, findChild, findChildren, getValidChildren, includesChildren, isRefObject, isSomeElement, isValidElement, mergeRefs, omitChildren, pickChildren, useAsync, useAsyncFunc, useAsyncRetry, useCallbackRef, useIsMounted, useIsSsr, useMergeRefs, useSafeLayoutEffect, useUnmountEffect, useUpdateEffect }; |
@@ -52,2 +52,3 @@ "use strict"; | ||
useIsMounted: () => useIsMounted, | ||
useIsSsr: () => useIsSsr, | ||
useMergeRefs: () => useMergeRefs, | ||
@@ -75,2 +76,6 @@ useSafeLayoutEffect: () => useSafeLayoutEffect, | ||
// src/function.ts | ||
var noop = () => { | ||
}; | ||
// src/react.tsx | ||
@@ -125,2 +130,11 @@ function createContext2({ | ||
} | ||
function useIsSsr() { | ||
if (typeof React.useSyncExternalStore === "function") | ||
return React.useSyncExternalStore( | ||
() => noop, | ||
() => false, | ||
() => true | ||
); | ||
return false; | ||
} | ||
function getValidChildren(children) { | ||
@@ -314,2 +328,3 @@ return React.Children.toArray(children).filter( | ||
useIsMounted, | ||
useIsSsr, | ||
useMergeRefs, | ||
@@ -316,0 +331,0 @@ useSafeLayoutEffect, |
{ | ||
"name": "@yamada-ui/utils", | ||
"version": "1.5.4", | ||
"version": "1.6.0-dev-20241127015414", | ||
"description": "Yamada UI utils", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
428772
5564
1