clava 0.2.0 → 0.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +0 -10
- package/dist/index.js +561 -390
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/perfs/component.bench.ts +233 -0
- package/src/index.ts +742 -618
- package/src/utils.ts +100 -32
- package/tests/_utils.ts +2 -2
- package/tests/extend-test.ts +48 -0
- package/tests/language-service-test.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# clava
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Improved runtime performance of `cv` and `splitProps`
|
|
6
|
+
|
|
7
|
+
Variant tables, disabled-variant sets, and extended-component metadata are now pre-built once when [`cv`](https://clava.style/docs/reference/cv) is called, so prop resolution no longer walks `Object.entries` and variant-related styles are pre-normalized at creation time instead of on each render. [`splitProps`](https://clava.style/docs/reference/split-props) reuses component key arrays directly instead of copying them per call.
|
|
8
|
+
|
|
9
|
+
Per-render benchmarks improve roughly 2× to 7×, with no public API or behavior changes; component-creation cost is unchanged.
|
|
10
|
+
|
|
3
11
|
## 0.2.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -127,16 +127,6 @@ interface CreateParams {
|
|
|
127
127
|
* only receive variant props. Arrays receive their listed keys but don't claim
|
|
128
128
|
* styling props. The last element is always the "rest" containing keys not
|
|
129
129
|
* claimed by any source.
|
|
130
|
-
* @example
|
|
131
|
-
* ```ts
|
|
132
|
-
* const [buttonProps, inputProps, rest] = splitProps(
|
|
133
|
-
* props,
|
|
134
|
-
* buttonComponent,
|
|
135
|
-
* inputComponent,
|
|
136
|
-
* );
|
|
137
|
-
* // buttonProps has class/style + button variants
|
|
138
|
-
* // inputProps has only input variants (no class/style)
|
|
139
|
-
* ```
|
|
140
130
|
*/
|
|
141
131
|
declare const splitProps: SplitPropsFunction;
|
|
142
132
|
/**
|