@erickmerchant/framework
Advanced tools
Comparing version 43.1.0 to 43.1.1
67
html.js
@@ -193,10 +193,20 @@ const weakMap = new WeakMap() | ||
break | ||
} else if (token.type === tokenTypes.key) { | ||
const next = tokens.next()?.value | ||
let key = token.value | ||
} | ||
const firstChar = key.charAt(0) | ||
const hasColon = ':' === firstChar | ||
const hasAtSign = '@' === firstChar | ||
let next = token | ||
let key = false | ||
let firstChar | ||
let hasColon | ||
let hasAtSign | ||
let constant = false | ||
let value = token.value | ||
if (next.type === tokenTypes.key) { | ||
next = tokens.next()?.value | ||
key = token.value | ||
firstChar = key.charAt(0) | ||
hasColon = ':' === firstChar | ||
hasAtSign = '@' === firstChar | ||
if (hasColon) { | ||
@@ -206,31 +216,20 @@ key = token.value.substring(1) | ||
if (next.type === tokenTypes.value) { | ||
if (child.attributes.inset != null) child.attributes.inset++ | ||
constant = next.type === tokenTypes.value | ||
value = next.value | ||
child.attributes.unshift({ | ||
type: tokenTypes.constant, | ||
key, | ||
value: next.value | ||
}) | ||
} else if (!hasColon && !hasAtSign) { | ||
if (child.attributes.inset != null) child.attributes.inset++ | ||
if (next.type === tokenTypes.variable && !hasColon && !hasAtSign) { | ||
value = variables[value] | ||
constant = true | ||
} | ||
} | ||
child.attributes.unshift({ | ||
type: tokenTypes.constant, | ||
key, | ||
value: variables[next.value] | ||
}) | ||
} else { | ||
child.dynamic = true | ||
if (constant) { | ||
if (child.attributes.inset != null) child.attributes.inset++ | ||
child.attributes.inset = | ||
child.attributes.inset ?? child.attributes.length | ||
child.attributes.push({ | ||
type: tokenTypes.variable, | ||
key, | ||
value: next.value | ||
}) | ||
} | ||
} else if (token.type === tokenTypes.variable) { | ||
child.attributes.unshift({ | ||
type: tokenTypes.constant, | ||
key, | ||
value | ||
}) | ||
} else { | ||
child.dynamic = true | ||
@@ -242,4 +241,4 @@ | ||
type: tokenTypes.variable, | ||
key: false, | ||
value: token.value | ||
key, | ||
value | ||
}) | ||
@@ -246,0 +245,0 @@ } |
{ | ||
"name": "@erickmerchant/framework", | ||
"version": "43.1.0", | ||
"version": "43.1.1", | ||
"description": "A front-end framework.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/erickmerchant/framework#readme", |
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
18754
604