@wix/zero-config-implementation 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,7 @@ export interface ExtractedCssInfo {
39
39
 
40
40
  export interface ComponentInfoWithCss extends CoupledComponentInfo {
41
41
  css: ExtractedCssInfo[]
42
+ varUsedByTraceId: Map<string, Set<string>>
42
43
  }
43
44
 
44
45
  /** The result of processing a single component through the manifest pipeline. */
@@ -147,13 +148,15 @@ export function processComponent(
147
148
  warnings.push(...cssWarnings)
148
149
 
149
150
  // Match CSS selectors to elements
151
+ let varUsedByTraceId = new Map<string, Set<string>>()
150
152
  if (html && extractedElements.length > 0 && css.length > 0) {
151
153
  try {
152
- const enrichedElements = matchCssSelectors(html, extractedElements, css)
154
+ const matchResult = matchCssSelectors(html, extractedElements, css)
153
155
  enhancedInfo = {
154
156
  ...enhancedInfo,
155
- elements: convertElements(enrichedElements),
157
+ elements: convertElements(matchResult.elements),
156
158
  }
159
+ varUsedByTraceId = matchResult.varUsedByTraceId
157
160
  } catch (error) {
158
161
  warnings.push({
159
162
  componentName: componentInfo.componentName,
@@ -168,6 +171,7 @@ export function processComponent(
168
171
  component: {
169
172
  ...enhancedInfo,
170
173
  css,
174
+ varUsedByTraceId,
171
175
  },
172
176
  warnings,
173
177
  }