@opendata-ai/openchart-core 7.0.4 → 7.1.0
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/index.d.ts +3 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/styles/tokens.css +6 -3
- package/src/theme/__tests__/dark-mode.test.ts +14 -4
- package/src/theme/__tests__/defaults.test.ts +2 -2
- package/src/theme/defaults.ts +3 -3
- package/src/theme/resolve.ts +3 -0
- package/src/types/layout.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -2873,8 +2873,11 @@ interface EndpointLabelEntry {
|
|
|
2873
2873
|
showLeader: boolean;
|
|
2874
2874
|
/** Optional anchor circle drawn on the line at the chart's right edge. */
|
|
2875
2875
|
marker?: {
|
|
2876
|
+
/** Rendered cx (offset right by radius so the line terminates at the circle edge). */
|
|
2876
2877
|
x: number;
|
|
2877
2878
|
y: number;
|
|
2879
|
+
/** Original data point x (used to suppress the underlying point mark). */
|
|
2880
|
+
dataX: number;
|
|
2878
2881
|
fill: string;
|
|
2879
2882
|
stroke: string;
|
|
2880
2883
|
strokeWidth: number;
|
package/dist/index.js
CHANGED
|
@@ -911,7 +911,7 @@ var DEFAULT_THEME = {
|
|
|
911
911
|
categorical: [...CATEGORICAL_PALETTE],
|
|
912
912
|
sequential: SEQUENTIAL_PALETTES,
|
|
913
913
|
diverging: DIVERGING_PALETTES,
|
|
914
|
-
background: "
|
|
914
|
+
background: "transparent",
|
|
915
915
|
text: "#09090b",
|
|
916
916
|
gridline: "rgba(0,0,0,0.1)",
|
|
917
917
|
// Used for axis lines/ticks AND axis tick label fill. Must clear WCAG AA
|
|
@@ -934,8 +934,8 @@ var DEFAULT_THEME = {
|
|
|
934
934
|
axisTick: 11
|
|
935
935
|
},
|
|
936
936
|
weights: {
|
|
937
|
-
normal:
|
|
938
|
-
medium:
|
|
937
|
+
normal: 450,
|
|
938
|
+
medium: 550,
|
|
939
939
|
semibold: 590,
|
|
940
940
|
bold: 700
|
|
941
941
|
}
|
|
@@ -1046,6 +1046,7 @@ function relativeLuminance2(hex2) {
|
|
|
1046
1046
|
return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
|
|
1047
1047
|
}
|
|
1048
1048
|
function isDarkBackground(hex2) {
|
|
1049
|
+
if (hex2 === "transparent") return false;
|
|
1049
1050
|
return relativeLuminance2(hex2) < 0.2;
|
|
1050
1051
|
}
|
|
1051
1052
|
function adaptChromeForDarkBg(theme, textColor) {
|