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

Method constructor

packages/core/src/import-map.ts:17–34  ·  view source on GitHub ↗
(private context: Pick<Context, 'jsx' | 'config' | 'conf' | 'isValidProperty' | 'recipes' | 'patterns'>)

Source from the content-addressed store, hash-verified

15 outdir: string
16
17 constructor(private context: Pick<Context, 'jsx' | 'config' | 'conf' | 'isValidProperty' | 'recipes' | 'patterns'>) {
18 const { jsx } = this.context
19
20 this.outdir = this.getOutdir()
21
22 const importMap = this.buildImportMap(context.config.importMap)
23
24 this.matchers.css = this.createMatcher(importMap.css, ['css', 'cva', 'sva'])
25 this.matchers.tokens = this.createMatcher(importMap.tokens, ['token'])
26 this.matchers.recipe = this.createMatcher(importMap.recipe)
27 this.matchers.pattern = this.createMatcher(importMap.pattern)
28
29 if (jsx.isEnabled) {
30 this.matchers.jsx = this.createMatcher(importMap.jsx, jsx.names)
31 }
32
33 this.value = importMap
34 }
35
36 /**
37 * Normalize one/many import map inputs to a single import map output with absolute paths.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected