(key, frames, options)
| 21 | isProcessed = false |
| 22 | |
| 23 | constructor(key, frames, options) { |
| 24 | const nameMatch = key.match(nameRegExp) |
| 25 | if (nameMatch && nameMatch[1]) { |
| 26 | this.name = nameMatch[1] |
| 27 | } else { |
| 28 | this.name = 'noname' |
| 29 | warning(false, `[JSS] Bad keyframes name ${key}`) |
| 30 | } |
| 31 | this.key = `${this.type}-${this.name}` |
| 32 | this.options = options |
| 33 | const {scoped, sheet, generateId} = options |
| 34 | this.id = scoped === false ? this.name : escape(generateId(this, sheet)) |
| 35 | this.rules = new RuleList({...options, parent: this}) |
| 36 | |
| 37 | for (const name in frames) { |
| 38 | this.rules.add(name, frames[name], { |
| 39 | ...options, |
| 40 | parent: this |
| 41 | }) |
| 42 | } |
| 43 | |
| 44 | this.rules.process() |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Generates a CSS string. |
nothing calls this directly
no test coverage detected