@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/index.cjs
CHANGED
|
@@ -464,6 +464,11 @@ var STYLE_ENTRY_CANDIDATES = [
|
|
|
464
464
|
"index.css"
|
|
465
465
|
];
|
|
466
466
|
var TAILWIND_IMPORT = /@import\s+["']tailwindcss["']\s*;?/;
|
|
467
|
+
function getElementClassNames(el) {
|
|
468
|
+
const className = el.className;
|
|
469
|
+
const raw = typeof className === "string" ? className : typeof className?.baseVal === "string" ? className.baseVal : el.getAttribute("class") ?? "";
|
|
470
|
+
return raw.split(/\s+/).filter(Boolean);
|
|
471
|
+
}
|
|
467
472
|
var compilerCache = null;
|
|
468
473
|
function getCachedBuild(cwd) {
|
|
469
474
|
if (compilerCache !== null && path.resolve(compilerCache.cwd) === path.resolve(cwd)) {
|
|
@@ -684,8 +689,8 @@ async function renderComponent(filePath, componentName, props, viewportWidth, vi
|
|
|
684
689
|
const classes = await page.evaluate(() => {
|
|
685
690
|
const set = /* @__PURE__ */ new Set();
|
|
686
691
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
687
|
-
for (const c of el
|
|
688
|
-
|
|
692
|
+
for (const c of getElementClassNames(el)) {
|
|
693
|
+
set.add(c);
|
|
689
694
|
}
|
|
690
695
|
});
|
|
691
696
|
return [...set];
|
|
@@ -4137,8 +4142,8 @@ function buildRenderer(filePath, componentName, viewportWidth, viewportHeight, g
|
|
|
4137
4142
|
const classes = await page.evaluate(() => {
|
|
4138
4143
|
const set = /* @__PURE__ */ new Set();
|
|
4139
4144
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
4140
|
-
for (const c of el
|
|
4141
|
-
|
|
4145
|
+
for (const c of getElementClassNames(el)) {
|
|
4146
|
+
set.add(c);
|
|
4142
4147
|
}
|
|
4143
4148
|
});
|
|
4144
4149
|
return [...set];
|
|
@@ -5018,8 +5023,8 @@ async function renderComponent2(filePath, componentName, props, viewportWidth, v
|
|
|
5018
5023
|
const classes = await page.evaluate(() => {
|
|
5019
5024
|
const set = /* @__PURE__ */ new Set();
|
|
5020
5025
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
5021
|
-
for (const c of el
|
|
5022
|
-
|
|
5026
|
+
for (const c of getElementClassNames(el)) {
|
|
5027
|
+
set.add(c);
|
|
5023
5028
|
}
|
|
5024
5029
|
});
|
|
5025
5030
|
return [...set];
|
|
@@ -5356,8 +5361,8 @@ async function renderComponent3(filePath, componentName, props, viewportWidth, v
|
|
|
5356
5361
|
const classes = await page.evaluate(() => {
|
|
5357
5362
|
const set = /* @__PURE__ */ new Set();
|
|
5358
5363
|
document.querySelectorAll("[class]").forEach((el) => {
|
|
5359
|
-
for (const c of el
|
|
5360
|
-
|
|
5364
|
+
for (const c of getElementClassNames(el)) {
|
|
5365
|
+
set.add(c);
|
|
5361
5366
|
}
|
|
5362
5367
|
});
|
|
5363
5368
|
return [...set];
|