@opendata-ai/openchart-vanilla 2.3.4 → 2.3.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendata-ai/openchart-vanilla",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Vanilla JS renderer for openchart: SVG charts, HTML tables, force-directed graphs",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Riley Hilliard",
@@ -46,8 +46,8 @@
46
46
  "typecheck": "tsc --noEmit"
47
47
  },
48
48
  "dependencies": {
49
- "@opendata-ai/openchart-core": "2.3.4",
50
- "@opendata-ai/openchart-engine": "2.3.4",
49
+ "@opendata-ai/openchart-core": "2.3.5",
50
+ "@opendata-ai/openchart-engine": "2.3.5",
51
51
  "d3-force": "^3.0.0",
52
52
  "d3-quadtree": "^3.0.1"
53
53
  },
@@ -9,6 +9,13 @@
9
9
  import type { ResolvedColumn, TableLayout, TableRow } from '@opendata-ai/openchart-core';
10
10
  import { renderCell } from './renderers/table-cells';
11
11
 
12
+ // ---------------------------------------------------------------------------
13
+ // Constants
14
+ // ---------------------------------------------------------------------------
15
+
16
+ const BRAND_URL = 'https://tryopendata.ai';
17
+ const BRAND_FONT_SIZE = 20;
18
+
12
19
  // ---------------------------------------------------------------------------
13
20
  // Chrome rendering
14
21
  // ---------------------------------------------------------------------------
@@ -351,10 +358,10 @@ export function renderTable(layout: TableLayout, container: HTMLElement): HTMLEl
351
358
  brand.className = 'viz-table-ref';
352
359
  brand.style.cssText = 'text-align: right; padding: 4px 8px;';
353
360
  const brandLink = document.createElement('a');
354
- brandLink.href = 'https://tryopendata.ai';
361
+ brandLink.href = BRAND_URL;
355
362
  brandLink.target = '_blank';
356
363
  brandLink.rel = 'noopener';
357
- brandLink.style.cssText = `font-size: 20px; font-weight: 600; color: ${brandColor}; opacity: 0.55; text-decoration: none; font-family: ${theme ? theme.fonts.family : 'sans-serif'};`;
364
+ brandLink.style.cssText = `font-size: ${BRAND_FONT_SIZE}px; font-weight: 600; color: ${brandColor}; opacity: 0.55; text-decoration: none; font-family: ${theme ? theme.fonts.family : 'sans-serif'};`;
358
365
  brandLink.textContent = 'OpenData';
359
366
  brand.appendChild(brandLink);
360
367
  wrapper.appendChild(brand);