vueless 0.0.660 → 0.0.661

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.660",
3
+ "version": "0.0.661",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -222,6 +222,10 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
222
222
  isComponentExists = Boolean(matchedComponent);
223
223
  }
224
224
 
225
+ const propsColors = getPropsColors(fileContent);
226
+
227
+ propsColors.forEach((color) => colors.add(color));
228
+
225
229
  if (isDefaultConfig) {
226
230
  fileContent.match(objectColorRegExp)?.forEach((colorMatch) => {
227
231
  const [, color] = objectColorRegExp.exec(colorMatch) || [];
@@ -260,6 +264,16 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
260
264
  };
261
265
  }
262
266
 
267
+ function getPropsColors(inputString) {
268
+ const colorsMatch = inputString.match(/colors:\s*\[(.*?)\]/s);
269
+
270
+ if (colorsMatch && colorsMatch[1]) {
271
+ return colorsMatch[1].split(",").map((color) => color.trim().replace(/['"]/g, ""));
272
+ }
273
+
274
+ return [];
275
+ }
276
+
263
277
  function isDefaultComponentConfig(filePath, componentName) {
264
278
  const componentDirName = filePath.split(path.sep).at(-2);
265
279