create-bestax 4.2.19 → 4.3.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.
Files changed (39) hide show
  1. package/README.md +13 -3
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +1 -0
  4. package/dist/constants.d.ts +12 -0
  5. package/dist/constants.d.ts.map +1 -1
  6. package/dist/constants.js +65 -0
  7. package/dist/project-creator.d.ts +8 -0
  8. package/dist/project-creator.d.ts.map +1 -1
  9. package/dist/project-creator.js +58 -2
  10. package/dist/prompts.d.ts +1 -0
  11. package/dist/prompts.d.ts.map +1 -1
  12. package/dist/prompts.js +15 -1
  13. package/package.json +3 -3
  14. package/templates/skills/bestax-custom-component/references/component-catalog.md +3 -1
  15. package/templates/skills/bestax-icons/references/icon-libraries.md +14 -1
  16. package/templates/skills/bestax-layout-scaffold/SKILL.md +15 -0
  17. package/templates/skills/bestax-migrate/SKILL.md +10 -4
  18. package/templates/skills/bestax-migrate/references/bloomer/prop-map.md +1 -1
  19. package/templates/skills/bestax-migrate/references/bloomer/unmappables.md +4 -1
  20. package/templates/skills/bestax-migrate/references/bulma-classes/component-map.md +49 -15
  21. package/templates/skills/bestax-migrate/references/bulma-classes/prop-map.md +4 -2
  22. package/templates/skills/bestax-migrate/references/bulma-classes/unmappables.md +166 -30
  23. package/templates/skills/bestax-migrate/references/rbx/prop-map.md +1 -1
  24. package/templates/skills/bestax-migrate/references/react-bulma-components/unmappables.md +2 -2
  25. package/templates/skills/bestax-optimize/references/modular-build.md +3 -1
  26. package/templates/skills/bestax-theming/SKILL.md +13 -10
  27. package/templates/skills/bestax-theming/examples/dark-mode.tsx +7 -6
  28. package/templates/skills/bestax-theming/examples/theme-config.tsx +10 -3
  29. package/templates/skills/bestax-theming/references/css-variables.md +89 -11
  30. package/templates/skills/bestax-theming/references/themeable-components.md +2 -0
  31. package/templates/vite/README.md +2 -2
  32. package/templates/vite/_oxlintrc.json +8 -0
  33. package/templates/vite/package.json +8 -12
  34. package/templates/vite/vite.config.js +1 -1
  35. package/templates/vite-ts/README.md +2 -2
  36. package/templates/vite-ts/_oxlintrc.json +8 -0
  37. package/templates/vite-ts/package.json +10 -15
  38. package/templates/vite/eslint.config.js +0 -29
  39. package/templates/vite-ts/eslint.config.js +0 -26
@@ -10,7 +10,11 @@ theming means overriding the right `--bulma-*` values.
10
10
 
11
11
  `Theme` is exported from the package and writes `--bulma-*` variables for you.
12
12
 
13
- - `isRoot` → injects the variables globally at `:root` (use once, at the app root).
13
+ - `isRoot` → injects the variables globally at `:root` (use once, at the app root). It writes
14
+ them before the browser paints what it rendered, so an app rendered in the browser has them
15
+ from its first frame of content. A server render doesn't include them, so a server-rendered
16
+ page paints with the stylesheet's values until it hydrates: put what it needs from its first
17
+ paint in CSS (path 2).
14
18
  - without `isRoot` → wraps children in a `<div>` and scopes the variables to that subtree.
15
19
  - Named props set the color/scheme HSL channels and common values (see "Theme props" below).
16
20
  - `bulmaVars` sets any other variable, keyed by its real `--bulma-*` name. It only changes
@@ -112,14 +116,39 @@ the blue too, and is too light for turquoise text on a white page. The other col
112
116
  from Bulma's own defaults. For a page made for stock Bulma, the bestax-migrate skill's
113
117
  `references/css-migration.md` covers getting its turquoise back.
114
118
 
115
- `Theme` doesn't set either one, so set them in your CSS, loaded after the library's styles:
119
+ Set them alongside the trio, through `Theme`'s `bulmaVars` or in your CSS:
116
120
 
117
121
  - **The invert** is one value for both schemes. Point it at a shade that reads on the new color: a
118
122
  near-black `var(--bulma-<c>-05-l)` on a light color, a near-white `var(--bulma-<c>-100-l)` on a
119
123
  dark one.
120
124
  - **The on-scheme lightness** has to read on the page's background, so Bulma gives each scheme
121
- its own. A value on `:root` in your stylesheet wins in both, so give dark mode its own value on
122
- both of its paths, as below.
125
+ its own. One value applies in both schemes, so give each scheme its own: on an `isRoot`
126
+ `Theme`, the on-scheme keys of `bulmaVars` take `{ light, dark }`, and `Theme` writes each
127
+ where Bulma's own value for that scheme applies. A scheme you leave out keeps the
128
+ stylesheet's value. `bestax-no-dark-mode.css` has no dark scheme, so with it give one string.
129
+
130
+ ```tsx
131
+ // Stock Bulma's turquoise, with the values from bulma/css/bulma.css.
132
+ <Theme
133
+ isRoot
134
+ primaryH="171deg"
135
+ primaryS="100%"
136
+ primaryL="41%"
137
+ bulmaVars={{
138
+ '--bulma-primary-invert-l': 'var(--bulma-primary-05-l)',
139
+ '--bulma-primary-on-scheme-l': { light: '21%', dark: '41%' },
140
+ }}
141
+ >
142
+ <App />
143
+ </Theme>
144
+ ```
145
+
146
+ A scoped `Theme` writes its variables as an inline style, which can't hold a value per scheme, so
147
+ there the on-scheme lightness takes only a string, and `{ light, dark }` is skipped with a warning
148
+ in development. Set it in your CSS instead when a scoped section needs one per scheme, or when
149
+ the page is rendered on the server, which paints before `Theme` runs. In CSS, loaded after the
150
+ library's styles, a value on `:root` wins in both schemes, so give dark mode its own value on
151
+ both of its paths:
123
152
 
124
153
  ```css
125
154
  /* Stock Bulma's turquoise, with the values from bulma/css/bulma.css. */
@@ -322,6 +351,15 @@ come from the `itemsToShow*` props, and `--bulma-carousel-items-in-view` is the
322
351
  viewport picks. The props also decide how far a step moves, so set the count with the props
323
352
  rather than with these variables.
324
353
 
354
+ The `--bulma-carousel-overlay-*` variables color the arrows, and indicators over the slides, only
355
+ while the overlay look is on: `overlayControls`, which follows `indicatorInside` unless set. The look
356
+ also puts a dark gradient band behind indicators over the slides (a `background`, not a variable),
357
+ and while it's on the arrows ignore `arrowColor`. For indicators over light slides, such as white
358
+ cards, use `<Carousel indicatorInside overlayControls={false}>`: plain colors and no band.
359
+ `overlayControls` alone gives the arrows the overlay look with the indicators below the slides. The
360
+ overlay colors default to light ones (`--bulma-white`) in either color scheme, since they sit on a
361
+ dark tint.
362
+
325
363
  ### Checkbox
326
364
 
327
365
  `--bulma-checkbox-active-color`, `--bulma-checkbox-background`, `--bulma-checkbox-border-color`,
@@ -341,6 +379,12 @@ that selector, so leave `color` unset when a class sets the fill. The unchecked
341
379
  the box holds the 3:1 WCAG asks of a control's boundary; keep a replacement at 3:1 against what
342
380
  the form sits on.
343
381
 
382
+ `--bulma-checkbox-size` (default `1.25em`) can't take the box below 24px: the stylesheet gives the
383
+ `.check` box a `min-width` and `min-height` of 24px, WCAG 2.2's minimum target size, so with
384
+ Bulma's default font sizes the box is 24px at the default and `small` sizes. For a smaller box, set the size and also
385
+ `min-width: 0; min-height: 0` on `.styled-checkbox.my-box .check` (mind the class prefix), and keep
386
+ the label text inside the `Checkbox`, since the whole label is the click target.
387
+
344
388
  ### Collapse
345
389
 
346
390
  `--bulma-collapse-border-color`, `--bulma-collapse-group-gap`, `--bulma-collapse-header-weight`,
@@ -555,6 +599,12 @@ declares `--bulma-radio-active-color` again on `.styled-radio.is-<color>`, which
555
599
  selector, so leave `color` unset when a class sets it. The unchecked ring, `--bulma-radio-border-color`, defaults to `text-weak` for the same 3:1 boundary
556
600
  contrast.
557
601
 
602
+ `--bulma-radio-size` (default `1.25em`) can't take the circle below 24px: the stylesheet gives the
603
+ `.check` circle a `min-width` and `min-height` of 24px, WCAG 2.2's minimum target size, so with
604
+ Bulma's default font sizes the circle is 24px at the default and `small` sizes. For a smaller circle, set the size and also
605
+ `min-width: 0; min-height: 0` on `.styled-radio.my-radio .check` (mind the class prefix), and keep
606
+ the label text inside the `Radio`, since the whole label is the click target.
607
+
558
608
  ### Rate
559
609
 
560
610
  `--bulma-rate-color-active`, `--bulma-rate-color-hover`, `--bulma-rate-color-inactive`,
@@ -571,6 +621,19 @@ contrast.
571
621
  `--bulma-reveal-duration`, `--bulma-reveal-easing`, `--bulma-reveal-flip-angle`,
572
622
  `--bulma-reveal-offset`, `--bulma-reveal-offset-large`, `--bulma-reveal-scale`
573
623
 
624
+ ### ScrollArea
625
+
626
+ Declared on the frame, `.scroll-area`, and read by the viewport inside it, so set them on the
627
+ frame, through `className` or `style`. `--bulma-scroll-area-scrollbar-width` takes what
628
+ `scrollbar-width` takes: `thin`, `auto` or `none`. `none` hides the bars while the area still
629
+ scrolls, which hides that it scrolls at all, so keep to `thin` or `auto`. Restyled bars owe
630
+ WCAG's 3:1, so keep a thumb color that clears it against the background in both schemes. In forced colors the browser gives the bars the system's colors
631
+ whatever these say.
632
+
633
+ `--bulma-scroll-area-fade-size`, `--bulma-scroll-area-scrollbar-width`,
634
+ `--bulma-scroll-area-thumb-color`, `--bulma-scroll-area-thumb-hover-color`,
635
+ `--bulma-scroll-area-track-color`
636
+
574
637
  ### Sidebar
575
638
 
576
639
  `--bulma-sidebar-background`, `--bulma-sidebar-close-color`,
@@ -603,6 +666,18 @@ contrast.
603
666
  `--bulma-slider-track-height-small`, `--bulma-slider-transition-duration`,
604
667
  `--bulma-slider-vertical-height`
605
668
 
669
+ ### Splitter
670
+
671
+ Declared on the root, `.splitter`. The handle reads them, and its line and grip are borders, so a
672
+ forced-colors page keeps them and draws an active handle in `Highlight`.
673
+ `--bulma-splitter-handle-size-coarse` is the strip's width for a coarse pointer, kept at 24px or
674
+ more for WCAG 2.5.8.
675
+
676
+ `--bulma-splitter-grip-color`, `--bulma-splitter-grip-length`, `--bulma-splitter-grip-radius`,
677
+ `--bulma-splitter-grip-size`, `--bulma-splitter-handle-size`,
678
+ `--bulma-splitter-handle-size-coarse`, `--bulma-splitter-line-active-color`,
679
+ `--bulma-splitter-line-active-size`, `--bulma-splitter-line-color`, `--bulma-splitter-line-size`
680
+
606
681
  ### Steps
607
682
 
608
683
  `--bulma-steps-animation-duration`, `--bulma-steps-content-margin-top`,
@@ -747,10 +822,11 @@ own, so a new color sets one per scheme (see "The lightnesses Bulma's build pick
747
822
 
748
823
  ### The scheme of the first paint
749
824
 
750
- `Theme` writes the attribute from an effect, and a client-rendered app (the create-bestax
751
- scaffold, for one) paints before its effects run. That first frame takes whatever `<html>`
752
- already carries: with nothing there, the visitor's OS scheme, which then flips. So the scheme
753
- for that frame comes from `index.html`:
825
+ `Theme` writes the attribute before the browser paints what it rendered, but a page can paint
826
+ before the app's script runs at all: a client-rendered app (the create-bestax scaffold, for one)
827
+ can show its empty page first, and a server-rendered one shows its server HTML. That first frame
828
+ takes whatever `<html>` already carries: with nothing there, the visitor's OS scheme, which then
829
+ flips. So the scheme for that frame comes from `index.html`:
754
830
 
755
831
  - **A scheme that never changes** goes on the `<html>` itself,
756
832
  `<html lang="en" data-theme="light">`, and needs no `colorMode`.
@@ -781,8 +857,8 @@ white text on cream. The failure is invisible unless the author's own OS is in d
781
857
 
782
858
  **If the design is single-mode, pin the scheme** on the `<html>` in `index.html`
783
859
  (`<html lang="en" data-theme="light">`, as above), so text can't flip out from under the palette.
784
- `<Theme isRoot colorMode="light">` pins it too, but only from its effect on, after the first
785
- paint.
860
+ `<Theme isRoot colorMode="light">` pins it too, but only once the app's script runs, so the
861
+ page can show the OS scheme before that.
786
862
 
787
863
  **If both modes are supported, never expose a fixed custom token to the flip** — derive it from
788
864
  scheme variables, or flip it yourself:
@@ -825,4 +901,6 @@ Color trios: `primaryH/primaryS/primaryL`, `linkH/linkS/linkL`, `infoH/S/L`, `su
825
901
  `darkInvertL`, `softL`, `boldL`, `softInvertL`, `boldInvertL`. Interaction deltas:
826
902
  `hoverBackgroundLDelta`, `activeBackgroundLDelta`, `hoverBorderLDelta`, `activeBorderLDelta`,
827
903
  `hoverColorLDelta`, `activeColorLDelta`, `hoverShadowADelta`, `activeShadowADelta`. Everything else:
828
- `bulmaVars={{ '--bulma-…': '…' }}`. All values are strings.
904
+ `bulmaVars={{ '--bulma-…': '…' }}`, each color's `--bulma-<c>-invert-l` and
905
+ `--bulma-<c>-on-scheme-l` included. All values are strings, except that an on-scheme key also
906
+ takes `{ light, dark }` on an `isRoot` `Theme`.
@@ -79,9 +79,11 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
79
79
  | `Progress` | every `validColors` member (the `-bis`/`-ter` shades and the greys deprecated: no CSS, dev-warn, removed next major — see ⚠️) | `small \| medium \| large` | — |
80
80
  | `Radio` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | the 6 only |
81
81
  | `Rate` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | the 6 only |
82
+ | `ScrollArea` | — (no `color`: the thumb is `--bulma-scroll-area-thumb-color`) | — (`--bulma-scroll-area-scrollbar-width`: `thin`, `auto` or `none`) | the browser's own bars, so forced colors gives them the system's colors; retheme through `--bulma-scroll-area-*` |
82
83
  | `SegmentedControl` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | fills only the checked segment (default `link`); `size` is the row's `are-<size>`; segments take no `color` or `size` |
83
84
  | `Select` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | also `isRounded` |
84
85
  | `Slider` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded`, `isCircle` |
86
+ | `Splitter` | — (no `color`: the line is `--bulma-splitter-line-color`) | — (no `size`) | the line and grip are borders, so forced colors keeps them; retheme through `--bulma-splitter-*` |
85
87
  | `Steps` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | the 6 only |
86
88
  | `Switch` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | also `isRounded`, `isThin`, `isOutlined` |
87
89
  | `Tabs` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | **entire `color` prop deprecated** (no CSS ships; dev-warn; removal next major) |
@@ -14,14 +14,14 @@ pnpm run dev
14
14
  - `pnpm run dev` - Start development server
15
15
  - `pnpm run build` - Build for production
16
16
  - `pnpm run preview` - Preview production build
17
- - `pnpm run lint` - Run ESLint
17
+ - `pnpm run lint` - Run Oxlint
18
18
 
19
19
  ## Features
20
20
 
21
21
  - ⚡️ Vite for lightning-fast HMR
22
22
  - 🎨 Bulma CSS framework
23
23
  - 📦 bestax-bulma component library
24
- - 🔧 ESLint pre-configured
24
+ - 🔧 Oxlint pre-configured
25
25
 
26
26
  ## Learn More
27
27
 
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["react", "oxc"],
4
+ "rules": {
5
+ "react/rules-of-hooks": "error",
6
+ "react/only-export-components": ["warn", { "allowConstantExport": true }]
7
+ }
8
+ }
@@ -6,24 +6,20 @@
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "vite build",
9
- "lint": "eslint .",
9
+ "lint": "oxlint",
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
13
  "@allxsmith/bestax-bulma": "workspace:^",
14
- "react": "^19.2.3",
15
- "react-dom": "^19.2.3"
14
+ "react": "^19.3.1",
15
+ "react-dom": "^19.3.1"
16
16
  },
17
17
  "devDependencies": {
18
- "@eslint/js": "^10.0.1",
19
- "@types/react": "^19.2.17",
20
- "@types/react-dom": "^19.2.3",
21
- "@vitejs/plugin-react": "^6.0.3",
22
- "eslint": "^10.5.0",
23
- "eslint-plugin-react-hooks": "^7.1.1",
24
- "eslint-plugin-react-refresh": "^0.5.3",
25
- "globals": "^17.7.0",
26
- "vite": "^8.1.0"
18
+ "@types/react": "^19.3.0",
19
+ "@types/react-dom": "^19.3.0",
20
+ "@vitejs/plugin-react": "^6.1.2",
21
+ "oxlint": "^1.89.0",
22
+ "vite": "^8.3.5"
27
23
  },
28
24
  "engines": {
29
25
  "node": "^20.19.0 || >=22.12.0"
@@ -1,7 +1,7 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import react from '@vitejs/plugin-react';
3
3
 
4
- // https://vitejs.dev/config/
4
+ // https://vite.dev/config/
5
5
  export default defineConfig({
6
6
  plugins: [react()],
7
7
  });
@@ -14,7 +14,7 @@ pnpm run dev
14
14
  - `pnpm run dev` - Start development server
15
15
  - `pnpm run build` - Build for production
16
16
  - `pnpm run preview` - Preview production build
17
- - `pnpm run lint` - Run ESLint
17
+ - `pnpm run lint` - Run Oxlint
18
18
 
19
19
  ## Features
20
20
 
@@ -22,7 +22,7 @@ pnpm run dev
22
22
  - 🎨 Bulma CSS framework
23
23
  - 📦 bestax-bulma component library
24
24
  - 📘 TypeScript for type safety
25
- - 🔧 ESLint pre-configured
25
+ - 🔧 Oxlint pre-configured
26
26
 
27
27
  ## Learn More
28
28
 
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["react", "typescript", "oxc"],
4
+ "rules": {
5
+ "react/rules-of-hooks": "error",
6
+ "react/only-export-components": ["warn", { "allowConstantExport": true }]
7
+ }
8
+ }
@@ -6,27 +6,22 @@
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "tsc -b && vite build",
9
- "lint": "eslint .",
9
+ "lint": "oxlint",
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
13
  "@allxsmith/bestax-bulma": "workspace:^",
14
- "react": "^19.2.3",
15
- "react-dom": "^19.2.3"
14
+ "react": "^19.3.1",
15
+ "react-dom": "^19.3.1"
16
16
  },
17
17
  "devDependencies": {
18
- "@eslint/js": "^10.0.1",
19
- "@types/node": "^24.13.3",
20
- "@types/react": "^19.2.17",
21
- "@types/react-dom": "^19.2.3",
22
- "@vitejs/plugin-react": "^6.0.3",
23
- "eslint": "^10.5.0",
24
- "eslint-plugin-react-hooks": "^7.1.1",
25
- "eslint-plugin-react-refresh": "^0.5.3",
26
- "globals": "^17.7.0",
27
- "typescript": "^6.0.3",
28
- "typescript-eslint": "^8.62.0",
29
- "vite": "^8.1.0"
18
+ "@types/node": "^24.19.2",
19
+ "@types/react": "^19.3.0",
20
+ "@types/react-dom": "^19.3.0",
21
+ "@vitejs/plugin-react": "^6.1.2",
22
+ "oxlint": "^1.89.0",
23
+ "typescript": "~7.0.2",
24
+ "vite": "^8.3.5"
30
25
  },
31
26
  "engines": {
32
27
  "node": "^20.19.0 || >=22.12.0"
@@ -1,29 +0,0 @@
1
- import js from '@eslint/js';
2
- import globals from 'globals';
3
- import reactHooks from 'eslint-plugin-react-hooks';
4
- import reactRefresh from 'eslint-plugin-react-refresh';
5
-
6
- export default [
7
- { ignores: ['dist'] },
8
- js.configs.recommended,
9
- {
10
- files: ['**/*.{js,jsx}'],
11
- plugins: {
12
- 'react-hooks': reactHooks,
13
- 'react-refresh': reactRefresh,
14
- },
15
- languageOptions: {
16
- ecmaVersion: 2020,
17
- globals: globals.browser,
18
- parserOptions: {
19
- ecmaVersion: 'latest',
20
- ecmaFeatures: { jsx: true },
21
- sourceType: 'module',
22
- },
23
- },
24
- rules: {
25
- ...reactHooks.configs['recommended-latest'].rules,
26
- ...reactRefresh.configs.vite.rules,
27
- },
28
- },
29
- ];
@@ -1,26 +0,0 @@
1
- import js from '@eslint/js';
2
- import globals from 'globals';
3
- import reactHooks from 'eslint-plugin-react-hooks';
4
- import reactRefresh from 'eslint-plugin-react-refresh';
5
- import tseslint from 'typescript-eslint';
6
-
7
- export default [
8
- { ignores: ['dist'] },
9
- js.configs.recommended,
10
- ...tseslint.configs.recommended,
11
- {
12
- files: ['**/*.{ts,tsx}'],
13
- plugins: {
14
- 'react-hooks': reactHooks,
15
- 'react-refresh': reactRefresh,
16
- },
17
- languageOptions: {
18
- ecmaVersion: 2020,
19
- globals: globals.browser,
20
- },
21
- rules: {
22
- ...reactHooks.configs['recommended-latest'].rules,
23
- ...reactRefresh.configs.vite.rules,
24
- },
25
- },
26
- ];