fix(studio): refine preset surfaces and repair gallery interactions
Quality / quality (ubuntu-latest) (push) Failing after 11m2s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-10-19 19:10:44 +05:30
1 parent f642a84c58
commit bb40dffee8
20 files changed
+345 -72

No files matched your search

+19 -2
View File
@@ -23,18 +23,35 @@ export function catalogRecipes(): Record<string, ComponentRecipe> {
const circle = ["circle", "round"].includes(axes.shape?.default ?? "");
const semanticGeometry =
/thumb|track|spinner|progress|marker|port$|status|dot|star|srOnly/i.test(part);
// Joined surfaces share the outer component's corners. Rounding each
// child creates seams, scalloped panels and rounded splitter rails.
const joined = (
{
StatsBar: ["item", "content"],
AuthSplitLayout: ["content"],
Collapse: ["trigger", "panel", "content"],
InputNumber: ["button", "content", "input"],
LayoutSplitter: ["handle"],
} as Record<string, string[]>
)[name]?.includes(part);
if (
descriptor.properties.includes("borderRadius") &&
!roundedFalse &&
!circle &&
!semanticGeometry
!semanticGeometry &&
!joined
) {
styles.borderRadius = ref(
descriptor.profile === "control" ? "shape.control" : "shape.panel",
);
}
// Only existing surfaces receive elevation. Layout wrappers and provider hosts are untouched.
if (descriptor.profile === "surface" && descriptor.properties.includes("boxShadow"))
if (
descriptor.profile === "surface" &&
descriptor.properties.includes("boxShadow") &&
!joined &&
!(name === "PreferenceSwitcher" && part === "menu")
)
styles.boxShadow = ref("elevation.panel");
if (Object.keys(styles).length) base[part] = styles;
}