myoperator-ui 0.0.119 → 0.0.120
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/index.js +17 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7260,22 +7260,23 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
7260
7260
|
cssUpdated = true;
|
|
7261
7261
|
} else {
|
|
7262
7262
|
const existingCss = await fs3.readFile(globalCssPath, "utf-8");
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7263
|
+
const hasSemanticVariables = existingCss.includes("--semantic-text-primary");
|
|
7264
|
+
if (!hasSemanticVariables) {
|
|
7265
|
+
spinner.stop();
|
|
7266
|
+
const result = await prompts2({
|
|
7267
|
+
type: "confirm",
|
|
7268
|
+
name: "updateCss",
|
|
7269
|
+
message: `${globalCss} is missing semantic CSS variables. Update with full variable set?`,
|
|
7270
|
+
initial: true
|
|
7271
|
+
});
|
|
7272
|
+
spinner.start("Initializing project...");
|
|
7273
|
+
if (result.updateCss) {
|
|
7274
|
+
const customImports = existingCss.match(/@import\s+["'][^"']+["'];?\s*$/gm) || [];
|
|
7275
|
+
const importsToKeep = customImports.filter(
|
|
7276
|
+
(imp) => !imp.includes("tailwindcss") && !imp.includes("@tailwind")
|
|
7277
|
+
).join("\n");
|
|
7278
|
+
if (importsToKeep) {
|
|
7279
|
+
await fs3.writeFile(globalCssPath, cssContent + "\n" + importsToKeep + "\n");
|
|
7279
7280
|
} else {
|
|
7280
7281
|
await fs3.writeFile(globalCssPath, cssContent);
|
|
7281
7282
|
}
|