myoperator-ui 0.0.18 → 0.0.20
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 +11 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import ora from "ora";
|
|
|
13
13
|
// src/utils/registry.ts
|
|
14
14
|
function prefixTailwindClasses(content, prefix) {
|
|
15
15
|
if (!prefix) return content;
|
|
16
|
-
const cleanPrefix = prefix;
|
|
16
|
+
const cleanPrefix = prefix.replace(/-/g, "") + ":";
|
|
17
17
|
return content.replace(/"([^"]+)"/g, (match, classString) => {
|
|
18
18
|
if (classString.startsWith("@") || classString.startsWith(".") || classString.includes("::")) {
|
|
19
19
|
return match;
|
|
@@ -333,10 +333,14 @@ var CSS_VARIABLES_V4 = `@import "tailwindcss";
|
|
|
333
333
|
--ring: 212.7 26.8% 83.9%;
|
|
334
334
|
}
|
|
335
335
|
`;
|
|
336
|
-
var
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
var getCSS_VARIABLES_V4_BOOTSTRAP = (prefix) => {
|
|
337
|
+
const cleanPrefix = prefix ? prefix.replace(/-/g, "") : "";
|
|
338
|
+
const prefixOption = cleanPrefix ? ` prefix(${cleanPrefix})` : "";
|
|
339
|
+
return `/* myOperator UI - Tailwind CSS for Bootstrap projects */
|
|
340
|
+
/* Selective imports to avoid Preflight conflicts with Bootstrap */
|
|
341
|
+
@layer theme, base, components, utilities;
|
|
342
|
+
@import "tailwindcss/theme.css" layer(theme);
|
|
343
|
+
@import "tailwindcss/utilities.css" layer(utilities)${prefixOption};
|
|
340
344
|
|
|
341
345
|
/* Tell Tailwind to scan component files for utility classes */
|
|
342
346
|
@source "./components/**/*.{js,ts,jsx,tsx}";
|
|
@@ -345,6 +349,7 @@ var CSS_VARIABLES_V4_BOOTSTRAP = `/* myOperator UI - Tailwind CSS for Bootstrap
|
|
|
345
349
|
/* End myOperator UI imports */
|
|
346
350
|
|
|
347
351
|
`;
|
|
352
|
+
};
|
|
348
353
|
var CSS_VARIABLES_V3 = `@tailwind base;
|
|
349
354
|
@tailwind components;
|
|
350
355
|
@tailwind utilities;
|
|
@@ -609,7 +614,7 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
609
614
|
const globalCssPath = path2.join(cwd, response.globalCss);
|
|
610
615
|
let cssContent;
|
|
611
616
|
if (response.tailwindVersion === "v4") {
|
|
612
|
-
cssContent = hasBootstrap ?
|
|
617
|
+
cssContent = hasBootstrap ? getCSS_VARIABLES_V4_BOOTSTRAP(prefix) : CSS_VARIABLES_V4;
|
|
613
618
|
} else {
|
|
614
619
|
cssContent = CSS_VARIABLES_V3;
|
|
615
620
|
}
|