@aqentra/datum 0.1.1 → 0.1.2

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.
@@ -445,13 +445,16 @@ function pick(palette, i2) {
445
445
  return palette[(i2 % palette.length + palette.length) % palette.length].toUpperCase();
446
446
  }
447
447
  function contrastText(fill2, dark) {
448
- const n2 = parseInt(fill2.slice(1), 16);
448
+ if (luminance(fill2) < 0.179) return "#FFFFFF";
449
+ return /^#[0-9a-f]{6}$/i.test(dark) && luminance(dark) >= 0.179 ? "#1F2328" : dark;
450
+ }
451
+ function luminance(color2) {
452
+ const n2 = parseInt(color2.slice(1), 16);
449
453
  const [r, g, b] = [n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255].map((c) => {
450
454
  const s = c / 255;
451
455
  return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
452
456
  });
453
- const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;
454
- return luminance < 0.179 ? "#FFFFFF" : dark;
457
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
455
458
  }
456
459
  var DEFAULT_THEME;
457
460
  var init_theme = __esm({
@@ -12834,7 +12837,7 @@ async function main(argv) {
12834
12837
  throw new Error(`Unknown command "${cmd}". Run: datum --help`);
12835
12838
  }
12836
12839
  }
12837
- var VERSION = true ? "0.1.1" : "dev";
12840
+ var VERSION = true ? "0.1.2" : "dev";
12838
12841
  main(process.argv.slice(2)).catch((e2) => {
12839
12842
  process.stderr.write(`datum: ${e2.message}
12840
12843
  `);
@@ -19,7 +19,7 @@
19
19
 
20
20
  $Base = 'https://localhost:3000/'
21
21
  $Dir = Join-Path $env:LOCALAPPDATA 'DATUM'
22
- Write-Host "Installing DATUM Desktop 0.1.1 for $env:USERNAME"
22
+ Write-Host "Installing DATUM Desktop 0.1.2 for $env:USERNAME"
23
23
  New-Item -ItemType Directory -Force -Path $Dir | Out-Null
24
24
 
25
25
  # 1. Program files: from this folder, or downloaded.
@@ -21,7 +21,7 @@ main() {
21
21
  Linux) DIR="${XDG_DATA_HOME:-$HOME/.local/share}/datum"; OS=linux ;;
22
22
  *) echo "DATUM Desktop supports macOS and Windows (use install.cmd there)."; exit 1 ;;
23
23
  esac
24
- echo "Installing DATUM Desktop 0.1.1 for $USER"
24
+ echo "Installing DATUM Desktop 0.1.2 for $USER"
25
25
  mkdir -p "$DIR"
26
26
 
27
27
  # 1. Program files: from this folder, or downloaded.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aqentra/datum",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Open-source, agent-friendly charts for PowerPoint: data-driven columns, waterfalls, Mekko and Gantt as native shapes, linked to Excel, with corporate themes and an MCP server.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://datum.aqentra.ai/",