create-bestax 3.0.0 → 3.1.1

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 (43) hide show
  1. package/dist/cli.d.ts.map +1 -1
  2. package/dist/cli.js +2 -0
  3. package/dist/constants.d.ts +3 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +21 -0
  6. package/dist/display.js +2 -2
  7. package/dist/index.js +0 -0
  8. package/dist/project-creator.d.ts +2 -0
  9. package/dist/project-creator.d.ts.map +1 -1
  10. package/dist/project-creator.js +26 -2
  11. package/dist/prompts.d.ts +1 -0
  12. package/dist/prompts.d.ts.map +1 -1
  13. package/dist/prompts.js +9 -0
  14. package/package.json +6 -3
  15. package/templates/skills/bestax-custom-component/SKILL.md +384 -0
  16. package/templates/skills/bestax-custom-component/references/api.md +77 -0
  17. package/templates/skills/bestax-custom-component/references/patterns.md +133 -0
  18. package/templates/skills/bestax-form/SKILL.md +209 -0
  19. package/templates/skills/bestax-form/references/api.md +102 -0
  20. package/templates/skills/bestax-form/references/patterns.md +210 -0
  21. package/templates/skills/bestax-layout-scaffold/SKILL.md +66 -0
  22. package/templates/skills/bestax-layout-scaffold/examples/app-shell.tsx +80 -0
  23. package/templates/skills/bestax-layout-scaffold/examples/card-grid.tsx +98 -0
  24. package/templates/skills/bestax-layout-scaffold/examples/centered.tsx +56 -0
  25. package/templates/skills/bestax-layout-scaffold/examples/landing.tsx +77 -0
  26. package/templates/skills/bestax-layout-scaffold/references/archetypes.md +183 -0
  27. package/templates/skills/bestax-layout-scaffold/references/layout-components.md +181 -0
  28. package/templates/skills/bestax-theming/SKILL.md +73 -0
  29. package/templates/skills/bestax-theming/examples/dark-mode.tsx +38 -0
  30. package/templates/skills/bestax-theming/examples/theme-config.tsx +58 -0
  31. package/templates/skills/bestax-theming/references/css-variables.md +130 -0
  32. package/templates/skills/bestax-theming/references/themeable-components.md +74 -0
  33. package/templates/vite/README.md +6 -6
  34. package/templates/vite-ts/README.md +6 -6
  35. package/dist/__mocks__/chalk.d.ts +0 -14
  36. package/dist/__mocks__/chalk.d.ts.map +0 -1
  37. package/dist/__mocks__/chalk.js +0 -13
  38. package/dist/__mocks__/figures.d.ts +0 -9
  39. package/dist/__mocks__/figures.d.ts.map +0 -1
  40. package/dist/__mocks__/figures.js +0 -7
  41. package/dist/__mocks__/prompts.d.ts +0 -3
  42. package/dist/__mocks__/prompts.d.ts.map +0 -1
  43. package/dist/__mocks__/prompts.js +0 -3
@@ -0,0 +1,74 @@
1
+ # Themeable component props
2
+
3
+ This is the self-contained inventory of the color/size/variant props that matter for theming in
4
+ `@allxsmith/bestax-bulma`. All values are source-verified. Components import from the package root:
5
+ `import { Button, Notification, Tag, Box, Message, Input, Title, SubTitle } from '@allxsmith/bestax-bulma'`.
6
+
7
+ ## Two kinds of color props
8
+
9
+ 1. **Component `color` modifier** → emits `is-<color>` (the filled Bulma variant). The accepted
10
+ values are component-specific (see the table). Example: `<Button color="primary">` → `is-primary`.
11
+ 2. **Helper color props** (available on virtually every component, applied as utility classes):
12
+ - `color` / `textColor` → `has-text-<color>` (text color)
13
+ - `backgroundColor` / `bgColor` → `has-background-<color>` (background)
14
+ - `colorShade` / `backgroundColorShade` → adds a shade suffix, e.g. `has-text-primary-30`
15
+
16
+ When a component has its own `color` modifier (Button, Tag, Input, …), use **`textColor`** /
17
+ **`bgColor`** for utility coloring so the two don't collide.
18
+
19
+ `<color>` for the helper props is one of **`validColors`**:
20
+
21
+ ```
22
+ primary, link, info, success, warning, danger,
23
+ black, black-bis, black-ter, grey-darker, grey-dark, grey, grey-light, grey-lighter,
24
+ white, light, dark
25
+ ```
26
+
27
+ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, light, dark, soft, bold, on-scheme`.
28
+
29
+ ## Component `color` / `size` props (verbatim unions)
30
+
31
+ | Component | `color` accepts | `size` accepts | Notes |
32
+ | -------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
33
+ | `Button` | `primary \| link \| info \| success \| warning \| danger \| white \| light \| dark \| black \| text \| ghost` | `small \| normal \| medium \| large` | adds `text`, `ghost`; also `isLight`, `isOutlined`, `isInverted`, `isRounded` |
34
+ | `Notification` | the 17 `validColors` | — | also `isLight` |
35
+ | `Tag` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `normal \| medium \| large` | also `isRounded`, `isDelete`, `isHoverable` |
36
+ | `Box` | `primary \| link \| info \| success \| warning \| danger` | — | the 6 only; also `hasShadow` |
37
+ | `Message` | `primary \| link \| info \| success \| warning \| danger` | — | the 6 only |
38
+ | `Input` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | also `isRounded`, `isStatic` |
39
+ | `Title` | — (no `color`; use `textColor`) | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | also `isSpaced` |
40
+ | `SubTitle` | — (no `color`; use `textColor`) | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | — |
41
+
42
+ The 6 brand colors (`primary, link, info, success, warning, danger`) are the ones a custom theme
43
+ recolors via the HSL trios (see `css-variables.md`). The greyscale and `white`/`light`/`dark`
44
+ entries follow the scheme variables.
45
+
46
+ ## Typography & misc helper props (on most components)
47
+
48
+ | Prop | Accepts | Class |
49
+ | -------------------------------------------- | --------------------------------------------------------- | ---------------------- |
50
+ | `textSize` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7` | `is-size-<n>` |
51
+ | `textWeight` | `light \| normal \| medium \| semibold \| bold` | `has-text-weight-<w>` |
52
+ | `fontFamily` | `sans-serif \| monospace \| primary \| secondary \| code` | `is-family-<f>` |
53
+ | `textAlign` | `centered \| justified \| left \| right` | `has-text-<a>` |
54
+ | `radius` | `radiusless` | `is-radiusless` |
55
+ | `shadow` | `shadowless` | `is-shadowless` |
56
+ | `m` / `p` (+ `mt/mr/mb/ml/mx/my`, `pt/…/py`) | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| auto` | `m-<n>` / `p-<n>` etc. |
57
+
58
+ These map to Bulma utility classes that read the same `--bulma-*` variables, so a custom theme
59
+ flows through them automatically.
60
+
61
+ ## Pattern
62
+
63
+ ```tsx
64
+ // Brand-colored, themeable components — colors recolor with the theme's HSL trios:
65
+ <Button color="primary">Save</Button>
66
+ <Notification color="info">Heads up</Notification>
67
+ <Tag color="success">Active</Tag>
68
+
69
+ // Utility coloring on a component that already has its own `color`:
70
+ <Button color="primary" textColor="white">Save</Button>
71
+
72
+ // Shade + background:
73
+ <Box bgColor="primary" backgroundColorShade="05">Subtle brand surface</Box>
74
+ ```
@@ -5,16 +5,16 @@ This template provides a minimal setup to get React working in Vite with HMR and
5
5
  ## Getting Started
6
6
 
7
7
  ```bash
8
- npm install
9
- npm run dev
8
+ pnpm install
9
+ pnpm dev
10
10
  ```
11
11
 
12
12
  ## Available Scripts
13
13
 
14
- - `npm run dev` - Start development server
15
- - `npm run build` - Build for production
16
- - `npm run preview` - Preview production build
17
- - `npm run lint` - Run ESLint
14
+ - `pnpm dev` - Start development server
15
+ - `pnpm build` - Build for production
16
+ - `pnpm preview` - Preview production build
17
+ - `pnpm lint` - Run ESLint
18
18
 
19
19
  ## Features
20
20
 
@@ -5,16 +5,16 @@ This template provides a minimal setup to get React working in Vite with TypeScr
5
5
  ## Getting Started
6
6
 
7
7
  ```bash
8
- npm install
9
- npm run dev
8
+ pnpm install
9
+ pnpm dev
10
10
  ```
11
11
 
12
12
  ## Available Scripts
13
13
 
14
- - `npm run dev` - Start development server
15
- - `npm run build` - Build for production
16
- - `npm run preview` - Preview production build
17
- - `npm run lint` - Run ESLint
14
+ - `pnpm dev` - Start development server
15
+ - `pnpm build` - Build for production
16
+ - `pnpm preview` - Preview production build
17
+ - `pnpm lint` - Run ESLint
18
18
 
19
19
  ## Features
20
20
 
@@ -1,14 +0,0 @@
1
- declare const chalk: {
2
- yellow: (str: string) => string;
3
- blue: (str: string) => string;
4
- cyan: (str: string) => string;
5
- magenta: (str: string) => string;
6
- green: (str: string) => string;
7
- red: (str: string) => string;
8
- dim: (str: string) => string;
9
- bold: {
10
- cyan: (str: string) => string;
11
- };
12
- };
13
- export default chalk;
14
- //# sourceMappingURL=chalk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chalk.d.ts","sourceRoot":"","sources":["../../src/__mocks__/chalk.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;kBACK,MAAM;gBACR,MAAM;gBACN,MAAM;mBACH,MAAM;iBACR,MAAM;eACR,MAAM;eACN,MAAM;;oBAEH,MAAM;;CAErB,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,13 +0,0 @@
1
- const chalk = {
2
- yellow: (str) => str,
3
- blue: (str) => str,
4
- cyan: (str) => str,
5
- magenta: (str) => str,
6
- green: (str) => str,
7
- red: (str) => str,
8
- dim: (str) => str,
9
- bold: {
10
- cyan: (str) => str,
11
- },
12
- };
13
- export default chalk;
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- star: string;
3
- cross: string;
4
- tick: string;
5
- bullet: string;
6
- pointer: string;
7
- };
8
- export default _default;
9
- //# sourceMappingURL=figures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"figures.d.ts","sourceRoot":"","sources":["../../src/__mocks__/figures.ts"],"names":[],"mappings":";;;;;;;AAAA,wBAME"}
@@ -1,7 +0,0 @@
1
- export default {
2
- star: '⭐',
3
- cross: '✖',
4
- tick: '✔',
5
- bullet: '●',
6
- pointer: '❯',
7
- };
@@ -1,3 +0,0 @@
1
- declare const prompts: import("jest-mock").Mock<import("jest-mock").UnknownFunction>;
2
- export default prompts;
3
- //# sourceMappingURL=prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/__mocks__/prompts.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,+DAAY,CAAC;AAE1B,eAAe,OAAO,CAAC"}
@@ -1,3 +0,0 @@
1
- import { jest } from '@jest/globals';
2
- const prompts = jest.fn();
3
- export default prompts;