create-bestax 4.2.0 → 4.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"project-creator.d.ts","sourceRoot":"","sources":["../src/project-creator.ts"],"names":[],"mappings":"AA6BA,OAAO,EAOL,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAWxB,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,YAAY,CAAS;gBAEjB,YAAY,CAAC,EAAE,MAAM;IAI3B,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAa3D,sBAAsB,CAC1B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC;IAkBnB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAInC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMjE,oBAAoB,CACxB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IAgBV,WAAW,CACf,UAAU,EAAE,MAAM,EAClB,WA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ionicons ESM
160
160
  // loader dynamically imports per-icon chunks that cannot carry
161
161
  // integrity hashes, so entry-file SRI would give false assurance.
162
- const ioniconScripts = ` <!-- Ionicons -->
162
+ const ioniconScripts = ` <!-- Ionicons (v8 is ESM-only; no legacy nomodule fallback exists) -->
163
163
  <script type="module" src="https://unpkg.com/ionicons@8.0.13/dist/ionicons/ionicons.esm.js"></script>
164
- <script nomodule src="https://unpkg.com/ionicons@8.0.13/dist/ionicons/ionicons.js"></script>
165
164
  `;
166
165
  htmlContent =
167
166
  htmlContent.slice(0, insertPosition) +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bestax",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Create a new bestax-bulma project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -52,12 +52,11 @@ Set it once on `ConfigProvider` and omit `library` everywhere else.
52
52
  type="module"
53
53
  src="https://unpkg.com/ionicons@8.0.13/dist/ionicons/ionicons.esm.js"
54
54
  ></script>
55
- <script
56
- nomodule
57
- src="https://unpkg.com/ionicons@8.0.13/dist/ionicons/ionicons.js"
58
- ></script>
59
55
  ```
60
56
 
57
+ Ionicons v8 is ESM-only — there is no legacy `nomodule` bundle, so a single
58
+ `type="module"` tag is all that is needed.
59
+
61
60
  - **Scaffold flag:** `--icon ionicons` — which maps to `iconLibrary="ion"`. Passing
62
61
  `'ionicons'` as the `library`/`iconLibrary` value renders nothing.
63
62
  - **Names:** kebab-case: `rocket`, `heart`, `settings`.
@@ -6,40 +6,40 @@ codemod converts it; **Flagged** = it leaves a `TODO(bestax-migrate)` comment (s
6
6
 
7
7
  ## Top-level components
8
8
 
9
- | RBC | bestax | Notes |
10
- | -------------- | -------------------------------------------- | ------------------------------------------------------------------------------------- |
11
- | `Block` | `Block` | Auto |
12
- | `Box` | `Box` | Auto |
13
- | `Breadcrumb` | `Breadcrumb` | Auto; `align` → `alignment` (`center`→`centered`) |
14
- | `Button` | `Button` | Auto; `<Button remove/>` → `<Delete/>`; see prop map |
15
- | `Card` | `Card` | Auto |
16
- | `Columns` | `Columns` | Auto; `breakpoint="mobile"`→`isMobile`, `multiline`→`isMultiline`, … |
17
- | `Container` | `Container` | Auto; `breakpoint="fluid"`→`fluid`, `max`→`isMax` |
18
- | `Content` | `Content` | Auto |
19
- | `Dropdown` | `Dropdown` | Structure auto; controlled `value`/`onChange` flagged |
20
- | `Element` | — | Flagged: no generic element; use a semantic component + helper props |
21
- | `Footer` | `Footer` | Auto |
22
- | `Form.*` | flat imports | See Form table below |
23
- | `Heading` | `Title` / `SubTitle` / `<p class="heading">` | Auto; `subtitle` picks `SubTitle`, `heading` picks the plain element |
24
- | `Hero` | `Hero` | Auto; `hasNavbar`→`fullheightWithNavbar`; `halfheight`/`gradient` flagged |
25
- | `Icon` | `Icon` | `<i class="fas fa-x">` children → `name`/`library`/`variant` props; else flagged |
26
- | `Image` | `Image` | Auto; numeric `size={128}` → `size="128x128"`, `rounded`→`isRounded` |
27
- | `Level` | `Level` | Auto; `breakpoint="mobile"`→`isMobile` |
28
- | `Loader` | plain `<div className="loader">` | Auto (Bulma v1 still ships the class) |
29
- | `Media` | `Media` | Auto |
30
- | `Menu` | `Menu` | Auto |
31
- | `Message` | `Message` | Auto; `size` flagged |
32
- | `Modal` | `Modal` | `show`→`active`; `closeOnEsc`/`closeOnBlur`/`showClose` flagged (defaults cover them) |
33
- | `Navbar` | `Navbar` | Auto; see dropdown note below |
34
- | `Notification` | `Notification` | Auto; `light`→`isLight` |
35
- | `Pagination` | `Pagination` | `onChange`→`onPageChange`; `delta`/labels/`showFirstLast`/`autoHide` flagged |
36
- | `Panel` | `Panel` | Auto |
37
- | `Progress` | `Progress` | Auto |
38
- | `Section` | `Section` | Auto |
39
- | `Table` | `Table` | Auto; `size="fullwidth"`→`isFullwidth`, `striped`→`isStriped`, … |
40
- | `Tabs` | `Tabs` | Auto; children wrapped in `Tabs.List`; `type="toggle-rounded"`→`toggle rounded` |
41
- | `Tag` | `Tag` | Auto; `remove`→`isDelete`, `rounded`→`isRounded` |
42
- | `Tile` | — | Flagged: Bulma v1 replaced tiles with `Grid`/`Cell` |
9
+ | RBC | bestax | Notes |
10
+ | -------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
11
+ | `Block` | `Block` | Auto |
12
+ | `Box` | `Box` | Auto |
13
+ | `Breadcrumb` | `Breadcrumb` | Auto; `align` → `alignment` (`center`→`centered`) |
14
+ | `Button` | `Button` | Auto for literal `remove` (by value, not presence — truthy → `<Delete/>`, `remove={false}` stays `Button`); dynamic flagged |
15
+ | `Card` | `Card` | Auto |
16
+ | `Columns` | `Columns` | Auto; `breakpoint="mobile"`→`isMobile`, `multiline`→`isMultiline`, … |
17
+ | `Container` | `Container` | Auto; `breakpoint="fluid"`→`fluid`, `max`→`isMax` |
18
+ | `Content` | `Content` | Auto |
19
+ | `Dropdown` | `Dropdown` | Structure auto; controlled `value`/`onChange` flagged |
20
+ | `Element` | — | Flagged: no generic element; use a semantic component + helper props |
21
+ | `Footer` | `Footer` | Auto |
22
+ | `Form.*` | flat imports | See Form table below |
23
+ | `Heading` | `Title` / `SubTitle` / `<p class="heading">` | Auto for literal `subtitle`/`heading` (by value, not presence — `subtitle={false}` is `Title`); dynamic value flagged |
24
+ | `Hero` | `Hero` | Auto; `hasNavbar`→`fullheightWithNavbar`; `halfheight`/`gradient` flagged |
25
+ | `Icon` | `Icon` | `<i class="fas fa-x">` children → `name`/`library`/`variant` props; else flagged |
26
+ | `Image` | `Image` | Auto; numeric `size={128}` → `size="128x128"`, `rounded`→`isRounded` |
27
+ | `Level` | `Level` | Auto; `breakpoint="mobile"`→`isMobile` |
28
+ | `Loader` | plain `<div className="loader">` | Auto (Bulma v1 still ships the class) |
29
+ | `Media` | `Media` | Auto |
30
+ | `Menu` | `Menu` | Auto |
31
+ | `Message` | `Message` | Auto; `size` flagged |
32
+ | `Modal` | `Modal` | `show`→`active`; `closeOnEsc`/`closeOnBlur`/`showClose` flagged (defaults cover them) |
33
+ | `Navbar` | `Navbar` | Auto; see dropdown note below |
34
+ | `Notification` | `Notification` | Auto; `light`→`isLight` |
35
+ | `Pagination` | `Pagination` | `onChange`→`onPageChange`; `delta`/labels/`showFirstLast`/`autoHide` flagged |
36
+ | `Panel` | `Panel` | Auto |
37
+ | `Progress` | `Progress` | Auto |
38
+ | `Section` | `Section` | Auto |
39
+ | `Table` | `Table` | Auto; `size="fullwidth"`→`isFullwidth`, `striped`→`isStriped`, … |
40
+ | `Tabs` | `Tabs` | Auto; children wrapped in `Tabs.List`; `type="toggle-rounded"`→`toggle rounded` |
41
+ | `Tag` | `Tag` | Auto; `remove`→`isDelete`, `rounded`→`isRounded` |
42
+ | `Tile` | — | Flagged: Bulma v1 replaced tiles with `Grid`/`Cell` |
43
43
 
44
44
  ## Compound sub-components
45
45
 
@@ -22,13 +22,18 @@ finish what it flagged.
22
22
 
23
23
  ```scss
24
24
  @use 'bulma/sass' with (
25
- $primary: #ff6b35,
26
- $family-primary: 'Nunito',
27
- sans-serif
28
- );
25
+ $primary: #ff6b35,
26
+ $family-primary: (
27
+ 'Nunito',
28
+ sans-serif,
29
+ )
30
+ );
29
31
  @use '@allxsmith/bestax-bulma/scss/extras';
30
32
  ```
31
33
 
34
+ A comma-valued override (a font-family stack) is wrapped in parens so Dart Sass
35
+ reads it as one list value, not extra arguments to `with (…)`.
36
+
32
37
  0.9 `_all` aggregator imports (`bulma/sass/elements/_all`) became directory modules
33
38
  (`@use 'bulma/sass/elements';`). Relative node_modules paths
34
39
  (`@import '../../node_modules/bulma/bulma'`, common under Parcel) keep their prefix,
@@ -38,6 +43,31 @@ finish what it flagged.
38
43
  **dart-sass ≥ 1.79** — the codemod's node-sass replacement installs that, but check
39
44
  bundler-pinned older versions (Parcel's sass transformer pins 1.66).
40
45
 
46
+ react-bulma-components' own stylesheet — any `react-bulma-components/…` specifier,
47
+ bare, `~`-prefixed, or a relative `node_modules/` path, covering the documented v3
48
+ entry points (`src/index.sass`, `dist/react-bulma-components(.min).css`) as well as
49
+ deep partials and extensionless forms — is not a third-party extension; it's the
50
+ library being migrated away from. It targets Bulma 0.9, not the v1 your components now
51
+ use, and (unless `--no-deps` is passed) `package.json` no longer lists it, so the
52
+ import can never resolve once installed. Every `--css` mode rewrites it into a real
53
+ Bulma root rather than leaving a known-broken import — the **same shape the
54
+ `@import 'bulma/…'` root path emits**, so a file that starts from RBC and one that
55
+ starts from a Bulma import converge: `bestax` (default) emits
56
+ `@use 'bulma/sass';` (folding any leading `$var` overrides above the import into
57
+ `with (…)`) plus `@use '@allxsmith/bestax-bulma/scss/extras';`; `bulma` emits plain
58
+ `@use 'bulma/sass';`; `keep` does the same with a TODO explaining the replacement
59
+ (worded to match whether `--no-deps` kept the package). It deliberately does **not**
60
+ emit the hard-configured `scss/bestax` bundle here — that bundle can't carry the
61
+ user's own theme vars, and reconfiguring `bulma/sass` when another file already
62
+ configures it is a hard Sass error. If the file already has its own `bulma/…` root
63
+ (a `@use 'bulma/sass'` of its own, or a Bulma `@import` the codemod converts), the RBC
64
+ **root/index** line (`src/index`, the bundled `dist/*.css`, or the bare specifier) is
65
+ dropped instead of emitting a second root; in `bestax` mode the extras are added once
66
+ alongside that existing root. A dropped RBC **deep partial** (e.g.
67
+ `src/components/navbar.sass`) is different — `bulma/sass` doesn't necessarily carry a
68
+ given partial's styles, so it gets a `// TODO(bestax-migrate)` and a report entry
69
+ ("port any styles it carried beyond Bulma's own by hand") rather than vanishing silently.
70
+
41
71
  - **package.json**: `react-bulma-components` removed, `@allxsmith/bestax-bulma` added,
42
72
  `bulma` bumped to `^1.0.4` (or added when sources still import `bulma/…` directly),
43
73
  and dead `node-sass` replaced with dart `sass`. Run the package manager's install
@@ -63,6 +93,8 @@ elements,form,components,grid,layout,helpers,themes}` with leaf partials like
63
93
  compatibility. Class-based usage (`className="is-checkradio"`) keeps needing the
64
94
  extension; usage that migrated to bestax components (Radio, Checkbox, the advanced
65
95
  form controls) is already styled by the bestax extras, so the import can go.
96
+ react-bulma-components' own stylesheet is never flagged this way (see above) — only
97
+ packages actually named `bulma-*` are.
66
98
 
67
99
  ## Choosing a CSS flavor (optional)
68
100
 
@@ -124,9 +124,9 @@ same rule as the extras section below).
124
124
 
125
125
  ## Extras component variables
126
126
 
127
- Every "Beyond Bulma" extra registers its own `--bulma-<component>-*` variables. They are
128
- registered on the component's **own selector** (`.avatar`, `.dialog`, `.tooltip`, … —
129
- `.bestax-avatar` etc. with the prefixed CSS flavor), not on `:root`. A value set on a wrapping
127
+ Every "Beyond Bulma" extra registers its own `--bulma-<component>-*` variables. Most are
128
+ registered on the component's **own selector** (`.avatar`, `.dialog`, … — `.bestax-avatar`
129
+ etc. with the prefixed CSS flavor), not on `:root`. A value set on a wrapping
130
130
  ancestor — including `Theme`'s `bulmaVars` on a wrapping `Theme` — is only _inherited_ and
131
131
  always loses to the component-level declaration, so it will NOT take effect. Working overrides
132
132
  target the component's own element instead: redeclare on the component's own class in your CSS
@@ -135,6 +135,20 @@ target the component's own element instead: redeclare on the component's own cla
135
135
  (`.avatar.big-avatar { --bulma-avatar-size: 3.5rem; }`), or set it via the component's `style`
136
136
  prop. Several default to core theme vars above, so they already flow through a custom theme.
137
137
 
138
+ Two exceptions where that advice silently fails, because the declarations sit somewhere a
139
+ lone class or the `style` prop cannot outrank:
140
+
141
+ - **Compound selectors** — LinkButton's variables are declared on `.button.link-button`
142
+ (specificity 0-2-0). A single class added via `className` is 0-1-0 and loses regardless of
143
+ stylesheet order. Override with the `style` prop, or in CSS loaded after the library
144
+ styles with a selector that matches or exceeds the compound:
145
+ `.button.link-button { --bulma-link-button-ghost-color: … }`.
146
+ - **Constituent elements** — Tooltip's variables (all but `--bulma-tooltip-dashed-color`)
147
+ are declared on `.tooltip-content`, and Sidebar's `--bulma-sidebar-overlay-background` on
148
+ `.sidebar-background`. Values set via `className` or `style` land on the component root and
149
+ are only inherited by the constituent, so they lose to its own declaration — target the
150
+ declaring element in your CSS: `.tooltip-content { --bulma-tooltip-background: … }`.
151
+
138
152
  ### Avatar / Avatars / Badge
139
153
 
140
154
  | Variable | Default |
@@ -238,6 +252,8 @@ own-selector override rule applies.
238
252
 
239
253
  ### LinkButton
240
254
 
255
+ Declared on the compound `.button.link-button` — see the compound-selector exception above.
256
+
241
257
  `--bulma-link-button-ghost-color`, `--bulma-link-button-ghost-hover-color`,
242
258
  `--bulma-link-button-transition-duration`, `--bulma-link-button-underline-offset`
243
259
 
@@ -378,6 +394,9 @@ own-selector override rule applies.
378
394
 
379
395
  ### Tooltip
380
396
 
397
+ All but `--bulma-tooltip-dashed-color` are declared on `.tooltip-content` — see the
398
+ constituent-element exception above.
399
+
381
400
  `--bulma-tooltip-arrow-margin`, `--bulma-tooltip-arrow-size`, `--bulma-tooltip-background`,
382
401
  `--bulma-tooltip-color`, `--bulma-tooltip-dashed-color`, `--bulma-tooltip-font-size`,
383
402
  `--bulma-tooltip-font-weight`, `--bulma-tooltip-line-height`, `--bulma-tooltip-max-width`,