windctrl 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.
Files changed (2) hide show
  1. package/dist/index.js +8 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -193,15 +193,18 @@ export function windctrl(config) {
193
193
  let finalSlots;
194
194
  const slotNames = Object.keys(slotParts);
195
195
  if (slotNames.length > 0) {
196
- finalSlots = {};
196
+ const out = {};
197
197
  for (const slotName of slotNames) {
198
- const merged = twMerge(clsx(slotParts[slotName]));
198
+ const parts = slotParts[slotName];
199
+ if (!parts)
200
+ continue;
201
+ const merged = twMerge(clsx(parts));
199
202
  if (merged) {
200
- finalSlots[slotName] = merged;
203
+ out[slotName] = merged;
201
204
  }
202
205
  }
203
- if (Object.keys(finalSlots).length === 0) {
204
- finalSlots = undefined;
206
+ if (Object.keys(out).length > 0) {
207
+ finalSlots = out;
205
208
  }
206
209
  }
207
210
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windctrl",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Advanced variant API for Tailwind CSS with stackable traits and interpolated dynamic styles.",
5
5
  "license": "MIT",
6
6
  "author": "Masaki Morishita (@morishxt)",