astahmer / pandabox

a toolbox for Panda CSS
https://pandabox.vercel.app/
53 stars 4 forks source link

feat: add shouldExclude option to pluginStrictTokenScope #58

Open k35o opened 5 months ago

k35o commented 5 months ago

Close https://github.com/astahmer/pandabox/issues/54

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pandabox-z5kx ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 3:14am
k35o commented 5 months ago

We noticed that the type of values not included in CssProperties, such as textStyle, is broken, although from existing.

The type below will be any.

{
  textStyle?: ConditionalValue<UtilityValues["textStyle"] | CssProperties["textStyle"]>
}

I had to fix it in a separate issue or pr.

And, incidentally, that did not happen with the first way it was implemented.

if (strictTokenProps.includes(prop)) {
  const longhand = ctx.utility.shorthands.get(prop);
  return `${prop}?: ConditionalValue<${value} | CssProperties["${longhand || prop}"]>`;
};

return match;