feat: add public ColorArea components, docs, and package contract

This commit is contained in:
maoyingjie
2026-10-26 23:51:31 +08:00
parent 01882160e6
commit ae364578ce
33 changed files with 2201 additions and 151 deletions
+36
View File
@@ -90,6 +90,42 @@ for (const id of process.argv.slice(2)) {
.base()
.includes("hv-select--secondary"),
);
if (id === "color-area") {
assert(lib.ColorArea === lib.ColorAreaRoot);
assert(lib.ColorAreaThumb);
assert(
lib
.colorAreaVariants({ showDots: true })
.base()
.includes("hv-color-area--show-dots"),
);
assert(
lib.colorAreaVariants().thumb() === "hv-color-area__thumb",
"ColorArea thumb class must stay in the baseline namespace",
);
const areaDts = readFileSync(
new URL(
"./node_modules/@heroui-vue/components/dist/components/color-area/ColorArea.vue.d.ts",
import.meta.url,
),
"utf8",
);
const thumbDts = readFileSync(
new URL(
"./node_modules/@heroui-vue/components/dist/components/color-area/ColorAreaThumb.vue.d.ts",
import.meta.url,
),
"utf8",
);
assert(
!areaDts.includes("reka-ui"),
"ColorArea declarations leak Reka types",
);
assert(
!thumbDts.includes("reka-ui"),
"ColorAreaThumb declarations leak Reka types",
);
}
if (id === "color-swatch") {
assert(lib.ColorSwatch === lib.ColorSwatchRoot);
assert(