@graphysdk/react-renderer 2.0.0-beta.1786440210947 → 2.0.0-beta.1787253424098
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/README.md +21 -13
- package/dist/{font-values-CPxYeqns.js → dev.utils-Bvss_b2-.js} +112 -198
- package/dist/dev.utils-DiNE92pC.cjs +2 -0
- package/dist/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +66 -2974
- package/dist/editable.mjs +7053 -1932
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +3 -37
- package/dist/graph-config.mjs +21 -47
- package/dist/history-chords-CL6oqQ1F.cjs +1 -0
- package/dist/history-chords-Dt2FvM26.js +6400 -0
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +35 -54
- package/dist/index.mjs +189 -189
- package/licenses/PolyForm-Free-Trial-1.0.0.md +93 -0
- package/licenses/PolyForm-NonCommercial-1.0.0.md +131 -0
- package/licenses/PolyForm-Small-Business-1.0.0.md +121 -0
- package/package.json +13 -2
- package/dist/font-values-CStAZ2d1.cjs +0 -2
- package/dist/history-chords-DAPEqcWx.js +0 -9130
- package/dist/history-chords-DFlFEtc_.cjs +0 -1
- /package/dist/{font-values.css → dev.css} +0 -0
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 a=require("./dev.utils-DiNE92pC.cjs");let s=require("@graphysdk/viz-engine/graph-config");var v=(e,n)=>{const r=e.appearance?.textStyle;return{...f(e.themeOverrides),...n&&r?l(r,n):void 0}},l=(e,n)=>{const r=i=>i===void 0?void 0:n.find(d=>d.id===i)?.fontFamily,o=r(e.body?.fontId),t=r(e.heading?.fontId);return{...o?{fontFamilyDefault:o}:void 0,...t?{fontFamilyHeading:t}:void 0}},f=e=>{if(e===void 0)return;const n={};for(const[r,o]of Object.entries(e))if(a.isMeasuredFontTokenKey(r)&&typeof o=="string"){const t=(0,s.parseFontShorthand)(o);if(t===null){c(r,o);continue}n[r]=t}else n[r]=o;return n},c=(e,n)=>{a.IS_DEV&&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`
|
|
@@ -123,30 +111,19 @@ declare const vars: {
|
|
|
123
111
|
trendPositiveColor: `var(--${string})`;
|
|
124
112
|
trendNeutralColor: `var(--${string})`;
|
|
125
113
|
defaultAnnotationArrowStroke: `var(--${string})`;
|
|
126
|
-
defaultAnnotationShapeStroke: `var(--${string})`;
|
|
127
114
|
defaultAnnotationShapeFill: `var(--${string})`;
|
|
128
115
|
arrowAnnotationStickerOutlineColor: `var(--${string})`;
|
|
129
116
|
arrowAnnotationStickerOutlineColorInverse: `var(--${string})`;
|
|
130
117
|
annotationFrameBorderColor: `var(--${string})`;
|
|
131
118
|
editMenuTriggerIconColor: `var(--${string})`;
|
|
132
119
|
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
120
|
gridLineWidth: `var(--${string})`;
|
|
140
|
-
gridLineDash: `var(--${string})`;
|
|
141
|
-
gridLineDotted: `var(--${string})`;
|
|
142
121
|
tooltipBorderRadius: `var(--${string})`;
|
|
143
|
-
tooltipBorderWidth: `var(--${string})`;
|
|
144
122
|
tooltipPaddingBlock: `var(--${string})`;
|
|
145
123
|
tooltipPaddingInline: `var(--${string})`;
|
|
146
124
|
tooltipRowGap: `var(--${string})`;
|
|
147
125
|
tooltipShadow: `var(--${string})`;
|
|
148
126
|
editorControlHeight: `var(--${string})`;
|
|
149
|
-
tickLabelOffset: `var(--${string})`;
|
|
150
127
|
legendItemGap: `var(--${string})`;
|
|
151
128
|
legendSwatchGap: `var(--${string})`;
|
|
152
129
|
legendSwatchWidth: `var(--${string})`;
|
|
@@ -192,10 +169,7 @@ declare const vars: {
|
|
|
192
169
|
toolbarSeparatorColor: `var(--${string})`;
|
|
193
170
|
tooltipBackground: `var(--${string})`;
|
|
194
171
|
tooltipBorderColor: `var(--${string})`;
|
|
195
|
-
tooltipHeadingTextColor: `var(--${string})`;
|
|
196
|
-
tooltipLabelTextColor: `var(--${string})`;
|
|
197
172
|
tooltipValueTextColor: `var(--${string})`;
|
|
198
|
-
tooltipPrimaryRowColor: `var(--${string})`;
|
|
199
173
|
hoverGuideLineColor: `var(--${string})`;
|
|
200
174
|
hoverGuideFillColor: `var(--${string})`;
|
|
201
175
|
fontFamilyDefault: `var(--${string})`;
|
|
@@ -227,15 +201,8 @@ declare const vars: {
|
|
|
227
201
|
fontLineHeightHeadingSm: `var(--${string})`;
|
|
228
202
|
fontLineHeightHeadingMd: `var(--${string})`;
|
|
229
203
|
fontLineHeightHeadingLg: `var(--${string})`;
|
|
230
|
-
fontTickLabel: `var(--${string})`;
|
|
231
|
-
fontAxisLabel: `var(--${string})`;
|
|
232
|
-
fontDataLabel: `var(--${string})`;
|
|
233
|
-
fontStackTotal: `var(--${string})`;
|
|
234
|
-
fontCategoryLabel: `var(--${string})`;
|
|
235
204
|
fontLegendLabel: `var(--${string})`;
|
|
236
205
|
fontSeriesLabel: `var(--${string})`;
|
|
237
|
-
fontTooltipLabel: `var(--${string})`;
|
|
238
|
-
fontTooltipHeading: `var(--${string})`;
|
|
239
206
|
fontTooltipFooter: `var(--${string})`;
|
|
240
207
|
fontJumboTooltipLabel: `var(--${string})`;
|
|
241
208
|
fontJumboTooltip: `var(--${string})`;
|
|
@@ -245,7 +212,6 @@ declare const vars: {
|
|
|
245
212
|
fontTooltipCaptionSmall: `var(--${string})`;
|
|
246
213
|
fontTrendTag: `var(--${string})`;
|
|
247
214
|
fontTrendTagSmall: `var(--${string})`;
|
|
248
|
-
fontGoalLineLabel: `var(--${string})`;
|
|
249
215
|
fontPieLabel: `var(--${string})`;
|
|
250
216
|
fontPieChartTotal: `var(--${string})`;
|
|
251
217
|
fontDifferenceArrowSmall: `var(--${string})`;
|
package/dist/graph-config.mjs
CHANGED
|
@@ -1,58 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as d, u as s } from "./dev.utils-Bvss_b2-.js";
|
|
2
|
+
import { parseFontShorthand as v } from "@graphysdk/viz-engine/graph-config";
|
|
3
|
+
var y = (e, n) => {
|
|
4
|
+
const r = e.appearance?.textStyle;
|
|
4
5
|
return {
|
|
5
|
-
...
|
|
6
|
-
...
|
|
6
|
+
...l(e.themeOverrides),
|
|
7
|
+
...n && r ? f(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
|
+
}, f = (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
|
+
}, l = (e) => {
|
|
16
|
+
if (e === void 0) return;
|
|
17
|
+
const n = {};
|
|
18
|
+
for (const [r, o] of Object.entries(e)) if (s(r) && typeof o == "string") {
|
|
19
|
+
const t = v(o);
|
|
46
20
|
if (t === null) {
|
|
47
|
-
|
|
21
|
+
m(r, o);
|
|
48
22
|
continue;
|
|
49
23
|
}
|
|
50
|
-
|
|
51
|
-
} else
|
|
52
|
-
return
|
|
53
|
-
},
|
|
54
|
-
|
|
24
|
+
n[r] = t;
|
|
25
|
+
} else n[r] = o;
|
|
26
|
+
return n;
|
|
27
|
+
}, m = (e, n) => {
|
|
28
|
+
d && 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
|
+
y as convertGraphConfigTheme
|
|
58
32
|
};
|