myoperator-ui 0.0.119 → 0.0.121
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 +99 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6972,6 +6972,7 @@ export default {
|
|
|
6972
6972
|
},
|
|
6973
6973
|
extend: {
|
|
6974
6974
|
colors: {
|
|
6975
|
+
// Legacy shadcn colors
|
|
6975
6976
|
border: "hsl(var(--border))",
|
|
6976
6977
|
input: "hsl(var(--input))",
|
|
6977
6978
|
ring: "hsl(var(--ring))",
|
|
@@ -7005,6 +7006,71 @@ export default {
|
|
|
7005
7006
|
DEFAULT: "hsl(var(--card))",
|
|
7006
7007
|
foreground: "hsl(var(--card-foreground))",
|
|
7007
7008
|
},
|
|
7009
|
+
// Semantic colors - Primary UI
|
|
7010
|
+
"semantic-primary": "var(--semantic-primary)",
|
|
7011
|
+
"semantic-primary-hover": "var(--semantic-primary-hover)",
|
|
7012
|
+
"semantic-primary-selected": "var(--semantic-primary-selected)",
|
|
7013
|
+
"semantic-primary-selected-hover": "var(--semantic-primary-selected-hover)",
|
|
7014
|
+
"semantic-primary-highlighted": "var(--semantic-primary-highlighted)",
|
|
7015
|
+
"semantic-primary-surface": "var(--semantic-primary-surface)",
|
|
7016
|
+
// Semantic colors - Brand
|
|
7017
|
+
"semantic-brand": "var(--semantic-brand)",
|
|
7018
|
+
"semantic-brand-hover": "var(--semantic-brand-hover)",
|
|
7019
|
+
"semantic-brand-selected": "var(--semantic-brand-selected)",
|
|
7020
|
+
"semantic-brand-selected-hover": "var(--semantic-brand-selected-hover)",
|
|
7021
|
+
"semantic-brand-highlighted": "var(--semantic-brand-highlighted)",
|
|
7022
|
+
"semantic-brand-surface": "var(--semantic-brand-surface)",
|
|
7023
|
+
// Semantic colors - Background
|
|
7024
|
+
"semantic-bg-primary": "var(--semantic-bg-primary)",
|
|
7025
|
+
"semantic-bg-secondary": "var(--semantic-bg-secondary)",
|
|
7026
|
+
"semantic-bg-ui": "var(--semantic-bg-ui)",
|
|
7027
|
+
"semantic-bg-grey": "var(--semantic-bg-grey)",
|
|
7028
|
+
"semantic-bg-grey-hover": "var(--semantic-bg-grey-hover)",
|
|
7029
|
+
"semantic-bg-inverted": "var(--semantic-bg-inverted)",
|
|
7030
|
+
"semantic-bg-hover": "var(--semantic-bg-hover)",
|
|
7031
|
+
// Semantic colors - Text
|
|
7032
|
+
"semantic-text-primary": "var(--semantic-text-primary)",
|
|
7033
|
+
"semantic-text-secondary": "var(--semantic-text-secondary)",
|
|
7034
|
+
"semantic-text-placeholder": "var(--semantic-text-placeholder)",
|
|
7035
|
+
"semantic-text-link": "var(--semantic-text-link)",
|
|
7036
|
+
"semantic-text-inverted": "var(--semantic-text-inverted)",
|
|
7037
|
+
"semantic-text-muted": "var(--semantic-text-muted)",
|
|
7038
|
+
// Semantic colors - Border
|
|
7039
|
+
"semantic-border-primary": "var(--semantic-border-primary)",
|
|
7040
|
+
"semantic-border-secondary": "var(--semantic-border-secondary)",
|
|
7041
|
+
"semantic-border-accent": "var(--semantic-border-accent)",
|
|
7042
|
+
"semantic-border-layout": "var(--semantic-border-layout)",
|
|
7043
|
+
"semantic-border-input": "var(--semantic-border-input)",
|
|
7044
|
+
"semantic-border-input-focus": "var(--semantic-border-input-focus)",
|
|
7045
|
+
// Semantic colors - Disabled
|
|
7046
|
+
"semantic-disabled-primary": "var(--semantic-disabled-primary)",
|
|
7047
|
+
"semantic-disabled-secondary": "var(--semantic-disabled-secondary)",
|
|
7048
|
+
"semantic-disabled-text": "var(--semantic-disabled-text)",
|
|
7049
|
+
"semantic-disabled-border": "var(--semantic-disabled-border)",
|
|
7050
|
+
// Semantic colors - Error
|
|
7051
|
+
"semantic-error-primary": "var(--semantic-error-primary)",
|
|
7052
|
+
"semantic-error-surface": "var(--semantic-error-surface)",
|
|
7053
|
+
"semantic-error-text": "var(--semantic-error-text)",
|
|
7054
|
+
"semantic-error-border": "var(--semantic-error-border)",
|
|
7055
|
+
"semantic-error-hover": "var(--semantic-error-hover)",
|
|
7056
|
+
// Semantic colors - Warning
|
|
7057
|
+
"semantic-warning-primary": "var(--semantic-warning-primary)",
|
|
7058
|
+
"semantic-warning-surface": "var(--semantic-warning-surface)",
|
|
7059
|
+
"semantic-warning-text": "var(--semantic-warning-text)",
|
|
7060
|
+
"semantic-warning-border": "var(--semantic-warning-border)",
|
|
7061
|
+
"semantic-warning-hover": "var(--semantic-warning-hover)",
|
|
7062
|
+
// Semantic colors - Success
|
|
7063
|
+
"semantic-success-primary": "var(--semantic-success-primary)",
|
|
7064
|
+
"semantic-success-surface": "var(--semantic-success-surface)",
|
|
7065
|
+
"semantic-success-text": "var(--semantic-success-text)",
|
|
7066
|
+
"semantic-success-border": "var(--semantic-success-border)",
|
|
7067
|
+
"semantic-success-hover": "var(--semantic-success-hover)",
|
|
7068
|
+
// Semantic colors - Info
|
|
7069
|
+
"semantic-info-primary": "var(--semantic-info-primary)",
|
|
7070
|
+
"semantic-info-surface": "var(--semantic-info-surface)",
|
|
7071
|
+
"semantic-info-text": "var(--semantic-info-text)",
|
|
7072
|
+
"semantic-info-border": "var(--semantic-info-border)",
|
|
7073
|
+
"semantic-info-hover": "var(--semantic-info-hover)",
|
|
7008
7074
|
},
|
|
7009
7075
|
borderRadius: {
|
|
7010
7076
|
lg: "var(--radius)",
|
|
@@ -7260,22 +7326,23 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
7260
7326
|
cssUpdated = true;
|
|
7261
7327
|
} else {
|
|
7262
7328
|
const existingCss = await fs3.readFile(globalCssPath, "utf-8");
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7329
|
+
const hasSemanticVariables = existingCss.includes("--semantic-text-primary");
|
|
7330
|
+
if (!hasSemanticVariables) {
|
|
7331
|
+
spinner.stop();
|
|
7332
|
+
const result = await prompts2({
|
|
7333
|
+
type: "confirm",
|
|
7334
|
+
name: "updateCss",
|
|
7335
|
+
message: `${globalCss} is missing semantic CSS variables. Update with full variable set?`,
|
|
7336
|
+
initial: true
|
|
7337
|
+
});
|
|
7338
|
+
spinner.start("Initializing project...");
|
|
7339
|
+
if (result.updateCss) {
|
|
7340
|
+
const customImports = existingCss.match(/@import\s+["'][^"']+["'];?\s*$/gm) || [];
|
|
7341
|
+
const importsToKeep = customImports.filter(
|
|
7342
|
+
(imp) => !imp.includes("tailwindcss") && !imp.includes("@tailwind")
|
|
7343
|
+
).join("\n");
|
|
7344
|
+
if (importsToKeep) {
|
|
7345
|
+
await fs3.writeFile(globalCssPath, cssContent + "\n" + importsToKeep + "\n");
|
|
7279
7346
|
} else {
|
|
7280
7347
|
await fs3.writeFile(globalCssPath, cssContent);
|
|
7281
7348
|
}
|
|
@@ -7291,9 +7358,24 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
7291
7358
|
tailwindUpdated = true;
|
|
7292
7359
|
} else {
|
|
7293
7360
|
const existingConfig = await fs3.readFile(tailwindConfigPath, "utf-8");
|
|
7294
|
-
|
|
7361
|
+
const hasLegacyColors = existingConfig.includes("hsl(var(--destructive))") || existingConfig.includes("hsl(var(--ring))");
|
|
7362
|
+
const hasSemanticColors = existingConfig.includes("semantic-text-primary");
|
|
7363
|
+
if (!hasLegacyColors && !hasSemanticColors) {
|
|
7295
7364
|
await fs3.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
7296
7365
|
tailwindUpdated = true;
|
|
7366
|
+
} else if (hasLegacyColors && !hasSemanticColors) {
|
|
7367
|
+
spinner.stop();
|
|
7368
|
+
const result = await prompts2({
|
|
7369
|
+
type: "confirm",
|
|
7370
|
+
name: "updateTailwind",
|
|
7371
|
+
message: `${tailwindConfig} is missing semantic color tokens. Update with full color set?`,
|
|
7372
|
+
initial: true
|
|
7373
|
+
});
|
|
7374
|
+
spinner.start("Initializing project...");
|
|
7375
|
+
if (result.updateTailwind) {
|
|
7376
|
+
await fs3.writeFile(tailwindConfigPath, getTailwindConfig(userPrefix, hasBootstrap));
|
|
7377
|
+
tailwindUpdated = true;
|
|
7378
|
+
}
|
|
7297
7379
|
}
|
|
7298
7380
|
}
|
|
7299
7381
|
}
|