@agent-scope/cli 1.20.1 → 1.20.2
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/dist/cli.js +13 -8
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +13 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -492,6 +492,11 @@ var STYLE_ENTRY_CANDIDATES = [
|
|
|
492
492
|
"index.css"
|
|
493
493
|
];
|
|
494
494
|
var TAILWIND_IMPORT = /@import\s+["']tailwindcss["']\s*;?/;
|
|
495
|
+
function getElementClassNames(el) {
|
|
496
|
+
const className = el.className;
|
|
497
|
+
const raw = typeof className === "string" ? className : typeof className?.baseVal === "string" ? className.baseVal : el.getAttribute("class") ?? "";
|
|
498
|
+
return raw.split(/\s+/).filter(Boolean);
|
|
499
|
+
}
|
|
495
500
|
var compilerCache = null;
|
|
496
501
|
function getCachedBuild(cwd) {
|
|
497
502
|
if (compilerCache !== null && resolve(compilerCache.cwd) === resolve(cwd)) {
|
|
@@ -712,8 +717,8 @@ async function renderComponent(filePath, componentName, props, viewportWidth, vi
|
|
|
712
717
|
const classes = await page.evaluate(() => {
|
|
713
718
|
const set = /* @__PURE__ */ new Set();
|
|
714
719
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
715
|
-
for (const c of el
|
|
716
|
-
|
|
720
|
+
for (const c of getElementClassNames(el)) {
|
|
721
|
+
set.add(c);
|
|
717
722
|
}
|
|
718
723
|
});
|
|
719
724
|
return [...set];
|
|
@@ -4211,8 +4216,8 @@ function buildRenderer(filePath, componentName, viewportWidth, viewportHeight, g
|
|
|
4211
4216
|
const classes = await page.evaluate(() => {
|
|
4212
4217
|
const set = /* @__PURE__ */ new Set();
|
|
4213
4218
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
4214
|
-
for (const c of el
|
|
4215
|
-
|
|
4219
|
+
for (const c of getElementClassNames(el)) {
|
|
4220
|
+
set.add(c);
|
|
4216
4221
|
}
|
|
4217
4222
|
});
|
|
4218
4223
|
return [...set];
|
|
@@ -5099,8 +5104,8 @@ async function renderComponent2(filePath, componentName, props, viewportWidth, v
|
|
|
5099
5104
|
const classes = await page.evaluate(() => {
|
|
5100
5105
|
const set = /* @__PURE__ */ new Set();
|
|
5101
5106
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
5102
|
-
for (const c of el
|
|
5103
|
-
|
|
5107
|
+
for (const c of getElementClassNames(el)) {
|
|
5108
|
+
set.add(c);
|
|
5104
5109
|
}
|
|
5105
5110
|
});
|
|
5106
5111
|
return [...set];
|
|
@@ -5444,8 +5449,8 @@ async function renderComponent3(filePath, componentName, props, viewportWidth, v
|
|
|
5444
5449
|
const classes = await page.evaluate(() => {
|
|
5445
5450
|
const set = /* @__PURE__ */ new Set();
|
|
5446
5451
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
5447
|
-
for (const c of el
|
|
5448
|
-
|
|
5452
|
+
for (const c of getElementClassNames(el)) {
|
|
5453
|
+
set.add(c);
|
|
5449
5454
|
}
|
|
5450
5455
|
});
|
|
5451
5456
|
return [...set];
|