@graphysdk/react-renderer 1.8.1-beta.1786626875304 → 1.8.1-beta.1786707936521
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/editable.cjs +1 -1
- package/dist/editable.d.ts +2 -2
- package/dist/editable.mjs +640 -630
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +3 -30
- package/dist/graph-config.mjs +21 -47
- package/dist/{history-chords-D_Rvl7hX.js → history-chords-CmDNkDXT.js} +2685 -2732
- package/dist/history-chords-RtuhuAiT.cjs +1 -0
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +13 -39
- package/dist/index.mjs +14 -14
- package/dist/typography-Bd5awt67.cjs +2 -0
- package/dist/{font-values-BZDSyJGS.js → typography-CiDZDGza.js} +112 -190
- package/dist/typography.css +1 -0
- package/package.json +2 -2
- package/dist/font-values-B_MGX5Fo.cjs +0 -2
- package/dist/history-chords-Ch2Waaba.cjs +0 -1
package/dist/graph-config.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./typography-Bd5awt67.cjs");let s=require("@graphysdk/viz-engine/graph-config");var v=(e,n)=>{const r=e.appearance?.textStyle;return{...c(e.themeOverrides),...n&&r?l(r,n):void 0}},l=(e,n)=>{const r=a=>a===void 0?void 0:n.find(i=>i.id===a)?.fontFamily,o=r(e.body?.fontId),t=r(e.heading?.fontId);return{...o?{fontFamilyDefault:o}:void 0,...t?{fontFamilyHeading:t}:void 0}},c=e=>{if(e===void 0)return;const n={};for(const[r,o]of Object.entries(e))if(d.isMeasuredFontTokenKey(r)&&typeof o=="string"){const t=(0,s.parseFontShorthand)(o);if(t===null){f(r,o);continue}n[r]=t}else n[r]=o;return n},f=(e,n)=>{process.env.NODE_ENV!=="production"&&console.warn(`[react-renderer] Ignoring GraphConfig themeOverrides."${e}": "${n}" is not a measurable font shorthand (needs a px/em size and a family).`)};exports.convertGraphConfigTheme=v;
|
package/dist/graph-config.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FontLength } from '@graphysdk/viz-engine/graph-config';
|
|
2
|
+
import { FontStyle } from '@graphysdk/viz-engine/graph-config';
|
|
1
3
|
import { GraphConfig } from '@graphysdk/viz-engine/graph-config';
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -10,26 +12,12 @@ import { GraphConfig } from '@graphysdk/viz-engine/graph-config';
|
|
|
10
12
|
*/
|
|
11
13
|
export declare const convertGraphConfigTheme: (config: GraphConfig, fontList?: FontListInput) => ThemeOverrides;
|
|
12
14
|
|
|
13
|
-
declare const FONT_STYLES: readonly ["normal", "italic", "oblique"];
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* A CSS length keeping its unit so measurement can treat it like CSS paint does: em scales with
|
|
17
|
-
* `textScale` (see `emToPx`), px stays absolute.
|
|
18
|
-
*/
|
|
19
|
-
declare interface FontLength {
|
|
20
|
-
value: number;
|
|
21
|
-
unit: 'px' | 'em';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
15
|
/** Host font catalog mapping each font id a `GraphConfig` may reference to a CSS `font-family` string. */
|
|
25
16
|
export declare type FontListInput = Array<{
|
|
26
17
|
id: string;
|
|
27
18
|
fontFamily: string;
|
|
28
19
|
}>;
|
|
29
20
|
|
|
30
|
-
/** A CSS `font-style` keyword accepted by a measured font token override. */
|
|
31
|
-
declare type FontStyle = (typeof FONT_STYLES)[number];
|
|
32
|
-
|
|
33
21
|
/**
|
|
34
22
|
* A structured override of a measured font token. Omitted fields keep the token's default (which
|
|
35
23
|
* still cascades from the leaf tokens, e.g. `fontSizeXs`), so `{ weight: 600 }` changes only the
|
|
@@ -49,7 +37,7 @@ declare interface FontTokenOverride {
|
|
|
49
37
|
* ({@link FontTokenOverride}); the CSS variable's shorthand is serialized from the same object
|
|
50
38
|
* measurement reads, so paint and layout move together.
|
|
51
39
|
*/
|
|
52
|
-
declare type MeasuredFontTokenKey = '
|
|
40
|
+
declare type MeasuredFontTokenKey = 'fontLegendLabel';
|
|
53
41
|
|
|
54
42
|
/**
|
|
55
43
|
* A partial set of token values layered over a base theme — the shape of the `themeOverrides`
|
|
@@ -130,15 +118,7 @@ declare const vars: {
|
|
|
130
118
|
annotationFrameBorderColor: `var(--${string})`;
|
|
131
119
|
editMenuTriggerIconColor: `var(--${string})`;
|
|
132
120
|
heatmapEmptyTileBackground: `var(--${string})`;
|
|
133
|
-
dataLabelOutsideBackground: `var(--${string})`;
|
|
134
|
-
dataLabelTextColor: `var(--${string})`;
|
|
135
|
-
dataLabelInsideTextColor: `var(--${string})`;
|
|
136
|
-
stackTotalTextColor: `var(--${string})`;
|
|
137
|
-
stackTotalBackground: `var(--${string})`;
|
|
138
|
-
stackTotalStroke: `var(--${string})`;
|
|
139
121
|
gridLineWidth: `var(--${string})`;
|
|
140
|
-
gridLineDash: `var(--${string})`;
|
|
141
|
-
gridLineDotted: `var(--${string})`;
|
|
142
122
|
tooltipBorderRadius: `var(--${string})`;
|
|
143
123
|
tooltipBorderWidth: `var(--${string})`;
|
|
144
124
|
tooltipPaddingBlock: `var(--${string})`;
|
|
@@ -146,7 +126,6 @@ declare const vars: {
|
|
|
146
126
|
tooltipRowGap: `var(--${string})`;
|
|
147
127
|
tooltipShadow: `var(--${string})`;
|
|
148
128
|
editorControlHeight: `var(--${string})`;
|
|
149
|
-
tickLabelOffset: `var(--${string})`;
|
|
150
129
|
legendItemGap: `var(--${string})`;
|
|
151
130
|
legendSwatchGap: `var(--${string})`;
|
|
152
131
|
legendSwatchWidth: `var(--${string})`;
|
|
@@ -227,11 +206,6 @@ declare const vars: {
|
|
|
227
206
|
fontLineHeightHeadingSm: `var(--${string})`;
|
|
228
207
|
fontLineHeightHeadingMd: `var(--${string})`;
|
|
229
208
|
fontLineHeightHeadingLg: `var(--${string})`;
|
|
230
|
-
fontTickLabel: `var(--${string})`;
|
|
231
|
-
fontAxisLabel: `var(--${string})`;
|
|
232
|
-
fontDataLabel: `var(--${string})`;
|
|
233
|
-
fontStackTotal: `var(--${string})`;
|
|
234
|
-
fontCategoryLabel: `var(--${string})`;
|
|
235
209
|
fontLegendLabel: `var(--${string})`;
|
|
236
210
|
fontSeriesLabel: `var(--${string})`;
|
|
237
211
|
fontTooltipLabel: `var(--${string})`;
|
|
@@ -245,7 +219,6 @@ declare const vars: {
|
|
|
245
219
|
fontTooltipCaptionSmall: `var(--${string})`;
|
|
246
220
|
fontTrendTag: `var(--${string})`;
|
|
247
221
|
fontTrendTagSmall: `var(--${string})`;
|
|
248
|
-
fontGoalLineLabel: `var(--${string})`;
|
|
249
222
|
fontPieLabel: `var(--${string})`;
|
|
250
223
|
fontPieChartTotal: `var(--${string})`;
|
|
251
224
|
fontDifferenceArrowSmall: `var(--${string})`;
|
package/dist/graph-config.mjs
CHANGED
|
@@ -1,58 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { l as d } from "./typography-CiDZDGza.js";
|
|
2
|
+
import { parseFontShorthand as s } from "@graphysdk/viz-engine/graph-config";
|
|
3
|
+
var p = (e, n) => {
|
|
4
|
+
const r = e.appearance?.textStyle;
|
|
4
5
|
return {
|
|
5
|
-
...
|
|
6
|
-
...
|
|
6
|
+
...f(e.themeOverrides),
|
|
7
|
+
...n && r ? v(r, n) : void 0
|
|
7
8
|
};
|
|
8
|
-
},
|
|
9
|
-
const
|
|
10
|
-
let n = "normal", i = 400, t = 0;
|
|
11
|
-
for (; t < e.length; ) {
|
|
12
|
-
const s = e[t];
|
|
13
|
-
if (s === void 0) return null;
|
|
14
|
-
if (s === "normal") t++;
|
|
15
|
-
else if (g(s))
|
|
16
|
-
n = s, t++;
|
|
17
|
-
else {
|
|
18
|
-
const u = m(s);
|
|
19
|
-
if (u === null) break;
|
|
20
|
-
i = u, t++;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const o = e[t];
|
|
24
|
-
if (o === void 0) return null;
|
|
25
|
-
const [a = "", l] = o.split("/"), d = h(a);
|
|
26
|
-
if (d === null) return null;
|
|
27
|
-
const c = l === void 0 ? null : v(l), f = e.slice(t + 1).join(" ").trim();
|
|
28
|
-
return f === "" ? null : {
|
|
29
|
-
style: n,
|
|
30
|
-
weight: i,
|
|
31
|
-
size: d,
|
|
32
|
-
family: f,
|
|
33
|
-
...c !== null ? { lineHeight: c } : {}
|
|
34
|
-
};
|
|
35
|
-
}, F = (r, e) => {
|
|
36
|
-
const n = (o) => o === void 0 ? void 0 : e.find((a) => a.id === o)?.fontFamily, i = n(r.body?.fontId), t = n(r.heading?.fontId);
|
|
9
|
+
}, v = (e, n) => {
|
|
10
|
+
const r = (a) => a === void 0 ? void 0 : n.find((i) => i.id === a)?.fontFamily, o = r(e.body?.fontId), t = r(e.heading?.fontId);
|
|
37
11
|
return {
|
|
38
|
-
...
|
|
12
|
+
...o ? { fontFamilyDefault: o } : void 0,
|
|
39
13
|
...t ? { fontFamilyHeading: t } : void 0
|
|
40
14
|
};
|
|
41
|
-
},
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
for (const [
|
|
45
|
-
const t =
|
|
15
|
+
}, f = (e) => {
|
|
16
|
+
if (e === void 0) return;
|
|
17
|
+
const n = {};
|
|
18
|
+
for (const [r, o] of Object.entries(e)) if (d(r) && typeof o == "string") {
|
|
19
|
+
const t = s(o);
|
|
46
20
|
if (t === null) {
|
|
47
|
-
|
|
21
|
+
l(r, o);
|
|
48
22
|
continue;
|
|
49
23
|
}
|
|
50
|
-
|
|
51
|
-
} else
|
|
52
|
-
return
|
|
53
|
-
},
|
|
54
|
-
process.env.NODE_ENV !== "production" && console.warn(`[react-renderer] Ignoring GraphConfig themeOverrides."${
|
|
24
|
+
n[r] = t;
|
|
25
|
+
} else n[r] = o;
|
|
26
|
+
return n;
|
|
27
|
+
}, l = (e, n) => {
|
|
28
|
+
process.env.NODE_ENV !== "production" && console.warn(`[react-renderer] Ignoring GraphConfig themeOverrides."${e}": "${n}" is not a measurable font shorthand (needs a px/em size and a family).`);
|
|
55
29
|
};
|
|
56
30
|
export {
|
|
57
|
-
|
|
31
|
+
p as convertGraphConfigTheme
|
|
58
32
|
};
|