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.
Files changed (2) hide show
  1. package/dist/index.js +17 -16
  2. 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
- if (!existingCss.includes("myOperator UI") && !existingCss.includes("--mo-background:")) {
7264
- let updateCss = tailwindVersion === "v3";
7265
- if (!updateCss) {
7266
- spinner.stop();
7267
- const result = await prompts2({
7268
- type: "confirm",
7269
- name: "updateCss",
7270
- message: `${globalCss} exists. Add myOperator UI imports to the top?`,
7271
- initial: true
7272
- });
7273
- updateCss = result.updateCss;
7274
- spinner.start("Initializing project...");
7275
- }
7276
- if (updateCss) {
7277
- if (hasBootstrap) {
7278
- await fs3.writeFile(globalCssPath, cssContent + existingCss);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.119",
3
+ "version": "0.0.120",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",