bestax-migrate 2.23.0 → 2.23.1

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 +1 @@
1
- {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA8BnE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA6CtD,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAOrD,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAShE,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAktBpD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA2FhD,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,SAAS,CAM3E"}
1
+ {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA8BnE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA4CtD,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAOrD,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAShE,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA0tBpD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA2FhD,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,SAAS,CAM3E"}
@@ -79,8 +79,7 @@ export const UNIVERSAL_PROPS = {
79
79
  // Per-component maps override this with AS_OK where bestax has an `as`.
80
80
  as: AS_TODO,
81
81
  // Same shape: the per-component maps override this with `rename: 'ref'` on
82
- // the targets that forward one, and the `navbar-item` special handles the
83
- // two it chooses between. Whatever is left reaches here, so no `innerRef`
82
+ // the targets that forward one. Whatever is left reaches here, so no `innerRef`
84
83
  // migrates in silence onto a target that cannot take it — the RBC sibling
85
84
  // `domRef` has been flagged universally all along.
86
85
  innerRef: {
@@ -697,7 +696,15 @@ export const MAPPING = {
697
696
  target: 'Navbar.Item',
698
697
  status: 'mapped',
699
698
  special: 'navbar-item',
700
- props: { active: {}, onClick: {}, as: AS_OK },
699
+ // Both targets the special picks forward a ref to the element rbx's
700
+ // `innerRef` reached: the item itself, or the `has-dropdown`
701
+ // container `Navbar.Dropdown` renders.
702
+ props: {
703
+ active: {},
704
+ onClick: {},
705
+ as: AS_OK,
706
+ innerRef: { rename: 'ref' },
707
+ },
701
708
  subs: { Container: { status: 'mapped', special: 'navbar-container' } },
702
709
  },
703
710
  Dropdown: { status: 'mapped', special: 'navbar-dropdown' },
@@ -1 +1 @@
1
- {"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAYL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAUL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAq3B9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAIf"}
1
+ {"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAYL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAUL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAu1B9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAIf"}
@@ -510,31 +510,6 @@ const SPECIALS = {
510
510
  addTodo(ctx, path, `prop:${prop}`, `bestax \`Navbar.Item\` has no \`${prop}\` prop; restructure or add a class by hand`);
511
511
  ctx.dirty = true;
512
512
  }
513
- // bestax's `Navbar.Dropdown` forwards a ref, but it is the one such target
514
- // the `innerRef: { rename: 'ref' }` entries in mapping.ts cannot reach:
515
- // that table is keyed on the rbx name (`Navbar.Item`), and only this
516
- // handler knows which of the two targets was picked. The condition is
517
- // about that, not about ref support: a plain `Navbar.Item` forwards one
518
- // too since #661, so leaving `innerRef` alone there is a rename this
519
- // handler declines rather than one the target cannot take. Performing it
520
- // changes emitted output on code that migrates today, so it stays #734 —
521
- // but declining silently is not an option either. `innerRef` is in no
522
- // rbx prop table, so nothing downstream flags it and it used to reach the
523
- // DOM as an unknown attribute with the report saying nothing, which is
524
- // the silent skip bestax-migrate/CLAUDE.md rules out. It is flagged here
525
- // instead, and the rename stays the user's to make.
526
- const handledInnerRef = [];
527
- const innerRefAttr = findAttr(element, 'innerRef');
528
- if (innerRefAttr) {
529
- handledInnerRef.push('innerRef');
530
- if (target === 'Navbar.Dropdown') {
531
- innerRefAttr.name = ctx.j.jsxIdentifier('ref');
532
- ctx.dirty = true;
533
- }
534
- else {
535
- addTodo(ctx, path, 'prop:innerRef', 'bestax `Navbar.Item` forwards a ref; rename `innerRef` to `ref` by hand');
536
- }
537
- }
538
513
  restrictAsToTargets(ctx, path, element, target ?? 'Navbar.Item', [
539
514
  'Navbar.Item',
540
515
  ]);
@@ -548,7 +523,6 @@ const SPECIALS = {
548
523
  'expanded',
549
524
  'hoverable',
550
525
  'managed',
551
- ...handledInnerRef,
552
526
  ],
553
527
  };
554
528
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bestax-migrate",
3
- "version": "2.23.0",
3
+ "version": "2.23.1",
4
4
  "description": "Codemods for migrating existing React apps from other Bulma libraries to @allxsmith/bestax-bulma",
5
5
  "type": "module",
6
6
  "bin": {