bestax-migrate 2.26.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/README.md +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +12 -6
- package/dist/sources/_shared/deps-common.d.ts +2 -0
- package/dist/sources/_shared/deps-common.d.ts.map +1 -1
- package/dist/sources/_shared/deps-common.js +3 -1
- 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 +41 -10
- package/dist/sources/bulma-classes/class-map.d.ts.map +1 -1
- package/dist/sources/bulma-classes/class-map.js +69 -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.d.ts +87 -0
- package/dist/sources/bulma-classes/html-assets.d.ts.map +1 -0
- package/dist/sources/bulma-classes/html-assets.js +246 -0
- package/dist/sources/bulma-classes/html-rules.d.ts +5 -0
- package/dist/sources/bulma-classes/html-rules.d.ts.map +1 -1
- package/dist/sources/bulma-classes/html-rules.js +14 -2
- package/dist/sources/bulma-classes/html.d.ts +12 -4
- package/dist/sources/bulma-classes/html.d.ts.map +1 -1
- package/dist/sources/bulma-classes/html.js +224 -49
- 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/project.d.ts +10 -2
- package/dist/sources/bulma-classes/project.d.ts.map +1 -1
- package/dist/sources/bulma-classes/project.js +17 -8
- 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 +13 -7
- package/dist/sources/react-bulma-components/mapping.d.ts.map +1 -1
- package/dist/sources/react-bulma-components/mapping.js +19 -5
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ The codemod uses [jscodeshift](https://github.com/facebook/jscodeshift) to:
|
|
|
59
59
|
- convert props (`renderAs` → `as`, `loading` → `isLoading`, numeric spacing/text sizes → string unions, `textAlign="center"` → `textAlign="centered"`, …)
|
|
60
60
|
- flatten responsive breakpoint objects (`mobile={{ size: 4 }}` → `sizeMobile={4}`) and bloomer's `isDisplay`/`isHidden` strings, arrays and objects (`isHidden="touch"` → `visibilityTouch="hidden"`)
|
|
61
61
|
- for `bulma-classes`, turn raw Bulma markup into components and props (`<a className="button is-primary">` → `<Button as="a" color="primary">`, `<p className="has-text-centered mt-4">` → `<Paragraph textAlign="centered" mt="4">`), converting an element only when bestax renders exactly the same markup
|
|
62
|
-
- for `bulma-classes` on an HTML page, write a React module beside it (`index.html` → `index.tsx`, or `.jsx` when the package isn't TypeScript) whose default export is the page's body as a component (`LoginPage`), converted as the same markup written as JSX would be. The page is never changed and an existing module is never overwritten; the head, the `<html>` and `<body>` attributes, scripts and inline handlers are left as `html-*` TODOs
|
|
62
|
+
- for `bulma-classes` on an HTML page, write a React module beside it (`index.html` → `index.tsx`, or `.jsx` when the package isn't TypeScript) whose default export is the page's body as a component (`LoginPage`), converted as the same markup written as JSX would be. The page is never changed and an existing module is never overwritten; the head, the `<html>` and `<body>` attributes, the stylesheets and scripts it loads, and inline handlers are left as `html-*` TODOs, except that under `--css bestax` or `--css bulma` the module imports the stylesheet in place of the page's Bulma `<link>`
|
|
63
63
|
- restructure patterns bestax models differently (`Table.Container`, Navbar dropdowns, `Form.Help`, icon-font children → `<Icon name=…>`)
|
|
64
64
|
- migrate stylesheets: CSS imports converge on `@allxsmith/bestax-bulma/bestax.css`, and SCSS files move from Bulma 0.9's `@import` + `$var !default` overrides to `@use 'bulma/sass' with (…)` plus `@use '@allxsmith/bestax-bulma/scss/extras'`
|
|
65
65
|
- update `package.json`: remove the source library, add `@allxsmith/bestax-bulma`, raise a declared pre-1.0 `bulma` to `^1` (adding it only when your sources import `bulma/…` directly — otherwise it arrives transitively), and swap the dead `node-sass` for dart `sass` (no install is ever run). Migrating **rbx** is what frees an app from Bulma 0.7.5: rbx pinned it as a _direct_ dependency, so the app could not choose its own Bulma version at all. The four Bulma extensions rbx also pulled in (`bulma-badge`, `bulma-divider`, `bulma-pageloader`, `bulma-tooltip`) are **reported rather than removed** — bestax replaces all four, but a manifest entry is a deliberate declaration and your own Sass may import them. A **bloomer** app declared its own Bulma 0.6, which is what gets bumped. For **bulma-classes** there is no library to remove, and by default (`--css keep`) the app's Bulma version, Sass and stylesheet imports all stay: its own Bulma already styles every class a converted element renders. `--css bestax` or `--css bulma` moves it to Bulma v1 like the other sources
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAIV,eAAe,EAEhB,MAAM,YAAY,CAAC;AA2BpB;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,GAAE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AkB5D;AAED,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgDlD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBvD;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAEpE;AA2QD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,EAAE,EAAE,KAAK,EACT,KAAK,GAAE,QAAwB,EAC/B,MAAM,GAAE,QAAyB,EAGjC,aAAa,GAAE,OAAO,eAAiC,GACtD,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAyBzB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,OAAO,GAAG,SAAS,EACzB,EAAE,EAAE,KAAK,EACT,aAAa,GAAE,CAAC,EAAE,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAA0B,GAC7E,OAAO,CAAC,IAAI,CAAC,CAqBf;AAYD,wBAAgB,SAAS,CACvB,EAAE,GAAE,KAAkD,GACrD,OAAO,CA+IT"}
|
package/dist/cli.js
CHANGED
|
@@ -234,8 +234,13 @@ function migrateFiles(source, files, reporter, io, options, project) {
|
|
|
234
234
|
const collector = reporter.startFile();
|
|
235
235
|
const extension = extensionOf(file);
|
|
236
236
|
if (source.transformHtml && source.htmlExtensions?.includes(extension)) {
|
|
237
|
-
const
|
|
238
|
-
|
|
237
|
+
const written = migrateHtmlPage(source.transformHtml, file, sourceText, collector, io, { ...options, project });
|
|
238
|
+
// The module is what the app will import from, as a JSX file's output
|
|
239
|
+
// is: one that imports bulma/… needs `bulma` declared.
|
|
240
|
+
if (written !== null && /['"](?:~?bulma\/)/.test(written)) {
|
|
241
|
+
bulmaReferenced = true;
|
|
242
|
+
}
|
|
243
|
+
reporter.finishFile(file, written !== null, collector.entries);
|
|
239
244
|
continue;
|
|
240
245
|
}
|
|
241
246
|
let output;
|
|
@@ -286,7 +291,8 @@ function migrateFiles(source, files, reporter, io, options, project) {
|
|
|
286
291
|
}
|
|
287
292
|
/**
|
|
288
293
|
* One HTML page: its module is written beside it (never over a file already
|
|
289
|
-
* there; the source checks), and the page itself is left as it was.
|
|
294
|
+
* there; the source checks), and the page itself is left as it was. Returns
|
|
295
|
+
* the module, or null when there is none to write.
|
|
290
296
|
*/
|
|
291
297
|
function migrateHtmlPage(transformHtml, file, sourceText, collector, io, options) {
|
|
292
298
|
let result;
|
|
@@ -298,10 +304,10 @@ function migrateHtmlPage(transformHtml, file, sourceText, collector, io, options
|
|
|
298
304
|
}
|
|
299
305
|
catch (error) {
|
|
300
306
|
io.error(chalk.red(`✖ ${file}: ${error.message}`));
|
|
301
|
-
return
|
|
307
|
+
return null;
|
|
302
308
|
}
|
|
303
309
|
if (result.output === null)
|
|
304
|
-
return
|
|
310
|
+
return null;
|
|
305
311
|
if (options.print)
|
|
306
312
|
io.log(result.output);
|
|
307
313
|
if (options.dry) {
|
|
@@ -311,7 +317,7 @@ function migrateHtmlPage(transformHtml, file, sourceText, collector, io, options
|
|
|
311
317
|
fs.writeFileSync(result.outputPath, result.output);
|
|
312
318
|
io.log(chalk.green(`Wrote ${result.outputPath} from ${file}.`));
|
|
313
319
|
}
|
|
314
|
-
return
|
|
320
|
+
return result.output;
|
|
315
321
|
}
|
|
316
322
|
/**
|
|
317
323
|
* HTML pages a folder walk found but `--extensions` left out, reported when
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { TodoCollector } from '../../types.js';
|
|
9
9
|
export declare const BULMA_RANGE = "^1.0.4";
|
|
10
|
+
/** bestax-bulma's optional peer range for Font Awesome. */
|
|
11
|
+
export declare const FONT_AWESOME_PEER_RANGE = "^6.7.2 || ^7.0.0";
|
|
10
12
|
export declare const DEP_SECTIONS: readonly ["dependencies", "devDependencies"];
|
|
11
13
|
type Section = (typeof DEP_SECTIONS)[number];
|
|
12
14
|
export interface Manifest {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps-common.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/deps-common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,eAAO,MAAM,WAAW,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"deps-common.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/deps-common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,2DAA2D;AAC3D,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAI1D,eAAO,MAAM,YAAY,8CAA+C,CAAC;AACzE,KAAK,OAAO,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACvB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC3D,qEAAqE;IACrE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,0CAA0C;IAC1C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,yDAAyD;IACzD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,SAAS,EAAE,aAAa,GAAG,SAAS,GACnC,QAAQ,CAiBV;AAaD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAmBlD;AAED,MAAM,WAAW,YAAY;IAC3B,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,OAAO,GAAG,SAAS,GACnC,YAAY,CA2Bd;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAqBzD;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAexD"}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import { isPreV1 } from './semver-range.js';
|
|
9
9
|
const BESTAX_RANGE = '^5';
|
|
10
10
|
export const BULMA_RANGE = '^1.0.4';
|
|
11
|
+
/** bestax-bulma's optional peer range for Font Awesome. */
|
|
12
|
+
export const FONT_AWESOME_PEER_RANGE = '^6.7.2 || ^7.0.0';
|
|
11
13
|
// Bulma v1's sass tree uses `color.channel(…)` — needs dart-sass ≥ 1.79.
|
|
12
14
|
const SASS_RANGE = '^1.79.0';
|
|
13
15
|
export const DEP_SECTIONS = ['dependencies', 'devDependencies'];
|
|
@@ -94,7 +96,7 @@ export function reportPeerRanges(manifest) {
|
|
|
94
96
|
for (const name of DEP_SECTIONS) {
|
|
95
97
|
const range = manifest.section(name)?.['@fortawesome/fontawesome-free'];
|
|
96
98
|
if (range && /^[~^]?[0-5](?:[.x]|$)/.test(range.trim())) {
|
|
97
|
-
manifest.report('peer-deps', `@fortawesome/fontawesome-free ${range} predates bestax-bulma's optional peer range (
|
|
99
|
+
manifest.report('peer-deps', `@fortawesome/fontawesome-free ${range} predates bestax-bulma's optional peer range (${FONT_AWESOME_PEER_RANGE}) — upgrade it, or install with \`npm install --legacy-peer-deps\``);
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/polymorphic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/polymorphic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAyCxB,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAkB,CAAC;AAmK3E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,MAAM,GAAG,SAAS,EAC5B,eAAa,KACZ,MAmBF,CAAC;AAMF,oDAAoD;AACpD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElD;AAQD,mDAAmD;AACnD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAW,CAAC;AAC1D,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAuB,CAAC;AAkEpE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAkC,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAwH5C,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnD;AASD,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAG3E;AAED,0DAA0D;AAC1D,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAoC,CAAC;AAE7E,6CAA6C;AAC7C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAC1C,CAAC;AAqPrB;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,MAAM;AACd;;;;;;;;;GASG;AACH,gBAAgB,UAAQ,GACvB,IAAI,CAuEN"}
|
|
@@ -38,13 +38,28 @@ import { addTodo, attrSource, findAttr, literalValueOf, removeAttr, } from './js
|
|
|
38
38
|
* output that does not compile.
|
|
39
39
|
*/
|
|
40
40
|
const AS_UNION_TABLE = {
|
|
41
|
+
Container: [
|
|
42
|
+
'div',
|
|
43
|
+
'main',
|
|
44
|
+
'section',
|
|
45
|
+
'article',
|
|
46
|
+
'aside',
|
|
47
|
+
'header',
|
|
48
|
+
'footer',
|
|
49
|
+
'nav',
|
|
50
|
+
],
|
|
41
51
|
Control: ['div', 'p'],
|
|
42
52
|
'Dropdown.Item': ['a', 'div', 'button'],
|
|
43
53
|
Footer: ['footer', 'div'],
|
|
54
|
+
Hero: ['section', 'div', 'main', 'header', 'footer', 'article', 'aside'],
|
|
55
|
+
'Hero.Foot': ['div', 'footer', 'nav'],
|
|
56
|
+
'Hero.Head': ['div', 'header', 'nav'],
|
|
44
57
|
Image: ['figure', 'div', 'p'],
|
|
45
58
|
'Level.Item': ['div', 'p', 'a'],
|
|
46
59
|
Media: ['article', 'div'],
|
|
47
60
|
'Media.Left': ['figure', 'div'],
|
|
61
|
+
Panel: ['nav', 'article', 'section', 'aside', 'div'],
|
|
62
|
+
'Panel.Block': ['a', 'div', 'label'],
|
|
48
63
|
SubTitle: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'],
|
|
49
64
|
Title: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'],
|
|
50
65
|
};
|
|
@@ -57,7 +72,7 @@ export const AS_UNIONS = AS_UNION_TABLE;
|
|
|
57
72
|
* That last group is why this set has to exist. An earlier pass flags an `as`
|
|
58
73
|
* a component cannot take and leaves the attribute in place as the marker for
|
|
59
74
|
* its TODO, so reading the element off whatever `as` is present would believe
|
|
60
|
-
* a prop the component never had -- and `<
|
|
75
|
+
* a prop the component never had -- and `<Pagination.Link as="span" href="/x">`
|
|
61
76
|
* would lose the `href` that compiles and keep the `as` that does not.
|
|
62
77
|
*/
|
|
63
78
|
const AS_ANY = new Set(['Button', 'Menu.Item', 'Navbar.Item', 'Navbar.Link']);
|
|
@@ -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,CA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AM,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,CAkoBpD,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"}
|
|
@@ -729,7 +729,7 @@ export const MAPPING = {
|
|
|
729
729
|
},
|
|
730
730
|
},
|
|
731
731
|
// ---- panel --------------------------------------------------------------
|
|
732
|
-
Panel: { status: 'mapped', target: 'Panel' },
|
|
732
|
+
Panel: { status: 'mapped', target: 'Panel', props: { tag: TAG_AS } },
|
|
733
733
|
PanelHeading: { status: 'mapped', target: 'Panel.Heading' },
|
|
734
734
|
PanelTabs: { status: 'mapped', target: 'Panel.Tabs' },
|
|
735
735
|
PanelTab: { status: 'mapped', special: 'panel-tab' },
|
|
@@ -776,7 +776,11 @@ export const MAPPING = {
|
|
|
776
776
|
Container: {
|
|
777
777
|
status: 'mapped',
|
|
778
778
|
target: 'Container',
|
|
779
|
-
props: {
|
|
779
|
+
props: {
|
|
780
|
+
hasTextColor: TEXT_COLOR_OK,
|
|
781
|
+
isFluid: { rename: 'fluid' },
|
|
782
|
+
tag: TAG_AS,
|
|
783
|
+
},
|
|
780
784
|
},
|
|
781
785
|
Footer: {
|
|
782
786
|
status: 'mapped',
|
|
@@ -797,12 +801,13 @@ export const MAPPING = {
|
|
|
797
801
|
isFullHeight: { booleanToProp: { name: 'size', value: 'fullheight' } },
|
|
798
802
|
isHalfHeight: { toClass: 'is-halfheight' },
|
|
799
803
|
isBold: { toClass: 'is-bold' },
|
|
804
|
+
tag: TAG_AS,
|
|
800
805
|
},
|
|
801
806
|
},
|
|
802
807
|
HeroHeader: {
|
|
803
808
|
status: 'mapped',
|
|
804
809
|
target: 'Hero.Head',
|
|
805
|
-
props: { hasTextColor: TEXT_COLOR_OK },
|
|
810
|
+
props: { hasTextColor: TEXT_COLOR_OK, tag: TAG_AS },
|
|
806
811
|
},
|
|
807
812
|
HeroBody: {
|
|
808
813
|
status: 'mapped',
|
|
@@ -813,7 +818,7 @@ export const MAPPING = {
|
|
|
813
818
|
HeroFooter: {
|
|
814
819
|
status: 'mapped',
|
|
815
820
|
target: 'Hero.Foot',
|
|
816
|
-
props: { hasTextColor: TEXT_COLOR_OK },
|
|
821
|
+
props: { hasTextColor: TEXT_COLOR_OK, tag: TAG_AS },
|
|
817
822
|
},
|
|
818
823
|
// ---- the helper HOC -----------------------------------------------------
|
|
819
824
|
withHelpersModifiers: {
|
|
@@ -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;
|
|
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;AAGjC,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAyqC9B,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,6 +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 { AS_UNIONS } from '../_shared/polymorphic.js';
|
|
16
17
|
import { applyIconProps, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
17
18
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
18
19
|
const stripModifierProps = makeStripModifierProps(UNIVERSAL_PROPS, RESPONSIVE_PROPS);
|
|
@@ -50,6 +51,8 @@ function plainTag(ctx, path, element, fallback, where) {
|
|
|
50
51
|
addTodo(ctx, path, 'prop:tag', `dynamic ${where} \`tag\`; it became a plain <${fallback}> — render the tag yourself`);
|
|
51
52
|
return fallback;
|
|
52
53
|
}
|
|
54
|
+
/** The tags bestax's `Panel.Block` renders through `as`, its default first. */
|
|
55
|
+
const PANEL_BLOCK_TAGS = new Set(AS_UNIONS['Panel.Block']);
|
|
53
56
|
/** A booleanish modifier prop → an `is-*` class fragment, always removed. */
|
|
54
57
|
function booleanClass(ctx, path, element, prop, cls, where) {
|
|
55
58
|
const attr = findAttr(element, prop);
|
|
@@ -589,9 +592,11 @@ const SPECIALS = {
|
|
|
589
592
|
};
|
|
590
593
|
},
|
|
591
594
|
/**
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
+
* bloomer's PanelBlock was a <div> unless `href` was set (a checkbox label,
|
|
596
|
+
* a search box), or the `tag` it was given. bestax's Panel.Block is an <a>
|
|
597
|
+
* by default and a <div> or a <label> through `as`, so a block on one of
|
|
598
|
+
* those tags is the bestax component, and one on any other tag, or a
|
|
599
|
+
* dynamic one, stays the plain block it was.
|
|
595
600
|
*/
|
|
596
601
|
'panel-block'(ctx, path, element) {
|
|
597
602
|
// The same rule as anchorWhenHref: bloomer chose the anchor with
|
|
@@ -606,6 +611,28 @@ const SPECIALS = {
|
|
|
606
611
|
if (anchored) {
|
|
607
612
|
return { handledProps: anchorWhenHref(ctx, path, element) };
|
|
608
613
|
}
|
|
614
|
+
// bloomer had no `as`, so one on the element is a stray attribute; the
|
|
615
|
+
// plain block below keeps it where it was, rather than this pass writing
|
|
616
|
+
// a second `as` beside it.
|
|
617
|
+
const tagAttr = findAttr(element, 'tag');
|
|
618
|
+
const tagValue = tagAttr ? literalValueOf(tagAttr) : undefined;
|
|
619
|
+
const blockTag = !tagAttr
|
|
620
|
+
? 'div'
|
|
621
|
+
: tagValue?.kind === 'string'
|
|
622
|
+
? tagValue.value
|
|
623
|
+
: undefined;
|
|
624
|
+
if (blockTag &&
|
|
625
|
+
PANEL_BLOCK_TAGS.has(blockTag) &&
|
|
626
|
+
!findAttr(element, 'as')) {
|
|
627
|
+
if (tagAttr)
|
|
628
|
+
removeAttr(element, tagAttr);
|
|
629
|
+
// `a` is the default, so it needs no `as`.
|
|
630
|
+
if (blockTag !== 'a') {
|
|
631
|
+
addAttr(element, makeAttr(ctx.j, 'as', blockTag));
|
|
632
|
+
}
|
|
633
|
+
ctx.dirty = true;
|
|
634
|
+
return { handledProps: ['tag'] };
|
|
635
|
+
}
|
|
609
636
|
const cls = join('panel-block', booleanClass(ctx, path, element, 'isActive', 'is-active', 'PanelBlock'), booleanClass(ctx, path, element, 'isWrapped', 'is-wrapped', 'PanelBlock'));
|
|
610
637
|
const tag = plainTag(ctx, path, element, 'div', 'PanelBlock');
|
|
611
638
|
return replaceWithPlain(ctx, path, element, tag, cls, 'PanelBlock');
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* Every conversion this table allows must render exactly the HTML the raw
|
|
7
7
|
* element rendered. That is a claim about bestax, and the render tests hold
|
|
8
8
|
* it: each root, modifier and helper here is rendered through the built
|
|
9
|
-
* library and compared with the raw markup it replaces.
|
|
9
|
+
* library and compared with the raw markup it replaces. One exception, on
|
|
10
|
+
* purpose: Font Awesome's own `<i aria-hidden="true">` alone in a `.icon`
|
|
11
|
+
* that carries nothing assistive tech reads converts to `Icon`, which writes
|
|
12
|
+
* the attribute on the `.icon` instead, since the glyph is hidden either way
|
|
13
|
+
* (see `readsGlyph`).
|
|
10
14
|
*
|
|
11
15
|
* Data only: `scripts/gen-mcp-index.mjs` imports it directly for the MCP
|
|
12
16
|
* server's `lookup_bulma_classes`, so nothing Node cannot strip (no enums, no
|
|
@@ -121,6 +125,20 @@ export interface Absorbs {
|
|
|
121
125
|
readonly beside: string;
|
|
122
126
|
}>>;
|
|
123
127
|
}
|
|
128
|
+
/** How a target that renders a glyph from props reads one (`Icon`). */
|
|
129
|
+
export interface ReadsGlyph {
|
|
130
|
+
/**
|
|
131
|
+
* The attributes the element may carry and still take Font Awesome's
|
|
132
|
+
* `aria-hidden` up off its `<i>`: ones the target renders as given that
|
|
133
|
+
* assistive tech doesn't read, a name ending in `*` standing for every
|
|
134
|
+
* attribute it starts. Read by name, whatever the value, since an
|
|
135
|
+
* expression may render as anything. Anything else (a name, a description,
|
|
136
|
+
* a `title`, a `role`, a `tabIndex`, a handler) keeps the attribute where
|
|
137
|
+
* it is: the move would hide what it exposes, and `Icon` writes no
|
|
138
|
+
* `aria-hidden` beside a `role` or `tabIndex` at all.
|
|
139
|
+
*/
|
|
140
|
+
readonly hiddenMovesBeside: readonly string[];
|
|
141
|
+
}
|
|
124
142
|
export interface RootEntry {
|
|
125
143
|
readonly status: RootStatus;
|
|
126
144
|
/**
|
|
@@ -275,6 +293,18 @@ export interface RootEntry {
|
|
|
275
293
|
* and each `.icon` converts on its own; they go.
|
|
276
294
|
*/
|
|
277
295
|
readonly buildsIcons?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* The target renders a glyph from props in place of its children (`Icon`,
|
|
298
|
+
* from `library` and `name`): when the element's only child is one bare,
|
|
299
|
+
* empty `<i>` whose classes `glyph.ts` reads, its classes become those
|
|
300
|
+
* props, the `<i>` goes and the element closes itself. Around anything
|
|
301
|
+
* else, the target renders its children as given. An `<i>` that carries
|
|
302
|
+
* the `aria-hidden` the target writes, as Font Awesome's own markup does,
|
|
303
|
+
* reads too when the element carries nothing assistive tech reads: the
|
|
304
|
+
* attribute moves up onto it, the one difference in markup a conversion
|
|
305
|
+
* makes.
|
|
306
|
+
*/
|
|
307
|
+
readonly readsGlyph?: ReadsGlyph;
|
|
278
308
|
/**
|
|
279
309
|
* The target renders the whole `.file` tree from props (`File`): its
|
|
280
310
|
* `<input>`, button text, icons and file name. The element converts only
|
|
@@ -291,15 +321,6 @@ export interface RootEntry {
|
|
|
291
321
|
* gutter). The reason is for the MCP lookup.
|
|
292
322
|
*/
|
|
293
323
|
readonly helpersLeftOut?: Readonly<Record<string, string>>;
|
|
294
|
-
/**
|
|
295
|
-
* Tags the target doesn't render, on which the element is valid Bulma that
|
|
296
|
-
* bestax renders some other way, so it stays markup with no `tag` TODO
|
|
297
|
-
* there. Any other tag still gets one. The reason is for the MCP lookup.
|
|
298
|
-
*/
|
|
299
|
-
readonly otherTagsStay?: {
|
|
300
|
-
readonly tags: readonly string[];
|
|
301
|
-
readonly why: string;
|
|
302
|
-
};
|
|
303
324
|
/**
|
|
304
325
|
* Attributes the target types as numbers, among the ones it is given (the
|
|
305
326
|
* child's, when it `absorbs` the child and puts them there), beside
|
|
@@ -383,6 +404,16 @@ export declare const FORWARDS_REF: readonly string[];
|
|
|
383
404
|
export declare const WRAPPERS: Readonly<Record<string, string>>;
|
|
384
405
|
/** The wrappers' own props, as `ROOTS` lists them for the components. */
|
|
385
406
|
export declare const WRAPPER_OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
407
|
+
/**
|
|
408
|
+
* Every class Bulma 0.9.4's compiled stylesheet has and v1's does not, read
|
|
409
|
+
* off the two with the class walk `e2e/bulma-classes-vocabulary.test.ts`
|
|
410
|
+
* uses. Under v1 these style nothing: the tiles, `.columns.is-variable`,
|
|
411
|
+
* `.heading`, `.number`, `is-marginless` and `is-paddingless` (v1 spells the
|
|
412
|
+
* last two `marginless` and `paddingless`). That test holds each one absent
|
|
413
|
+
* from the v1 stylesheet bestax depends on; the 0.9 half was read from its
|
|
414
|
+
* published package, which nothing here installs.
|
|
415
|
+
*/
|
|
416
|
+
export declare const REMOVED_IN_V1: readonly string[];
|
|
386
417
|
/** Bulma 0.9 classes v1 dropped, with what replaced them. */
|
|
387
418
|
export declare const LEGACY_09: Readonly<Record<string, string>>;
|
|
388
419
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-map.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/class-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"class-map.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/class-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,MAAM,GAChB;IAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAE9E,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,6EAA6E;IAC7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,CAAC,KAAK,EAAE,SAAS,CAAC;CAC3B;AA6DD,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAqHzD,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,CAS3C,CAAC;AAIH;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAyCA,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnE;AAiBD,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE5D;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE7D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAGlE;AAED,qCAAqC;AACrC,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,MAAM,GACZ,QAAQ,GAAG,SAAS,CAEtB;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5D;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1D"}
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* Every conversion this table allows must render exactly the HTML the raw
|
|
7
7
|
* element rendered. That is a claim about bestax, and the render tests hold
|
|
8
8
|
* it: each root, modifier and helper here is rendered through the built
|
|
9
|
-
* library and compared with the raw markup it replaces.
|
|
9
|
+
* library and compared with the raw markup it replaces. One exception, on
|
|
10
|
+
* purpose: Font Awesome's own `<i aria-hidden="true">` alone in a `.icon`
|
|
11
|
+
* that carries nothing assistive tech reads converts to `Icon`, which writes
|
|
12
|
+
* the attribute on the `.icon` instead, since the glyph is hidden either way
|
|
13
|
+
* (see `readsGlyph`).
|
|
10
14
|
*
|
|
11
15
|
* Data only: `scripts/gen-mcp-index.mjs` imports it directly for the MCP
|
|
12
16
|
* server's `lookup_bulma_classes`, so nothing Node cannot strip (no enums, no
|
|
@@ -657,6 +661,16 @@ export const ROOTS = {
|
|
|
657
661
|
...BASE,
|
|
658
662
|
target: 'Container',
|
|
659
663
|
tag: 'div',
|
|
664
|
+
as: [
|
|
665
|
+
'div',
|
|
666
|
+
'main',
|
|
667
|
+
'section',
|
|
668
|
+
'article',
|
|
669
|
+
'aside',
|
|
670
|
+
'header',
|
|
671
|
+
'footer',
|
|
672
|
+
'nav',
|
|
673
|
+
],
|
|
660
674
|
modifiers: {
|
|
661
675
|
...flags({
|
|
662
676
|
'is-fluid': 'fluid',
|
|
@@ -674,6 +688,7 @@ export const ROOTS = {
|
|
|
674
688
|
])),
|
|
675
689
|
},
|
|
676
690
|
ownProps: [
|
|
691
|
+
'as',
|
|
677
692
|
'textColor',
|
|
678
693
|
'color',
|
|
679
694
|
'bgColor',
|
|
@@ -953,6 +968,7 @@ export const ROOTS = {
|
|
|
953
968
|
...BASE,
|
|
954
969
|
target: 'Hero',
|
|
955
970
|
tag: 'section',
|
|
971
|
+
as: ['section', 'div', 'main', 'header', 'footer', 'article', 'aside'],
|
|
956
972
|
// Hero's `color` is the component color, and `textColor` reaches the DOM
|
|
957
973
|
// as an attribute rather than a class.
|
|
958
974
|
textColor: null,
|
|
@@ -960,13 +976,14 @@ export const ROOTS = {
|
|
|
960
976
|
...tokens('is-', COMPONENT_COLORS, 'color'),
|
|
961
977
|
...tokens('is-', ['small', 'medium', 'large', 'fullheight', 'fullheight-with-navbar'], 'size'),
|
|
962
978
|
},
|
|
963
|
-
ownProps: ['color', 'size', 'bgColor', 'fullheightWithNavbar'],
|
|
979
|
+
ownProps: ['as', 'color', 'size', 'bgColor', 'fullheightWithNavbar'],
|
|
964
980
|
},
|
|
965
981
|
'hero-head': {
|
|
966
982
|
...BASE,
|
|
967
983
|
target: 'Hero.Head',
|
|
968
984
|
tag: 'div',
|
|
969
|
-
|
|
985
|
+
as: ['div', 'header', 'nav'],
|
|
986
|
+
ownProps: ['as', 'color', 'bgColor', 'textColor'],
|
|
970
987
|
},
|
|
971
988
|
'hero-body': {
|
|
972
989
|
...BASE,
|
|
@@ -978,7 +995,8 @@ export const ROOTS = {
|
|
|
978
995
|
...BASE,
|
|
979
996
|
target: 'Hero.Foot',
|
|
980
997
|
tag: 'div',
|
|
981
|
-
|
|
998
|
+
as: ['div', 'footer', 'nav'],
|
|
999
|
+
ownProps: ['as', 'color', 'bgColor', 'textColor'],
|
|
982
1000
|
},
|
|
983
1001
|
level: {
|
|
984
1002
|
...BASE,
|
|
@@ -1365,13 +1383,15 @@ export const ROOTS = {
|
|
|
1365
1383
|
'dropdown-content': part(),
|
|
1366
1384
|
'dropdown-item': part(),
|
|
1367
1385
|
'dropdown-divider': part(),
|
|
1368
|
-
//
|
|
1369
|
-
// icon with no name, no `role`
|
|
1370
|
-
// `
|
|
1386
|
+
// `Icon` renders a bare `<i>` from `library` and `name`, and with children,
|
|
1387
|
+
// `.icon` around them as given. It hides an icon with no name, no `role`
|
|
1388
|
+
// and no `tabIndex`, writing `aria-hidden` on the `.icon` and never on the
|
|
1389
|
+
// `<i>`, and makes one named by `aria-label` or `aria-labelledby` an image.
|
|
1371
1390
|
icon: {
|
|
1372
1391
|
...BASE,
|
|
1373
1392
|
target: 'Icon',
|
|
1374
1393
|
tag: 'span',
|
|
1394
|
+
readsGlyph: { hiddenMovesBeside: ['id', 'style', 'key', 'data-*'] },
|
|
1375
1395
|
modifiers: tokens('is-', ['small', 'medium', 'large'], 'size'),
|
|
1376
1396
|
defaults: { 'aria-hidden': 'true' },
|
|
1377
1397
|
namedDefaults: {
|
|
@@ -1688,13 +1708,14 @@ export const ROOTS = {
|
|
|
1688
1708
|
...BASE,
|
|
1689
1709
|
target: 'Panel',
|
|
1690
1710
|
tag: 'nav',
|
|
1711
|
+
as: ['nav', 'article', 'section', 'aside', 'div'],
|
|
1691
1712
|
textColor: null,
|
|
1692
1713
|
bgColor: null,
|
|
1693
1714
|
omits: Object.fromEntries(COMPONENT_COLORS.map(color => [
|
|
1694
1715
|
`is-${color}`,
|
|
1695
1716
|
'`color` renders `has-text-<color>` on the panel as well',
|
|
1696
1717
|
])),
|
|
1697
|
-
ownProps: ['color'],
|
|
1718
|
+
ownProps: ['as', 'color'],
|
|
1698
1719
|
},
|
|
1699
1720
|
'panel-heading': {
|
|
1700
1721
|
status: 'mapped',
|
|
@@ -1718,15 +1739,29 @@ export const ROOTS = {
|
|
|
1718
1739
|
status: 'mapped',
|
|
1719
1740
|
target: 'Panel.Block',
|
|
1720
1741
|
tag: 'a',
|
|
1742
|
+
as: ['a', 'div', 'label'],
|
|
1721
1743
|
textColor: null,
|
|
1722
1744
|
bgColor: null,
|
|
1723
1745
|
noHelpers: true,
|
|
1724
1746
|
modifiers: flags({ 'is-active': 'active' }),
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1747
|
+
// The anchor attributes, and `rel`, reach only an <a>, and the label's
|
|
1748
|
+
// only a <label> (`STRIP_FROM_NON_ANCHOR` and `STRIP_FROM_NON_LABEL` in
|
|
1749
|
+
// bulma-ui's Panel.tsx).
|
|
1750
|
+
dropsAttr: Object.fromEntries([
|
|
1751
|
+
...[
|
|
1752
|
+
'href',
|
|
1753
|
+
'target',
|
|
1754
|
+
'download',
|
|
1755
|
+
'hrefLang',
|
|
1756
|
+
'ping',
|
|
1757
|
+
'referrerPolicy',
|
|
1758
|
+
'media',
|
|
1759
|
+
'type',
|
|
1760
|
+
'rel',
|
|
1761
|
+
].map(name => [name, { except: ['a'] }]),
|
|
1762
|
+
...['htmlFor', 'form'].map(name => [name, { except: ['label'] }]),
|
|
1763
|
+
]),
|
|
1764
|
+
ownProps: ['as', 'active'],
|
|
1730
1765
|
},
|
|
1731
1766
|
'panel-icon': todo('Panel.Icon', 'bestax `Panel.Icon` renders through `Icon`, which always writes an `aria-label`'),
|
|
1732
1767
|
// With no `Tabs.Content` among its children, `Tabs` renders `.tabs` around
|
|
@@ -1976,6 +2011,27 @@ export const WRAPPER_OWN_PROPS = {
|
|
|
1976
2011
|
UnorderedList: ['textColor', 'bgColor'],
|
|
1977
2012
|
Figure: ['textColor', 'bgColor'],
|
|
1978
2013
|
};
|
|
2014
|
+
/**
|
|
2015
|
+
* Every class Bulma 0.9.4's compiled stylesheet has and v1's does not, read
|
|
2016
|
+
* off the two with the class walk `e2e/bulma-classes-vocabulary.test.ts`
|
|
2017
|
+
* uses. Under v1 these style nothing: the tiles, `.columns.is-variable`,
|
|
2018
|
+
* `.heading`, `.number`, `is-marginless` and `is-paddingless` (v1 spells the
|
|
2019
|
+
* last two `marginless` and `paddingless`). That test holds each one absent
|
|
2020
|
+
* from the v1 stylesheet bestax depends on; the 0.9 half was read from its
|
|
2021
|
+
* published package, which nothing here installs.
|
|
2022
|
+
*/
|
|
2023
|
+
export const REMOVED_IN_V1 = [
|
|
2024
|
+
'heading',
|
|
2025
|
+
'is-ancestor',
|
|
2026
|
+
'is-child',
|
|
2027
|
+
'is-marginless',
|
|
2028
|
+
'is-paddingless',
|
|
2029
|
+
'is-parent',
|
|
2030
|
+
'is-variable',
|
|
2031
|
+
'is-vertical',
|
|
2032
|
+
'number',
|
|
2033
|
+
'tile',
|
|
2034
|
+
];
|
|
1979
2035
|
/** Bulma 0.9 classes v1 dropped, with what replaced them. */
|
|
1980
2036
|
export const LEGACY_09 = {
|
|
1981
2037
|
tile: 'Bulma v1 removed tiles; rebuild the layout with `Grid` and `Cell` (see the Bulma 0.9 to 1 guide)',
|
|
@@ -20,4 +20,24 @@ export interface Glyph {
|
|
|
20
20
|
* Material Design Icons glyph.
|
|
21
21
|
*/
|
|
22
22
|
export declare function readGlyph(glyph: ChildFacts | undefined): Glyph | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The glyph of Font Awesome's own markup, `<i class="fas fa-home"
|
|
25
|
+
* aria-hidden="true">`: an `<i>` that carries that attribute and nothing
|
|
26
|
+
* else, and that `readGlyph` reads once it's set aside. Undefined for any
|
|
27
|
+
* other `<i>`, one that `readGlyph` reads as it is included.
|
|
28
|
+
*/
|
|
29
|
+
export declare function readHiddenGlyph(glyph: ChildFacts | undefined): Glyph | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* A glyph as the props `Icon` is given, in the order they're written: one
|
|
32
|
+
* feature as a string, and more than one as a list.
|
|
33
|
+
*/
|
|
34
|
+
export declare function glyphProps(glyph: Glyph): Array<[name: string, value: string | readonly string[]]>;
|
|
35
|
+
/**
|
|
36
|
+
* The glyph Font Awesome's script drew an `<svg class="svg-inline--fa">` for,
|
|
37
|
+
* as the props `Icon` renders the `<i>` it was drawn from: the name from its
|
|
38
|
+
* `data-icon` (else its one class naming a glyph), the style from its
|
|
39
|
+
* `data-prefix`, and its other classes but the width one the script adds.
|
|
40
|
+
* For advice only: `Icon` renders that `<i>`, never the `<svg>`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function readDrawnGlyph(svg: ChildFacts | undefined): Glyph | undefined;
|
|
23
43
|
//# sourceMappingURL=glyph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyph.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/glyph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,IAAI,GAAG,KAAK,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"glyph.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/glyph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,IAAI,GAAG,KAAK,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAqFD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAmC1E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,KAAK,GAAG,SAAS,CAMnB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,GACX,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,CAAC,CAe1D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CA0B7E"}
|