myoperator-ui 0.0.234-beta.0 → 0.0.234
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 +15 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30102,7 +30102,21 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
30102
30102
|
const hasThemeImport = existingCss.includes("myoperator-ui-theme.css");
|
|
30103
30103
|
const needsScopedPreflight = hasBootstrap && !existingCss.includes('[class*="tw-"]');
|
|
30104
30104
|
if (needsScopedPreflight) {
|
|
30105
|
-
|
|
30105
|
+
const lines = existingCss.split("\n");
|
|
30106
|
+
const customLines = lines.filter((line) => {
|
|
30107
|
+
const trimmed = line.trim();
|
|
30108
|
+
if (!trimmed || trimmed.startsWith("/*") || trimmed.startsWith("*") || trimmed.startsWith("//")) return false;
|
|
30109
|
+
if (trimmed.startsWith("@tailwind")) return false;
|
|
30110
|
+
if (trimmed.startsWith("@import") && trimmed.includes("myoperator-ui-theme")) return false;
|
|
30111
|
+
if (trimmed.startsWith("@import") || trimmed.startsWith("@use")) return true;
|
|
30112
|
+
return false;
|
|
30113
|
+
});
|
|
30114
|
+
const importsToKeep = customLines.join("\n");
|
|
30115
|
+
if (importsToKeep) {
|
|
30116
|
+
await fs5.writeFile(globalCssPath, cssContent + "\n" + importsToKeep + "\n");
|
|
30117
|
+
} else {
|
|
30118
|
+
await fs5.writeFile(globalCssPath, cssContent);
|
|
30119
|
+
}
|
|
30106
30120
|
cssUpdated = true;
|
|
30107
30121
|
} else if (!hasThemeImport) {
|
|
30108
30122
|
spinner.stop();
|