(input: string)
| 29 | }; |
| 30 | |
| 31 | const splitDeclarations = (input: string): string[] => { |
| 32 | const results: string[] = []; |
| 33 | let current = ''; |
| 34 | let depth = 0; |
| 35 | |
| 36 | for (const char of input) { |
| 37 | if (char === '(') depth++; |
| 38 | if (char === ')') depth--; |
| 39 | |
| 40 | if (char === ';' && depth === 0) { |
| 41 | results.push(current); |
| 42 | current = ''; |
| 43 | } else { |
| 44 | current += char; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | if (current) results.push(current); |
| 49 | return results; |
| 50 | }; |
| 51 | |
| 52 | export const inlineCssToJs = ( |
| 53 | inlineStyle: string, |