@wonderflow/charts 12.8.0 → 12.9.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/components/bar-chart/bar-chart.d.ts +54 -0
- package/dist/components/bar-chart/bar-chart.d.ts.map +1 -0
- package/dist/components/bar-chart/bar-chart.js +56 -0
- package/dist/components/bar-chart/bar-chart.test.d.ts +2 -0
- package/dist/components/bar-chart/bar-chart.test.d.ts.map +1 -0
- package/dist/components/bar-chart/bar-chart.test.js +15 -0
- package/dist/components/bar-chart/index.d.ts +3 -0
- package/dist/components/bar-chart/index.d.ts.map +1 -0
- package/dist/components/bar-chart/index.js +16 -0
- package/dist/components/cartesian-base/cartesian-base-axis.js +15 -15
- package/dist/components/cartesian-base/cartesian-base-brush.d.ts +21 -0
- package/dist/components/cartesian-base/cartesian-base-brush.d.ts.map +1 -0
- package/dist/components/cartesian-base/cartesian-base-brush.js +59 -0
- package/dist/components/cartesian-base/cartesian-base-grid.d.ts +1 -1
- package/dist/components/cartesian-base/cartesian-base-grid.d.ts.map +1 -1
- package/dist/components/cartesian-base/cartesian-base-legend.d.ts +3 -2
- package/dist/components/cartesian-base/cartesian-base-legend.d.ts.map +1 -1
- package/dist/components/cartesian-base/cartesian-base-legend.js +9 -8
- package/dist/components/cartesian-base/cartesian-base.d.ts +26 -6
- package/dist/components/cartesian-base/cartesian-base.d.ts.map +1 -1
- package/dist/components/cartesian-base/cartesian-base.js +41 -76
- package/dist/components/cartesian-base/cartesian-base.module.css +1 -1
- package/dist/components/cartesian-base/cartesian-base.test.d.ts +1 -1
- package/dist/components/cartesian-base/cartesian-base.test.d.ts.map +1 -1
- package/dist/components/cartesian-base/cartesian-base.test.js +33 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/line-chart/line-chart.d.ts +59 -2
- package/dist/components/line-chart/line-chart.d.ts.map +1 -1
- package/dist/components/line-chart/line-chart.js +16 -41
- package/dist/components/loader/loader.test.js +3 -1
- package/dist/components/shapes/bars/bars.d.ts +3 -0
- package/dist/components/shapes/bars/bars.d.ts.map +1 -0
- package/dist/components/shapes/bars/bars.js +24 -0
- package/dist/components/shapes/bars/bars.module.css +1 -0
- package/dist/components/shapes/bars/bars.test.d.ts +2 -0
- package/dist/components/shapes/bars/bars.test.d.ts.map +1 -0
- package/dist/components/shapes/bars/bars.test.js +71 -0
- package/dist/components/shapes/bars/index.d.ts +2 -0
- package/dist/components/shapes/bars/index.d.ts.map +1 -0
- package/dist/components/shapes/bars/index.js +16 -0
- package/dist/components/shapes/index.d.ts +1 -0
- package/dist/components/shapes/index.d.ts.map +1 -1
- package/dist/components/shapes/index.js +1 -0
- package/dist/components/shapes/lines/lines-average.d.ts +3 -0
- package/dist/components/shapes/lines/lines-average.d.ts.map +1 -0
- package/dist/components/shapes/lines/lines-average.js +69 -0
- package/dist/components/shapes/lines/lines-marker-labels.d.ts.map +1 -1
- package/dist/components/shapes/lines/lines-marker-labels.js +14 -7
- package/dist/components/shapes/lines/lines-overlay.d.ts.map +1 -1
- package/dist/components/shapes/lines/lines-overlay.js +8 -5
- package/dist/components/shapes/lines/lines-series.d.ts.map +1 -1
- package/dist/components/shapes/lines/lines-series.js +10 -7
- package/dist/components/shapes/lines/lines-tooltip.d.ts.map +1 -1
- package/dist/components/shapes/lines/lines-tooltip.js +16 -20
- package/dist/components/shapes/lines/lines.d.ts.map +1 -1
- package/dist/components/shapes/lines/lines.js +18 -16
- package/dist/components/shapes/lines/lines.module.css +1 -1
- package/dist/components/shapes/lines/lines.test.js +13 -7
- package/dist/hooks/hooks.test.d.ts +2 -0
- package/dist/hooks/hooks.test.d.ts.map +1 -0
- package/dist/hooks/hooks.test.js +153 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +19 -0
- package/dist/hooks/useBrush.d.ts +74 -0
- package/dist/hooks/useBrush.d.ts.map +1 -0
- package/dist/hooks/useBrush.js +175 -0
- package/dist/hooks/useCartesian.d.ts +73 -0
- package/dist/hooks/useCartesian.d.ts.map +1 -0
- package/dist/hooks/useCartesian.js +143 -0
- package/dist/hooks/useLineChart.d.ts +39 -0
- package/dist/hooks/useLineChart.d.ts.map +1 -0
- package/dist/hooks/useLineChart.js +79 -0
- package/dist/hooks/useSSR.d.ts +5 -0
- package/dist/hooks/useSSR.d.ts.map +1 -0
- package/dist/hooks/useSSR.js +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/providers/cartesian.d.ts +1 -0
- package/dist/providers/cartesian.d.ts.map +1 -1
- package/dist/providers/cartesian.js +20 -18
- package/dist/providers/data.d.ts +3 -1
- package/dist/providers/data.d.ts.map +1 -1
- package/dist/providers/data.js +19 -17
- package/dist/providers/layout.d.ts.map +1 -1
- package/dist/providers/layout.js +17 -16
- package/dist/providers/style-config.d.ts.map +1 -1
- package/dist/providers/style-config.js +17 -16
- package/dist/providers/theme.d.ts.map +1 -1
- package/dist/providers/theme.js +16 -16
- package/dist/style-config/brush.d.ts +3 -0
- package/dist/style-config/brush.d.ts.map +1 -0
- package/dist/style-config/brush.js +28 -0
- package/dist/style-config/cartesian.d.ts.map +1 -1
- package/dist/style-config/cartesian.js +5 -3
- package/dist/style-config/index.d.ts +1 -0
- package/dist/style-config/index.d.ts.map +1 -1
- package/dist/style-config/index.js +2 -1
- package/dist/style-config/lines.d.ts.map +1 -1
- package/dist/style-config/lines.js +13 -1
- package/dist/style-config/themes.d.ts.map +1 -1
- package/dist/style-config/themes.js +33 -1
- package/dist/types/bar-chart.d.ts +49 -0
- package/dist/types/bar-chart.d.ts.map +1 -0
- package/dist/types/bar-chart.js +54 -0
- package/dist/types/brush.d.ts +14 -0
- package/dist/types/brush.d.ts.map +1 -0
- package/dist/types/brush.js +16 -0
- package/dist/types/cartesian.d.ts +4 -2
- package/dist/types/cartesian.d.ts.map +1 -1
- package/dist/types/cartesian.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/line-chart.d.ts +4 -1
- package/dist/types/line-chart.d.ts.map +1 -1
- package/dist/types/line-chart.js +1 -1
- package/dist/types/lines.d.ts +14 -0
- package/dist/types/lines.d.ts.map +1 -1
- package/dist/types/lines.js +1 -1
- package/dist/types/main.d.ts +9 -1
- package/dist/types/main.d.ts.map +1 -1
- package/dist/types/main.js +1 -1
- package/dist/types/themes.d.ts +16 -0
- package/dist/types/themes.d.ts.map +1 -1
- package/dist/types/themes.js +1 -1
- package/dist/types/viewport.d.ts +4 -4
- package/dist/types/viewport.d.ts.map +1 -1
- package/dist/types/viewport.js +1 -1
- package/dist/utils/axis.js +14 -14
- package/dist/utils/data.d.ts +10 -7
- package/dist/utils/data.d.ts.map +1 -1
- package/dist/utils/data.js +26 -1
- package/dist/utils/data.test.js +109 -1
- package/dist/utils/lines.d.ts +3 -3
- package/dist/utils/lines.d.ts.map +1 -1
- package/dist/utils/lines.js +3 -3
- package/dist/utils/lines.test.js +6 -6
- package/dist/utils/metadata.d.ts +7 -4
- package/dist/utils/metadata.d.ts.map +1 -1
- package/dist/utils/metadata.js +6 -2
- package/dist/utils/metadata.test.js +8 -8
- package/dist/utils/viewport.d.ts +3 -1
- package/dist/utils/viewport.d.ts.map +1 -1
- package/package.json +15 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/providers/data.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/providers/data.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;CACjD,CAAC;AAEF,oBAAY,iBAAiB,GAAG,gBAAgB,CAAA;AAQhD,eAAO,MAAM,WAAW,2CAA+C,CAAC;AAExE,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAStD,CAAC;AAEF,eAAO,MAAM,cAAc,wBAS1B,CAAC"}
|
package/dist/providers/data.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
3
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
const defaultData = {
|
|
19
19
|
data: [],
|
|
20
|
+
filteredData: [],
|
|
20
21
|
metadata: undefined,
|
|
21
22
|
};
|
|
22
23
|
export const DataContext = createContext(defaultData);
|
|
23
|
-
export const DataProvider = ({ children, data, metadata, }) => (_jsx(DataContext.Provider, { value: { data, metadata }, children: children }));
|
|
24
|
+
export const DataProvider = ({ children, data, filteredData, metadata, }) => (_jsx(DataContext.Provider, { value: { data, metadata, filteredData }, children: children }));
|
|
24
25
|
export const useDataContext = () => {
|
|
25
26
|
const context = useContext(DataContext);
|
|
26
27
|
if (!context) {
|
|
27
|
-
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.error('useDataContext() must be used inside DataProvider to access context data.');
|
|
28
30
|
}
|
|
29
|
-
return context;
|
|
31
|
+
return context ?? defaultData;
|
|
30
32
|
};
|
|
31
33
|
DataContext.displayName = 'DataContext';
|
|
32
34
|
DataProvider.displayName = 'DataProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/providers/layout.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,kBAAkB,GAAG,oBAAoB,CAAC;AAEtD,oBAAY,mBAAmB,GAAG;IAChC,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAA;AAID,eAAO,MAAM,aAAa,+CAAmD,CAAC;AAE9E,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,mBAAmB,CAO1D,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/providers/layout.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,kBAAkB,GAAG,oBAAoB,CAAC;AAEtD,oBAAY,mBAAmB,GAAG;IAChC,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAA;AAID,eAAO,MAAM,aAAa,+CAAmD,CAAC;AAE9E,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,mBAAmB,CAO1D,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;CAa5B,CAAC"}
|
package/dist/providers/layout.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
3
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
import { CartesianChartLayout } from '../types';
|
|
19
19
|
const defaultLayout = CartesianChartLayout.HORIZONTAL;
|
|
@@ -22,10 +22,11 @@ export const LayoutProvider = ({ children, layout, }) => (_jsx(LayoutContext.Pro
|
|
|
22
22
|
export const useLayoutContext = () => {
|
|
23
23
|
const context = useContext(LayoutContext);
|
|
24
24
|
if (!context) {
|
|
25
|
-
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.error('useLayoutContext() must be used inside LayoutProvider to access context data.');
|
|
26
27
|
}
|
|
27
28
|
return {
|
|
28
|
-
context,
|
|
29
|
+
context: context ?? defaultLayout,
|
|
29
30
|
isHorizontal: context === CartesianChartLayout.HORIZONTAL,
|
|
30
31
|
isVertical: context === CartesianChartLayout.VERTICAL,
|
|
31
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-config.d.ts","sourceRoot":"","sources":["../../src/providers/style-config.tsx"],"names":[],"mappings":";AAqBA,OAAO,EACL,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,oBAAY,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D,oBAAY,wBAAwB,GAAG;IACrC,WAAW,EAAE,oBAAoB,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAA;AAED,eAAO,MAAM,kBAAkB,+CAA+D,CAAC;AAE/F,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,wBAAwB,CAOpE,CAAC;AAEF,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"style-config.d.ts","sourceRoot":"","sources":["../../src/providers/style-config.tsx"],"names":[],"mappings":";AAqBA,OAAO,EACL,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,oBAAY,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D,oBAAY,wBAAwB,GAAG;IACrC,WAAW,EAAE,oBAAoB,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAA;AAED,eAAO,MAAM,kBAAkB,+CAA+D,CAAC;AAE/F,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,wBAAwB,CAOpE,CAAC;AAEF,eAAO,MAAM,qBAAqB,4BASjC,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
3
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
import { cartesianStyleConfig, } from '../style-config';
|
|
19
19
|
export const StyleConfigContext = createContext(cartesianStyleConfig);
|
|
@@ -21,9 +21,10 @@ export const StyleConfigProvider = ({ styleConfig, children, }) => (_jsx(StyleCo
|
|
|
21
21
|
export const useStyleConfigContext = () => {
|
|
22
22
|
const context = useContext(StyleConfigContext);
|
|
23
23
|
if (!context) {
|
|
24
|
-
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
25
|
+
console.error('useStyleConfigContext() must be used inside StyleConfigProvider to access context data.');
|
|
25
26
|
}
|
|
26
|
-
return context;
|
|
27
|
+
return context ?? cartesianStyleConfig;
|
|
27
28
|
};
|
|
28
29
|
StyleConfigContext.displayName = 'StyleConfigContext';
|
|
29
30
|
StyleConfigProvider.displayName = 'StyleConfigProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/providers/theme.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,oBAAY,iBAAiB,GAAG,aAAa,CAAC;AAE9C,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE,iBAAiB,CAAC;CAC1B,CAAA;AAID,eAAO,MAAM,YAAY,wCAAiD,CAAC;AAE3E,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,kBAAkB,CAOxD,CAAC;AAEF,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/providers/theme.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,oBAAY,iBAAiB,GAAG,aAAa,CAAC;AAE9C,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE,iBAAiB,CAAC;CAC1B,CAAA;AAID,eAAO,MAAM,YAAY,wCAAiD,CAAC;AAE3E,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,kBAAkB,CAOxD,CAAC;AAEF,eAAO,MAAM,eAAe,qBAQ3B,CAAC"}
|
package/dist/providers/theme.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
3
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
const defaultTheme = 'light';
|
|
19
19
|
export const ThemeContext = createContext(defaultTheme);
|
|
@@ -21,9 +21,9 @@ export const ThemeProvider = ({ children, theme, }) => (_jsx(ThemeContext.Provid
|
|
|
21
21
|
export const useThemeContext = () => {
|
|
22
22
|
const context = useContext(ThemeContext);
|
|
23
23
|
if (!context) {
|
|
24
|
-
|
|
24
|
+
console.error('useThemeContext() must be used inside ThemeProvider to access context data.');
|
|
25
25
|
}
|
|
26
|
-
return context;
|
|
26
|
+
return context ?? defaultTheme;
|
|
27
27
|
};
|
|
28
28
|
ThemeContext.displayName = 'ThemeContext';
|
|
29
29
|
ThemeProvider.displayName = 'ThemeProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brush.d.ts","sourceRoot":"","sources":["../../src/style-config/brush.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,eAAO,MAAM,gBAAgB,EAAE,uBAY9B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const brushStyleConfig = {
|
|
17
|
+
handle: {
|
|
18
|
+
strokeWidth: 1,
|
|
19
|
+
},
|
|
20
|
+
selectedBox: {
|
|
21
|
+
fillOpacity: 0.2,
|
|
22
|
+
strokeWidth: 1,
|
|
23
|
+
strokeOpacity: 0.8,
|
|
24
|
+
},
|
|
25
|
+
pattern: {
|
|
26
|
+
strokeWidth: 1,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesian.d.ts","sourceRoot":"","sources":["../../src/style-config/cartesian.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cartesian.d.ts","sourceRoot":"","sources":["../../src/style-config/cartesian.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAU1D,eAAO,MAAM,oBAAoB,EAAE,oBASlC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2023 Wonderflow Design Team
|
|
2
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { axisStyleConfig } from './axis';
|
|
17
|
+
import { brushStyleConfig } from './brush';
|
|
17
18
|
import { gridStyleConfig } from './grid';
|
|
18
19
|
import { headingsStyleConfig } from './headings';
|
|
19
20
|
import { legendStyleConfig } from './legend';
|
|
@@ -21,11 +22,12 @@ import { linesStyleConfig } from './lines';
|
|
|
21
22
|
import { themes } from './themes';
|
|
22
23
|
import { viewportStyleConfig } from './viewport';
|
|
23
24
|
export const cartesianStyleConfig = {
|
|
25
|
+
axis: axisStyleConfig,
|
|
26
|
+
brush: brushStyleConfig,
|
|
24
27
|
headings: headingsStyleConfig,
|
|
25
28
|
grid: gridStyleConfig,
|
|
26
|
-
axis: axisStyleConfig,
|
|
27
29
|
legend: legendStyleConfig,
|
|
28
30
|
lines: linesStyleConfig,
|
|
29
|
-
viewport: viewportStyleConfig,
|
|
30
31
|
themes,
|
|
32
|
+
viewport: viewportStyleConfig,
|
|
31
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style-config/index.ts"],"names":[],"mappings":"AAgBA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style-config/index.ts"],"names":[],"mappings":"AAgBA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2023 Wonderflow Design Team
|
|
2
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export * from './axis';
|
|
17
|
+
export * from './brush';
|
|
17
18
|
export * from './cartesian';
|
|
18
19
|
export * from './colors';
|
|
19
20
|
export * from './grid';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../src/style-config/lines.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../src/style-config/lines.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,gBAAgB,EAAE,gBAmC9B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2023 Wonderflow Design Team
|
|
2
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -36,4 +36,16 @@ export const linesStyleConfig = {
|
|
|
36
36
|
strokeWidth: 1,
|
|
37
37
|
strokeOpacity: 1,
|
|
38
38
|
},
|
|
39
|
+
average: {
|
|
40
|
+
maxLabelWidth: 200,
|
|
41
|
+
opacity: 0.8,
|
|
42
|
+
pointerEvents: 'none',
|
|
43
|
+
strokeDasharray: '5,2',
|
|
44
|
+
strokeWidth: 1,
|
|
45
|
+
titleFontSize: 12,
|
|
46
|
+
titleFontWeight: 400,
|
|
47
|
+
backgroundPadding: 4,
|
|
48
|
+
backgroundProps: { rx: 2, ry: 2 },
|
|
49
|
+
titleProps: { dy: -1 },
|
|
50
|
+
},
|
|
39
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/style-config/themes.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGzC,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/style-config/themes.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGzC,eAAO,MAAM,UAAU,EAAE,KAgDxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAgDvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAGpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2023 Wonderflow Design Team
|
|
2
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -45,6 +45,22 @@ export const themeLight = {
|
|
|
45
45
|
},
|
|
46
46
|
lines: {
|
|
47
47
|
noData: colorPaletteNeutrals.dimmed1,
|
|
48
|
+
average: colorPaletteNeutrals.dimmed8,
|
|
49
|
+
averageFontColor: colorPaletteNeutrals.dimmed0,
|
|
50
|
+
},
|
|
51
|
+
brush: {
|
|
52
|
+
handle: {
|
|
53
|
+
fill: colorPaletteNeutrals.dimmed0,
|
|
54
|
+
stroke: colorPaletteNeutrals.dimmed4,
|
|
55
|
+
},
|
|
56
|
+
selectedBox: {
|
|
57
|
+
fill: colorPaletteNeutrals.dimmed7,
|
|
58
|
+
stroke: colorPaletteNeutrals.dimmed4,
|
|
59
|
+
},
|
|
60
|
+
pattern: {
|
|
61
|
+
fill: 'none',
|
|
62
|
+
stroke: colorPaletteNeutrals.dimmed4,
|
|
63
|
+
},
|
|
48
64
|
},
|
|
49
65
|
};
|
|
50
66
|
export const themeDark = {
|
|
@@ -78,6 +94,22 @@ export const themeDark = {
|
|
|
78
94
|
},
|
|
79
95
|
lines: {
|
|
80
96
|
noData: colorPaletteNeutrals.dimmed7,
|
|
97
|
+
average: colorPaletteNeutrals.dimmed0,
|
|
98
|
+
averageFontColor: colorPaletteNeutrals.dimmed8,
|
|
99
|
+
},
|
|
100
|
+
brush: {
|
|
101
|
+
handle: {
|
|
102
|
+
fill: colorPaletteNeutrals.dimmed0,
|
|
103
|
+
stroke: colorPaletteNeutrals.dimmed4,
|
|
104
|
+
},
|
|
105
|
+
selectedBox: {
|
|
106
|
+
fill: colorPaletteNeutrals.dimmed2,
|
|
107
|
+
stroke: colorPaletteNeutrals.dimmed4,
|
|
108
|
+
},
|
|
109
|
+
pattern: {
|
|
110
|
+
fill: 'none',
|
|
111
|
+
stroke: colorPaletteNeutrals.dimmed4,
|
|
112
|
+
},
|
|
81
113
|
},
|
|
82
114
|
};
|
|
83
115
|
export const themes = {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AxisProps } from './cartesian';
|
|
3
|
+
import { Charts, SortingType } from './main';
|
|
4
|
+
export declare type BarChartIndex = Partial<AxisProps> & {
|
|
5
|
+
dataKey: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type BarChartOverlay = Partial<AxisProps> & {
|
|
8
|
+
dataKey: string;
|
|
9
|
+
style?: BarStyle;
|
|
10
|
+
rename?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type BarChartSeries = Partial<AxisProps> & {
|
|
13
|
+
dataKey: string[];
|
|
14
|
+
groupBy?: string[];
|
|
15
|
+
style?: Array<BarStyle | undefined>;
|
|
16
|
+
rename?: (...args: any) => string;
|
|
17
|
+
};
|
|
18
|
+
export declare type BarChartTooltip = {
|
|
19
|
+
extraSeriesData?: (...args: any) => string;
|
|
20
|
+
extraOverlayData?: (...args: any) => string;
|
|
21
|
+
extraContent?: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
export declare type BarStyle = {
|
|
24
|
+
fill?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare type BarChartMetadata = {
|
|
27
|
+
type: Charts;
|
|
28
|
+
isStacked: boolean;
|
|
29
|
+
sortBy: SortingType;
|
|
30
|
+
index: string;
|
|
31
|
+
series: {
|
|
32
|
+
dataKey: string[];
|
|
33
|
+
names: string[];
|
|
34
|
+
colors: Array<string | undefined>;
|
|
35
|
+
style?: Array<BarStyle | undefined>;
|
|
36
|
+
};
|
|
37
|
+
overlay: {
|
|
38
|
+
dataKey?: string;
|
|
39
|
+
name: string;
|
|
40
|
+
color: string;
|
|
41
|
+
style?: BarStyle;
|
|
42
|
+
};
|
|
43
|
+
tooltip?: BarChartTooltip;
|
|
44
|
+
hideMissingDataConnection?: boolean;
|
|
45
|
+
showMarker?: boolean;
|
|
46
|
+
showMarkerLabel?: boolean;
|
|
47
|
+
hidePadding?: boolean;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=bar-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bar-chart.d.ts","sourceRoot":"","sources":["../../src/types/bar-chart.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE7C,oBAAY,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG;IAChD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC;CACnC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,eAAe,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC;IAC3C,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC;IAC5C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAA;AAED,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QAClC,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;KACrC,CAAC;IACF,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,QAAQ,CAAC;KAClB,CAAC;IACF,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Wonderflow Design Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
17
|
+
// const dataStructure = [
|
|
18
|
+
// {
|
|
19
|
+
// product: 'productA',
|
|
20
|
+
// continents: [
|
|
21
|
+
// {
|
|
22
|
+
// name: 'europe',
|
|
23
|
+
// value: 100,
|
|
24
|
+
// countries: [
|
|
25
|
+
// {
|
|
26
|
+
// name: 'italy',
|
|
27
|
+
// value: 100,
|
|
28
|
+
// },
|
|
29
|
+
// {
|
|
30
|
+
// name: 'france',
|
|
31
|
+
// value: 100,
|
|
32
|
+
// },
|
|
33
|
+
// ],
|
|
34
|
+
// },
|
|
35
|
+
// {
|
|
36
|
+
// name: 'africa',
|
|
37
|
+
// value: 100,
|
|
38
|
+
// countries: [
|
|
39
|
+
// {
|
|
40
|
+
// name: 'algeria',
|
|
41
|
+
// value: 100,
|
|
42
|
+
// },
|
|
43
|
+
// {
|
|
44
|
+
// name: 'tunisia',
|
|
45
|
+
// value: 100,
|
|
46
|
+
// },
|
|
47
|
+
// ],
|
|
48
|
+
// },
|
|
49
|
+
// ],
|
|
50
|
+
// },
|
|
51
|
+
// ];
|
|
52
|
+
// const index = dataStructure[0].product; // 'product'
|
|
53
|
+
// const series = dataStructure[0].continents[0].value; // 'continents[x].value'
|
|
54
|
+
// const groupBy = dataStructure[0].continents[0].name; // 'continents[x].name'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare type BrushElementStyleConfig = {
|
|
2
|
+
handle: {
|
|
3
|
+
strokeWidth: number;
|
|
4
|
+
};
|
|
5
|
+
selectedBox: {
|
|
6
|
+
fillOpacity: number;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
strokeOpacity: number;
|
|
9
|
+
};
|
|
10
|
+
pattern: {
|
|
11
|
+
strokeWidth: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=brush.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brush.d.ts","sourceRoot":"","sources":["../../src/types/brush.ts"],"names":[],"mappings":"AAgBA,oBAAY,uBAAuB,GAAG;IACpC,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,WAAW,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023-2024 Wonderflow Design Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TickFormatter } from '@visx/axis';
|
|
2
2
|
import { NumberValue } from '@visx/vendor/d3-scale';
|
|
3
3
|
import { AxisElementsStyleConfig, AxisOrientation } from './axis';
|
|
4
|
+
import { BrushElementStyleConfig } from './brush';
|
|
4
5
|
import { GridStyleConfig } from './grid';
|
|
5
6
|
import { HeadingsStyleConfig } from './headings';
|
|
6
7
|
import { LegendStyleConfig } from './legend';
|
|
@@ -47,12 +48,13 @@ export declare type AxisProps = {
|
|
|
47
48
|
otherProps?: Record<string, unknown>;
|
|
48
49
|
};
|
|
49
50
|
export declare type CartesianStyleConfig = {
|
|
51
|
+
axis: AxisElementsStyleConfig;
|
|
52
|
+
brush: BrushElementStyleConfig;
|
|
50
53
|
headings: HeadingsStyleConfig;
|
|
51
54
|
grid: GridStyleConfig;
|
|
52
|
-
axis: AxisElementsStyleConfig;
|
|
53
55
|
lines: LinesStyleConfig;
|
|
54
56
|
legend: LegendStyleConfig;
|
|
55
|
-
viewport: ViewportStyleConfig;
|
|
56
57
|
themes: Themes;
|
|
58
|
+
viewport: ViewportStyleConfig;
|
|
57
59
|
};
|
|
58
60
|
//# sourceMappingURL=cartesian.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesian.d.ts","sourceRoot":"","sources":["../../src/types/cartesian.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,oBAAY,oBAAoB;IAC9B,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED,oBAAY,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,oBAAY,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,CAAA;AAED,oBAAY,SAAS,GAAG;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,aAAa,CAAC,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,CAAA;AAED,oBAAY,oBAAoB,GAAG;IACjC,
|
|
1
|
+
{"version":3,"file":"cartesian.d.ts","sourceRoot":"","sources":["../../src/types/cartesian.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,oBAAY,oBAAoB;IAC9B,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED,oBAAY,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,oBAAY,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,CAAA;AAED,oBAAY,SAAS,GAAG;IACtB,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,aAAa,CAAC,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,CAAA;AAED,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,KAAK,EAAE,uBAAuB,CAAC;IAC/B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,mBAAmB,CAAC;CAC/B,CAAA"}
|
package/dist/types/cartesian.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAgBA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAgBA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|