@tipp/ui 0.1.4 → 0.1.5
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/chart/chart.cjs +12 -2
- package/dist/chart/chart.cjs.map +1 -1
- package/dist/chart/chart.d.cts +3 -2
- package/dist/chart/chart.d.ts +3 -2
- package/dist/chart/chart.js +2 -2
- package/dist/chart/chart.js.map +1 -1
- package/package.json +4 -2
- package/src/chart/chart.tsx +3 -4
package/dist/chart/chart.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
10
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -29,6 +31,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
29
31
|
}
|
|
30
32
|
return to;
|
|
31
33
|
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
40
|
+
mod
|
|
41
|
+
));
|
|
32
42
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
43
|
|
|
34
44
|
// src/chart/chart.tsx
|
|
@@ -37,8 +47,8 @@ __export(chart_exports, {
|
|
|
37
47
|
Chart: () => Chart
|
|
38
48
|
});
|
|
39
49
|
module.exports = __toCommonJS(chart_exports);
|
|
40
|
-
var import_react_echarts = require("@kbox-labs/react-echarts");
|
|
41
50
|
var import_react_resize_detector = require("react-resize-detector");
|
|
51
|
+
var import_echarts_for_react = __toESM(require("echarts-for-react"), 1);
|
|
42
52
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
53
|
function Chart(props) {
|
|
44
54
|
const { width, height, ref } = (0, import_react_resize_detector.useResizeDetector)({
|
|
@@ -46,7 +56,7 @@ function Chart(props) {
|
|
|
46
56
|
refreshMode: "debounce",
|
|
47
57
|
refreshRate: 100
|
|
48
58
|
});
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_echarts_for_react.default, __spreadValues({ style: { width, height } }, props)) });
|
|
50
60
|
}
|
|
51
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
52
62
|
0 && (module.exports = {
|
package/dist/chart/chart.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chart/chart.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/chart/chart.tsx"],"sourcesContent":["import React from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport ReactECharts from 'echarts-for-react';\n\nexport type ChartProps = React.ComponentProps<typeof ReactECharts>;\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <ReactECharts style={{ width, height }} {...props} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mCAAkC;AAClC,+BAAyB;AAanB;AATC,SAAS,MAAM,OAAgC;AACpD,QAAM,EAAE,OAAO,QAAQ,IAAI,QAAI,gDAAkB;AAAA,IAC/C,cAAc;AAAA,IACd,aAAa;AAAA,IACb,aAAa;AAAA,EACf,CAAC;AAED,SACE,4CAAC,SAAI,KAAU,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GACpD,sDAAC,yBAAAA,SAAA,iBAAa,OAAO,EAAE,OAAO,OAAO,KAAO,MAAO,GACrD;AAEJ;","names":["ReactECharts"]}
|
package/dist/chart/chart.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactECharts from 'echarts-for-react';
|
|
2
3
|
|
|
3
|
-
type ChartProps =
|
|
4
|
+
type ChartProps = React.ComponentProps<typeof ReactECharts>;
|
|
4
5
|
declare function Chart(props: ChartProps): JSX.Element;
|
|
5
6
|
|
|
6
7
|
export { Chart, type ChartProps };
|
package/dist/chart/chart.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactECharts from 'echarts-for-react';
|
|
2
3
|
|
|
3
|
-
type ChartProps =
|
|
4
|
+
type ChartProps = React.ComponentProps<typeof ReactECharts>;
|
|
4
5
|
declare function Chart(props: ChartProps): JSX.Element;
|
|
5
6
|
|
|
6
7
|
export { Chart, type ChartProps };
|
package/dist/chart/chart.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-LGTAQGUA.js";
|
|
4
4
|
|
|
5
5
|
// src/chart/chart.tsx
|
|
6
|
-
import { EChart } from "@kbox-labs/react-echarts";
|
|
7
6
|
import { useResizeDetector } from "react-resize-detector";
|
|
7
|
+
import ReactECharts from "echarts-for-react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
function Chart(props) {
|
|
10
10
|
const { width, height, ref } = useResizeDetector({
|
|
@@ -12,7 +12,7 @@ function Chart(props) {
|
|
|
12
12
|
refreshMode: "debounce",
|
|
13
13
|
refreshRate: 100
|
|
14
14
|
});
|
|
15
|
-
return /* @__PURE__ */ jsx("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
15
|
+
return /* @__PURE__ */ jsx("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(ReactECharts, __spreadValues({ style: { width, height } }, props)) });
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
18
|
Chart
|
package/dist/chart/chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chart/chart.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/chart/chart.tsx"],"sourcesContent":["import React from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport ReactECharts from 'echarts-for-react';\n\nexport type ChartProps = React.ComponentProps<typeof ReactECharts>;\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <ReactECharts style={{ width, height }} {...props} />\n </div>\n );\n}\n"],"mappings":";;;;;AACA,SAAS,yBAAyB;AAClC,OAAO,kBAAkB;AAanB;AATC,SAAS,MAAM,OAAgC;AACpD,QAAM,EAAE,OAAO,QAAQ,IAAI,IAAI,kBAAkB;AAAA,IAC/C,cAAc;AAAA,IACd,aAAa;AAAA,IACb,aAAa;AAAA,EACf,CAAC;AAED,SACE,oBAAC,SAAI,KAAU,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GACpD,8BAAC,+BAAa,OAAO,EAAE,OAAO,OAAO,KAAO,MAAO,GACrD;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tipp/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -54,9 +54,11 @@
|
|
|
54
54
|
"dist/**"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@kbox-labs/react-echarts": "^1.2.0",
|
|
58
57
|
"@radix-ui/react-icons": "^1.3.0",
|
|
59
58
|
"@radix-ui/themes": "^3.1.1",
|
|
59
|
+
"echarts-for-react": "^3.0.2",
|
|
60
|
+
"i": "^0.3.7",
|
|
61
|
+
"npm": "^10.8.2",
|
|
60
62
|
"react": "^18.3.1",
|
|
61
63
|
"react-datepicker": "^7.3.0",
|
|
62
64
|
"react-dom": "^18.3.1",
|
package/src/chart/chart.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EChart } from '@kbox-labs/react-echarts';
|
|
3
|
-
import type { EChartProps } from '@kbox-labs/react-echarts';
|
|
4
2
|
import { useResizeDetector } from 'react-resize-detector';
|
|
3
|
+
import ReactECharts from 'echarts-for-react';
|
|
5
4
|
|
|
6
|
-
export type ChartProps =
|
|
5
|
+
export type ChartProps = React.ComponentProps<typeof ReactECharts>;
|
|
7
6
|
|
|
8
7
|
export function Chart(props: ChartProps): JSX.Element {
|
|
9
8
|
const { width, height, ref } = useResizeDetector({
|
|
@@ -14,7 +13,7 @@ export function Chart(props: ChartProps): JSX.Element {
|
|
|
14
13
|
|
|
15
14
|
return (
|
|
16
15
|
<div ref={ref} style={{ width: '100%', height: '100%' }}>
|
|
17
|
-
<
|
|
16
|
+
<ReactECharts style={{ width, height }} {...props} />
|
|
18
17
|
</div>
|
|
19
18
|
);
|
|
20
19
|
}
|