REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.37 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@emotion/babel-plugin/src/emotion-macro.js
Text
Base64
import { transformExpressionWithStyles, createTransformerMacro } from './utils' const isAlreadyTranspiled = path => { if (!path.isCallExpression()) { return false } const firstArgPath = path.get('arguments.0') if (!firstArgPath) { return false } if (!firstArgPath.isConditionalExpression()) { return false } const alternatePath = firstArgPath.get('alternate') if (!alternatePath.isObjectExpression()) { return false } const properties = new Set( alternatePath.get('properties').map(p => p.node.key.name) ) return ['name', 'styles'].every(p => properties.has(p)) } let createEmotionTransformer = (isPure /*: boolean */) => ( { state, babel, importSource, reference, importSpecifierName } /*: Object */ ) => { const path = reference.parentPath if (isAlreadyTranspiled(path)) { return } if (isPure) { path.addComment('leading', '#__PURE__') } let node = transformExpressionWithStyles({ babel, state, path, shouldLabel: true }) if (node) { path.node.arguments[0] = node } } export let transformers = { css: createEmotionTransformer(true), injectGlobal: createEmotionTransformer(false), keyframes: createEmotionTransformer(true) } export let createEmotionMacro = (importSource /*: string */) => createTransformerMacro(transformers, { importSource })
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
utils
DIR
-
drwxr-xr-x
2026-02-28 00:28:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
core-macro.js
4.15 KB
lrw-r--r--
2026-02-28 00:27:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
emotion-macro.js
1.37 KB
lrw-r--r--
2026-02-28 00:27:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
9.73 KB
lrw-r--r--
2026-02-28 00:28:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
styled-macro.js
3.42 KB
lrw-r--r--
2026-02-28 00:28:28
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).