myoperator-ui 0.0.27 → 0.0.28

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 +14 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -618,14 +618,18 @@ export function cn(...inputs: ClassValue[]) {
618
618
  } else {
619
619
  const existingCss = await fs2.readFile(globalCssPath, "utf-8");
620
620
  if (!existingCss.includes("myOperator UI") && !existingCss.includes("--mo-background:")) {
621
- spinner.stop();
622
- const { updateCss } = await prompts2({
623
- type: "confirm",
624
- name: "updateCss",
625
- message: `${response.globalCss} exists. Add myOperator UI imports to the top?`,
626
- initial: true
627
- });
628
- spinner.start("Initializing project...");
621
+ let updateCss = response.tailwindVersion === "v3";
622
+ if (!updateCss) {
623
+ spinner.stop();
624
+ const result = await prompts2({
625
+ type: "confirm",
626
+ name: "updateCss",
627
+ message: `${response.globalCss} exists. Add myOperator UI imports to the top?`,
628
+ initial: true
629
+ });
630
+ updateCss = result.updateCss;
631
+ spinner.start("Initializing project...");
632
+ }
629
633
  if (updateCss) {
630
634
  if (hasBootstrap || prefix) {
631
635
  await fs2.writeFile(globalCssPath, cssContent + existingCss);
@@ -645,18 +649,8 @@ export function cn(...inputs: ClassValue[]) {
645
649
  } else {
646
650
  const existingConfig = await fs2.readFile(tailwindConfigPath, "utf-8");
647
651
  if (!existingConfig.includes("hsl(var(--destructive))") && !existingConfig.includes("hsl(var(--ring))")) {
648
- spinner.stop();
649
- const { updateTailwind } = await prompts2({
650
- type: "confirm",
651
- name: "updateTailwind",
652
- message: `${response.tailwindConfig} exists. Update with myOperator UI theme colors?`,
653
- initial: true
654
- });
655
- spinner.start("Initializing project...");
656
- if (updateTailwind) {
657
- await fs2.writeFile(tailwindConfigPath, getTailwindConfig(prefix));
658
- tailwindUpdated = true;
659
- }
652
+ await fs2.writeFile(tailwindConfigPath, getTailwindConfig(prefix));
653
+ tailwindUpdated = true;
660
654
  }
661
655
  }
662
656
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",