clava 0.6.3 → 0.6.4
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/CHANGELOG.md +4 -0
- package/README.md +4 -0
- package/dist/index.js +559 -518
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +1078 -1029
- package/src/refine-warning.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# clava
|
|
2
2
|
|
|
3
|
+
## 0.6.4
|
|
4
|
+
|
|
5
|
+
- Fixed shared components in [`cv`](https://clava.style/docs/reference/cv) extension chains to apply only at their first occurrence, preventing repeated base classes and variant output when several components extend the same base.
|
|
6
|
+
|
|
3
7
|
## 0.6.3
|
|
4
8
|
|
|
5
9
|
### Improved runtime performance of the `refine` chain
|
package/README.md
CHANGED
|
@@ -269,6 +269,10 @@ Function variants can return any class value, `{ class, style }`, a default Clav
|
|
|
269
269
|
|
|
270
270
|
Use `extend` to compose existing Clava components. Extended base classes are ordered before the child class, and extended variant output is applied before child variant output.
|
|
271
271
|
|
|
272
|
+
If a component appears through several `extend` paths, Clava applies it only at its first occurrence. Its classes, styles, defaults, and refinement participate through that path. For example, if `left` and `right` both extend `base`, `cv({ extend: [left, right] })` applies `base`, then `left`, then `right`. The component's JSX and HTML helpers share the same identity. Separate components can still emit identical classes.
|
|
273
|
+
|
|
274
|
+
Components created by older Clava versions retain their existing internal extension behavior. Shared ancestors inside those components can still repeat.
|
|
275
|
+
|
|
272
276
|
```ts
|
|
273
277
|
const baseButton = cv({
|
|
274
278
|
class: "button",
|