@opendata-ai/openchart-react 9.2.1 → 9.2.3
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.js +13 -10
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -41,8 +41,8 @@ import {
|
|
|
41
41
|
// src/ThemeContext.tsx
|
|
42
42
|
import { createContext, useContext } from "react";
|
|
43
43
|
import { jsx } from "react/jsx-runtime";
|
|
44
|
-
var VizThemeContext = createContext(void 0);
|
|
45
|
-
var VizDarkModeContext = createContext(void 0);
|
|
44
|
+
var VizThemeContext = /* @__PURE__ */ createContext(void 0);
|
|
45
|
+
var VizDarkModeContext = /* @__PURE__ */ createContext(void 0);
|
|
46
46
|
function useVizTheme() {
|
|
47
47
|
return useContext(VizThemeContext);
|
|
48
48
|
}
|
|
@@ -55,7 +55,7 @@ function VizThemeProvider({ theme, darkMode, children }) {
|
|
|
55
55
|
|
|
56
56
|
// src/BarList.tsx
|
|
57
57
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
58
|
-
var BarList = forwardRef(function BarList2({ spec, theme: themeProp, darkMode, onRowClick, onRowHover, className, style }, ref) {
|
|
58
|
+
var BarList = /* @__PURE__ */ forwardRef(function BarList2({ spec, theme: themeProp, darkMode, onRowClick, onRowHover, className, style }, ref) {
|
|
59
59
|
const contextTheme = useVizTheme();
|
|
60
60
|
const contextDarkMode = useVizDarkMode();
|
|
61
61
|
const theme = useMemo(() => mergeThemeConfig(contextTheme, themeProp), [contextTheme, themeProp]);
|
|
@@ -357,8 +357,11 @@ function ChartInner({
|
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
var Chart =
|
|
361
|
-
|
|
360
|
+
var Chart = /* @__PURE__ */ (() => {
|
|
361
|
+
const component = forwardRef2(ChartInner);
|
|
362
|
+
component.displayName = "Chart";
|
|
363
|
+
return component;
|
|
364
|
+
})();
|
|
362
365
|
|
|
363
366
|
// src/ChartStory.tsx
|
|
364
367
|
import {
|
|
@@ -583,7 +586,7 @@ import {
|
|
|
583
586
|
useRef as useRef5
|
|
584
587
|
} from "react";
|
|
585
588
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
586
|
-
var GeoMap = forwardRef3(function GeoMap2({
|
|
589
|
+
var GeoMap = /* @__PURE__ */ forwardRef3(function GeoMap2({
|
|
587
590
|
spec,
|
|
588
591
|
reader,
|
|
589
592
|
readerSelection,
|
|
@@ -716,7 +719,7 @@ function legendStructural(legend) {
|
|
|
716
719
|
if (legend === true || legend === void 0) return "true";
|
|
717
720
|
return JSON.stringify({ interactive: legend.interactive, counts: legend.counts });
|
|
718
721
|
}
|
|
719
|
-
var Graph = forwardRef4(function Graph2({
|
|
722
|
+
var Graph = /* @__PURE__ */ forwardRef4(function Graph2({
|
|
720
723
|
spec,
|
|
721
724
|
theme: themeProp,
|
|
722
725
|
darkMode,
|
|
@@ -1183,7 +1186,7 @@ import {
|
|
|
1183
1186
|
useRef as useRef10
|
|
1184
1187
|
} from "react";
|
|
1185
1188
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1186
|
-
var Race = forwardRef5(function Race2({ spec, theme, darkMode, className, style, autoResize, watermark, onWarn, onPeriod }, ref) {
|
|
1189
|
+
var Race = /* @__PURE__ */ forwardRef5(function Race2({ spec, theme, darkMode, className, style, autoResize, watermark, onWarn, onPeriod }, ref) {
|
|
1187
1190
|
const contextTheme = useVizTheme();
|
|
1188
1191
|
const contextDarkMode = useVizDarkMode();
|
|
1189
1192
|
const resolvedDarkMode = darkMode ?? contextDarkMode;
|
|
@@ -1272,7 +1275,7 @@ import {
|
|
|
1272
1275
|
useRef as useRef11
|
|
1273
1276
|
} from "react";
|
|
1274
1277
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1275
|
-
var Sankey = forwardRef6(function Sankey2({
|
|
1278
|
+
var Sankey = /* @__PURE__ */ forwardRef6(function Sankey2({
|
|
1276
1279
|
spec,
|
|
1277
1280
|
theme: themeProp,
|
|
1278
1281
|
darkMode,
|
|
@@ -1380,7 +1383,7 @@ import {
|
|
|
1380
1383
|
useRef as useRef12
|
|
1381
1384
|
} from "react";
|
|
1382
1385
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1383
|
-
var TileMap = forwardRef7(function TileMap2({ spec, theme: themeProp, darkMode, onTileClick, onTileHover, className, style }, ref) {
|
|
1386
|
+
var TileMap = /* @__PURE__ */ forwardRef7(function TileMap2({ spec, theme: themeProp, darkMode, onTileClick, onTileHover, className, style }, ref) {
|
|
1384
1387
|
const contextTheme = useVizTheme();
|
|
1385
1388
|
const contextDarkMode = useVizDarkMode();
|
|
1386
1389
|
const theme = useMemo8(() => mergeThemeConfig8(contextTheme, themeProp), [contextTheme, themeProp]);
|