bestax-migrate 2.27.0 → 2.28.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/dist/sources/_shared/polymorphic.d.ts.map +1 -1
- package/dist/sources/_shared/polymorphic.js +16 -1
- package/dist/sources/bloomer/mapping.d.ts.map +1 -1
- package/dist/sources/bloomer/mapping.js +9 -4
- package/dist/sources/bloomer/specials.d.ts.map +1 -1
- package/dist/sources/bloomer/specials.js +30 -3
- package/dist/sources/bulma-classes/class-map.d.ts +31 -10
- package/dist/sources/bulma-classes/class-map.d.ts.map +1 -1
- package/dist/sources/bulma-classes/class-map.js +48 -13
- package/dist/sources/bulma-classes/glyph.d.ts +20 -0
- package/dist/sources/bulma-classes/glyph.d.ts.map +1 -1
- package/dist/sources/bulma-classes/glyph.js +64 -0
- package/dist/sources/bulma-classes/html-assets.js +1 -1
- package/dist/sources/bulma-classes/plan.d.ts +40 -1
- package/dist/sources/bulma-classes/plan.d.ts.map +1 -1
- package/dist/sources/bulma-classes/plan.js +160 -24
- package/dist/sources/bulma-classes/transform.d.ts +2 -1
- package/dist/sources/bulma-classes/transform.d.ts.map +1 -1
- package/dist/sources/bulma-classes/transform.js +231 -33
- package/dist/sources/rbx/mapping.d.ts +10 -0
- package/dist/sources/rbx/mapping.d.ts.map +1 -1
- package/dist/sources/rbx/mapping.js +12 -6
- package/dist/sources/react-bulma-components/mapping.d.ts.map +1 -1
- package/dist/sources/react-bulma-components/mapping.js +18 -4
- package/package.json +2 -2
|
@@ -18,7 +18,7 @@ const DOCS = 'https://bestax.io/docs';
|
|
|
18
18
|
const numeric = { numberToString: true };
|
|
19
19
|
/**
|
|
20
20
|
* `as` is universal in rbx — `forwardRefAs` puts it on every component — but
|
|
21
|
-
* bestax declares it on only
|
|
21
|
+
* bestax declares it on only some components, several of them constrained to a
|
|
22
22
|
* narrow literal union (`Footer` is `'footer' | 'div'`). So the default is a
|
|
23
23
|
* TODO, and the components that really do accept `as` opt in with `AS_OK` in
|
|
24
24
|
* their own prop map, which runs first and wins.
|
|
@@ -36,7 +36,7 @@ const AS_TODO = {
|
|
|
36
36
|
* `'footer' | 'div'`, `Control` is `'div'`), so an `as={SomeComponent}` still
|
|
37
37
|
* surfaces — as a type error the user can see, rather than a silent rewrite.
|
|
38
38
|
*/
|
|
39
|
-
const AS_OK = {};
|
|
39
|
+
export const AS_OK = {};
|
|
40
40
|
/**
|
|
41
41
|
* Helper props rbx mixes into every component via `HelpersProps`. Applied
|
|
42
42
|
* after each component's own prop map, to whatever attributes are left.
|
|
@@ -182,6 +182,7 @@ export const MAPPING = {
|
|
|
182
182
|
status: 'mapped',
|
|
183
183
|
target: 'Container',
|
|
184
184
|
props: {
|
|
185
|
+
as: AS_OK,
|
|
185
186
|
fluid: {},
|
|
186
187
|
// bestax's ContainerBreakpoint is 'tablet' | 'desktop' | 'widescreen';
|
|
187
188
|
// rbx accepts all six, so the other three are type errors if passed on.
|
|
@@ -729,10 +730,14 @@ export const MAPPING = {
|
|
|
729
730
|
Panel: {
|
|
730
731
|
status: 'mapped',
|
|
731
732
|
target: 'Panel',
|
|
732
|
-
props: { color: {} },
|
|
733
|
+
props: { as: AS_OK, color: {} },
|
|
733
734
|
subs: {
|
|
734
735
|
Heading: { status: 'mapped', target: 'Panel.Heading' },
|
|
735
|
-
Block: {
|
|
736
|
+
Block: {
|
|
737
|
+
status: 'mapped',
|
|
738
|
+
target: 'Panel.Block',
|
|
739
|
+
props: { active: {}, as: AS_OK },
|
|
740
|
+
},
|
|
736
741
|
Icon: { status: 'partial', target: 'Panel.Icon', special: 'icon' },
|
|
737
742
|
Tab: {
|
|
738
743
|
status: 'mapped',
|
|
@@ -815,6 +820,7 @@ export const MAPPING = {
|
|
|
815
820
|
status: 'mapped',
|
|
816
821
|
target: 'Hero',
|
|
817
822
|
props: {
|
|
823
|
+
as: AS_OK,
|
|
818
824
|
color: {},
|
|
819
825
|
// rbx's five sizes are bestax's five, `fullheight-with-navbar`
|
|
820
826
|
// included, and both render the one `is-<size>` class.
|
|
@@ -825,8 +831,8 @@ export const MAPPING = {
|
|
|
825
831
|
},
|
|
826
832
|
subs: {
|
|
827
833
|
Body: { status: 'mapped', target: 'Hero.Body' },
|
|
828
|
-
Foot: { status: 'mapped', target: 'Hero.Foot' },
|
|
829
|
-
Head: { status: 'mapped', target: 'Hero.Head' },
|
|
834
|
+
Foot: { status: 'mapped', target: 'Hero.Foot', props: { as: AS_OK } },
|
|
835
|
+
Head: { status: 'mapped', target: 'Hero.Head', props: { as: AS_OK } },
|
|
830
836
|
},
|
|
831
837
|
},
|
|
832
838
|
Section: { status: 'mapped', target: 'Section', props: { size: {} } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/sources/react-bulma-components/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQnE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAgFtD,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAUhE,CAAC;AAIF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/sources/react-bulma-components/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQnE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAgFtD,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAUhE,CAAC;AAIF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAirBpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAsEhD,CAAC;AAEF,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,SAAS,CAM3E"}
|
|
@@ -252,6 +252,7 @@ export const MAPPING = {
|
|
|
252
252
|
status: 'mapped',
|
|
253
253
|
target: 'Container',
|
|
254
254
|
props: {
|
|
255
|
+
renderAs: { rename: 'as' },
|
|
255
256
|
max: { booleanToProp: { name: 'isMax' } },
|
|
256
257
|
breakpoint: {
|
|
257
258
|
// 'tablet' / 'desktop' stay as breakpoint="..." (same prop in bestax)
|
|
@@ -430,6 +431,7 @@ export const MAPPING = {
|
|
|
430
431
|
status: 'mapped',
|
|
431
432
|
target: 'Hero',
|
|
432
433
|
props: {
|
|
434
|
+
renderAs: { rename: 'as' },
|
|
433
435
|
color: {},
|
|
434
436
|
size: {
|
|
435
437
|
valueTodo: {
|
|
@@ -442,9 +444,17 @@ export const MAPPING = {
|
|
|
442
444
|
hasNavbar: { booleanToProp: { name: 'fullheightWithNavbar' } },
|
|
443
445
|
},
|
|
444
446
|
subs: {
|
|
445
|
-
Header: {
|
|
447
|
+
Header: {
|
|
448
|
+
status: 'mapped',
|
|
449
|
+
target: 'Hero.Head',
|
|
450
|
+
props: { renderAs: { rename: 'as' } },
|
|
451
|
+
},
|
|
446
452
|
Body: { status: 'mapped', target: 'Hero.Body' },
|
|
447
|
-
Footer: {
|
|
453
|
+
Footer: {
|
|
454
|
+
status: 'mapped',
|
|
455
|
+
target: 'Hero.Foot',
|
|
456
|
+
props: { renderAs: { rename: 'as' } },
|
|
457
|
+
},
|
|
448
458
|
},
|
|
449
459
|
},
|
|
450
460
|
Icon: {
|
|
@@ -688,7 +698,7 @@ export const MAPPING = {
|
|
|
688
698
|
Panel: {
|
|
689
699
|
status: 'mapped',
|
|
690
700
|
target: 'Panel',
|
|
691
|
-
props: { color: {} },
|
|
701
|
+
props: { renderAs: { rename: 'as' }, color: {} },
|
|
692
702
|
subs: {
|
|
693
703
|
Header: { status: 'mapped', target: 'Panel.Heading' },
|
|
694
704
|
Tabs: {
|
|
@@ -699,7 +709,11 @@ export const MAPPING = {
|
|
|
699
709
|
Tab: { status: 'mapped', special: 'panel-tab' },
|
|
700
710
|
},
|
|
701
711
|
},
|
|
702
|
-
Block: {
|
|
712
|
+
Block: {
|
|
713
|
+
status: 'mapped',
|
|
714
|
+
target: 'Panel.Block',
|
|
715
|
+
props: { ...activeKept, renderAs: { rename: 'as' } },
|
|
716
|
+
},
|
|
703
717
|
Icon: { status: 'partial', target: 'Panel.Icon', special: 'icon' },
|
|
704
718
|
},
|
|
705
719
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-migrate",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"description": "Codemods for migrating existing React apps from other Bulma libraries to @allxsmith/bestax-bulma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"jscodeshift": "^17.3.0",
|
|
41
41
|
"parse5": "^7.3.0",
|
|
42
42
|
"property-information": "^7.2.0",
|
|
43
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
43
|
+
"@allxsmith/bestax-bulma": "^5.38.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@jest/globals": "^30.0.0",
|