vueless 0.0.656 → 0.0.657
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/composables/useUI.ts
CHANGED
package/package.json
CHANGED
|
@@ -214,7 +214,9 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
|
|
|
214
214
|
const fileContent = await readFile(file, "utf-8");
|
|
215
215
|
const isDefaultConfig = isDefaultComponentConfig(file, componentName);
|
|
216
216
|
const componentRegExp = new RegExp(`<${componentName}[^>]+>`, "g");
|
|
217
|
+
const componentExtendExp = new RegExp(`{${componentName}}`, "g");
|
|
217
218
|
const matchedComponent = fileContent.match(componentRegExp);
|
|
219
|
+
const matchedExtendComponent = fileContent.match(componentExtendExp);
|
|
218
220
|
|
|
219
221
|
if (!isComponentExists) {
|
|
220
222
|
isComponentExists = Boolean(matchedComponent);
|
|
@@ -228,6 +230,14 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
|
|
|
228
230
|
});
|
|
229
231
|
}
|
|
230
232
|
|
|
233
|
+
if (matchedExtendComponent) {
|
|
234
|
+
const objectColors = objectColorRegExp.exec(fileContent) || [];
|
|
235
|
+
|
|
236
|
+
objectColors.forEach((color) => {
|
|
237
|
+
if (color) colors.add(color);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
231
241
|
/* Collect color from U[Component] */
|
|
232
242
|
matchedComponent?.forEach((match) => {
|
|
233
243
|
const [, singleColor] = singleColorRegExp.exec(match) || [];
|