formalconf 2.0.13 → 2.0.14

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/formalconf.js +54 -41
  2. package/package.json +1 -1
@@ -467,7 +467,7 @@ function StatusIndicator({
467
467
  // package.json
468
468
  var package_default = {
469
469
  name: "formalconf",
470
- version: "2.0.13",
470
+ version: "2.0.14",
471
471
  description: "Dotfiles management TUI for macOS and Linux - config management, package sync, and theme switching",
472
472
  type: "module",
473
473
  main: "./dist/formalconf.js",
@@ -4828,8 +4828,7 @@ function darken(hex, percent) {
4828
4828
  }
4829
4829
  function createColloidPalette(palette, mode) {
4830
4830
  const isDark = mode === "dark";
4831
- const grey = isDark ? interpolateGreyscale(palette.background, palette.foreground) : interpolateGreyscale(palette.foreground, palette.background);
4832
- const orderedGrey = isDark ? grey : [...grey].reverse();
4831
+ const orderedGrey = isDark ? interpolateGreyscale(palette.foreground, palette.background) : interpolateGreyscale(palette.background, palette.foreground);
4833
4832
  const accentBase = palette.accent || palette.color4;
4834
4833
  return {
4835
4834
  grey: orderedGrey,
@@ -4867,6 +4866,8 @@ function createColloidPalette(palette, mode) {
4867
4866
  }
4868
4867
  function generateColloidScss(palette, mode) {
4869
4868
  const colloid = createColloidPalette(palette, mode);
4869
+ const orange = interpolateColor(palette.color1, palette.color3, 0.5);
4870
+ const pink = interpolateColor(palette.color1, palette.color5, 0.4);
4870
4871
  const greyNames = [
4871
4872
  "050",
4872
4873
  "100",
@@ -4891,41 +4892,62 @@ function generateColloidScss(palette, mode) {
4891
4892
  let scss = `// FormalConf Generated Color Palette
4892
4893
  // Auto-generated - do not edit manually
4893
4894
 
4894
- // Greyscale (interpolated from theme background/foreground)
4895
+ // Red
4896
+ $red-light: ${colloid.red.light};
4897
+ $red-dark: ${colloid.red.dark};
4898
+
4899
+ // Pink
4900
+ $pink-light: ${lighten(pink, 10)};
4901
+ $pink-dark: ${darken(pink, 10)};
4902
+
4903
+ // Purple
4904
+ $purple-light: ${colloid.purple.light};
4905
+ $purple-dark: ${colloid.purple.dark};
4906
+
4907
+ // Blue
4908
+ $blue-light: ${colloid.blue.light};
4909
+ $blue-dark: ${colloid.blue.dark};
4910
+
4911
+ // Teal
4912
+ $teal-light: ${colloid.teal.light};
4913
+ $teal-dark: ${colloid.teal.dark};
4914
+
4915
+ // Green
4916
+ $green-light: ${colloid.green.light};
4917
+ $green-dark: ${colloid.green.dark};
4918
+
4919
+ // Yellow
4920
+ $yellow-light: ${colloid.yellow.light};
4921
+ $yellow-dark: ${colloid.yellow.dark};
4922
+
4923
+ // Orange
4924
+ $orange-light: ${lighten(orange, 10)};
4925
+ $orange-dark: ${darken(orange, 10)};
4926
+
4927
+ // Grey
4895
4928
  `;
4896
4929
  for (let i = 0;i < greyNames.length; i++) {
4897
4930
  scss += `$grey-${greyNames[i]}: ${colloid.grey[i]};
4898
4931
  `;
4899
4932
  }
4900
4933
  scss += `
4901
- // Base colors
4902
- $black: ${colloid.black};
4934
+ // White
4903
4935
  $white: ${colloid.white};
4904
4936
 
4905
- // Semantic colors - dark variants
4906
- $red-dark: ${colloid.red.dark};
4907
- $green-dark: ${colloid.green.dark};
4908
- $yellow-dark: ${colloid.yellow.dark};
4909
- $blue-dark: ${colloid.blue.dark};
4910
- $purple-dark: ${colloid.purple.dark};
4911
- $teal-dark: ${colloid.teal.dark};
4937
+ // Black
4938
+ $black: ${colloid.black};
4912
4939
 
4913
- // Semantic colors - light variants
4914
- $red-light: ${colloid.red.light};
4915
- $green-light: ${colloid.green.light};
4916
- $yellow-light: ${colloid.yellow.light};
4917
- $blue-light: ${colloid.blue.light};
4918
- $purple-light: ${colloid.purple.light};
4919
- $teal-light: ${colloid.teal.light};
4940
+ // Button (window controls)
4941
+ $button-close: ${palette.color1};
4942
+ $button-max: ${palette.color2};
4943
+ $button-min: ${palette.color3};
4920
4944
 
4921
- // Accent colors (primary buttons, links, highlights)
4922
- $default-dark: ${colloid.accent.dark};
4923
- $default-light: ${colloid.accent.light};
4945
+ // Link
4924
4946
  $links: ${palette.accent || palette.color4};
4925
4947
 
4926
- // Backgrounds
4927
- $background: ${palette.background};
4928
- $foreground: ${palette.foreground};
4948
+ // Theme (accent color)
4949
+ $default-light: ${colloid.accent.light};
4950
+ $default-dark: ${colloid.accent.dark};
4929
4951
  `;
4930
4952
  return scss;
4931
4953
  }
@@ -4987,6 +5009,7 @@ async function cloneColloidRepo() {
4987
5009
  return result.success;
4988
5010
  }
4989
5011
  async function updateColloidRepo() {
5012
+ await exec(["git", "checkout", "--", "src/sass/_color-palette-default.scss"], COLLOID_DIR);
4990
5013
  const result = await exec(["git", "pull", "--rebase"], COLLOID_DIR);
4991
5014
  return result.success;
4992
5015
  }
@@ -4998,21 +5021,9 @@ async function ensureColloidRepo() {
4998
5021
  }
4999
5022
  async function writeCustomPalette(palette, mode) {
5000
5023
  const scss = generateColloidScss(palette, mode);
5001
- const palettePath = join6(COLLOID_DIR, "src", "sass", "_color-palette-formalconf.scss");
5024
+ const palettePath = join6(COLLOID_DIR, "src", "sass", "_color-palette-default.scss");
5002
5025
  await writeFile(palettePath, scss);
5003
5026
  }
5004
- async function patchTweaksFile(themeName) {
5005
- const tweaksContent = `// FormalConf theme: ${themeName}
5006
- // Auto-patched to use custom color palette
5007
-
5008
- @import 'color-palette-formalconf';
5009
-
5010
- $tweaks: true;
5011
- $colorscheme: true;
5012
- `;
5013
- const tweaksPath = join6(COLLOID_DIR, "src", "sass", "_tweaks-temp.scss");
5014
- await writeFile(tweaksPath, tweaksContent);
5015
- }
5016
5027
  async function runColloidInstall(options) {
5017
5028
  const args = [
5018
5029
  "./install.sh",
@@ -5024,12 +5035,15 @@ async function runColloidInstall(options) {
5024
5035
  if (options.installLibadwaita !== false) {
5025
5036
  args.push("-l");
5026
5037
  }
5038
+ if (options.mode === "dark") {
5039
+ args.push("--tweaks", "black");
5040
+ }
5027
5041
  const result = await exec(args, COLLOID_DIR);
5028
5042
  return result.exitCode;
5029
5043
  }
5030
5044
  function getGtkThemeName(themeName, mode) {
5031
5045
  const modeCapitalized = mode === "dark" ? "Dark" : "Light";
5032
- return `Colloid-formalconf-${themeName}-${modeCapitalized}`;
5046
+ return `formalconf-${themeName}-${modeCapitalized}`;
5033
5047
  }
5034
5048
  async function applyGtkTheme(theme, mode) {
5035
5049
  if (getOS() !== "linux") {
@@ -5068,7 +5082,6 @@ ${instructions}`
5068
5082
  };
5069
5083
  }
5070
5084
  await writeCustomPalette(palette, mode);
5071
- await patchTweaksFile(themeName);
5072
5085
  const gtkConfig = theme.gtk || {};
5073
5086
  const options = {
5074
5087
  themeName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formalconf",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "Dotfiles management TUI for macOS and Linux - config management, package sync, and theme switching",
5
5
  "type": "module",
6
6
  "main": "./dist/formalconf.js",