MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / formatNodeStyleForUi

Function formatNodeStyleForUi

packages/extension/utils/variable-output.ts:34–45  ·  view source on GitHub ↗
(
  style: Record<string, string>,
  node: SceneNode,
  readers: FigmaLookupReaders = DEFAULT_READERS
)

Source from the content-addressed store, hash-verified

32}
33
34export function formatNodeStyleForUi(
35 style: Record<string, string>,
36 node: SceneNode,
37 readers: FigmaLookupReaders = DEFAULT_READERS
38): FormattedStyle {
39 const context = buildVariableProjectionContext(node, readers)
40
41 return {
42 style: applyVariableStyle(style, node, context, getCssExprForCodeSyntaxVariable, readers),
43 ...(context.variableSyntax ? { variableSyntax: context.variableSyntax } : {})
44 }
45}
46
47export function formatNodeStyleForMcp(
48 style: Record<string, string>,

Callers 2

Calls 2

applyVariableStyleFunction · 0.85

Tested by

no test coverage detected