REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.49 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@emotion/react/src/context.tsx
Text
Base64
import * as React from 'react' import { useContext, forwardRef } from 'react' import createCache, { EmotionCache } from '@emotion/cache' import isDevelopment from '#is-development' import isBrowser from '#is-browser' let EmotionCacheContext = /* #__PURE__ */ React.createContext<EmotionCache | null>( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway typeof HTMLElement !== 'undefined' ? /* #__PURE__ */ createCache({ key: 'css' }) : null ) if (isDevelopment) { EmotionCacheContext.displayName = 'EmotionCacheContext' } export let CacheProvider = EmotionCacheContext.Provider export let __unsafe_useEmotionCache = function useEmotionCache() { return useContext(EmotionCacheContext) } let withEmotionCache = function withEmotionCache<Props, RefType = any>( func: ( props: React.PropsWithoutRef<Props>, context: EmotionCache, ref?: React.ForwardedRef<RefType> ) => React.ReactNode ): | React.FC<React.PropsWithoutRef<Props> & React.RefAttributes<RefType>> | React.ForwardRefExoticComponent< React.PropsWithoutRef<Props> & React.RefAttributes<RefType> > { return forwardRef<RefType, Props>((props, ref) => { // the cache will never be null in the browser let cache = useContext(EmotionCacheContext)! return func(props, cache, ref) }) } if (!isBrowser) { withEmotionCache = function withEmotionCache(func) { return (props: Parameters<typeof func>[0]) => { let cache = useContext(EmotionCacheContext) if (cache === null) { // yes, we're potentially creating this on every render // it doesn't actually matter though since it's only on the server // so there will only every be a single render // that could change in the future because of suspense and etc. but for now, // this works and i don't want to optimise for a future thing that we aren't sure about cache = createCache({ key: 'css' }) return ( <EmotionCacheContext.Provider value={cache}> {func(props, cache)} </EmotionCacheContext.Provider> ) } else { return func(props, cache) } } } } export { withEmotionCache }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 16
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
conditions
DIR
-
drwxr-xr-x
2026-02-28 00:30:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-names.tsx
4.50 KB
lrw-r--r--
2026-02-28 00:30:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
context.tsx
2.49 KB
lrw-r--r--
2026-02-28 00:30:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
css.ts
423 B
lrw-r--r--
2026-02-28 00:30:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
emotion-element.tsx
4.99 KB
lrw-r--r--
2026-02-28 00:30:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get-label-from-stack-trace.ts
1.61 KB
lrw-r--r--
2026-02-28 00:30:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
global.tsx
4.49 KB
lrw-r--r--
2026-02-28 00:30:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
2.08 KB
lrw-r--r--
2026-02-28 00:30:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
jsx-dev-runtime.ts
826 B
lrw-r--r--
2026-02-28 00:30:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
jsx-namespace.ts
4.23 KB
lrw-r--r--
2026-02-28 00:30:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
jsx-runtime.ts
924 B
lrw-r--r--
2026-02-28 00:30:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
jsx.ts
1.55 KB
lrw-r--r--
2026-02-28 00:30:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
keyframes.ts
654 B
lrw-r--r--
2026-02-28 00:30:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
theming.tsx
2.85 KB
lrw-r--r--
2026-02-28 00:30:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types.ts
544 B
lrw-r--r--
2026-02-28 00:30:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.ts
40 B
lrw-r--r--
2026-02-28 00:30:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_isolated-hnrs.ts
650 B
lrw-r--r--
2026-02-28 00:30:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).