MCPcopy
hub / github.com/tailwindlabs/tailwindcss / resolveApplyDependencies

Function resolveApplyDependencies

packages/tailwindcss/src/apply.ts:341–363  ·  view source on GitHub ↗
(
  node: Extract<AstNode, { kind: 'at-rule' }>,
  designSystem: DesignSystem,
)

Source from the content-addressed store, hash-verified

339}
340
341function* resolveApplyDependencies(
342 node: Extract<AstNode, { kind: 'at-rule' }>,
343 designSystem: DesignSystem,
344) {
345 for (let candidate of node.params.split(/\s+/g)) {
346 for (let node of designSystem.parseCandidate(candidate)) {
347 switch (node.kind) {
348 case 'arbitrary':
349 // Doesn't matter, because there is no lookup needed
350 break
351
352 case 'static':
353 case 'functional':
354 // Lookup by "root"
355 yield node.root
356 break
357
358 default:
359 node satisfies never
360 }
361 }
362 }
363}

Callers 1

substituteAtApplyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected