bestax-migrate 2.25.2 → 2.25.4
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/props.d.ts.map +1 -1
- package/dist/sources/_shared/props.js +24 -1
- package/dist/sources/_shared/size-unions.d.ts +18 -0
- package/dist/sources/_shared/size-unions.d.ts.map +1 -0
- package/dist/sources/_shared/size-unions.js +17 -0
- package/dist/sources/_shared/specials-utils.d.ts +31 -0
- package/dist/sources/_shared/specials-utils.d.ts.map +1 -1
- package/dist/sources/_shared/specials-utils.js +80 -0
- package/dist/sources/bloomer/mapping.d.ts.map +1 -1
- package/dist/sources/bloomer/mapping.js +4 -1
- package/dist/sources/bloomer/specials.d.ts.map +1 -1
- package/dist/sources/bloomer/specials.js +27 -9
- package/dist/sources/rbx/mapping.d.ts.map +1 -1
- package/dist/sources/rbx/mapping.js +8 -15
- package/dist/sources/rbx/specials.d.ts.map +1 -1
- package/dist/sources/rbx/specials.js +11 -2
- package/dist/sources/react-bulma-components/mapping.d.ts.map +1 -1
- package/dist/sources/react-bulma-components/mapping.js +4 -7
- package/dist/sources/react-bulma-components/specials.d.ts.map +1 -1
- package/dist/sources/react-bulma-components/specials.js +16 -5
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/props.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/props.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAA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VERSAL_PROPS` in its `mapping.ts`
|
|
7
7
|
* while sharing this interpreter.
|
|
8
8
|
*/
|
|
9
|
-
import { addAttr, addTodo, attributesOf, findAttr, jsxStringValue, literalValueOf, makeAttr, removeAttr, resolveBooleanish, } from './jsx-utils.js';
|
|
9
|
+
import { addAttr, addTodo, attributesOf, findAttr, jsxNameParts, jsxStringValue, literalValueOf, makeAttr, removeAttr, resolveBooleanish, } from './jsx-utils.js';
|
|
10
10
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11
11
|
/**
|
|
12
12
|
* Add a converted attribute unless the target name is already present — two
|
|
@@ -107,6 +107,29 @@ export function applyPropAction(ctx, path, element, attr, action) {
|
|
|
107
107
|
addTodo(ctx, path, `prop:${originalName}`, `\`${written}\` — ${action.valueTodo[todoKey]}`);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
+
if (action.allowed) {
|
|
111
|
+
if (literal.kind === 'string' && action.allowed.includes(literal.value)) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const values = action.allowed.map(v => `'${v}'`).join(', ');
|
|
115
|
+
// Several of these can land on one statement, so say which element.
|
|
116
|
+
const parts = jsxNameParts(element.openingElement?.name);
|
|
117
|
+
const on = parts ? ` on \`<${parts.join('.')}>\`` : '';
|
|
118
|
+
let written;
|
|
119
|
+
if (literal.kind === 'string') {
|
|
120
|
+
written = `${originalName}="${literal.value}"`;
|
|
121
|
+
}
|
|
122
|
+
else if (literal.kind === 'number') {
|
|
123
|
+
written = `${originalName}={${literal.value}}`;
|
|
124
|
+
}
|
|
125
|
+
else if (literal.kind === 'boolean') {
|
|
126
|
+
written = literal.value ? originalName : `${originalName}={false}`;
|
|
127
|
+
}
|
|
128
|
+
addTodo(ctx, path, `prop:${originalName}`, written === undefined
|
|
129
|
+
? `\`${originalName}\`${on} has a dynamic value, and bestax-bulma takes only ${values}; make sure it can only be one of those`
|
|
130
|
+
: `\`${written}\`${on} is not a value bestax-bulma takes (${values}); use one of those or drop it`);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
110
133
|
if (action.valueToProp) {
|
|
111
134
|
if (literal.kind === 'string') {
|
|
112
135
|
const mapped = action.valueMap?.[literal.value];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `size` values bestax takes on the components a source's group or
|
|
3
|
+
* message `size` carries onto, keyed by the name the mappings use as their
|
|
4
|
+
* `target`. rbx and react-bulma-components both accept any string there, so
|
|
5
|
+
* a mapping passes a size through only when it is in this list
|
|
6
|
+
* (`PropAction.allowed`), and anything else keeps a TODO rather than becoming
|
|
7
|
+
* output that does not compile.
|
|
8
|
+
*
|
|
9
|
+
* bulma-ui keeps these unions in module-local constants, so this is a hand
|
|
10
|
+
* copy. `e2e/size-unions.test.ts` holds each row to the library's own type in
|
|
11
|
+
* both directions, and checks every mapping that names a row uses it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SIZE_UNIONS: {
|
|
14
|
+
readonly Buttons: readonly ["small", "medium", "large"];
|
|
15
|
+
readonly Tags: readonly ["medium", "large"];
|
|
16
|
+
readonly Message: readonly ["small", "medium", "large"];
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=size-unions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size-unions.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/size-unions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW;;;;CAI8B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `size` values bestax takes on the components a source's group or
|
|
3
|
+
* message `size` carries onto, keyed by the name the mappings use as their
|
|
4
|
+
* `target`. rbx and react-bulma-components both accept any string there, so
|
|
5
|
+
* a mapping passes a size through only when it is in this list
|
|
6
|
+
* (`PropAction.allowed`), and anything else keeps a TODO rather than becoming
|
|
7
|
+
* output that does not compile.
|
|
8
|
+
*
|
|
9
|
+
* bulma-ui keeps these unions in module-local constants, so this is a hand
|
|
10
|
+
* copy. `e2e/size-unions.test.ts` holds each row to the library's own type in
|
|
11
|
+
* both directions, and checks every mapping that names a row uses it.
|
|
12
|
+
*/
|
|
13
|
+
export const SIZE_UNIONS = {
|
|
14
|
+
Buttons: ['small', 'medium', 'large'],
|
|
15
|
+
Tags: ['medium', 'large'],
|
|
16
|
+
Message: ['small', 'medium', 'large'],
|
|
17
|
+
};
|
|
@@ -76,6 +76,37 @@ export declare function modifierClass(ctx: TransformContext, path: ASTPath<any>,
|
|
|
76
76
|
* it is picked.
|
|
77
77
|
*/
|
|
78
78
|
export declare function restrictAsToTargets(ctx: TransformContext, path: ASTPath<any>, element: any, target: string | undefined, allowed: string[], prop?: string): void;
|
|
79
|
+
/** What a source's title handler tells `keepTitleLevel` about it. */
|
|
80
|
+
export interface TitleSource {
|
|
81
|
+
/** The source component, for the TODO (`Heading`, `Subtitle`). */
|
|
82
|
+
where: string;
|
|
83
|
+
/** The bestax component it becomes: `Title` or `SubTitle`. */
|
|
84
|
+
target: string;
|
|
85
|
+
/** The source's size prop: `isSize` in bloomer, `size` elsewhere. */
|
|
86
|
+
size: string;
|
|
87
|
+
/** The source's element prop: `tag`, `renderAs` or `as`. */
|
|
88
|
+
tag: string;
|
|
89
|
+
/** The element the source rendered when no tag was given. */
|
|
90
|
+
level: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Carry a title's size across without changing its heading level.
|
|
94
|
+
*
|
|
95
|
+
* Every source library rendered a title at the element its tag prop named,
|
|
96
|
+
* or at its own default, whatever the size. bestax's `Title` and `SubTitle`
|
|
97
|
+
* render the heading their `size` names unless `as="p"`, so `<Title size={4}>`
|
|
98
|
+
* is an <h4>. A size therefore stays `size` only where that renders the
|
|
99
|
+
* element the source did: a <p>, or the <hN> the size names, at a size bestax
|
|
100
|
+
* takes. Anywhere else it moves to the `textSize` helper, which sets the same
|
|
101
|
+
* font size and leaves the level to `as`. Any other size gets a TODO.
|
|
102
|
+
*
|
|
103
|
+
* bestax defaults to an <h1>, so a source whose default is another level gets
|
|
104
|
+
* it written out as `as`, unless the size already renders it or a spread may
|
|
105
|
+
* name the element.
|
|
106
|
+
*
|
|
107
|
+
* Returns the props it consumed, for the handler's `handledProps`.
|
|
108
|
+
*/
|
|
109
|
+
export declare function keepTitleLevel(ctx: TransformContext, path: ASTPath<any>, element: any, source: TitleSource): string[];
|
|
79
110
|
/**
|
|
80
111
|
* Strip the link attributes a plain element cannot carry.
|
|
81
112
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specials-utils.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/specials-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQjD,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,KACT,aAAa,CAAC;AAEnB,4EAA4E;AAC5E,wBAAgB,WAAW,CACzB,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,QAAQ,EAAE,MAAM,GACf,aAAa,CAuBf;AAED;;;;;;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EAAE,MAAM,GACZ,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,SAAO,GACV,IAAI,CAaN;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,IAAI,CA2CN;AAED,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,KAAK,EAAE,GAAG,EAAE,EACZ,KAAK,EAAE,MAAM,KACV,GAAG,EAAE,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS;4BAG7C,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,OACP,MAAM,aACA,MAAM,GAAG,SAAS,SACtB,MAAM,KACZ,aAAa;6BA2CT,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,SACL,MAAM,YACH,MAAM,GAAG,MAAM,EAAE,KAC1B,aAAa,GAAG,IAAI;EA8CxB"}
|
|
1
|
+
{"version":3,"file":"specials-utils.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/specials-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQjD,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM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EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,WAAW,GAClB,MAAM,EAAE,CAiEV;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,IAAI,CA2CN;AAED,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,KAAK,EAAE,GAAG,EAAE,EACZ,KAAK,EAAE,MAAM,KACV,GAAG,EAAE,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS;4BAG7C,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,OACP,MAAM,aACA,MAAM,GAAG,SAAS,SACtB,MAAM,KACZ,aAAa;6BA2CT,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,SACL,MAAM,YACH,MAAM,GAAG,MAAM,EAAE,KAC1B,aAAa,GAAG,IAAI;EA8CxB"}
|
|
@@ -225,6 +225,86 @@ export function restrictAsToTargets(ctx, path, element, target, allowed, prop =
|
|
|
225
225
|
.join(' / ')} does); render the tag directly or restructure`);
|
|
226
226
|
ctx.dirty = true;
|
|
227
227
|
}
|
|
228
|
+
/** The sizes bestax's Title and SubTitle turn into a heading level. */
|
|
229
|
+
const TITLE_SIZES = ['1', '2', '3', '4', '5', '6'];
|
|
230
|
+
/** Bulma's seven sizes, all of which `textSize` takes. */
|
|
231
|
+
const TEXT_SIZES = [...TITLE_SIZES, '7'];
|
|
232
|
+
/**
|
|
233
|
+
* Carry a title's size across without changing its heading level.
|
|
234
|
+
*
|
|
235
|
+
* Every source library rendered a title at the element its tag prop named,
|
|
236
|
+
* or at its own default, whatever the size. bestax's `Title` and `SubTitle`
|
|
237
|
+
* render the heading their `size` names unless `as="p"`, so `<Title size={4}>`
|
|
238
|
+
* is an <h4>. A size therefore stays `size` only where that renders the
|
|
239
|
+
* element the source did: a <p>, or the <hN> the size names, at a size bestax
|
|
240
|
+
* takes. Anywhere else it moves to the `textSize` helper, which sets the same
|
|
241
|
+
* font size and leaves the level to `as`. Any other size gets a TODO.
|
|
242
|
+
*
|
|
243
|
+
* bestax defaults to an <h1>, so a source whose default is another level gets
|
|
244
|
+
* it written out as `as`, unless the size already renders it or a spread may
|
|
245
|
+
* name the element.
|
|
246
|
+
*
|
|
247
|
+
* Returns the props it consumed, for the handler's `handledProps`.
|
|
248
|
+
*/
|
|
249
|
+
export function keepTitleLevel(ctx, path, element, source) {
|
|
250
|
+
const { j } = ctx;
|
|
251
|
+
const tagAttr = findAttr(element, source.tag) ?? findAttr(element, 'as');
|
|
252
|
+
const spread = (element.openingElement.attributes ?? []).some((a) => a.type === 'JSXSpreadAttribute');
|
|
253
|
+
// The element the source rendered, where the codemod can see it. A spread
|
|
254
|
+
// names the element only where the source spells its tag prop `as`, the
|
|
255
|
+
// name bestax reads: a `tag` or `renderAs` inside one never reaches `as`.
|
|
256
|
+
let rendered;
|
|
257
|
+
if (tagAttr) {
|
|
258
|
+
const literal = literalValueOf(tagAttr);
|
|
259
|
+
if (literal.kind === 'string')
|
|
260
|
+
rendered = literal.value;
|
|
261
|
+
}
|
|
262
|
+
else if (!spread || source.tag !== 'as') {
|
|
263
|
+
rendered = source.level;
|
|
264
|
+
}
|
|
265
|
+
const handled = [];
|
|
266
|
+
let sizeRendersLevel = false;
|
|
267
|
+
const sizeAttr = findAttr(element, source.size);
|
|
268
|
+
if (sizeAttr) {
|
|
269
|
+
const literal = literalValueOf(sizeAttr);
|
|
270
|
+
const size = literal.kind === 'string' || literal.kind === 'number'
|
|
271
|
+
? String(literal.value)
|
|
272
|
+
: undefined;
|
|
273
|
+
const movable = size !== undefined && TEXT_SIZES.includes(size);
|
|
274
|
+
const textSize = findAttr(element, 'textSize');
|
|
275
|
+
// A size the codemod cannot read is still safe beside a <p>; a literal
|
|
276
|
+
// has to be one bestax's `size` takes, or its class goes.
|
|
277
|
+
const takes = size === undefined
|
|
278
|
+
? literal.kind === 'expression'
|
|
279
|
+
: TITLE_SIZES.includes(size);
|
|
280
|
+
if (takes && (rendered === 'p' || rendered === `h${size}`)) {
|
|
281
|
+
// `size` renders this element too, so the prop map carries it as is.
|
|
282
|
+
sizeRendersLevel = true;
|
|
283
|
+
}
|
|
284
|
+
else if (movable && !textSize) {
|
|
285
|
+
sizeAttr.name = j.jsxIdentifier('textSize');
|
|
286
|
+
sizeAttr.value = j.stringLiteral(size);
|
|
287
|
+
handled.push(source.size);
|
|
288
|
+
ctx.dirty = true;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
const level = `bestax's \`${source.target}\` renders the heading its \`size\` names unless \`as="p"\``;
|
|
292
|
+
addTodo(ctx, path, `prop:${source.size}`, !takes
|
|
293
|
+
? `bestax's \`${source.target}\` takes a \`size\` from 1 to 6 and renders no size class for this one; drop it, or set a \`textSize\` from '1' to '7' instead`
|
|
294
|
+
: textSize
|
|
295
|
+
? `\`${source.where}\` sets a size and \`textSize\` both, and ${level}; to keep the level, drop \`size\` and let \`textSize\` set the font size`
|
|
296
|
+
: `\`${source.where}\` kept its element at every size, but ${level}; to keep the level, carry the size with \`textSize\`, which takes '1' to '7' as strings`);
|
|
297
|
+
// Written as bestax's prop either way, so the prop map adds nothing.
|
|
298
|
+
sizeAttr.name = j.jsxIdentifier('size');
|
|
299
|
+
handled.push(source.size);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (!tagAttr && rendered && source.level !== 'h1' && !sizeRendersLevel) {
|
|
303
|
+
addAttr(element, makeAttr(j, 'as', source.level));
|
|
304
|
+
ctx.dirty = true;
|
|
305
|
+
}
|
|
306
|
+
return handled;
|
|
307
|
+
}
|
|
228
308
|
/**
|
|
229
309
|
* Strip the link attributes a plain element cannot carry.
|
|
230
310
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/sources/bloomer/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAkBnE;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,UAEzB,CAAC;AA8CF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAsBtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAG1D,CAAC;AAEF;;;;;GAKG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aAG/B,CAAC;AAEH,eAAO,MAAM,kBAAkB,aAqB7B,CAAC;AAEH,8EAA8E;AAC9E,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAC3C,MAAM,GAAG,IAAI,CA0Bf;AAED,iFAAiF;AACjF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOlD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/sources/bloomer/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAkBnE;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,UAEzB,CAAC;AA8CF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAsBtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAG1D,CAAC;AAEF;;;;;GAKG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aAG/B,CAAC;AAEH,eAAO,MAAM,kBAAkB,aAqB7B,CAAC;AAEH,8EAA8E;AAC9E,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAC3C,MAAM,GAAG,IAAI,CA0Bf;AAED,iFAAiF;AACjF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOlD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA6nBpD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAiIpD,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,SAAS,CAM3E"}
|
|
@@ -310,10 +310,13 @@ export const MAPPING = {
|
|
|
310
310
|
props: { isColor: color, isSize: size },
|
|
311
311
|
},
|
|
312
312
|
// bestax's `Title.size` accepts the numbers 1–6 as well as their string
|
|
313
|
-
// forms,
|
|
313
|
+
// forms, but it also picks the heading level, which bloomer's `isSize`
|
|
314
|
+
// never did. The special keeps the level, moving the size to `textSize`
|
|
315
|
+
// where `size` would change it; `isSize: size` covers the rest.
|
|
314
316
|
Title: {
|
|
315
317
|
status: 'mapped',
|
|
316
318
|
target: 'Title',
|
|
319
|
+
special: 'title',
|
|
317
320
|
props: {
|
|
318
321
|
hasTextColor: TEXT_COLOR_OK,
|
|
319
322
|
isSize: size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/bloomer/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/bloomer/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AA6oC9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAQf;AAED,eAAO,MAAM,aAAa,UAAwB,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { RENDER_TODO, RESPONSIVE_PROPS, UNIVERSAL_PROPS } from './mapping.js';
|
|
14
14
|
import { addAttr, attrSource, addTodo, attributesOf, findAttr, literalValueOf, makeAttr, removeAttr, resolveBooleanish, } from '../_shared/jsx-utils.js';
|
|
15
15
|
import { applyPropAction } from '../_shared/props.js';
|
|
16
|
-
import { applyIconProps, makeStripModifierProps, makeStructuralHelpers, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
16
|
+
import { applyIconProps, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
17
17
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
18
18
|
const stripModifierProps = makeStripModifierProps(UNIVERSAL_PROPS, RESPONSIVE_PROPS);
|
|
19
19
|
/**
|
|
@@ -810,15 +810,33 @@ const SPECIALS = {
|
|
|
810
810
|
return replaceWithPlain(ctx, path, element, tag, cls, 'HeroVideo');
|
|
811
811
|
},
|
|
812
812
|
/**
|
|
813
|
-
* bloomer's
|
|
814
|
-
*
|
|
813
|
+
* bloomer's Title rendered an <h1> and its Subtitle an <h2> at every
|
|
814
|
+
* `isSize`, while bestax's render the heading their `size` names. Keeping
|
|
815
|
+
* the heading level is what a screen reader hears, so the size moves to
|
|
816
|
+
* `textSize` wherever `size` would change it (see `keepTitleLevel`).
|
|
815
817
|
*/
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
818
|
+
title(ctx, path, element) {
|
|
819
|
+
return {
|
|
820
|
+
handledProps: keepTitleLevel(ctx, path, element, {
|
|
821
|
+
where: 'Title',
|
|
822
|
+
target: 'Title',
|
|
823
|
+
size: 'isSize',
|
|
824
|
+
tag: 'tag',
|
|
825
|
+
level: 'h1',
|
|
826
|
+
}),
|
|
827
|
+
};
|
|
828
|
+
},
|
|
829
|
+
/** As `title`, from bloomer's <h2>; bestax's SubTitle defaults to an <h1>. */
|
|
830
|
+
subtitle(ctx, path, element) {
|
|
831
|
+
return {
|
|
832
|
+
handledProps: keepTitleLevel(ctx, path, element, {
|
|
833
|
+
where: 'Subtitle',
|
|
834
|
+
target: 'SubTitle',
|
|
835
|
+
size: 'isSize',
|
|
836
|
+
tag: 'tag',
|
|
837
|
+
level: 'h2',
|
|
838
|
+
}),
|
|
839
|
+
};
|
|
822
840
|
},
|
|
823
841
|
/**
|
|
824
842
|
* bloomer's ModalClose always rendered Bulma's `.modal-close` overlay
|
|
@@ -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;
|
|
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;AA+BnE;;;;;;;;;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,CAitBpD,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"}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* itself changed (`is-marginless` became `m-0`), and those are recorded as
|
|
13
13
|
* explicit conversions rather than guesses.
|
|
14
14
|
*/
|
|
15
|
+
import { SIZE_UNIONS } from '../_shared/size-unions.js';
|
|
15
16
|
const DOCS = 'https://bestax.io/docs';
|
|
16
17
|
/** rbx sizes are numbers; every bestax size prop takes the string form. */
|
|
17
18
|
const numeric = { numberToString: true };
|
|
@@ -128,7 +129,7 @@ export const MAPPING = {
|
|
|
128
129
|
},
|
|
129
130
|
forwardRefAs: {
|
|
130
131
|
status: 'todo',
|
|
131
|
-
todo: '`forwardRefAs` is rbx-internal and has no counterpart. bestax forwards a ref from the form controls, plus `Avatar`, `Button`, `Carousel`, `CarouselItem`, `Dialog`, `Dropdown`, `Link`, `LinkButton`, `Loader`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`, `Navbar.Dropdown`, `Navbar.Item`, `Navbar.Link`, `Sidebar` and `
|
|
132
|
+
todo: '`forwardRefAs` is rbx-internal and has no counterpart. bestax forwards a ref from the form controls, plus `Avatar`, `Button`, `Carousel`, `CarouselItem`, `Dialog`, `Dropdown`, `EmptyState`, `Kbd`, `Kbd.Group`, `Link`, `LinkButton`, `Loader`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`, `Navbar.Dropdown`, `Navbar.Item`, `Navbar.Link`, `SegmentedControl`, `SegmentedControl.Segment`, `Sidebar`, `Toast` and `ToggleButton` — pass `ref` directly on those, though not on the `Field`, `Field.Label`, `Field.Body`, `Checkboxes` and `Radios` wrappers, which forward none. Mind the `Navbar.Dropdown` collision: your rbx `Navbar.Dropdown` is the menu and becomes `Navbar.DropdownMenu`, which forwards no ref, while bestax `Navbar.Dropdown` — the container your `<Navbar.Item dropdown>` becomes — does. The rest, `Box` included, forward no ref: React 18 drops it with a warning, React 19 leaves it wherever the rest props go, so put the ref on a wrapping element you control',
|
|
132
133
|
},
|
|
133
134
|
// ---- elements -----------------------------------------------------------
|
|
134
135
|
Block: { status: 'mapped', target: 'Block' },
|
|
@@ -172,9 +173,7 @@ export const MAPPING = {
|
|
|
172
173
|
valueMap: { centered: 'isCentered', right: 'isRight' },
|
|
173
174
|
valueToProp: true,
|
|
174
175
|
},
|
|
175
|
-
size: {
|
|
176
|
-
todo: 'bestax `Buttons` has no size prop; set `size` on each Button instead',
|
|
177
|
-
},
|
|
176
|
+
size: { allowed: SIZE_UNIONS.Buttons },
|
|
178
177
|
},
|
|
179
178
|
},
|
|
180
179
|
},
|
|
@@ -318,9 +317,7 @@ export const MAPPING = {
|
|
|
318
317
|
target: 'Tags',
|
|
319
318
|
props: {
|
|
320
319
|
gapless: { booleanToProp: { name: 'hasAddons' } },
|
|
321
|
-
size: {
|
|
322
|
-
todo: 'bestax `Tags` has no size prop; set `size` on each Tag instead',
|
|
323
|
-
},
|
|
320
|
+
size: { allowed: SIZE_UNIONS.Tags },
|
|
324
321
|
},
|
|
325
322
|
},
|
|
326
323
|
},
|
|
@@ -595,9 +592,7 @@ export const MAPPING = {
|
|
|
595
592
|
target: 'Message',
|
|
596
593
|
props: {
|
|
597
594
|
color: {},
|
|
598
|
-
size: {
|
|
599
|
-
todo: 'bestax `Message` has no size prop; use the `size` helper on its children',
|
|
600
|
-
},
|
|
595
|
+
size: { allowed: SIZE_UNIONS.Message },
|
|
601
596
|
},
|
|
602
597
|
subs: {
|
|
603
598
|
Body: { status: 'mapped', target: 'Message.Body' },
|
|
@@ -821,11 +816,9 @@ export const MAPPING = {
|
|
|
821
816
|
target: 'Hero',
|
|
822
817
|
props: {
|
|
823
818
|
color: {},
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
},
|
|
828
|
-
},
|
|
819
|
+
// rbx's five sizes are bestax's five, `fullheight-with-navbar`
|
|
820
|
+
// included, and both render the one `is-<size>` class.
|
|
821
|
+
size: {},
|
|
829
822
|
gradient: {
|
|
830
823
|
todo: 'bestax `Hero` has no gradient variant; add a custom class or `bgColor`',
|
|
831
824
|
},
|
|
@@ -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,
|
|
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,EAWL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAg2B9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAIf"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { BADGE_PROPS, RESPONSIVE_BREAKPOINTS, TOOLTIP_PROPS, UNIVERSAL_PROPS, } from './mapping.js';
|
|
17
17
|
import { addAttr, addTodo, buildJsxName, attributesOf, findAttr, jsxNameParts, literalValueOf, makeAttr, plainElement, removeAttr, resolveBooleanish, } from '../_shared/jsx-utils.js';
|
|
18
|
-
import { alignTarget, applyIconProps, makeStripModifierProps, makeStructuralHelpers, mergeClassName, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
18
|
+
import { alignTarget, applyIconProps, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, mergeClassName, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
20
20
|
const stripModifierProps = makeStripModifierProps(UNIVERSAL_PROPS, RESPONSIVE_BREAKPOINTS, 'innerRef');
|
|
21
21
|
/**
|
|
@@ -68,6 +68,8 @@ const SPECIALS = {
|
|
|
68
68
|
* rbx folds title and subtitle into one component behind a `subtitle`
|
|
69
69
|
* boolean; bestax splits them into `Title` and `SubTitle`. rbx also ignores
|
|
70
70
|
* `spaced` when `subtitle` is set, so a subtitle never carries isSpaced.
|
|
71
|
+
* Both rendered an <h1> at every `size`, which bestax's turn into the
|
|
72
|
+
* heading the size names, so `keepTitleLevel` decides where the size goes.
|
|
71
73
|
*/
|
|
72
74
|
title(ctx, path, element) {
|
|
73
75
|
const subtitleAttr = findAttr(element, 'subtitle');
|
|
@@ -110,7 +112,14 @@ const SPECIALS = {
|
|
|
110
112
|
}
|
|
111
113
|
ctx.dirty = true;
|
|
112
114
|
}
|
|
113
|
-
|
|
115
|
+
const sized = keepTitleLevel(ctx, path, element, {
|
|
116
|
+
where: 'Title',
|
|
117
|
+
target,
|
|
118
|
+
size: 'size',
|
|
119
|
+
tag: 'as',
|
|
120
|
+
level: 'h1',
|
|
121
|
+
});
|
|
122
|
+
return { target, handledProps: ['subtitle', 'spaced', ...sized] };
|
|
114
123
|
},
|
|
115
124
|
/**
|
|
116
125
|
* bestax's Icon takes a `name` (plus `library`/`variant`) instead of an
|
|
@@ -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;
|
|
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,CAmqBpD,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"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* compound sub listed there) resolves to an entry here, so extending coverage
|
|
11
11
|
* later is a table edit that cannot silently regress.
|
|
12
12
|
*/
|
|
13
|
+
import { SIZE_UNIONS } from '../_shared/size-unions.js';
|
|
13
14
|
const DOCS = 'https://bestax.io/docs';
|
|
14
15
|
/** Bulma spacing values are string unions in bestax ('0'–'6'). */
|
|
15
16
|
const spacing = { numberToString: true };
|
|
@@ -26,7 +27,7 @@ export const UNIVERSAL_PROPS = {
|
|
|
26
27
|
todo: 'this bestax component has no `as` prop; restructure the element instead',
|
|
27
28
|
},
|
|
28
29
|
domRef: {
|
|
29
|
-
todo: 'bestax-bulma has no `domRef`. The form controls, plus `Avatar`, `Button`, `Carousel`, `CarouselItem`, `Dialog`, `Dropdown`, `Link`, `LinkButton`, `Loader`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`, `Navbar.Dropdown`, `Navbar.Item`, `Navbar.Link`, `Sidebar` and `
|
|
30
|
+
todo: 'bestax-bulma has no `domRef`. The form controls, plus `Avatar`, `Button`, `Carousel`, `CarouselItem`, `Dialog`, `Dropdown`, `EmptyState`, `Kbd`, `Kbd.Group`, `Link`, `LinkButton`, `Loader`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`, `Navbar.Dropdown`, `Navbar.Item`, `Navbar.Link`, `SegmentedControl`, `SegmentedControl.Segment`, `Sidebar`, `Toast` and `ToggleButton` forward a ref — on those, rename `domRef` to `ref`, though not on the `Field`, `Field.Label`, `Field.Body`, `Checkboxes` and `Radios` wrappers, which forward none. Mind the `Navbar.Dropdown` collision: the `Navbar.Item` that wrapped your dropdown became bestax `Navbar.Dropdown` and forwards one, while your `Navbar.Dropdown` became `Navbar.DropdownMenu` and does not. The rest forward no ref: React 18 drops it with a warning, React 19 leaves it wherever the rest props go, so put the ref on a DOM child or wrap the component',
|
|
30
31
|
},
|
|
31
32
|
// ColorProps
|
|
32
33
|
backgroundColor: { rename: 'bgColor' },
|
|
@@ -180,9 +181,7 @@ export const MAPPING = {
|
|
|
180
181
|
valueMap: { center: 'isCentered', right: 'isRight' },
|
|
181
182
|
valueToProp: true,
|
|
182
183
|
},
|
|
183
|
-
size: {
|
|
184
|
-
todo: 'bestax Buttons has no group size; set size on each Button',
|
|
185
|
-
},
|
|
184
|
+
size: { allowed: SIZE_UNIONS.Buttons },
|
|
186
185
|
},
|
|
187
186
|
},
|
|
188
187
|
},
|
|
@@ -548,9 +547,7 @@ export const MAPPING = {
|
|
|
548
547
|
target: 'Message',
|
|
549
548
|
props: {
|
|
550
549
|
color: {},
|
|
551
|
-
size: {
|
|
552
|
-
todo: 'no size prop on bestax Message; use textSize on the body',
|
|
553
|
-
},
|
|
550
|
+
size: { allowed: SIZE_UNIONS.Message },
|
|
554
551
|
},
|
|
555
552
|
subs: {
|
|
556
553
|
Header: { status: 'mapped', target: 'Message.Header' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/react-bulma-components/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAWL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/react-bulma-components/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAWL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAw3B9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAIf;AAED,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAGjE,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { RESPONSIVE_BREAKPOINTS, UNIVERSAL_PROPS } from './mapping.js';
|
|
11
11
|
import { addAttr, addTodo, attributesOf, buildJsxName, findAttr, literalValueOf, makeAttr, plainElement, removeAttr, resolveBooleanish, } from '../_shared/jsx-utils.js';
|
|
12
12
|
import { enforcePolymorphicProps } from '../_shared/polymorphic.js';
|
|
13
|
-
import { alignTarget, dropLinkAttrsForPlainTag, makeStripModifierProps, mergeClassName, applyIconProps, parseIconClasses, } from '../_shared/specials-utils.js';
|
|
13
|
+
import { alignTarget, dropLinkAttrsForPlainTag, keepTitleLevel, makeStripModifierProps, mergeClassName, applyIconProps, parseIconClasses, } from '../_shared/specials-utils.js';
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
15
15
|
/**
|
|
16
16
|
* The attributes a plain-element rewrite keeps: the modifier strip decides
|
|
@@ -159,13 +159,24 @@ const SPECIALS = {
|
|
|
159
159
|
removeAttr(element, headingAttr);
|
|
160
160
|
ctx.dirty = true;
|
|
161
161
|
}
|
|
162
|
+
// Dynamic subtitle (attr kept) or no subtitle → conservative Title.
|
|
163
|
+
let target = 'Title';
|
|
162
164
|
if (subtitleAttr && !subtitleDynamic) {
|
|
163
165
|
removeAttr(element, subtitleAttr);
|
|
164
166
|
ctx.dirty = true;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
if (subtitleTruthy)
|
|
168
|
+
target = 'SubTitle';
|
|
169
|
+
}
|
|
170
|
+
// RBC rendered an <h1> (its `renderAs` default) at every `size`; bestax
|
|
171
|
+
// renders the heading the size names, so the size may move to `textSize`.
|
|
172
|
+
const handledProps = keepTitleLevel(ctx, path, element, {
|
|
173
|
+
where: 'Heading',
|
|
174
|
+
target,
|
|
175
|
+
size: 'size',
|
|
176
|
+
tag: 'renderAs',
|
|
177
|
+
level: 'h1',
|
|
178
|
+
});
|
|
179
|
+
return { target, handledProps };
|
|
169
180
|
},
|
|
170
181
|
'level-side'(ctx, path, element) {
|
|
171
182
|
return alignTarget(ctx, path, element, 'align', { left: 'Level.Left', right: 'Level.Right' }, 'Level.Left');
|
package/dist/types.d.ts
CHANGED
|
@@ -49,6 +49,13 @@ export interface PropAction {
|
|
|
49
49
|
* `className` (`isSize="large"` → `is-large`). A dynamic value is a TODO.
|
|
50
50
|
*/
|
|
51
51
|
toClassPrefix?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The string values bestax takes for this prop. One of them passes through
|
|
54
|
+
* unchanged; any other value, or one the codemod cannot read, stays as
|
|
55
|
+
* written with a TODO that lists these. For a source that types the prop as
|
|
56
|
+
* any string where bestax has a closed union.
|
|
57
|
+
*/
|
|
58
|
+
allowed?: readonly string[];
|
|
52
59
|
/** Remove the attribute entirely. */
|
|
53
60
|
drop?: boolean;
|
|
54
61
|
/** Leave the attribute as-is and attach a TODO with this hint. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EA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D;AAClD,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IAC/C,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC3D;;;OAGG;IACH,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-migrate",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.4",
|
|
4
4
|
"description": "Codemods for migrating existing React apps from other Bulma libraries to @allxsmith/bestax-bulma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"chalk": "^6.0.0",
|
|
39
39
|
"commander": "^15.0.0",
|
|
40
40
|
"jscodeshift": "^17.3.0",
|
|
41
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
41
|
+
"@allxsmith/bestax-bulma": "^5.34.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@jest/globals": "^30.0.0",
|
|
45
45
|
"@types/jest": "^30.0.0",
|
|
46
46
|
"@types/jscodeshift": "^17.3.0",
|
|
47
|
-
"@types/node": "^26.
|
|
47
|
+
"@types/node": "^26.6.4",
|
|
48
48
|
"@types/react": "^19.2.18",
|
|
49
49
|
"@types/react-dom": "^19.2.5",
|
|
50
50
|
"classnames": "^2.5.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"jest": "^30.2.0",
|
|
53
53
|
"react": "^19.2.8",
|
|
54
54
|
"react-dom": "^19.2.8",
|
|
55
|
-
"ts-jest": "^29.4.
|
|
55
|
+
"ts-jest": "^29.4.14",
|
|
56
56
|
"typescript": "^6.0.3"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|