@reuters-graphics/graphics-components 3.0.8 → 3.0.10

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.
@@ -3,7 +3,7 @@ import getParameterByName from './getParameterByName';
3
3
  import Ias from './ias';
4
4
  const ONETRUST_LOGS = 'ot_logs';
5
5
  const ONETRUST_GEOLOCATION_MOCK = 'ot_geolocation_mock';
6
- const ONETRUST_SCRIPT_ID = '38cb75bd-fbe1-4ac8-b4af-e531ab368caf-test';
6
+ const ONETRUST_SCRIPT_ID = '38cb75bd-fbe1-4ac8-b4af-e531ab368caf';
7
7
  export const loadBootstrap = () => {
8
8
  window.freestar = window.freestar || {};
9
9
  const freestar = window.freestar;
@@ -37,11 +37,11 @@ export interface CustomFont {
37
37
  family?: Partial<FontFamily>;
38
38
  size?: Partial<FontSize>;
39
39
  }
40
- export interface Theme {
40
+ export interface ThemeConfig {
41
41
  colour: Colour;
42
42
  font: Font;
43
43
  }
44
- export interface CustomTheme {
44
+ export interface CustomThemeConfig {
45
45
  colour?: Partial<Colour>;
46
46
  font?: Partial<CustomFont>;
47
47
  [customProperty: string]: unknown;
@@ -14,7 +14,7 @@
14
14
  import mergeThemes from './utils/merge.js';
15
15
 
16
16
  // Types
17
- import type { CustomTheme, Theme } from './@types/component';
17
+ import type { CustomThemeConfig, ThemeConfig } from './@types/component';
18
18
  import type { Snippet } from 'svelte';
19
19
  type Base = 'light' | 'dark';
20
20
 
@@ -22,7 +22,7 @@
22
22
  /** Custom theme object. Can be a partial theme with just
23
23
  * what you want to change.
24
24
  */
25
- theme?: CustomTheme | Theme;
25
+ theme?: CustomThemeConfig | ThemeConfig;
26
26
  /**
27
27
  * Base theme is one of `light` or `dark` and will be merged
28
28
  * with your custom theme to fill in any values you don't
@@ -2,17 +2,17 @@
2
2
  * Pre-made themes you can import.
3
3
  */
4
4
  export declare const themes: {
5
- light: Theme;
6
- dark: Theme;
5
+ light: ThemeConfig;
6
+ dark: ThemeConfig;
7
7
  };
8
- import type { CustomTheme, Theme } from './@types/component';
8
+ import type { CustomThemeConfig, ThemeConfig } from './@types/component';
9
9
  import type { Snippet } from 'svelte';
10
10
  type Base = 'light' | 'dark';
11
11
  interface Props {
12
12
  /** Custom theme object. Can be a partial theme with just
13
13
  * what you want to change.
14
14
  */
15
- theme?: CustomTheme | Theme;
15
+ theme?: CustomThemeConfig | ThemeConfig;
16
16
  /**
17
17
  * Base theme is one of `light` or `dark` and will be merged
18
18
  * with your custom theme to fill in any values you don't
@@ -1,4 +1,4 @@
1
- /** @type {Omit<import('../@types/component').Theme, "colour">} */
1
+ /** @type {Omit<import('../@types/component').ThemeConfig, "colour">} */
2
2
  /* Generated from
3
3
  https://www.fluid-type-scale.com/calculate?minFontSize=18&minWidth=320&minRatio=1.125&maxFontSize=21&maxWidth=1280&maxRatio=1.25&steps=xxs%2Cxs%2Csm%2Cbase%2Clg%2Cxl%2C2xl%2C3xl%2C4xl%2C5xl%2C6xl&baseStep=base&prefix=&decimals=2&useRems=on&remValue=16&previewFont=Noto+Sans&previewText=Almost+before+we+knew+it%2C+we+had+left+the+ground&previewWidth=0
4
4
  */
@@ -1,6 +1,6 @@
1
1
  import common from './common.js';
2
2
 
3
- /** @type {import('../@types/component').Theme} */
3
+ /** @type {import('../@types/component').ThemeConfig} */
4
4
  export default {
5
5
  ...common,
6
6
  colour: {
@@ -1,6 +1,6 @@
1
1
  import common from './common.js';
2
2
 
3
- /** @type {import('../@types/component').Theme} */
3
+ /** @type {import('../@types/component').ThemeConfig} */
4
4
  export default {
5
5
  ...common,
6
6
  colour: {
@@ -1,5 +1,5 @@
1
- import type { Theme, CustomTheme } from '../@types/component';
1
+ import type { ThemeConfig, CustomThemeConfig } from '../@types/component';
2
2
  /**
3
3
  * Deep merges theme objects.
4
4
  */
5
- export default function merge<T extends Record<string, unknown>>(target: T, ...sources: (Theme | CustomTheme)[]): T;
5
+ export default function merge<T extends Record<string, unknown>>(target: T, ...sources: (ThemeConfig | CustomThemeConfig)[]): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reuters-graphics/graphics-components",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://reuters-graphics.github.io/graphics-components",