(resolved: string | string[], nodes: AstNode[])
| 600 | } |
| 601 | |
| 602 | function parseVariantValue(resolved: string | string[], nodes: AstNode[]): AstNode[] { |
| 603 | let resolvedArray = typeof resolved === class="st">'string' ? [resolved] : resolved |
| 604 | return resolvedArray.flatMap((r) => { |
| 605 | if (r.trim().endsWith(class="st">'}')) { |
| 606 | let updatedCSS = r.replace(class="st">'}', class="st">'{@slot}}') |
| 607 | let ast = CSS.parse(updatedCSS) |
| 608 | substituteAtSlot(ast, nodes) |
| 609 | return ast |
| 610 | } else { |
| 611 | return rule(r, nodes) |
| 612 | } |
| 613 | }) |
| 614 | } |
| 615 | |
| 616 | type Primitive = string | number | boolean | null |
| 617 | export type CssPluginOptions = Record<string, Primitive | Primitive[]> |
no test coverage detected