bestax-mcp 1.16.0 → 1.16.2
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/data/bulma-classes.json +16 -57
- package/data/catalog.json +1 -1
- package/data/components/Button.json +1 -1
- package/data/components/Buttons.json +3 -3
- package/data/components/LinkButton.json +1 -1
- package/data/components/Modal.json +1 -1
- package/data/components/Popover.json +1 -1
- package/data/components/ToggleButton.json +1 -1
- package/data/skills/bestax-migrate/SKILL.md +4 -3
- package/data/skills/bestax-migrate/references/bulma-classes/component-map.md +14 -8
- package/data/skills/bestax-migrate/references/bulma-classes/prop-map.md +12 -3
- package/data/skills/bestax-migrate/references/bulma-classes/unmappables.md +22 -2
- package/data/skills/bestax-optimize/references/modular-build.md +4 -3
- package/data/skills.json +4 -4
- package/dist/bulma-classes.d.ts +5 -0
- package/dist/bulma-classes.d.ts.map +1 -1
- package/dist/bulma-classes.js +24 -12
- package/package.json +2 -2
package/data/bulma-classes.json
CHANGED
|
@@ -5280,62 +5280,6 @@
|
|
|
5280
5280
|
"parent": null,
|
|
5281
5281
|
"rendersText": null,
|
|
5282
5282
|
"classNameReplaces": false
|
|
5283
|
-
},
|
|
5284
|
-
"marginless": {
|
|
5285
|
-
"status": "plain",
|
|
5286
|
-
"target": null,
|
|
5287
|
-
"tag": null,
|
|
5288
|
-
"as": null,
|
|
5289
|
-
"sizeDrivesTag": false,
|
|
5290
|
-
"textColor": null,
|
|
5291
|
-
"bgColor": null,
|
|
5292
|
-
"part": false,
|
|
5293
|
-
"why": "a Bulma helper with no bestax prop",
|
|
5294
|
-
"modifiers": {},
|
|
5295
|
-
"omits": {},
|
|
5296
|
-
"wrapsChildren": null,
|
|
5297
|
-
"folds": null,
|
|
5298
|
-
"absorbs": null,
|
|
5299
|
-
"writes": null,
|
|
5300
|
-
"countsChildren": null,
|
|
5301
|
-
"readsGlyph": null,
|
|
5302
|
-
"buildsIcons": false,
|
|
5303
|
-
"buildsFile": false,
|
|
5304
|
-
"noHelpers": false,
|
|
5305
|
-
"helpersLeftOut": {},
|
|
5306
|
-
"topLevelOnly": false,
|
|
5307
|
-
"items": null,
|
|
5308
|
-
"parent": null,
|
|
5309
|
-
"rendersText": null,
|
|
5310
|
-
"classNameReplaces": false
|
|
5311
|
-
},
|
|
5312
|
-
"paddingless": {
|
|
5313
|
-
"status": "plain",
|
|
5314
|
-
"target": null,
|
|
5315
|
-
"tag": null,
|
|
5316
|
-
"as": null,
|
|
5317
|
-
"sizeDrivesTag": false,
|
|
5318
|
-
"textColor": null,
|
|
5319
|
-
"bgColor": null,
|
|
5320
|
-
"part": false,
|
|
5321
|
-
"why": "a Bulma helper with no bestax prop",
|
|
5322
|
-
"modifiers": {},
|
|
5323
|
-
"omits": {},
|
|
5324
|
-
"wrapsChildren": null,
|
|
5325
|
-
"folds": null,
|
|
5326
|
-
"absorbs": null,
|
|
5327
|
-
"writes": null,
|
|
5328
|
-
"countsChildren": null,
|
|
5329
|
-
"readsGlyph": null,
|
|
5330
|
-
"buildsIcons": false,
|
|
5331
|
-
"buildsFile": false,
|
|
5332
|
-
"noHelpers": false,
|
|
5333
|
-
"helpersLeftOut": {},
|
|
5334
|
-
"topLevelOnly": false,
|
|
5335
|
-
"items": null,
|
|
5336
|
-
"parent": null,
|
|
5337
|
-
"rendersText": null,
|
|
5338
|
-
"classNameReplaces": false
|
|
5339
5283
|
}
|
|
5340
5284
|
},
|
|
5341
5285
|
"precedence": [
|
|
@@ -5724,6 +5668,14 @@
|
|
|
5724
5668
|
"group": "spacing",
|
|
5725
5669
|
"write": { "prop": "py", "value": "auto" }
|
|
5726
5670
|
},
|
|
5671
|
+
"is-marginless": {
|
|
5672
|
+
"group": "spacing",
|
|
5673
|
+
"write": { "prop": "m", "value": "0" }
|
|
5674
|
+
},
|
|
5675
|
+
"is-paddingless": {
|
|
5676
|
+
"group": "spacing",
|
|
5677
|
+
"write": { "prop": "p", "value": "0" }
|
|
5678
|
+
},
|
|
5727
5679
|
"is-size-1": {
|
|
5728
5680
|
"group": "typography",
|
|
5729
5681
|
"write": { "prop": "textSize", "value": "1" }
|
|
@@ -6940,8 +6892,11 @@
|
|
|
6940
6892
|
}
|
|
6941
6893
|
},
|
|
6942
6894
|
"legacy": {
|
|
6943
|
-
"tile": "Bulma v1 removed tiles; rebuild the layout with `Grid` and `Cell` (see the Bulma 0.9 to 1 guide)"
|
|
6895
|
+
"tile": "Bulma v1 removed tiles; rebuild the layout with `Grid` and `Cell` (see the Bulma 0.9 to 1 guide)",
|
|
6896
|
+
"is-marginless": "Bulma v1 removed `is-marginless`, so it styles nothing now; write v1's `m-0` in its place, or `m=\"0\"` on a bestax component. The codemod does that itself wherever the element converts",
|
|
6897
|
+
"is-paddingless": "Bulma v1 removed `is-paddingless`, so it styles nothing now; write v1's `p-0` in its place, or `p=\"0\"` on a bestax component. The codemod does that itself wherever the element converts"
|
|
6944
6898
|
},
|
|
6899
|
+
"replaced": { "is-marginless": "m-0", "is-paddingless": "p-0" },
|
|
6945
6900
|
"removed": [
|
|
6946
6901
|
"heading",
|
|
6947
6902
|
"is-ancestor",
|
|
@@ -6979,6 +6934,10 @@
|
|
|
6979
6934
|
"why": "a Bulma helper with no bestax prop",
|
|
6980
6935
|
"match": "^(?:is-display-.+|is-visibility-.+|is-float-.+|is-clear-.+|has-text-weight-extrabold|is-align-content-(?:baseline|start|end)|is-align-items-self-(?:start|end)|is-offset-0(?:-[a-z]+)?)$"
|
|
6981
6936
|
},
|
|
6937
|
+
{
|
|
6938
|
+
"why": "Bulma's other name for `m-0` or `p-0`, with the same rule; bestax writes that rule as `m=\"0\"` or `p=\"0\"`, which renders `m-0` or `p-0`, so the class stays as it is",
|
|
6939
|
+
"match": "^(?:marginless|paddingless)$"
|
|
6940
|
+
},
|
|
6982
6941
|
{
|
|
6983
6942
|
"why": "a `.breadcrumb` separator, which converts only on its own `.breadcrumb`",
|
|
6984
6943
|
"match": "^has-[a-z]+-separator$"
|
package/data/catalog.json
CHANGED
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"name": "isLoading",
|
|
164
164
|
"type": "boolean",
|
|
165
165
|
"default": "false",
|
|
166
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn
|
|
166
|
+
"description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
167
167
|
"required": false,
|
|
168
168
|
"inherited": false,
|
|
169
169
|
"deprecated": false
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"name": "isLoading",
|
|
194
194
|
"type": "boolean",
|
|
195
195
|
"default": "false",
|
|
196
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn
|
|
196
|
+
"description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
197
197
|
"required": false,
|
|
198
198
|
"inherited": false,
|
|
199
199
|
"deprecated": false
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
"name": "isLoading",
|
|
388
388
|
"type": "boolean",
|
|
389
389
|
"default": "false",
|
|
390
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn
|
|
390
|
+
"description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
391
391
|
"required": false,
|
|
392
392
|
"inherited": true,
|
|
393
393
|
"deprecated": false
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
"name": "isLoading",
|
|
564
564
|
"type": "boolean",
|
|
565
565
|
"default": "false",
|
|
566
|
-
"description": "Shows Bulma's spinner in place of
|
|
566
|
+
"description": "Shows Bulma's spinner in place of its content and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Everything inside it is hidden behind the spinner, in forced colors (Windows' contrast themes) too, and under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
567
567
|
"required": false,
|
|
568
568
|
"inherited": false,
|
|
569
569
|
"deprecated": false
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"name": "isLoading",
|
|
109
109
|
"type": "boolean",
|
|
110
110
|
"default": "false",
|
|
111
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn
|
|
111
|
+
"description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
112
112
|
"required": false,
|
|
113
113
|
"inherited": true,
|
|
114
114
|
"deprecated": false
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"code": "function example() {\n const [open, setOpen] = useState(false);\n const closeModal = () => setOpen(false);\n\n return (\n <>\n <Button color=\"success\" onClick={() => setOpen(true)}>\n Show Modal\n </Button>\n <Modal isActive={open}>\n <Modal.Background onClick={closeModal} />\n <Modal.Content>\n <Box>\n <Title size=\"4\">Custom Content</Title>\n <Paragraph>Using compound components for full control!</Paragraph>\n </Box>\n </Modal.Content>\n <Modal.Close variant=\"floating\" onClick={closeModal} />\n </Modal>\n </>\n );\n}"
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
|
-
"accessibility": "- The modal root gets `role=\"dialog\"` and `aria-modal=\"true\"` while active — pass an explicit `role` to override (e.g. `Dialog` passes `role=\"presentation\"` on the `Modal` it wraps so its own `role=\"alertdialog\"` is the only one announced).\n- **Give the dialog an accessible name.** With the legacy API, `modalCardTitle` is wired up as `aria-labelledby` for you. With the compound API, pass your own `aria-label` or `aria-labelledby` on `<Modal>` — a `role=\"dialog\"` with no name is announced as just \"dialog\". An explicit `aria-labelledby` always wins over the generated one.\n- Escape closes the modal (calls `onClose`) by default; opt out with `closeOnEscape={false}`. One Escape closes the topmost overlay only, whichever open Modal, [Dialog](https://bestax.io/docs/api/components/dialog), [Sidebar](https://bestax.io/docs/api/components/sidebar) or full-page [Loading](https://bestax.io/docs/api/components/loading) opened last, and the next Escape closes the one under it. A modal on top with `closeOnEscape={false}` still keeps Escape from the layers under it. A [Toast](https://bestax.io/docs/api/components/toast) waits until no overlay is open.\n- The modal calls `preventDefault()` on the Escape it closes on, so a listener of your own that runs after it can tell the key was used.\n- A popup inside the modal takes its own Escape first. With an Autocomplete list, a Dropdown menu, a Popover or a date picker's calendar open, the first Escape closes that and the next one closes the modal.\n- A popup of your own inside a modal should call `preventDefault()` on the Escape it closes on. The modal leaves an Escape that was prevented alone, whether your popup hears it in a React `onKeyDown` or in a listener on `document`. Call it only when the popup is open and the key was pressed in it, so an Escape with nothing to close still closes the modal, and so does one pressed in a modal opened over your popup.\n- Body scroll is locked while the modal is active; opt out with `lockScroll={false}`. The lock is ref-counted and shared with `Dialog`, `Sidebar` and `Loading`, so whichever overlay closes first doesn't unlock the page underneath one that is still open.\n- Focus moves to the first
|
|
49
|
+
"accessibility": "- The modal root gets `role=\"dialog\"` and `aria-modal=\"true\"` while active — pass an explicit `role` to override (e.g. `Dialog` passes `role=\"presentation\"` on the `Modal` it wraps so its own `role=\"alertdialog\"` is the only one announced).\n- **Give the dialog an accessible name.** With the legacy API, `modalCardTitle` is wired up as `aria-labelledby` for you. With the compound API, pass your own `aria-label` or `aria-labelledby` on `<Modal>` — a `role=\"dialog\"` with no name is announced as just \"dialog\". An explicit `aria-labelledby` always wins over the generated one.\n- Escape closes the modal (calls `onClose`) by default; opt out with `closeOnEscape={false}`. One Escape closes the topmost overlay only, whichever open Modal, [Dialog](https://bestax.io/docs/api/components/dialog), [Sidebar](https://bestax.io/docs/api/components/sidebar) or full-page [Loading](https://bestax.io/docs/api/components/loading) opened last, and the next Escape closes the one under it. A modal on top with `closeOnEscape={false}` still keeps Escape from the layers under it. A [Toast](https://bestax.io/docs/api/components/toast) waits until no overlay is open.\n- The modal calls `preventDefault()` on the Escape it closes on, so a listener of your own that runs after it can tell the key was used.\n- A popup inside the modal takes its own Escape first. With an Autocomplete list, a Dropdown menu, a Popover or a date picker's calendar open, the first Escape closes that and the next one closes the modal.\n- A popup of your own inside a modal should call `preventDefault()` on the Escape it closes on. The modal leaves an Escape that was prevented alone, whether your popup hears it in a React `onKeyDown` or in a listener on `document`. Call it only when the popup is open and the key was pressed in it, so an Escape with nothing to close still closes the modal, and so does one pressed in a modal opened over your popup.\n- Body scroll is locked while the modal is active; opt out with `lockScroll={false}`. The lock is ref-counted and shared with `Dialog`, `Sidebar` and `Loading`, so whichever overlay closes first doesn't unlock the page underneath one that is still open.\n- Focus moves to the first tab stop (or the modal itself) on open, and is restored to the previously focused element on close — unless another modal is still open on top, in which case that one keeps focus.\n- Tab and Shift+Tab cycle within the modal while it is the topmost modal overlay, so the keyboard order agrees with what `aria-modal=\"true\"` tells assistive technology. They wrap at the same tab stops [`useFocusTrap`](https://bestax.io/docs/api/helpers/usefocustrap) does, so disabled, hidden and `tabIndex={-1}` elements are skipped, and so is inert content, such as a closed [Sidebar](https://bestax.io/docs/api/components/sidebar) inside the modal, and the content of a closed `<details>`. A radio group counts once. A Tab from outside the modal brings focus back in, and so does a Tab the browser takes out anyway, as Safari does past links when its settings say to. With another Modal or Dialog, a [Sidebar](https://bestax.io/docs/api/components/sidebar) with an overlay or a full-page Loading opened over it, the modal leaves Tab alone until that one closes. A Sidebar without an overlay isn't modal: opened over the modal, it takes Escape first, but the modal keeps holding Tab and keeps focus, so the sidebar doesn't take focus when it opens, and a Tab from its controls comes back into the modal. A focus trap of your own inside it, such as a portaled panel's, keeps a Tab it calls `preventDefault()` on, and the modal leaves focus where your trap put it. Note that `aria-modal` does not by itself make background content inert, and no `inert` attribute is applied, so background content remains reachable by pointer and by browser UI such as find-in-page.\n- The modal background closes the modal on click (`onClose` required).\n- Close buttons are provided for both modal-card and modal-content variants.\n\n:::note\nAlways provide an `onClose` handler for accessibility and to allow users to dismiss the modal.\n:::",
|
|
50
50
|
"related": [
|
|
51
51
|
"Button",
|
|
52
52
|
"Dialog",
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
"name": "isLoading",
|
|
286
286
|
"type": "boolean",
|
|
287
287
|
"default": "false",
|
|
288
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn
|
|
288
|
+
"description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
289
289
|
"required": false,
|
|
290
290
|
"inherited": true,
|
|
291
291
|
"deprecated": false
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"name": "isLoading",
|
|
126
126
|
"type": "boolean",
|
|
127
127
|
"default": "false",
|
|
128
|
-
"description": "Shows Bulma's spinner in place of
|
|
128
|
+
"description": "Shows Bulma's spinner in place of its content and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Everything inside it is hidden behind the spinner, in forced colors (Windows' contrast themes) too, and under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
129
129
|
"required": false,
|
|
130
130
|
"inherited": false,
|
|
131
131
|
"deprecated": false
|
|
@@ -132,10 +132,11 @@ code per the references, or deliberately keep the old markup with `className` st
|
|
|
132
132
|
drift than the 0.9 → 1 guide alone describes.
|
|
133
133
|
- **bulma-classes**: there is no library to remove. An element converts only when the bestax
|
|
134
134
|
component renders the same markup (tag, classes, attributes), so a converted page renders
|
|
135
|
-
the same HTML, but for
|
|
135
|
+
the same HTML, but for deliberate exceptions: Font Awesome's own hidden `<i>` in a `.icon`
|
|
136
136
|
that carries nothing else assistive tech reads becomes `Icon`, which hides the `.icon`
|
|
137
|
-
instead, the glyph hidden either way
|
|
138
|
-
|
|
137
|
+
instead, the glyph hidden either way, and Bulma 0.9's `is-marginless` and `is-paddingless`,
|
|
138
|
+
which style nothing under v1, become `m="0"` and `p="0"`. Everything else stays as written, with a
|
|
139
|
+
TODO when there is something to decide. Static class strings convert, and so does a `clsx` or
|
|
139
140
|
`classnames` call of strings and conditional classes, where a condition on a flag becomes
|
|
140
141
|
its prop (`isLoading={busy}`);
|
|
141
142
|
any other computed className gets `dynamic-class:<Target>`, naming the component the element
|
|
@@ -4,10 +4,11 @@ For apps that style plain JSX with Bulma's classes (`<div className="columns">`)
|
|
|
4
4
|
wrapper library. The codemod converts an element only when the bestax component renders
|
|
5
5
|
**exactly the markup the element did**: same tag, same classes, same attributes. Anything else
|
|
6
6
|
stays as written, with a `TODO(bestax-migrate)` when there is something to decide (see
|
|
7
|
-
[unmappables.md](unmappables.md)).
|
|
7
|
+
[unmappables.md](unmappables.md)). The exceptions are deliberate. Font Awesome's own
|
|
8
8
|
`<i aria-hidden="true">` alone in a `.icon` that carries nothing assistive tech reads becomes
|
|
9
9
|
`Icon`, which puts that attribute on the `.icon` instead, since the glyph is hidden either way
|
|
10
|
-
(see `.icon` below).
|
|
10
|
+
(see `.icon` below). And a Bulma 0.9 helper that v1 removed, which styles nothing now, becomes
|
|
11
|
+
the v1 helper that does its job (the [prop map](prop-map.md) lists them).
|
|
11
12
|
|
|
12
13
|
A class the codemod doesn't know, such as the app's own `pricing-card`, rides along in
|
|
13
14
|
`className`, which every bestax component passes through. So does a Bulma class with no bestax
|
|
@@ -161,8 +162,8 @@ classes become `Icon`'s props, read as `IconText` reads them (below), and the `I
|
|
|
161
162
|
|
|
162
163
|
Font Awesome's own markup hides the `<i>` instead, and converts the same way when the `.icon`
|
|
163
164
|
carries nothing but its classes, an `id`, a `style` and `data-` attributes: the `aria-hidden`
|
|
164
|
-
moves up onto the `.icon`, where `Icon` writes it, so the glyph is hidden either way. That is
|
|
165
|
-
|
|
165
|
+
moves up onto the `.icon`, where `Icon` writes it, so the glyph is hidden either way. That is a
|
|
166
|
+
place a conversion changes the markup, on purpose:
|
|
166
167
|
|
|
167
168
|
```jsx
|
|
168
169
|
<span className="icon is-small is-left">
|
|
@@ -373,7 +374,12 @@ button, the navbar's burger and dropdown link, the panel's icon, Radio and Radio
|
|
|
373
374
|
## Classes left alone
|
|
374
375
|
|
|
375
376
|
`.help`, `.label`, `.hero-buttons`, `.hero-video`, `.theme-dark`, `.theme-light`, `.fa`,
|
|
376
|
-
`.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
`.navbar-content`, `.navbar-tabs` and `.panel-list` are valid Bulma with nothing in bestax to
|
|
378
|
+
convert to. `.loader` is left alone as well, although bestax's `Loader` renders the same
|
|
379
|
+
element: swap it in by hand for its progressbar role and accessible name. An element carrying
|
|
380
|
+
one stays as written, and gets no TODO.
|
|
381
|
+
|
|
382
|
+
v1's `marginless` and `paddingless` are helpers, not components, so they don't hold an element
|
|
383
|
+
back: `<p className="has-text-centered marginless">` becomes
|
|
384
|
+
`<Paragraph textAlign="centered" className="marginless">`. They keep their names, since bestax
|
|
385
|
+
writes the same rules as `m-0` and `p-0`.
|
|
@@ -161,6 +161,7 @@ and `visible`. Ratios are `1by1`, `5by4`, `4by3`, `3by2`, `5by3`, `16by9`, `2by1
|
|
|
161
161
|
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
162
162
|
| `m-{n}`, `mt-{n}`, `mr-{n}`, `mb-{n}`, `ml-{n}`, `mx-{n}`, `my-{n}` (`0` to `6`, `auto`) | `m`, `mt`, `mr`, `mb`, `ml`, `mx`, `my` |
|
|
163
163
|
| `p-{n}`, `pt-{n}`, `pr-{n}`, `pb-{n}`, `pl-{n}`, `px-{n}`, `py-{n}` | `p`, `pt`, `pr`, `pb`, `pl`, `px`, `py` |
|
|
164
|
+
| `is-marginless`, `is-paddingless` (Bulma 0.9's, which v1 removed) | `m="0"`, `p="0"`, which render v1's `m-0` and `p-0` |
|
|
164
165
|
| `has-text-{color}` | `textColor` (on `Menu`, `Menu.Label`, `Menu.List` and `Table`, `color`) |
|
|
165
166
|
| `has-background-{color}` | `bgColor` (on `Menu`, `Menu.Label`, `Menu.List`, `Tag`, `File`, `InputBase`, `TextAreaBase` and `SelectBase`, `backgroundColor`) |
|
|
166
167
|
| `is-size-1` … `is-size-7`, and `-{viewport}` | `textSize`, `textSize{Viewport}` |
|
|
@@ -221,10 +222,18 @@ Some classes stay put because of how bestax renders them:
|
|
|
221
222
|
instead of as its own class.
|
|
222
223
|
- `is-hidden` becomes `visibility="hidden"`, which renders the same class and doesn't interact
|
|
223
224
|
with `display`.
|
|
225
|
+
- `is-marginless` and `is-paddingless` are the only classes a conversion changes: they style
|
|
226
|
+
nothing under v1, so they become the prop of the v1 helper that does their job. A live class
|
|
227
|
+
for the same prop keeps it, whichever is written first, so beside `p-2` the class stays with a
|
|
228
|
+
`legacy:` TODO, and so it does wherever the element stays markup. Beside a class for another
|
|
229
|
+
prop, such as `px-2`, it still converts: v1 puts every side and axis class after `p-0`, so
|
|
230
|
+
`px-2` keeps its sides.
|
|
224
231
|
|
|
225
232
|
## Classes that stay classes
|
|
226
233
|
|
|
227
234
|
Color shades (`has-text-primary-65`), the `-touch` and `-only` breakpoints of text size and
|
|
228
|
-
alignment, Grid and `.image` modifiers away from their own element, an `.image` ratio,
|
|
229
|
-
|
|
230
|
-
|
|
235
|
+
alignment, Grid and `.image` modifiers away from their own element, an `.image` ratio, v1's
|
|
236
|
+
`marginless` and `paddingless` (the rules of `m-0` and `p-0` under other names), and the Bulma
|
|
237
|
+
helpers bestax has no prop for (`is-display-*`, `is-visibility-*`, `is-float-*`, `is-clear-*`,
|
|
238
|
+
…) stay in `className`. They render exactly as before. An `.image` size or ratio away from its
|
|
239
|
+
`.image` also gets a `modifier:image` TODO, since Bulma styles it only there.
|
|
@@ -95,7 +95,7 @@ makes one named by `aria-label` or `aria-labelledby` an image, with `role="img"`
|
|
|
95
95
|
own. `Icon` writes `aria-hidden` on the `.icon` and never on the `<i>` inside. Font Awesome's own
|
|
96
96
|
markup, `<i class="fas fa-envelope" aria-hidden="true">` alone in a `.icon` that carries
|
|
97
97
|
nothing but its classes, an `id`, a `style` and `data-` attributes, converts anyway, with the
|
|
98
|
-
attribute moved up onto the `.icon`,
|
|
98
|
+
attribute moved up onto the `.icon`, an exception to identical markup. A `.icon` that
|
|
99
99
|
carries anything more never takes the move. A `role` or `tabIndex` written out converts around
|
|
100
100
|
the `<i>` as it is, since `Icon` then hides nothing itself. Anything else, or either of those as
|
|
101
101
|
an expression, keeps the `.icon` as markup: a `title` or a description would be hidden with it,
|
|
@@ -353,6 +353,24 @@ in the browser:
|
|
|
353
353
|
0.9 to 1 guide shows the translation. Until then the element has no styles at all under
|
|
354
354
|
Bulma v1.
|
|
355
355
|
|
|
356
|
+
`legacy:is-marginless`, `legacy:is-paddingless`: v1 removed both, so they style nothing.
|
|
357
|
+
Wherever the element converts, the codemod writes them as `m="0"` and `p="0"`, which render
|
|
358
|
+
v1's `m-0` and `p-0`, and says nothing. The TODO comes only where the class stays: on an
|
|
359
|
+
element that stays markup (a `<div>` with no component class, or one refused for another
|
|
360
|
+
reason), or beside a class for the same prop (`p-2`, before it or after), which keeps the prop
|
|
361
|
+
since it's what the page renders today. Write `m-0` or `p-0` in its place, or drop it if the
|
|
362
|
+
spacing it once removed no longer matters.
|
|
363
|
+
|
|
364
|
+
## A class that styles nothing where it is: `modifier:<root>`
|
|
365
|
+
|
|
366
|
+
`modifier:image`: an `.image` size or ratio (`is-64x64`, `is-square`, `is-4by3`) on an element
|
|
367
|
+
without `.image`. Bulma styles them only on the element that carries `.image`, so this one
|
|
368
|
+
sizes nothing, unless the project's own CSS gives the class a rule. If the element is the
|
|
369
|
+
image's box, add `image`. On a tag `Image` renders (the component map's `.image` row lists
|
|
370
|
+
them), re-run and it can convert; on any other tag it stays markup, and the TODO says so.
|
|
371
|
+
Otherwise drop the class. A computed `className` the codemod can't read whole gets no such TODO, since a class it
|
|
372
|
+
can't see may be the `.image`.
|
|
373
|
+
|
|
356
374
|
## A whole file it left alone
|
|
357
375
|
|
|
358
376
|
These come only when the file has an element the codemod would convert (a computed className
|
|
@@ -684,7 +702,9 @@ A page with no Bulma component class writes nothing and reports nothing.
|
|
|
684
702
|
- Helper classes on a `<div>` (`<div className="is-flex mt-4">`): bestax has no plain `<div>`
|
|
685
703
|
wrapper, and the classes are valid Bulma, so the element stays.
|
|
686
704
|
- `.help`, `.label`, `.loader` and the other classes in the component map's "left alone" list.
|
|
687
|
-
- A class with no bestax prop on a converted element: it stays in `className`.
|
|
705
|
+
- A class with no bestax prop on a converted element: it stays in `className`. That covers
|
|
706
|
+
v1's `marginless` and `paddingless`, which have the same rules as `m-0` and `p-0` under
|
|
707
|
+
other names, so they stay as written while the element converts on its other classes.
|
|
688
708
|
|
|
689
709
|
## After the codemod
|
|
690
710
|
|
|
@@ -133,9 +133,10 @@ Notes:
|
|
|
133
133
|
`bulma/sass/components/dropdown` next to `scss/components/contextmenu`.
|
|
134
134
|
- `Loader` is stock Bulma styled by `bulma/sass/elements/loader`, and the `isLoading`
|
|
135
135
|
spinners on `Button`, `Control` and `Select` are Bulma's too. The `loader` extras partial
|
|
136
|
-
stops all of them under `prefers-reduced-motion: reduce`,
|
|
137
|
-
|
|
138
|
-
include it (`as bestax-loader`) next to the Bulma modules in any build
|
|
136
|
+
stops all of them under `prefers-reduced-motion: reduce`, hides everything inside a loading
|
|
137
|
+
button where Bulma hides only the label, and keeps each ring open in forced colors (Windows'
|
|
138
|
+
contrast themes), so include it (`as bestax-loader`) next to the Bulma modules in any build
|
|
139
|
+
that shows one. Its
|
|
139
140
|
rules win over Bulma's either way, so the order of the two `@use` lines does not matter.
|
|
140
141
|
- `Progress` and the skeletons are stock Bulma too (`bulma/sass/elements/progress`,
|
|
141
142
|
`bulma/sass/base/skeleton`). The `progress` and `skeleton` extras partials
|
package/data/skills.json
CHANGED
|
@@ -103,17 +103,17 @@
|
|
|
103
103
|
{
|
|
104
104
|
"id": "bulma-classes-component-map",
|
|
105
105
|
"file": "references/bulma-classes/component-map.md",
|
|
106
|
-
"bytes":
|
|
106
|
+
"bytes": 29661
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"id": "bulma-classes-prop-map",
|
|
110
110
|
"file": "references/bulma-classes/prop-map.md",
|
|
111
|
-
"bytes":
|
|
111
|
+
"bytes": 36213
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"id": "bulma-classes-unmappables",
|
|
115
115
|
"file": "references/bulma-classes/unmappables.md",
|
|
116
|
-
"bytes":
|
|
116
|
+
"bytes": 49495
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
"id": "css-migration",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
{
|
|
163
163
|
"id": "modular-build",
|
|
164
164
|
"file": "references/modular-build.md",
|
|
165
|
-
"bytes":
|
|
165
|
+
"bytes": 12025
|
|
166
166
|
}
|
|
167
167
|
],
|
|
168
168
|
"examples": []
|
package/dist/bulma-classes.d.ts
CHANGED
|
@@ -177,6 +177,11 @@ export interface BulmaClassTable {
|
|
|
177
177
|
wrappers: Record<string, string>;
|
|
178
178
|
helpers: Record<string, HelperRecord>;
|
|
179
179
|
legacy: Record<string, string>;
|
|
180
|
+
/**
|
|
181
|
+
* Removed Bulma 0.9 helpers, each with the v1 helper whose prop it
|
|
182
|
+
* converts as (`is-marginless` as `m-0`'s `m="0"`).
|
|
183
|
+
*/
|
|
184
|
+
replaced: Record<string, string>;
|
|
180
185
|
/** Classes Bulma 0.9's stylesheet has and v1's does not. */
|
|
181
186
|
removed: string[];
|
|
182
187
|
passthrough: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulma-classes.d.ts","sourceRoot":"","sources":["../src/bulma-classes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAC7C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACpC,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B;;;OAGG;IACH,aAAa,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B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AC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAM,GACxD,MAAM,CA2IR"}
|
package/dist/bulma-classes.js
CHANGED
|
@@ -157,6 +157,9 @@ export function lookupClasses(table, input, tag) {
|
|
|
157
157
|
const tokens = classTokens(input);
|
|
158
158
|
const verdicts = new Map();
|
|
159
159
|
const stays = (token, why) => verdicts.set(token, { kind: 'class', why });
|
|
160
|
+
// A removed Bulma 0.9 helper that stays says what replaced it, whatever
|
|
161
|
+
// kept it: that is what there is to do about it.
|
|
162
|
+
const helperStays = (token, why) => stays(token, own(table.replaced, token) ? leftoverReason(table, token) : why);
|
|
160
163
|
const result = (element) => ({
|
|
161
164
|
tag,
|
|
162
165
|
element,
|
|
@@ -204,7 +207,7 @@ export function lookupClasses(table, input, tag) {
|
|
|
204
207
|
continue;
|
|
205
208
|
}
|
|
206
209
|
bare = false;
|
|
207
|
-
|
|
210
|
+
helperStays(token, `bestax renders \`.${wrapper}\` with no other class`);
|
|
208
211
|
}
|
|
209
212
|
if (tag && tag !== entry.tag) {
|
|
210
213
|
return result({
|
|
@@ -248,7 +251,7 @@ export function lookupClasses(table, input, tag) {
|
|
|
248
251
|
const why = `bestax has no component for a plain <${tag}>, so its classes stay`;
|
|
249
252
|
for (const token of tokens) {
|
|
250
253
|
if (own(table.helpers, token))
|
|
251
|
-
|
|
254
|
+
helperStays(token, why);
|
|
252
255
|
}
|
|
253
256
|
return result({ kind: 'markup', why });
|
|
254
257
|
}
|
|
@@ -288,14 +291,20 @@ export function lookupClasses(table, input, tag) {
|
|
|
288
291
|
? wrapsChildren
|
|
289
292
|
: undefined;
|
|
290
293
|
// Each class as the root's modifier, else as a helper prop, in order; the
|
|
291
|
-
// first class to set a prop keeps it.
|
|
294
|
+
// first class to set a prop keeps it, but a Bulma 0.9 class v1 removed
|
|
295
|
+
// goes after every other, as in the planner, so a live class for the same
|
|
296
|
+
// prop keeps it whichever is written first (`is-paddingless p-2`).
|
|
292
297
|
// What the component needs for its own class comes first, so no class can
|
|
293
298
|
// take its prop (`variant="lines"` for `.skeleton-lines`).
|
|
294
299
|
const writes = new Map((entry.writes ?? []).map(write => [
|
|
295
300
|
write.prop,
|
|
296
301
|
{ value: write.value ?? true, token: root ?? '' },
|
|
297
302
|
]));
|
|
298
|
-
|
|
303
|
+
const claiming = [
|
|
304
|
+
...tokens.filter(token => !own(table.replaced, token)),
|
|
305
|
+
...tokens.filter(token => own(table.replaced, token)),
|
|
306
|
+
];
|
|
307
|
+
for (const token of claiming) {
|
|
299
308
|
if (token === root) {
|
|
300
309
|
verdicts.set(token, { kind: 'component', target: target });
|
|
301
310
|
continue;
|
|
@@ -339,7 +348,7 @@ export function lookupClasses(table, input, tag) {
|
|
|
339
348
|
if (!helper)
|
|
340
349
|
continue;
|
|
341
350
|
if (entry.noHelpers) {
|
|
342
|
-
|
|
351
|
+
helperStays(token, `bestax \`${target}\` takes no helper props`);
|
|
343
352
|
continue;
|
|
344
353
|
}
|
|
345
354
|
const prop = helper.group === 'text-color'
|
|
@@ -348,16 +357,16 @@ export function lookupClasses(table, input, tag) {
|
|
|
348
357
|
? entry.bgColor
|
|
349
358
|
: helper.write.prop;
|
|
350
359
|
if (!prop) {
|
|
351
|
-
|
|
360
|
+
helperStays(token, `bestax \`${target}\` has no prop that renders it`);
|
|
352
361
|
continue;
|
|
353
362
|
}
|
|
354
363
|
const leftOut = own(entry.helpersLeftOut, prop);
|
|
355
364
|
if (leftOut) {
|
|
356
|
-
|
|
365
|
+
helperStays(token, leftOut);
|
|
357
366
|
continue;
|
|
358
367
|
}
|
|
359
368
|
if (writes.has(prop)) {
|
|
360
|
-
|
|
369
|
+
helperStays(token, `\`${prop}\` is already set by \`${writes.get(prop).token}\``);
|
|
361
370
|
continue;
|
|
362
371
|
}
|
|
363
372
|
const write = { prop, value: helper.write.value };
|
|
@@ -367,12 +376,15 @@ export function lookupClasses(table, input, tag) {
|
|
|
367
376
|
group: helper.group,
|
|
368
377
|
});
|
|
369
378
|
const color = helper.group === 'text-color' || helper.group === 'background';
|
|
379
|
+
const v1 = own(table.replaced, token);
|
|
370
380
|
verdicts.set(token, {
|
|
371
381
|
kind: 'prop',
|
|
372
382
|
writes: [write],
|
|
373
|
-
condition:
|
|
374
|
-
?
|
|
375
|
-
:
|
|
383
|
+
condition: v1
|
|
384
|
+
? `Bulma 1 removed \`${token}\`, so this renders its v1 class, \`${v1}\`, in its place`
|
|
385
|
+
: color && !target
|
|
386
|
+
? colorCondition(table, helper.group === 'text-color' ? 'textColor' : 'bgColor')
|
|
387
|
+
: undefined,
|
|
376
388
|
});
|
|
377
389
|
}
|
|
378
390
|
// `File` renders Bulma's `is-empty` itself beside `hasName` while it has
|
|
@@ -392,7 +404,7 @@ export function lookupClasses(table, input, tag) {
|
|
|
392
404
|
const undo = (prop, why) => {
|
|
393
405
|
const { token, value } = writes.get(prop);
|
|
394
406
|
const named = value === true ? `\`${prop}\`` : `\`${prop}="${value}"\``;
|
|
395
|
-
|
|
407
|
+
helperStays(token, `${named} ${why}, so here it stays a class`);
|
|
396
408
|
writes.delete(prop);
|
|
397
409
|
undone = true;
|
|
398
410
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"mcpName": "io.github.allxsmith/bestax-mcp",
|
|
5
5
|
"description": "MCP server for @allxsmith/bestax-bulma — component props, examples, CSS variables and agent skills, served offline from a version-pinned index",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
44
44
|
"zod": "^4.4.3",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.39.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.39.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jest/globals": "^30.0.0",
|