MCPcopy Create free account
hub / github.com/chakra-ui/panda / assignPatternMatcher

Method assignPatternMatcher

packages/core/src/jsx.ts:44–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 assignPatternMatcher() {
45 if (!this.isEnabled) return
46
47 for (const pattern of this.context.patterns.details) {
48 this.patternPropertiesByJsxName.set(pattern.jsxName, new Set(pattern.props ?? []))
49 pattern.jsx.forEach((jsx) => {
50 if (typeof jsx === 'string') {
51 this.patternMatcher.string.add(jsx)
52 } else {
53 this.patternMatcher.regex.push(jsx)
54 }
55 })
56 }
57 }
58
59 private get jsxFactory() {
60 return this.context.config.jsxFactory ?? 'styled'

Callers 1

constructorMethod · 0.95

Calls 2

forEachMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected