@barefootjs/jsx 0.24.1 → 0.25.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.
package/src/types.ts CHANGED
@@ -1455,6 +1455,19 @@ export interface NamedExportSpecifier {
1455
1455
  isTypeOnly: boolean
1456
1456
  }
1457
1457
 
1458
+ /** One identifier occurrence in a factory body that call-site inlining may
1459
+ * rename (#2341 BUG-1). Offsets are relative to ReactiveFactoryInfo.bodySource. */
1460
+ export interface FactoryRenameSite {
1461
+ name: string
1462
+ start: number
1463
+ end: number
1464
+ /** 'shorthand' = the identifier is simultaneously a property key and a
1465
+ * value/binding reference ({ name } literal, or { name } object-pattern
1466
+ * element). Renaming it must EXPAND to `name: <replacement>` to preserve
1467
+ * the key. 'plain' = ordinary reference or declaration name. */
1468
+ form: 'plain' | 'shorthand'
1469
+ }
1470
+
1458
1471
  /**
1459
1472
  * Reactive factory helper metadata (#931). Collected when a same-file
1460
1473
  * function matches the factory shape: exactly one top-level `return` whose
@@ -1500,6 +1513,14 @@ export interface ReactiveFactoryInfo {
1500
1513
  * file are dropped at prescan time.
1501
1514
  */
1502
1515
  requiredImports?: RequiredFactoryImport[]
1516
+ /**
1517
+ * Identifier occurrences within `bodySource` that call-site inlining may
1518
+ * rename (#2341 BUG-1) — collected by the same AST walk that produces
1519
+ * `bodySource`, so offsets stay in lockstep with the serialized text.
1520
+ * Same-file and cross-file factories both get this (both flow through
1521
+ * `detectReactiveFactory`).
1522
+ */
1523
+ renameSites: FactoryRenameSite[]
1503
1524
  }
1504
1525
 
1505
1526
  /**
@@ -1526,7 +1547,7 @@ export interface RequiredFactoryImport {
1526
1547
  * the generic BF110.
1527
1548
  */
1528
1549
  export interface DeclinedReactiveFactory {
1529
- code: 'BF111' | 'BF112' | 'BF113'
1550
+ code: 'BF111' | 'BF112' | 'BF113' | 'BF114'
1530
1551
  /** Detail spliced into the call-site message (e.g. offending identifier list). */
1531
1552
  detail: string
1532
1553
  /** Definition site (in the helper file for cross-file declines). */