Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/css-to-react-native/src/transforms/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import parseFontFamily from './fontFamily'
import {
regExpToken,
SPACE,
LENGTH,
UNSUPPORTED_LENGTH_UNIT,
SLASH,
} from '../tokenTypes'
const NORMAL = regExpToken(/^(normal)$/)
const STYLE = regExpToken(/^(italic)$/)
const WEIGHT = regExpToken(/^([1-9]00|bold)$/)
const VARIANT = regExpToken(/^(small-caps)$/)
const defaultFontStyle = 'normal'
const defaultFontWeight = 'normal'
const defaultFontVariant = []
export default tokenStream => {
let fontStyle
let fontWeight
let fontVariant
// let fontSize;
let lineHeight
// let fontFamily;
let numStyleWeightVariantMatched = 0
while (numStyleWeightVariantMatched < 3 && tokenStream.hasTokens()) {
if (tokenStream.matches(NORMAL)) {
/* pass */
} else if (fontStyle === undefined && tokenStream.matches(STYLE)) {
fontStyle = tokenStream.lastValue
} else if (fontWeight === undefined && tokenStream.matches(WEIGHT)) {
fontWeight = tokenStream.lastValue
} else if (fontVariant === undefined && tokenStream.matches(VARIANT)) {
fontVariant = [tokenStream.lastValue]
} else {
break
}
tokenStream.expect(SPACE)
numStyleWeightVariantMatched += 1
}
const fontSize = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT)
if (tokenStream.matches(SLASH)) {
lineHeight = tokenStream.expect(LENGTH, UNSUPPORTED_LENGTH_UNIT)
}
tokenStream.expect(SPACE)
const { fontFamily } = parseFontFamily(tokenStream)
if (fontStyle === undefined) fontStyle = defaultFontStyle
if (fontWeight === undefined) fontWeight = defaultFontWeight
if (fontVariant === undefined) fontVariant = defaultFontVariant
const out = { fontStyle, fontWeight, fontVariant, fontSize, fontFamily }
if (lineHeight !== undefined) out.lineHeight = lineHeight
return out
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0038 ]-- |