styled-components-to-stylex-codemod 0.0.55 → 0.0.56

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.
@@ -1,285 +1,4 @@
1
- import { n as createPrepassParser } from "./ast-walk-C226poBl.mjs";
2
- import { n as isTemplatePlaceholderInSelectorContext, r as PLACEHOLDER_RE } from "./selector-context-heuristic-LVizWWOR.mjs";
3
- import { resolve } from "node:path";
4
- import "node:fs";
5
- //#region src/internal/utilities/collection-utils.ts
6
- /** Add a value to a Set stored in a Map, creating the Set if it doesn't exist. */
7
- function addToSetMap(map, key, value) {
8
- let set = map.get(key);
9
- if (!set) {
10
- set = /* @__PURE__ */ new Set();
11
- map.set(key, set);
12
- }
13
- set.add(value);
14
- }
15
- //#endregion
16
- //#region src/internal/prepass/scan-cross-file-selectors.ts
17
- /**
18
- * Pre-filter: matches any bare `${Identifier}` template expression.
19
- * Used to skip files that only contain arrow functions or member expressions
20
- * in template literals (e.g. `${props => ...}`, `${theme.color}`).
21
- */
22
- const BARE_TEMPLATE_IDENTIFIER_RE = /\$\{\s*[a-zA-Z_$][\w$]*\s*\}/;
23
- /**
24
- * Categorize cross-file selector usages into marker sidecar and global selector bridge maps.
25
- *
26
- * Bridge usages (from already-converted files) are skipped — the consumer handles marker
27
- * generation via the forward selector handler, so no sidecar/bridge is needed on the target.
28
- */
29
- function categorizeSelectorUsages(usages, componentsNeedingMarkerSidecar, componentsNeedingGlobalSelectorBridge) {
30
- for (const usage of usages) {
31
- if (usage.bridgeComponentName) continue;
32
- if (usage.consumerIsTransformed) addToSetMap(componentsNeedingMarkerSidecar, usage.resolvedPath, usage.importedName);
33
- addToSetMap(componentsNeedingGlobalSelectorBridge, usage.resolvedPath, usage.importedName);
34
- }
35
- }
36
- /**
37
- * Regex matching bridge GlobalSelector export patterns (global for matchAll).
38
- * Matches both:
39
- * - Old format: `export const XGlobalSelector = ".sc2sx-..."`
40
- * - New format: `` export const XGlobalSelector = `.${xBridgeClass}` ``
41
- */
42
- const BRIDGE_EXPORT_RE = /export\s+const\s+(\w+GlobalSelector)\s*=\s*(?:["']\.sc2sx-|`\.\$\{)/g;
43
- /**
44
- * Detect whether an imported name is a bridge GlobalSelector from an
45
- * already-converted StyleX file.
46
- *
47
- * Detection criteria (hybrid fast + safe):
48
- * 1. Variable name ends with "GlobalSelector" AND the stripped name starts uppercase
49
- * 2. Target file contains "@stylexjs/stylex" (string check, no parse)
50
- * 3. Target file has a matching `export const XGlobalSelector = ".sc2sx-"` pattern
51
- *
52
- * @returns The stripped component name (e.g., "CollapseArrowIcon" for
53
- * "CollapseArrowIconGlobalSelector"), or null if not a bridge.
54
- */
55
- function detectBridgeGlobalSelector(importedName, resolvedPath, readFile) {
56
- if (!importedName.endsWith("GlobalSelector")) return null;
57
- const stripped = importedName.slice(0, -14);
58
- if (!stripped || !/^[A-Z]/.test(stripped)) return null;
59
- const content = readFile(resolvedPath);
60
- if (!content || !content.includes("@stylexjs/stylex")) return null;
61
- let found = false;
62
- for (const m of content.matchAll(BRIDGE_EXPORT_RE)) if (m[1] === importedName) {
63
- found = true;
64
- break;
65
- }
66
- if (!found) return null;
67
- return stripped;
68
- }
69
- /**
70
- * If `importedName` is a bridge GlobalSelector, populate bridge fields on `usage`
71
- * and find the corresponding component import from the same source.
72
- */
73
- function applyBridgeFields(usage, importedName, localName, resolvedPath, importMap, readFile) {
74
- const bridgeName = detectBridgeGlobalSelector(importedName, resolvedPath, readFile);
75
- if (!bridgeName) return;
76
- usage.bridgeComponentName = bridgeName;
77
- const imp = importMap.get(localName);
78
- if (!imp) return;
79
- let defaultImportLocal;
80
- for (const [otherLocal, otherImp] of importMap) {
81
- if (otherImp.source !== imp.source || otherLocal === localName) continue;
82
- if (otherImp.importedName === bridgeName) {
83
- usage.bridgeComponentLocalName = otherLocal;
84
- defaultImportLocal = void 0;
85
- break;
86
- }
87
- if (otherImp.importedName === "default" && defaultImportLocal === void 0) defaultImportLocal = otherLocal;
88
- }
89
- if (defaultImportLocal !== void 0) usage.bridgeComponentLocalName = defaultImportLocal;
90
- }
91
- /** Global version for matchAll/replace operations */
92
- const PLACEHOLDER_RE_G = new RegExp(PLACEHOLDER_RE.source, "g");
93
- /**
94
- * Walk the AST collecting ImportDeclaration and TaggedTemplateExpression nodes.
95
- *
96
- * Uses a targeted recursive walk — only descends into node types that can
97
- * contain these targets (skips type annotations, comments, etc.).
98
- */
99
- function walkForImportsAndTemplates(node, imports, templates) {
100
- if (!node || typeof node !== "object") return;
101
- const n = node;
102
- if (n.type === "ImportDeclaration") {
103
- imports.push(n);
104
- return;
105
- }
106
- if (n.type === "TaggedTemplateExpression") templates.push(n);
107
- for (const key of Object.keys(n)) {
108
- if (key === "type" || key === "start" || key === "end" || key === "loc") continue;
109
- const val = n[key];
110
- if (Array.isArray(val)) for (const child of val) walkForImportsAndTemplates(child, imports, templates);
111
- else if (val && typeof val === "object" && val.type) walkForImportsAndTemplates(val, imports, templates);
112
- }
113
- }
114
- /** Build a map of localName → import info from raw ImportDeclaration nodes. */
115
- function buildImportMapFromNodes(importNodes) {
116
- const map = /* @__PURE__ */ new Map();
117
- for (const node of importNodes) {
118
- const sourceValue = node.source?.value;
119
- if (typeof sourceValue !== "string") continue;
120
- const specifiers = node.specifiers;
121
- if (!specifiers) continue;
122
- for (const spec of specifiers) {
123
- const localName = getNodeName(spec.local);
124
- if (!localName) continue;
125
- if (spec.type === "ImportDefaultSpecifier") map.set(localName, {
126
- source: sourceValue,
127
- importedName: "default"
128
- });
129
- else if (spec.type === "ImportNamespaceSpecifier") map.set(localName, {
130
- source: sourceValue,
131
- importedName: "*"
132
- });
133
- else if (spec.type === "ImportSpecifier") {
134
- const importedName = getNodeName(spec.imported) ?? localName;
135
- map.set(localName, {
136
- source: sourceValue,
137
- importedName
138
- });
139
- }
140
- }
141
- }
142
- return map;
143
- }
144
- /**
145
- * Local identifiers that refer to `styled` from `"styled-components"` (default and/or
146
- * `import { styled }` / `import { styled as sc }`).
147
- */
148
- function collectStyledLocalBindingNames(importNodes) {
149
- const names = /* @__PURE__ */ new Set();
150
- for (const node of importNodes) {
151
- if (node.source?.value !== "styled-components") continue;
152
- const specifiers = node.specifiers;
153
- if (!specifiers) continue;
154
- for (const spec of specifiers) if (spec.type === "ImportDefaultSpecifier") {
155
- const name = getNodeName(spec.local);
156
- if (name) names.add(name);
157
- } else if (spec.type === "ImportSpecifier") {
158
- if (getNodeName(spec.imported) === "styled") {
159
- const localName = getNodeName(spec.local);
160
- if (localName) names.add(localName);
161
- }
162
- }
163
- }
164
- return names;
165
- }
166
- /** Find the local name for the styled-components default import. */
167
- function findStyledImportNameFromNodes(importNodes) {
168
- let namedStyledLocal;
169
- for (const node of importNodes) {
170
- if (node.source?.value !== "styled-components") continue;
171
- const specifiers = node.specifiers;
172
- if (!specifiers) continue;
173
- for (const spec of specifiers) if (spec.type === "ImportDefaultSpecifier") {
174
- const name = getNodeName(spec.local);
175
- if (name) return name;
176
- } else if (spec.type === "ImportSpecifier") {
177
- if (getNodeName(spec.imported) === "styled") {
178
- const localName = getNodeName(spec.local);
179
- if (localName) namedStyledLocal = localName;
180
- }
181
- }
182
- }
183
- return namedStyledLocal;
184
- }
185
- /**
186
- * Find local names of `css` imported from styled-components.
187
- * Handles aliased imports like `import { css as sc } from "styled-components"`.
188
- */
189
- function findCssImportNamesFromNodes(importNodes) {
190
- const names = /* @__PURE__ */ new Set();
191
- for (const node of importNodes) {
192
- if (node.source?.value !== "styled-components") continue;
193
- const specifiers = node.specifiers;
194
- if (!specifiers) continue;
195
- for (const spec of specifiers) if (spec.type === "ImportSpecifier") {
196
- if (getNodeName(spec.imported) === "css") {
197
- const localName = getNodeName(spec.local);
198
- if (localName) names.add(localName);
199
- }
200
- }
201
- }
202
- return names;
203
- }
204
- /**
205
- * Find local names of imported components used as selectors inside
206
- * styled-components template literals (both `styled` and `css` tagged templates).
207
- */
208
- function findComponentSelectorLocalsFromNodes(templateNodes, styledImportName, cssImportNames) {
209
- const selectorLocals = /* @__PURE__ */ new Set();
210
- for (const node of templateNodes) {
211
- if (!isStyledTag(node.tag, styledImportName) && !isCssTag(node.tag, cssImportNames)) continue;
212
- const quasi = node.quasi;
213
- if (!quasi) continue;
214
- const quasis = quasi.quasis;
215
- const expressions = quasi.expressions;
216
- if (!quasis || !expressions) continue;
217
- const rawParts = [];
218
- for (let i = 0; i < quasis.length; i++) {
219
- const value = quasis[i]?.value;
220
- rawParts.push(value?.raw ?? "");
221
- if (i < expressions.length) rawParts.push(`__SC_EXPR_${i}__`);
222
- }
223
- const rawCss = rawParts.join("");
224
- for (const match of rawCss.matchAll(PLACEHOLDER_RE_G)) {
225
- const exprIndex = Number(match[1]);
226
- const pos = match.index;
227
- if (isTemplatePlaceholderInSelectorContext(rawCss, pos, match[0].length)) {
228
- const expr = expressions[exprIndex];
229
- if (expr?.type === "Identifier" && typeof expr.name === "string") selectorLocals.add(expr.name);
230
- }
231
- }
232
- }
233
- return selectorLocals;
234
- }
235
- /**
236
- * Check whether a styled-components tag expression is a styled call.
237
- * Matches: styled.div, styled(X), styled.div.attrs(...), styled(X).withConfig(...), etc.
238
- */
239
- function isStyledTag(tag, styledName) {
240
- if (!tag || typeof tag !== "object") return false;
241
- if (tag.type === "MemberExpression") {
242
- const obj = tag.object;
243
- if (obj?.type === "Identifier" && obj.name === styledName) return true;
244
- }
245
- if (tag.type === "CallExpression") {
246
- const callee = tag.callee;
247
- if (callee?.type === "Identifier" && callee.name === styledName) return true;
248
- if (callee?.type === "MemberExpression" && callee.object) return isStyledTag(callee.object, styledName);
249
- }
250
- return false;
251
- }
252
- /** Check if a template tag is the `css` helper from styled-components. */
253
- function isCssTag(tag, cssImportNames) {
254
- if (!tag || !cssImportNames || cssImportNames.size === 0) return false;
255
- return tag.type === "Identifier" && typeof tag.name === "string" && cssImportNames.has(tag.name);
256
- }
257
- /** Safely extract the name string from an AST identifier-like node. */
258
- function getNodeName(node) {
259
- if (!node || typeof node !== "object") return;
260
- if (node.type === "Identifier" && typeof node.name === "string") return node.name;
261
- }
262
- /** Deduplicate and resolve two file lists into a single array of absolute paths. */
263
- function deduplicateAndResolve(filesToTransform, consumerPaths) {
264
- const seen = /* @__PURE__ */ new Set();
265
- const result = [];
266
- for (const f of filesToTransform) {
267
- const abs = resolve(f);
268
- if (!seen.has(abs)) {
269
- seen.add(abs);
270
- result.push(abs);
271
- }
272
- }
273
- for (const f of consumerPaths) {
274
- const abs = resolve(f);
275
- if (!seen.has(abs)) {
276
- seen.add(abs);
277
- result.push(abs);
278
- }
279
- }
280
- return result;
281
- }
282
- //#endregion
1
+ import { m as createPrepassParser } from "./ast-walk-CLvMH7Lm.mjs";
283
2
  //#region src/internal/prepass/stylex-component-exports.ts
284
3
  /**
285
4
  * Prepass helpers for identifying exported components that already apply StyleX.
@@ -597,4 +316,4 @@ function getExhaustiveObservedStaticValues(info, propName) {
597
316
  return values.length === propUsage.values.length ? values : null;
598
317
  }
599
318
  //#endregion
600
- export { walkForImportsAndTemplates as _, mergeComponentPropUsage as a, BARE_TEMPLATE_IDENTIFIER_RE as c, categorizeSelectorUsages as d, collectStyledLocalBindingNames as f, findStyledImportNameFromNodes as g, findCssImportNamesFromNodes as h, getExhaustiveObservedStaticValues as i, applyBridgeFields as l, findComponentSelectorLocalsFromNodes as m, createComponentPropUsageInfo as n, readStaticJsxLiteral as o, deduplicateAndResolve as p, formatObservedVariantCondition as r, collectStylexExportNames as s, KNOWN_NON_ELEMENT_PROPS as t, buildImportMapFromNodes as u, addToSetMap as v };
319
+ export { mergeComponentPropUsage as a, getExhaustiveObservedStaticValues as i, createComponentPropUsageInfo as n, readStaticJsxLiteral as o, formatObservedVariantCondition as r, collectStylexExportNames as s, KNOWN_NON_ELEMENT_PROPS as t };
@@ -1,8 +1,8 @@
1
- import { a as fileImportsFrom, c as resolveBarrelReExport, d as Logger, i as fileExports, l as resolveBarrelReExportBinding, n as createPrepassParser, o as findImportSource, t as walkAst } from "./ast-walk-C226poBl.mjs";
2
- import { n as extractStyledDefBasesFromAstProgram, r as extractStyledDefBasesFromSource, t as computeGlobalLeafKeys } from "./compute-leaf-set-Cu4lMMQ9.mjs";
3
- import { r as escapeRegex } from "./string-utils-Bo3cWgss.mjs";
4
- import { t as isSelectorContext } from "./selector-context-heuristic-LVizWWOR.mjs";
5
- import { _ as walkForImportsAndTemplates, a as mergeComponentPropUsage, c as BARE_TEMPLATE_IDENTIFIER_RE, d as categorizeSelectorUsages, f as collectStyledLocalBindingNames, g as findStyledImportNameFromNodes, h as findCssImportNamesFromNodes, l as applyBridgeFields, m as findComponentSelectorLocalsFromNodes, n as createComponentPropUsageInfo, o as readStaticJsxLiteral, p as deduplicateAndResolve, s as collectStylexExportNames, t as KNOWN_NON_ELEMENT_PROPS, u as buildImportMapFromNodes, v as addToSetMap } from "./prop-usage-Bs2F3Wke.mjs";
1
+ import { S as Logger, _ as findImportSource, a as buildImportMapFromNodes, b as resolveBarrelReExportBinding, c as deduplicateAndResolve, d as findStyledImportNameFromNodes, f as walkForImportsAndTemplates, g as fileImportsFrom, h as fileExports, i as applyBridgeFields, l as findComponentSelectorLocalsFromNodes, m as createPrepassParser, o as categorizeSelectorUsages, p as addToSetMap, r as BARE_TEMPLATE_IDENTIFIER_RE, t as walkAst, u as findCssImportNamesFromNodes, y as resolveBarrelReExport } from "./ast-walk-CLvMH7Lm.mjs";
2
+ import { t as isSelectorContext } from "./selector-context-heuristic-Dptd93Xe.mjs";
3
+ import { n as extractStyledDefBases, t as computeGlobalLeafKeys } from "./compute-leaf-set-D5GvkV-H.mjs";
4
+ import { r as escapeRegex } from "./string-utils-4eeXGa48.mjs";
5
+ import { a as mergeComponentPropUsage, n as createComponentPropUsageInfo, o as readStaticJsxLiteral, s as collectStylexExportNames, t as KNOWN_NON_ELEMENT_PROPS } from "./prop-usage-z-bcXTOD.mjs";
6
6
  import { relative, resolve } from "node:path";
7
7
  import { readFileSync, realpathSync } from "node:fs";
8
8
  import { execSync } from "node:child_process";
@@ -364,14 +364,7 @@ async function runPrepass(options) {
364
364
  /** Regex baseline for styled defs, then AST pass overrides/adds rows when parse succeeds. */
365
365
  function mergeLeafStyledDefBasesForFile(filePath, source, parser, styledDefBases) {
366
366
  if (hasLeavesOnlyPrepassBlocker(source)) return;
367
- extractStyledDefBasesFromSource(filePath, source, styledDefBases);
368
- try {
369
- const ast = parser.parse(source);
370
- const program = ast.program ?? ast;
371
- const importNodes = [];
372
- walkForImportsAndTemplates(program, importNodes, []);
373
- extractStyledDefBasesFromAstProgram(filePath, program, collectStyledLocalBindingNames(importNodes), styledDefBases);
374
- } catch {}
367
+ extractStyledDefBases(filePath, source, parser, styledDefBases);
375
368
  }
376
369
  function hasLeavesOnlyPrepassBlocker(source) {
377
370
  return source.includes("shouldForwardProp") || hasUniversalSelectorCandidate(source);
@@ -381,7 +374,7 @@ function isTypeScriptParser(parserName) {
381
374
  }
382
375
  async function loadTypeScriptAnalysis() {
383
376
  try {
384
- return await import("./typescript-analysis-BLyx4wAJ.mjs");
377
+ return await import("./typescript-analysis-BzsnorIV.mjs");
385
378
  } catch (err) {
386
379
  const message = err instanceof Error ? err.message : String(err);
387
380
  if (message.includes("typescript") && (message.includes("Cannot find") || message.includes("ERR_MODULE_NOT_FOUND"))) throw new Error(["TypeScript parser runs require the optional `typescript` package for compiler metadata.", "Install TypeScript in the project (supported range: >=5.0.0 <6), or use a non-TypeScript parser."].join("\n"));
@@ -1,4 +1,4 @@
1
- import { r as toRealPath } from "./path-utils-BC4U8X_q.mjs";
1
+ import { r as toRealPath } from "./path-utils-ByFNVtHo.mjs";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  //#region src/internal/public-api-validation.ts
4
4
  function describeValue(value) {
@@ -1,16 +1,16 @@
1
1
  import { t as createModuleResolver } from "./resolve-imports-DgSAddIF.mjs";
2
- import { A as isIdentifierNamed, B as literalToString, C as isAstNode$1, D as isEmptyCssBranch, E as isConditionalExpressionNode, F as isNumericTsType, G as staticValueToLiteral, H as resolveIdentifierToPropName, I as isPureIdempotentExpression, J as DEFAULT_THEME_HOOK, K as unwrapLogicalFallback, L as isReactComponentPropsUtilityName, M as isLogicalExpressionNode, N as isMemberExpressionNode, O as isFunctionNode$1, P as isNodeOfType, R as isUndefinedIdentifier, S as isArrowFunctionExpression, T as isCallExpressionNode, U as resolveStaticExpressionValue, V as patternBindsAnyName, W as setIdentifierTypeAnnotation, X as isDirectionalResult, Z as assertValidAdapter, _ as getNodeLocStart, a as cloneAstNode, b as hasNonLiteralLogicalFallback, c as extractRootAndPath, d as getArrowFnSingleParamName, f as getDeclaratorId, g as getMemberPathFromIdentifier, h as getJsxElementName, i as buildStyleFnConditionExpr, j as isIdentifierNode, k as isIdentifierMemberExpression, l as extractStaticLiteralValue, m as getIdentifierMemberPropertyName, n as astNodesEqual, o as collectIdentifiers, p as getFunctionBodyExpr, q as mergeMarkerDeclarations, r as buildEnumValueMap, s as collectPatternBindingNames$2, t as transformedComponentAcceptsSx, u as getArrowFnParamBindings, v as getRootJsxIdentifierName, w as isAstPath, x as identifierName, y as getSinglePropFromMemberExpr, z as literalToStaticValue } from "./sx-surface-Cth8EesU.mjs";
3
- import { d as Logger, f as PARTIAL_MIGRATION_INCOMPLETE_WARNING, i as fileExports, l as resolveBarrelReExportBinding, n as createPrepassParser, o as findImportSource, p as UNSUPPORTED_SHOULD_FORWARD_PROP_WARNING, r as findDefaultExportedLocalName, s as getReExportedSourceName, t as walkAst, u as CASCADE_CONFLICT_WARNING } from "./ast-walk-C226poBl.mjs";
4
- import { n as resolveExistingFilePath, r as toRealPath, t as isRelativeSpecifier } from "./path-utils-BC4U8X_q.mjs";
5
- import { a as hasTopLevelMatch, c as isPrettierIgnoreComment, d as isValidIdentifierName, f as kebabToCamelCase, g as sanitizeIdentifier, h as normalizeWhitespace, i as getCommentBody, l as isSingleBackgroundComponent, m as lowerFirst, n as capitalize$1, o as isBackgroundImageValue, p as looksLikeLength, r as escapeRegex, s as isJSDocBlockComment, t as camelToKebabCase, u as isStyleSectionMarkerComment } from "./string-utils-Bo3cWgss.mjs";
6
- import { a as terminateStandaloneInterpolationStatements, i as parseStyledTemplateLiteral, n as isTemplatePlaceholderInSelectorContext, r as PLACEHOLDER_RE } from "./selector-context-heuristic-LVizWWOR.mjs";
7
- import { _ as walkForImportsAndTemplates, a as mergeComponentPropUsage, i as getExhaustiveObservedStaticValues, n as createComponentPropUsageInfo, o as readStaticJsxLiteral, r as formatObservedVariantCondition, s as collectStylexExportNames, t as KNOWN_NON_ELEMENT_PROPS, u as buildImportMapFromNodes } from "./prop-usage-Bs2F3Wke.mjs";
2
+ import { A as isIdentifierNamed, B as literalToString, C as isAstNode$1, D as isEmptyCssBranch, E as isConditionalExpressionNode, F as isNumericTsType, G as staticValueToLiteral, H as resolveIdentifierToPropName, I as isPureIdempotentExpression, J as DEFAULT_THEME_HOOK, K as unwrapLogicalFallback, L as isReactComponentPropsUtilityName, M as isLogicalExpressionNode, N as isMemberExpressionNode, O as isFunctionNode$1, P as isNodeOfType, R as isUndefinedIdentifier, S as isArrowFunctionExpression, T as isCallExpressionNode, U as resolveStaticExpressionValue, V as patternBindsAnyName, W as setIdentifierTypeAnnotation, X as isDirectionalResult, Z as assertValidAdapter, _ as getNodeLocStart, a as cloneAstNode, b as hasNonLiteralLogicalFallback, c as extractRootAndPath, d as getArrowFnSingleParamName, f as getDeclaratorId, g as getMemberPathFromIdentifier, h as getJsxElementName, i as buildStyleFnConditionExpr, j as isIdentifierNode, k as isIdentifierMemberExpression, l as extractStaticLiteralValue, m as getIdentifierMemberPropertyName, n as astNodesEqual, o as collectIdentifiers, p as getFunctionBodyExpr, q as mergeMarkerDeclarations, r as buildEnumValueMap, s as collectPatternBindingNames$2, t as transformedComponentAcceptsSx, u as getArrowFnParamBindings, v as getRootJsxIdentifierName, w as isAstPath, x as identifierName, y as getSinglePropFromMemberExpr, z as literalToStaticValue } from "./sx-surface-_Hjc6ZDq.mjs";
3
+ import { C as PARTIAL_MIGRATION_INCOMPLETE_WARNING, S as Logger, _ as findImportSource, a as buildImportMapFromNodes, b as resolveBarrelReExportBinding, f as walkForImportsAndTemplates, h as fileExports, m as createPrepassParser, n as findDefaultExportedLocalName, t as walkAst, v as getReExportedSourceName, w as UNSUPPORTED_SHOULD_FORWARD_PROP_WARNING, x as CASCADE_CONFLICT_WARNING } from "./ast-walk-CLvMH7Lm.mjs";
4
+ import { a as terminateStandaloneInterpolationStatements, i as parseStyledTemplateLiteral, n as isTemplatePlaceholderInSelectorContext, r as PLACEHOLDER_RE } from "./selector-context-heuristic-Dptd93Xe.mjs";
5
+ import { n as resolveExistingFilePath, r as toRealPath, t as isRelativeSpecifier } from "./path-utils-ByFNVtHo.mjs";
6
+ import { a as hasTopLevelMatch, c as isPrettierIgnoreComment, d as isValidIdentifierName, f as kebabToCamelCase, g as sanitizeIdentifier, h as normalizeWhitespace, i as getCommentBody, l as isSingleBackgroundComponent, m as lowerFirst, n as capitalize$1, o as isBackgroundImageValue, p as looksLikeLength, r as escapeRegex, s as isJSDocBlockComment, t as camelToKebabCase, u as isStyleSectionMarkerComment } from "./string-utils-4eeXGa48.mjs";
7
+ import { a as mergeComponentPropUsage, i as getExhaustiveObservedStaticValues, n as createComponentPropUsageInfo, o as readStaticJsxLiteral, r as formatObservedVariantCondition, s as collectStylexExportNames, t as KNOWN_NON_ELEMENT_PROPS } from "./prop-usage-z-bcXTOD.mjs";
8
8
  import { createRequire } from "node:module";
9
9
  import jscodeshift from "jscodeshift";
10
10
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
11
11
  import { existsSync, readFileSync, realpathSync } from "node:fs";
12
- import valueParser from "postcss-value-parser";
13
12
  import { compile } from "stylis";
13
+ import valueParser from "postcss-value-parser";
14
14
  import selectorParser from "postcss-selector-parser";
15
15
  //#region src/internal/css-value-split.ts
16
16
  function splitCssValueWhitespace(raw) {
@@ -1,5 +1,5 @@
1
- import { r as toRealPath } from "./path-utils-BC4U8X_q.mjs";
2
- import { r as escapeRegex } from "./string-utils-Bo3cWgss.mjs";
1
+ import { r as toRealPath } from "./path-utils-ByFNVtHo.mjs";
2
+ import { r as escapeRegex } from "./string-utils-4eeXGa48.mjs";
3
3
  import { basename, dirname, relative } from "node:path";
4
4
  import { readFileSync } from "node:fs";
5
5
  //#region src/internal/transient-prop-consumer-patcher.ts
@@ -1,4 +1,4 @@
1
- import { n as resolveExistingFilePath } from "./path-utils-BC4U8X_q.mjs";
1
+ import { n as resolveExistingFilePath } from "./path-utils-ByFNVtHo.mjs";
2
2
  import path from "node:path";
3
3
  import ts from "typescript";
4
4
  //#region src/internal/prepass/ts-ast-shared.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styled-components-to-stylex-codemod",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "description": "Codemod to transform styled-components to StyleX",
5
5
  "keywords": [
6
6
  "codemod",