myoperator-ui 0.0.170-beta.0 → 0.0.170-beta.1

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 +24 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11939,6 +11939,30 @@ async function sync(options) {
11939
11939
  }
11940
11940
  }
11941
11941
  }
11942
+ const tailwindConfigCandidates = ["tailwind.config.js", "tailwind.config.ts", "tailwind.config.mjs", "tailwind.config.cjs"];
11943
+ for (const candidate of tailwindConfigCandidates) {
11944
+ const configPath = path6.join(cwd, candidate);
11945
+ if (await fs6.pathExists(configPath)) {
11946
+ let configContent = await fs6.readFile(configPath, "utf-8");
11947
+ let injected = 0;
11948
+ for (const group of ["error", "warning", "success", "info"]) {
11949
+ const surfaceKey = `"semantic-${group}-surface":`;
11950
+ const subtleKey = `"semantic-${group}-surface-subtle":`;
11951
+ if (configContent.includes(surfaceKey) && !configContent.includes(subtleKey)) {
11952
+ const subtleLine = ` "${`semantic-${group}-surface-subtle`}": "var(--semantic-${group}-surface-subtle)",
11953
+ `;
11954
+ configContent = configContent.replace(surfaceKey, subtleLine + ` ${surfaceKey}`);
11955
+ injected++;
11956
+ }
11957
+ }
11958
+ if (injected > 0) {
11959
+ await fs6.writeFile(configPath, configContent);
11960
+ console.log(chalk5.green(` \u2713 Updated ${candidate} (${injected} new color token${injected === 1 ? "" : "s"} added)
11961
+ `));
11962
+ }
11963
+ break;
11964
+ }
11965
+ }
11942
11966
  const themeFilePath = path6.join(cwd, "src/lib/myoperator-ui-theme.css");
11943
11967
  if (await fs6.pathExists(themeFilePath)) {
11944
11968
  const existingTheme = await fs6.readFile(themeFilePath, "utf-8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.170-beta.0",
3
+ "version": "0.0.170-beta.1",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",