@orderly.network/chart 2.0.0-alpha.2 → 2.0.1-alpha.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.mts +2 -5
- package/dist/index.d.ts +2 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import { PluginCreator } from 'tailwindcss/types/config';
|
|
3
3
|
|
|
4
4
|
type PnLChartDataItem = {
|
|
5
5
|
date: string;
|
|
@@ -58,9 +58,6 @@ type VolChartProps = {
|
|
|
58
58
|
};
|
|
59
59
|
declare const VolBarChart: (props: VolChartProps) => react_jsx_runtime.JSX.Element;
|
|
60
60
|
|
|
61
|
-
declare const chartPlugin:
|
|
62
|
-
handler: tailwindcss_types_config.PluginCreator;
|
|
63
|
-
config?: Partial<tailwindcss_types_config.Config> | undefined;
|
|
64
|
-
};
|
|
61
|
+
declare const chartPlugin: PluginCreator;
|
|
65
62
|
|
|
66
63
|
export { AssetLineChart, PnLBarChart, PnlLineChart, VolBarChart, type VolChartDataItem, chartPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import { PluginCreator } from 'tailwindcss/types/config';
|
|
3
3
|
|
|
4
4
|
type PnLChartDataItem = {
|
|
5
5
|
date: string;
|
|
@@ -58,9 +58,6 @@ type VolChartProps = {
|
|
|
58
58
|
};
|
|
59
59
|
declare const VolBarChart: (props: VolChartProps) => react_jsx_runtime.JSX.Element;
|
|
60
60
|
|
|
61
|
-
declare const chartPlugin:
|
|
62
|
-
handler: tailwindcss_types_config.PluginCreator;
|
|
63
|
-
config?: Partial<tailwindcss_types_config.Config> | undefined;
|
|
64
|
-
};
|
|
61
|
+
declare const chartPlugin: PluginCreator;
|
|
65
62
|
|
|
66
63
|
export { AssetLineChart, PnLBarChart, PnlLineChart, VolBarChart, type VolChartDataItem, chartPlugin };
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tailwindcss@3.4.12_ts-node@10.9.2_@swc+core@1.7.26_@swc+helpers@0.5.13__@types+node@22.5.5_typescript@5.2.2_/node_modules/tailwindcss/lib/util/createPlugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.12_ts-node@10.9.2_@swc+core@1.7.26_@swc+helpers@0.5.13__@types+node@22.5.5_typescript@5.2.2_/node_modules/tailwindcss/lib/public/create-plugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.12_ts-node@10.9.2_@swc+core@1.7.26_@swc+helpers@0.5.13__@types+node@22.5.5_typescript@5.2.2_/node_modules/tailwindcss/plugin.js","../src/orderly/useColors.ts","../src/utils/theme.ts","../src/orderly/pnlBar.tsx","../src/orderly/customTooltip.tsx","../src/utils/yTickFormatter.ts","../src/orderly/xAxisLabel.tsx","../src/orderly/pnlLine.tsx","../src/orderly/assetLine.tsx","../src/orderly/volBar.tsx","../src/tailwindcss/theme.ts"],"names":["require_createPlugin","__commonJSMin","exports","_default","createPlugin","plugin","config","pluginFunction","configFunction","optionsFunction","options","require_create_plugin","_createPlugin","_interop_require_default","obj","require_plugin","module","getThemeColors","root","computedStyle","convertToRGB","color","useColors","colors","useMemo","themeColors","OrderlyChartTooltip","props","label","value","prefix","unit","coloring","dp","rm","jsxs","Box","Flex","jsx","Text","tickFormatter","absValue","formatted","numberToHumanStyle","RoundedRectangle","fill","x","y","width","height","absHeight","XAxisLabel","stroke","payload","index","containerWidth","_x","CustomizedCross","Cross","CustomTooltip","active","todayStr","useRef","PnLBarChart","invisible","widthRef","ResponsiveContainer","cn","BarChart","Tooltip","CartesianGrid","ReferenceLine","Bar","entry","Cell","YAxis","XAxis","PnlLineChart","dataTransfer","data","series","acc","item","LineChart","Line","AssetLineChart","opacity","tooltip","VolBarChart","isEmpty","b","maxVolume","decimal","number","decimalPlaces","abbreviations","toFixedWithoutRounding","num","fix","numStr","decimalIndex","cutoffIndex","import_plugin","chartPlugin","addComponents","addBase"],"mappings":";;;;;;;;sgBAAA,IAAAA,CAAAA,CAAAC,CAAAC,CAAAA,CAAAA,EAAA,CACA,MAAA,CAAO,eAAeA,CAAS,CAAA,YAAA,CAAc,CACzC,KAAA,CAAO,CACX,CAAA,CAAC,EACD,MAAO,CAAA,cAAA,CAAeA,CAAS,CAAA,SAAA,CAAW,CACtC,UAAA,CAAY,CACZ,CAAA,CAAA,GAAA,CAAK,UAAW,CACZ,OAAOC,EACX,CACJ,CAAC,EACD,SAASC,CAAAA,CAAaC,CAAQC,CAAAA,CAAAA,CAAQ,CAClC,OAAO,CACH,OAASD,CAAAA,CAAAA,CACT,MAAAC,CAAAA,CACJ,CACJ,CACAF,EAAa,WAAc,CAAA,SAASG,CAAgBC,CAAAA,CAAAA,CAAiB,KAAK,EAAK,CAAA,CAAA,CAC3E,IAAMC,CAAAA,CAAkB,SAASC,CAAAA,CAAS,CACtC,OAAO,CACH,SAAWA,CAAAA,CAAAA,CACX,OAASH,CAAAA,CAAAA,CAAeG,CAAO,CAAA,CAC/B,OAAQF,CAAeE,CAAAA,CAAO,CAClC,CACJ,CACA,CAAA,OAAAD,EAAgB,mBAAsB,CAAA,CAAA,CAAA,CAGtCA,CAAgB,CAAA,gBAAA,CAAmBF,CACnCE,CAAAA,CAAAA,CAAgB,gBAAmBD,CAAAA,CAAAA,CAC5BC,CACX,CAAA,CACA,IAAMN,EAAAA,CAAWC,EC/BjB,CAAA,CAAA,CAAA,IAAAO,EAAAV,CAAAC,CAAAA,CAAAA,EAAA,CACA,MAAA,CAAO,cAAeA,CAAAA,CAAAA,CAAS,YAAc,CAAA,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B,EACA,+CAAiD,CAAA,CAC/C,aAAe,CAAA,KACjB,CACF,CACF,CACA,CAAA,CACE,aAAe,CAAA,CAAA,CACjB,CACF,EACF,CAAC","file":"index.js","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import { useMemo } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\n\nexport const useColors = (colors?: { profit: string; loss: string }) => {\n const _colors = useMemo(() => {\n const themeColors = getThemeColors();\n return {\n profit: colors?.profit || themeColors.profit,\n loss: colors?.loss || themeColors.loss,\n primary: themeColors.primary,\n primaryLight: themeColors.primaryLight,\n };\n }, [colors]);\n\n return _colors;\n};\n","export const getThemeColors = () => {\n const root = document.documentElement;\n const computedStyle = getComputedStyle(root);\n\n const colors = {\n primary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary\")\n ),\n primaryLight: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary-light\")\n ),\n secondary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-secondary\")\n ),\n success: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-success\")\n ),\n warning: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-warning\")\n ),\n danger: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-danger\")),\n info: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-info\")),\n loss: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-loss\")\n ),\n profit: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-profit\")\n ),\n };\n\n return colors;\n};\n\nconst convertToRGB = (color: string) => {\n return `rgb(${color.split(\" \").join(\",\")})`;\n};\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\nimport { Flex } from \"@orderly.network/ui\";\n// import { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnLChartDataItem = {\n date: string;\n pnl: number;\n};\n\nexport type PnLChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: PnLChartDataItem[];\n invisible?: boolean;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height } = props;\n\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n />\n );\n};\n\nexport const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index, width, containerWidth } = props;\n\n const _x =\n index === 0\n ? 48\n : containerWidth > 0\n ? containerWidth - 10\n : width + payload.offset;\n\n return (\n <g transform={`translate(${_x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor={index === 0 ? \"start\" : \"end\"}\n // textAnchor={\"start\"}\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, stroke, fill } = props;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nexport const PnLBarChart = (props: PnLChartProps) => {\n const { invisible } = props;\n const colors = useColors(props.colors);\n const widthRef = useRef(0);\n\n return (\n // @ts-ignore\n <ResponsiveContainer\n className={cn(invisible && \"chart-invisible\")}\n onResize={(width, height) => {\n // console.log(\"width\", width, height);\n widthRef.current = width;\n }}\n >\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -10, top: 10, right: 10, bottom: 30 }}\n >\n {!invisible && (\n // @ts-ignore\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip />}\n />\n )}\n\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n <ReferenceLine y={0} stroke=\"rgba(0,0,0,0.04)\" />\n\n {!invisible && (\n // @ts-ignore\n <Bar dataKey=\"pnl\" shape={<RoundedRectangle />}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.pnl > 0 ? colors.profit : colors.loss}\n />\n );\n })}\n </Bar>\n )}\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickFormatter={(value) => tickFormatter(value)}\n tickLine={false}\n axisLine={false}\n dataKey={\"pnl\"}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel containerWidth={widthRef.current} />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n />\n </BarChart>\n </ResponsiveContainer>\n );\n};\n","import { Box, Flex, Text } from \"@orderly.network/ui\";\n\nexport const OrderlyChartTooltip = (props: {\n label: string;\n value: string | number;\n unit?: string;\n prefix?: React.ReactNode;\n titleClassName?: string;\n coloring?: boolean;\n dp?: number;\n rm?: number;\n}) => {\n const {\n label,\n value,\n prefix,\n unit = \"USDC\",\n coloring = false,\n dp,\n rm,\n } = props;\n return (\n <Box intensity={600} p={3} r=\"md\">\n <Flex direction={\"row\"} className={props.titleClassName}>\n {prefix}\n <Text.numeral\n unit={unit}\n as=\"div\"\n size=\"sm\"\n coloring={coloring}\n showIdentifier={coloring}\n unitClassName=\"oui-text-base-contrast-54 oui-ml-1\"\n weight=\"semibold\"\n rm={rm}\n dp={dp}\n >\n {value}\n </Text.numeral>\n </Flex>\n <Text size=\"2xs\" intensity={54} weight=\"semibold\">\n {label}\n </Text>\n </Box>\n );\n};\n","import { numberToHumanStyle } from \"@orderly.network/utils\";\n\nexport const tickFormatter = (value: number) => {\n let absValue = Math.abs(value);\n const dp = absValue === 0 ? 0 : absValue <= 10 ? 2 : absValue <= 100 ? 1 : 0;\n\n const formatted = numberToHumanStyle(absValue, dp);\n return value < 0 ? `-${formatted}` : formatted;\n};\n","export const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index } = props;\n\n return (\n <g transform={`translate(${x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor=\"end\"\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n","import { useMemo, useRef } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\nimport { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n ReferenceLine,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: any;\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nconst PnlLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n const dataTransfer = (data: any[]) => {\n const series: any[] = [];\n\n data?.reduce((acc, item) => {\n acc += item.pnl;\n series.push({\n ...item,\n pnl: acc,\n _pnl: item.pnl,\n // date: new Date(item.date).getTime(),\n });\n return acc;\n }, 0);\n\n return series;\n };\n\n const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n data={data}\n margin={{ top: 20, right: 10, left: -10, bottom: 0 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n // scale={\"time\"}\n // type=\"number\"\n // range={}\n />\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"pnl\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <ReferenceLine y={0} stroke=\"#000\" /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"pnl\"\n stroke={colors.primaryLight}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { PnlLineChart };\n","import { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n Tooltip,\n Label,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type AssetChartDataItem = {\n date: string;\n account_value: number;\n};\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: AssetChartDataItem[];\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n />\n );\n }\n\n return null;\n};\n\nconst AssetLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n // const dataTransfer = (data: any[]) => {\n // const series: any[] = [];\n\n // data.reduce((acc, item) => {\n // acc += item.pnl;\n // series.push({ ...item, pnl: acc, _pnl: item.pnl });\n // return acc;\n // }, 0);\n\n // return series;\n // };\n\n // const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n width={530}\n height={180}\n data={props.data}\n margin={{ top: 20, right: 10, left: -20, bottom: -10 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n ></XAxis>\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"account_value\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <Legend /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"account_value\"\n stroke={colors.profit}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { AssetLineChart };\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\n\nexport type VolChartDataItem = {\n date: string;\n volume: number;\n opacity?: string | number;\n};\n\nexport type VolChartTooltip = {\n rm?: number;\n dp?: number;\n};\n\nexport type VolChartProps = {\n colors?: {\n fill: string;\n };\n data: VolChartDataItem[];\n tooltip?: VolChartTooltip;\n className?: string;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height, opacity } = props;\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n opacity={opacity}\n />\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, payload, stroke, fill } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (\n props: TooltipProps<any, any> & { tooltip?: VolChartTooltip }\n) => {\n const { active, payload, label, tooltip } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label}\n value={payload[0].value}\n // prefix=\"Commission\"\n titleClassName=\"oui-gap-4\"\n rm={tooltip?.rm}\n dp={tooltip?.dp}\n />\n );\n }\n\n return null;\n};\n\nexport const VolBarChart = (props: VolChartProps) => {\n const colors = useColors(\n props.colors?.fill\n ? { profit: props.colors?.fill, loss: props.colors?.fill }\n : undefined\n );\n\n const isEmpty = props.data.reduce((a, b) => a + b.volume, 0) === 0;\n const maxVolume = props.data.reduce((a,b) => (a > b.volume ? a : b.volume), 0);\n const decimal = maxVolume <= 10 ? 2 : (maxVolume <= 100 ? 1 : 0);\n\n return (\n // @ts-ignore\n <Box className={cn(props.className)}>\n {/* @ts-ignore */}\n <ResponsiveContainer>\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -0, top: 6, right: 0, bottom: 20 }}\n >\n {/* @ts-ignore */}\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip tooltip={props.tooltip} />}\n />\n <CartesianGrid\n vertical={false}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.08}\n repeatCount={6}\n />\n <ReferenceLine y={0} stroke=\"#000\" />\n {/* @ts-ignore */}\n <Bar dataKey=\"volume\" shape={<RoundedRectangle />} minPointSize={1}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.volume > 0 ? colors.profit : colors.loss}\n opacity={entry.opacity}\n />\n );\n })}\n </Bar>\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n dataKey={\"volume\"}\n tickFormatter={(value, index) => {\n if (isEmpty) return `${index * 100}`;\n return numberToHumanStyle(value, decimal);\n }}\n width={45}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n stroke=\"rgb(229, 231, 235)\"\n strokeOpacity={0.2}\n />\n </BarChart>\n </ResponsiveContainer>\n </Box>\n );\n};\nfunction numberToHumanStyle(number: number, decimalPlaces: number = 0): string {\n const abbreviations = [\"\", \"K\", \"M\", \"B\", \"T\"];\n\n let index = 0;\n while (number >= 1000 && index < abbreviations.length - 1) {\n number /= 1000;\n index++;\n }\n\n const roundedNumber = toFixedWithoutRounding(number, decimalPlaces);\n\n return `${roundedNumber}${abbreviations[index]}`;\n}\n\nfunction toFixedWithoutRounding(num: number, fix: number): string {\n const numStr = num.toString();\n const decimalIndex = numStr.indexOf(\".\");\n\n if (decimalIndex === -1 || fix === 0) {\n return numStr.split(\".\")[0];\n }\n\n const cutoffIndex = decimalIndex + fix + 1;\n\n return numStr.slice(0, cutoffIndex);\n}\n","import plugin from \"tailwindcss/plugin\";\n\nexport const chartPlugin = () =>\n plugin(function ({ addComponents, addBase }) {\n addComponents(\n {\n \".xAxis\": {\n \".recharts-cartesian-axis-tick:first-child text\": {\n \"text-anchor\": \"start\",\n },\n \".recharts-cartesian-axis-tick:last-child text\": {\n \"text-anchor\": \"end\",\n },\n },\n },\n {\n respectPrefix: false,\n }\n );\n });\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tailwindcss@3.4.4_ts-node@10.9.2_@swc+core@1.4.12_@swc+helpers@0.5.15__@types+node@22.9.0_typescript@5.6.3_/node_modules/tailwindcss/lib/util/createPlugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.4_ts-node@10.9.2_@swc+core@1.4.12_@swc+helpers@0.5.15__@types+node@22.9.0_typescript@5.6.3_/node_modules/tailwindcss/lib/public/create-plugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.4_ts-node@10.9.2_@swc+core@1.4.12_@swc+helpers@0.5.15__@types+node@22.9.0_typescript@5.6.3_/node_modules/tailwindcss/plugin.js","../src/orderly/useColors.ts","../src/utils/theme.ts","../src/orderly/pnlBar.tsx","../src/orderly/customTooltip.tsx","../src/utils/yTickFormatter.ts","../src/orderly/pnlLine.tsx","../src/orderly/xAxisLabel.tsx","../src/orderly/assetLine.tsx","../src/orderly/volBar.tsx","../src/tailwindcss/theme.ts"],"names":["require_createPlugin","__commonJSMin","exports","_default","createPlugin","plugin","config","pluginFunction","configFunction","optionsFunction","options","require_create_plugin","_createPlugin","_interop_require_default","obj","require_plugin","module","useMemo","getThemeColors","root","computedStyle","convertToRGB","color","useColors","colors","themeColors","BarChart","XAxis","YAxis","ResponsiveContainer","Bar","Cell","Tooltip","CartesianGrid","ReferenceLine","Cross","Box","Flex","Text","jsx","jsxs","OrderlyChartTooltip","props","label","value","prefix","unit","coloring","dp","rm","cn","useRef","numberToHumanStyle","tickFormatter","absValue","formatted","RoundedRectangle","fill","x","y","width","height","absHeight","XAxisLabel","stroke","payload","index","containerWidth","_x","CustomizedCross","CustomTooltip","active","todayStr","PnLBarChart","invisible","widthRef","entry","LineChart","Line","PnlLineChart","dataTransfer","data","series","acc","item","AssetLineChart","opacity","tooltip","VolBarChart","isEmpty","b","maxVolume","decimal","number","decimalPlaces","abbreviations","toFixedWithoutRounding","num","fix","numStr","decimalIndex","cutoffIndex","import_plugin","chartPlugin","addComponents","addBase"],"mappings":"ygBAAA,IAAAA,EAAAC,EAAAC,GAAA,cACA,OAAO,eAAeA,EAAS,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,UAAW,CACtC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOC,EACX,CACJ,CAAC,EACD,SAASC,EAAaC,EAAQC,EAAQ,CAClC,MAAO,CACH,QAASD,EACT,OAAAC,CACJ,CACJ,CACAF,EAAa,YAAc,SAASG,EAAgBC,EAAiB,KAAK,CAAC,GAAI,CAC3E,IAAMC,EAAkB,SAASC,EAAS,CACtC,MAAO,CACH,UAAWA,EACX,QAASH,EAAeG,CAAO,EAC/B,OAAQF,EAAeE,CAAO,CAClC,CACJ,EACA,OAAAD,EAAgB,oBAAsB,GAGtCA,EAAgB,iBAAmBF,EACnCE,EAAgB,iBAAmBD,EAC5BC,CACX,EACA,IAAMN,GAAWC,IC/BjB,IAAAO,EAAAV,EAAAC,GAAA,cACA,OAAO,eAAeA,EAAS,aAAc,CACzC,MAAO,EACX,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e8B,GAAuBH,EAAQC,CAAa,CAE3C,GAAGC,EAAc7B,CAAK,CAAC,EAChD,CAEA,SAAS8B,GAAuBC,EAAaC,EAAqB,CAChE,IAAMC,EAASF,EAAI,SAAS,EACtBG,EAAeD,EAAO,QAAQ,GAAG,EAEvC,GAAIC,IAAiB,IAAMF,IAAQ,EACjC,OAAOC,EAAO,MAAM,GAAG,EAAE,CAAC,EAG5B,IAAME,EAAcD,EAAeF,EAAM,EAEzC,OAAOC,EAAO,MAAM,EAAGE,CAAW,CACpC,CCxMA,IAAAC,EAAmB,OAINC,GAA6B,OACxC,EAAAlG,SAAO,SAAU,CAAE,cAAAmG,EAAe,QAAAC,CAAQ,EAAG,CAC3CD,EACE,CACE,SAAU,CACR,iDAAkD,CAChD,cAAe,OACjB,EACA,gDAAiD,CAC/C,cAAe,KACjB,CACF,CACF,EACA,CACE,cAAe,EACjB,CACF,CACF,CAAC","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import { useMemo } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\n\nexport const useColors = (colors?: { profit: string; loss: string }) => {\n const _colors = useMemo(() => {\n const themeColors = getThemeColors();\n return {\n profit: colors?.profit || themeColors.profit,\n loss: colors?.loss || themeColors.loss,\n primary: themeColors.primary,\n primaryLight: themeColors.primaryLight,\n };\n }, [colors]);\n\n return _colors;\n};\n","export const getThemeColors = () => {\n const root = document.documentElement;\n const computedStyle = getComputedStyle(root);\n\n const colors = {\n primary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary\")\n ),\n primaryLight: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary-light\")\n ),\n secondary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-secondary\")\n ),\n success: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-success\")\n ),\n warning: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-warning\")\n ),\n danger: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-danger\")),\n info: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-info\")),\n loss: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-loss\")\n ),\n profit: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-profit\")\n ),\n };\n\n return colors;\n};\n\nconst convertToRGB = (color: string) => {\n return `rgb(${color.split(\" \").join(\",\")})`;\n};\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\nimport { Flex } from \"@orderly.network/ui\";\n// import { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnLChartDataItem = {\n date: string;\n pnl: number;\n};\n\nexport type PnLChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: PnLChartDataItem[];\n invisible?: boolean;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height } = props;\n\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n />\n );\n};\n\nexport const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index, width, containerWidth } = props;\n\n const _x =\n index === 0\n ? 48\n : containerWidth > 0\n ? containerWidth - 10\n : width + payload.offset;\n\n return (\n <g transform={`translate(${_x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor={index === 0 ? \"start\" : \"end\"}\n // textAnchor={\"start\"}\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, stroke, fill } = props;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nexport const PnLBarChart = (props: PnLChartProps) => {\n const { invisible } = props;\n const colors = useColors(props.colors);\n const widthRef = useRef(0);\n\n return (\n // @ts-ignore\n <ResponsiveContainer\n className={cn(invisible && \"chart-invisible\")}\n onResize={(width, height) => {\n // console.log(\"width\", width, height);\n widthRef.current = width;\n }}\n >\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -10, top: 10, right: 10, bottom: 30 }}\n >\n {!invisible && (\n // @ts-ignore\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip />}\n />\n )}\n\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n <ReferenceLine y={0} stroke=\"rgba(0,0,0,0.04)\" />\n\n {!invisible && (\n // @ts-ignore\n <Bar dataKey=\"pnl\" shape={<RoundedRectangle />}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.pnl > 0 ? colors.profit : colors.loss}\n />\n );\n })}\n </Bar>\n )}\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickFormatter={(value) => tickFormatter(value)}\n tickLine={false}\n axisLine={false}\n dataKey={\"pnl\"}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel containerWidth={widthRef.current} />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n />\n </BarChart>\n </ResponsiveContainer>\n );\n};\n","import { Box, Flex, Text } from \"@orderly.network/ui\";\n\nexport const OrderlyChartTooltip = (props: {\n label: string;\n value: string | number;\n unit?: string;\n prefix?: React.ReactNode;\n titleClassName?: string;\n coloring?: boolean;\n dp?: number;\n rm?: number;\n}) => {\n const {\n label,\n value,\n prefix,\n unit = \"USDC\",\n coloring = false,\n dp,\n rm,\n } = props;\n return (\n <Box intensity={600} p={3} r=\"md\">\n <Flex direction={\"row\"} className={props.titleClassName}>\n {prefix}\n <Text.numeral\n unit={unit}\n as=\"div\"\n size=\"sm\"\n coloring={coloring}\n showIdentifier={coloring}\n unitClassName=\"oui-text-base-contrast-54 oui-ml-1\"\n weight=\"semibold\"\n rm={rm}\n dp={dp}\n >\n {value}\n </Text.numeral>\n </Flex>\n <Text size=\"2xs\" intensity={54} weight=\"semibold\">\n {label}\n </Text>\n </Box>\n );\n};\n","import { numberToHumanStyle } from \"@orderly.network/utils\";\n\nexport const tickFormatter = (value: number) => {\n let absValue = Math.abs(value);\n const dp = absValue === 0 ? 0 : absValue <= 10 ? 2 : absValue <= 100 ? 1 : 0;\n\n const formatted = numberToHumanStyle(absValue, dp);\n return value < 0 ? `-${formatted}` : formatted;\n};\n","import { useMemo, useRef } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\nimport { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n ReferenceLine,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: any;\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nconst PnlLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n const dataTransfer = (data: any[]) => {\n const series: any[] = [];\n\n data?.reduce((acc, item) => {\n acc += item.pnl;\n series.push({\n ...item,\n pnl: acc,\n _pnl: item.pnl,\n // date: new Date(item.date).getTime(),\n });\n return acc;\n }, 0);\n\n return series;\n };\n\n const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n data={data}\n margin={{ top: 20, right: 10, left: -10, bottom: 0 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n // scale={\"time\"}\n // type=\"number\"\n // range={}\n />\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"pnl\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <ReferenceLine y={0} stroke=\"#000\" /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"pnl\"\n stroke={colors.primaryLight}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { PnlLineChart };\n","export const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index } = props;\n\n return (\n <g transform={`translate(${x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor=\"end\"\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n","import { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n Tooltip,\n Label,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type AssetChartDataItem = {\n date: string;\n account_value: number;\n};\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: AssetChartDataItem[];\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n />\n );\n }\n\n return null;\n};\n\nconst AssetLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n // const dataTransfer = (data: any[]) => {\n // const series: any[] = [];\n\n // data.reduce((acc, item) => {\n // acc += item.pnl;\n // series.push({ ...item, pnl: acc, _pnl: item.pnl });\n // return acc;\n // }, 0);\n\n // return series;\n // };\n\n // const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n width={530}\n height={180}\n data={props.data}\n margin={{ top: 20, right: 10, left: -20, bottom: -10 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n ></XAxis>\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"account_value\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <Legend /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"account_value\"\n stroke={colors.profit}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { AssetLineChart };\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\n\nexport type VolChartDataItem = {\n date: string;\n volume: number;\n opacity?: string | number;\n};\n\nexport type VolChartTooltip = {\n rm?: number;\n dp?: number;\n};\n\nexport type VolChartProps = {\n colors?: {\n fill: string;\n };\n data: VolChartDataItem[];\n tooltip?: VolChartTooltip;\n className?: string;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height, opacity } = props;\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n opacity={opacity}\n />\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, payload, stroke, fill } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (\n props: TooltipProps<any, any> & { tooltip?: VolChartTooltip }\n) => {\n const { active, payload, label, tooltip } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label}\n value={payload[0].value}\n // prefix=\"Commission\"\n titleClassName=\"oui-gap-4\"\n rm={tooltip?.rm}\n dp={tooltip?.dp}\n />\n );\n }\n\n return null;\n};\n\nexport const VolBarChart = (props: VolChartProps) => {\n const colors = useColors(\n props.colors?.fill\n ? { profit: props.colors?.fill, loss: props.colors?.fill }\n : undefined\n );\n\n const isEmpty = props.data.reduce((a, b) => a + b.volume, 0) === 0;\n const maxVolume = props.data.reduce((a,b) => (a > b.volume ? a : b.volume), 0);\n const decimal = maxVolume <= 10 ? 2 : (maxVolume <= 100 ? 1 : 0);\n\n return (\n // @ts-ignore\n <Box className={cn(props.className)}>\n {/* @ts-ignore */}\n <ResponsiveContainer>\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -0, top: 6, right: 0, bottom: 20 }}\n >\n {/* @ts-ignore */}\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip tooltip={props.tooltip} />}\n />\n <CartesianGrid\n vertical={false}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.08}\n repeatCount={6}\n />\n <ReferenceLine y={0} stroke=\"#000\" />\n {/* @ts-ignore */}\n <Bar dataKey=\"volume\" shape={<RoundedRectangle />} minPointSize={1}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.volume > 0 ? colors.profit : colors.loss}\n opacity={entry.opacity}\n />\n );\n })}\n </Bar>\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n dataKey={\"volume\"}\n tickFormatter={(value, index) => {\n if (isEmpty) return `${index * 100}`;\n return numberToHumanStyle(value, decimal);\n }}\n width={45}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n stroke=\"rgb(229, 231, 235)\"\n strokeOpacity={0.2}\n />\n </BarChart>\n </ResponsiveContainer>\n </Box>\n );\n};\nfunction numberToHumanStyle(number: number, decimalPlaces: number = 0): string {\n const abbreviations = [\"\", \"K\", \"M\", \"B\", \"T\"];\n\n let index = 0;\n while (number >= 1000 && index < abbreviations.length - 1) {\n number /= 1000;\n index++;\n }\n\n const roundedNumber = toFixedWithoutRounding(number, decimalPlaces);\n\n return `${roundedNumber}${abbreviations[index]}`;\n}\n\nfunction toFixedWithoutRounding(num: number, fix: number): string {\n const numStr = num.toString();\n const decimalIndex = numStr.indexOf(\".\");\n\n if (decimalIndex === -1 || fix === 0) {\n return numStr.split(\".\")[0];\n }\n\n const cutoffIndex = decimalIndex + fix + 1;\n\n return numStr.slice(0, cutoffIndex);\n}\n","import plugin from \"tailwindcss/plugin\";\n\nimport { PluginCreator } from \"tailwindcss/types/config\";\n\nexport const chartPlugin: PluginCreator = () =>\n plugin(function ({ addComponents, addBase }) {\n addComponents(\n {\n \".xAxis\": {\n \".recharts-cartesian-axis-tick:first-child text\": {\n \"text-anchor\": \"start\",\n },\n \".recharts-cartesian-axis-tick:last-child text\": {\n \"text-anchor\": \"end\",\n },\n },\n },\n {\n respectPrefix: false,\n }\n );\n });\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -7,5 +7,5 @@ import { numberToHumanStyle } from '@orderly.network/utils';
|
|
|
7
7
|
var N=Object.create;var k=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var $=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of D(e))!K.call(t,i)&&i!==r&&k(t,i,{get:()=>e[i],enumerable:!(o=z(e,i))||o.enumerable});return t};var M=(t,e,r)=>(r=t!=null?N(I(t)):{},$(!t||!t.__esModule?k(r,"default",{value:t,enumerable:!0}):r,t));var _=g(x=>{Object.defineProperty(x,"__esModule",{value:!0});Object.defineProperty(x,"default",{enumerable:!0,get:function(){return Jt}});function S(t,e){return {handler:t,config:e}}S.withOptions=function(t,e=()=>({})){let r=function(o){return {__options:o,handler:t(o),config:e(o)}};return r.__isOptionsFunction=!0,r.__pluginFunction=t,r.__configFunction=e,r};var Jt=S;});var O=g(b=>{Object.defineProperty(b,"__esModule",{value:!0});Object.defineProperty(b,"default",{enumerable:!0,get:function(){return te}});var Zt=jt(_());function jt(t){return t&&t.__esModule?t:{default:t}}var te=Zt.default;});var R=g((Qe,A)=>{var C=O();A.exports=(C.__esModule?C:{default:C}).default;});var v=()=>{let t=document.documentElement,e=getComputedStyle(t);return {primary:u(e.getPropertyValue("--oui-color-primary")),primaryLight:u(e.getPropertyValue("--oui-color-primary-light")),secondary:u(e.getPropertyValue("--oui-color-secondary")),success:u(e.getPropertyValue("--oui-color-success")),warning:u(e.getPropertyValue("--oui-color-warning")),danger:u(e.getPropertyValue("--oui-color-danger")),info:u(e.getPropertyValue("--oui-color-info")),loss:u(e.getPropertyValue("--oui-color-trading-loss")),profit:u(e.getPropertyValue("--oui-color-trading-profit"))}},u=t=>`rgb(${t.split(" ").join(",")})`;var f=t=>useMemo(()=>{let r=v();return {profit:t?.profit||r.profit,loss:t?.loss||r.loss,primary:r.primary,primaryLight:r.primaryLight}},[t]);var d=t=>{let{label:e,value:r,prefix:o,unit:i="USDC",coloring:a=!1,dp:n,rm:c}=t;return jsxs(Box,{intensity:600,p:3,r:"md",children:[jsxs(Flex,{direction:"row",className:t.titleClassName,children:[o,jsx(Text.numeral,{unit:i,as:"div",size:"sm",coloring:a,showIdentifier:a,unitClassName:"oui-text-base-contrast-54 oui-ml-1",weight:"semibold",rm:c,dp:n,children:r})]}),jsx(Text,{size:"2xs",intensity:54,weight:"semibold",children:e})]})};var h=t=>{let e=Math.abs(t),r=e===0?0:e<=10?2:e<=100?1:0,o=numberToHumanStyle(e,r);return t<0?`-${o}`:o};var ot=t=>{let{fill:e,x:r,y:o,width:i,height:a}=t,n=Math.abs(a);return jsx("rect",{rx:2,x:r,y:a>0?o:o+a,width:i,height:n,stroke:"none",fill:e})},it=t=>{let{x:e,y:r,stroke:o,payload:i,index:a,width:n,containerWidth:c}=t,V=a===0?48:c>0?c-10:n+i.offset;return jsx("g",{transform:`translate(${V},${r-6})`,children:jsx("text",{x:0,y:0,dy:16,textAnchor:a===0?"start":"end",fontSize:10,fill:"rgba(255,255,255,0.54)",children:a===0?i.value:"Now"})})},at=t=>{let{width:e,height:r,stroke:o,fill:i}=t;return jsx(Cross,{x:t.x+t.width/2,top:t.top,height:r,width:1,stroke:"rgba(255,255,255,0.16)",strokeDasharray:"3 2",fill:"none"})},nt=t=>{let{active:e,payload:r,label:o}=t,i=useRef(new Date().toISOString().split("T")[0]);return e&&r&&r.length?jsx(d,{label:o===i.current?"Now":o,value:r[0].value,coloring:!0}):null},lt=t=>{let{invisible:e}=t,r=f(t.colors),o=useRef(0);return jsx(ResponsiveContainer,{className:cn(e&&"chart-invisible"),onResize:(i,a)=>{o.current=i;},children:jsxs(BarChart,{data:t.data,margin:{left:-10,top:10,right:10,bottom:30},children:[!e&&jsx(Tooltip,{cursor:jsx(at,{}),content:jsx(nt,{})}),jsx(CartesianGrid,{vertical:!1,stroke:"#FFFFFF",strokeOpacity:.04}),jsx(ReferenceLine,{y:0,stroke:"rgba(0,0,0,0.04)"}),!e&&jsx(Bar,{dataKey:"pnl",shape:jsx(ot,{}),children:t.data.map((i,a)=>jsx(Cell,{fill:i.pnl>0?r.profit:r.loss},`cell-${a}`))}),jsx(YAxis,{tick:{fontSize:10,fill:"rgba(255,255,255,0.54)"},tickFormatter:i=>h(i),tickLine:!1,axisLine:!1,dataKey:"pnl"}),jsx(XAxis,{dataKey:"date",tickLine:!1,interval:t.data.length-2,height:1,tick:jsx(it,{containerWidth:o.current}),stroke:"#FFFFFF",strokeOpacity:.04})]})})};var y=t=>{let{x:e,y:r,stroke:o,payload:i,index:a}=t;return jsx("g",{transform:`translate(${e},${r-6})`,children:jsx("text",{x:0,y:0,dy:16,textAnchor:"end",fontSize:10,fill:"rgba(255,255,255,0.54)",children:a===0?i.value:"Now"})})};var xt=t=>{let{active:e,payload:r,label:o}=t,i=useRef(new Date().toISOString().split("T")[0]);return e&&r&&r.length?jsx(d,{label:o===i.current?"Now":o,value:r[0].value,coloring:!0}):null},bt=t=>{let e=f(t.colors),r=i=>{let a=[];return i?.reduce((n,c)=>(n+=c.pnl,a.push({...c,pnl:n,_pnl:c.pnl}),n),0),a},o=useMemo(()=>r(t.data),[t.data]);return jsx(ResponsiveContainer,{className:t.invisible?"chart-invisible":"",children:jsxs(LineChart,{data:o,margin:{top:20,right:10,left:-10,bottom:0},children:[jsx(CartesianGrid,{vertical:!1,stroke:"#FFFFFF",strokeOpacity:.04}),jsx(XAxis,{dataKey:"date",interval:t.data.length-2,tick:jsx(y,{}),stroke:"#FFFFFF",strokeOpacity:.04}),jsx(YAxis,{dataKey:"pnl",tick:{fontSize:10,fill:"rgba(255,255,255,0.54)"},tickLine:!1,axisLine:!1,tickFormatter:i=>h(i)}),!t.invisible&&jsx(Tooltip,{cursor:{strokeDasharray:"3 2",strokeOpacity:.16},content:jsx(xt,{})}),!t.invisible&&jsx(Line,{type:"natural",dataKey:"pnl",stroke:e.primaryLight,strokeWidth:2,dot:!1,isAnimationActive:!1})]})})};var _t=t=>{let{active:e,payload:r,label:o}=t,i=useRef(new Date().toISOString().split("T")[0]);return e&&r&&r.length?jsx(d,{label:o===i.current?"Now":o,value:r[0].value}):null},Ot=t=>{let e=f(t.colors);return jsx(ResponsiveContainer,{className:t.invisible?"chart-invisible":"",children:jsxs(LineChart,{width:530,height:180,data:t.data,margin:{top:20,right:10,left:-20,bottom:-10},children:[jsx(CartesianGrid,{vertical:!1,stroke:"#FFFFFF",strokeOpacity:.04}),jsx(XAxis,{dataKey:"date",interval:t.data.length-2,tick:jsx(y,{}),stroke:"#FFFFFF",strokeOpacity:.04}),jsx(YAxis,{dataKey:"account_value",tick:{fontSize:10,fill:"rgba(255,255,255,0.54)"},tickLine:!1,axisLine:!1,tickFormatter:r=>h(r)}),!t.invisible&&jsx(Tooltip,{cursor:{strokeDasharray:"3 2",strokeOpacity:.16},content:jsx(_t,{})}),!t.invisible&&jsx(Line,{type:"natural",dataKey:"account_value",stroke:e.profit,strokeWidth:2,dot:!1,isAnimationActive:!1})]})})};var Gt=t=>{let{fill:e,x:r,y:o,width:i,height:a,opacity:n}=t,c=Math.abs(a);return jsx("rect",{rx:2,x:r,y:a>0?o:o+a,width:i,height:c,stroke:"none",fill:e,opacity:n})},Wt=t=>{let{width:e,height:r,payload:o,stroke:i,fill:a}=t;return o?.[0]?.value===0?null:jsx(Cross,{x:t.x+t.width/2,top:t.top,height:r,width:1,stroke:"rgba(255,255,255,0.16)",strokeDasharray:"3 2",fill:"none"})},Yt=t=>{let{active:e,payload:r,label:o,tooltip:i}=t;return r?.[0]?.value===0?null:e&&r&&r.length?jsx(d,{label:o,value:r[0].value,titleClassName:"oui-gap-4",rm:i?.rm,dp:i?.dp}):null},qt=t=>{let e=f(t.colors?.fill?{profit:t.colors?.fill,loss:t.colors?.fill}:void 0),r=t.data.reduce((a,n)=>a+n.volume,0)===0,o=t.data.reduce((a,n)=>a>n.volume?a:n.volume,0),i=o<=10?2:o<=100?1:0;return jsx(Box,{className:cn(t.className),children:jsx(ResponsiveContainer,{children:jsxs(BarChart,{data:t.data,margin:{left:-0,top:6,right:0,bottom:20},children:[jsx(Tooltip,{cursor:jsx(Wt,{}),content:jsx(Yt,{tooltip:t.tooltip})}),jsx(CartesianGrid,{vertical:!1,stroke:"#FFFFFF",strokeOpacity:.08,repeatCount:6}),jsx(ReferenceLine,{y:0,stroke:"#000"}),jsx(Bar,{dataKey:"volume",shape:jsx(Gt,{}),minPointSize:1,children:t.data.map((a,n)=>jsx(Cell,{fill:a.volume>0?e.profit:e.loss,opacity:a.opacity},`cell-${n}`))}),jsx(YAxis,{tick:{fontSize:10,fill:"rgba(255,255,255,0.54)"},tickLine:!1,axisLine:!1,dataKey:"volume",tickFormatter:(a,n)=>r?`${n*100}`:Et(a,i),width:45}),jsx(XAxis,{dataKey:"date",tickLine:!1,interval:t.data.length-2,height:1,tick:{fontSize:10,fill:"rgba(255,255,255,0.54)"},stroke:"rgb(229, 231, 235)",strokeOpacity:.2})]})})})};function Et(t,e=0){let r=["","K","M","B","T"],o=0;for(;t>=1e3&&o<r.length-1;)t/=1e3,o++;return `${Qt(t,e)}${r[o]}`}function Qt(t,e){let r=t.toString(),o=r.indexOf(".");if(o===-1||e===0)return r.split(".")[0];let i=o+e+1;return r.slice(0,i)}var B=M(R()),ee=()=>(0, B.default)(function({addComponents:t,addBase:e}){t({".xAxis":{".recharts-cartesian-axis-tick:first-child text":{"text-anchor":"start"},".recharts-cartesian-axis-tick:last-child text":{"text-anchor":"end"}}},{respectPrefix:!1});});
|
|
8
8
|
|
|
9
9
|
export { Ot as AssetLineChart, lt as PnLBarChart, bt as PnlLineChart, qt as VolBarChart, ee as chartPlugin };
|
|
10
|
-
//# sourceMappingURL=
|
|
10
|
+
//# sourceMappingURL=out.js.map
|
|
11
11
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tailwindcss@3.4.12_ts-node@10.9.2_@swc+core@1.7.26_@swc+helpers@0.5.13__@types+node@22.5.5_typescript@5.2.2_/node_modules/tailwindcss/lib/util/createPlugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.12_ts-node@10.9.2_@swc+core@1.7.26_@swc+helpers@0.5.13__@types+node@22.5.5_typescript@5.2.2_/node_modules/tailwindcss/lib/public/create-plugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.12_ts-node@10.9.2_@swc+core@1.7.26_@swc+helpers@0.5.13__@types+node@22.5.5_typescript@5.2.2_/node_modules/tailwindcss/plugin.js","../src/orderly/useColors.ts","../src/utils/theme.ts","../src/orderly/pnlBar.tsx","../src/orderly/customTooltip.tsx","../src/utils/yTickFormatter.ts","../src/orderly/xAxisLabel.tsx","../src/orderly/pnlLine.tsx","../src/orderly/assetLine.tsx","../src/orderly/volBar.tsx","../src/tailwindcss/theme.ts"],"names":["require_createPlugin","__commonJSMin","exports","_default","createPlugin","plugin","config","pluginFunction","configFunction","optionsFunction","options","require_create_plugin","_createPlugin","_interop_require_default","obj","require_plugin","module","getThemeColors","root","computedStyle","convertToRGB","color","useColors","colors","useMemo","themeColors","OrderlyChartTooltip","props","label","value","prefix","unit","coloring","dp","rm","jsxs","Box","Flex","jsx","Text","tickFormatter","absValue","formatted","numberToHumanStyle","RoundedRectangle","fill","x","y","width","height","absHeight","XAxisLabel","stroke","payload","index","containerWidth","_x","CustomizedCross","Cross","CustomTooltip","active","todayStr","useRef","PnLBarChart","invisible","widthRef","ResponsiveContainer","cn","BarChart","Tooltip","CartesianGrid","ReferenceLine","Bar","entry","Cell","YAxis","XAxis","PnlLineChart","dataTransfer","data","series","acc","item","LineChart","Line","AssetLineChart","opacity","tooltip","VolBarChart","isEmpty","b","maxVolume","decimal","number","decimalPlaces","abbreviations","toFixedWithoutRounding","num","fix","numStr","decimalIndex","cutoffIndex","import_plugin","chartPlugin","addComponents","addBase"],"mappings":";;;;;;sgBAAA,IAAAA,CAAAA,CAAAC,CAAAC,CAAAA,CAAAA,EAAA,CACA,MAAA,CAAO,eAAeA,CAAS,CAAA,YAAA,CAAc,CACzC,KAAA,CAAO,CACX,C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,CAAAA,EAAAA,CAKF,OAAO,CAFe0C,EAAAA,EAAAA,CAAuBH,CAAQC,CAAAA,CAAa,CAE3C,CAAA,EAAGC,CAAczC,CAAAA,CAAK,CAAC,CAAA,CAChD,CAEA,SAAS0C,EAAuBC,CAAAA,CAAAA,CAAaC,EAAqB,CAChE,IAAMC,CAASF,CAAAA,CAAAA,CAAI,QAAS,EAAA,CACtBG,CAAeD,CAAAA,CAAAA,CAAO,OAAQ,CAAA,GAAG,CAEvC,CAAA,GAAIC,CAAiB,GAAA,CAAA,CAAA,EAAMF,IAAQ,CACjC,CAAA,OAAOC,CAAO,CAAA,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAG5B,CAAA,IAAME,CAAcD,CAAAA,CAAAA,CAAeF,CAAM,CAAA,CAAA,CAEzC,OAAOC,CAAO,CAAA,KAAA,CAAM,CAAGE,CAAAA,CAAW,CACpC,CCxMAC,IAAAA,CAAAA,CAAmB,CAENC,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,EAAAA,CAAc,IACzB,IAAA,CAAA,CAAAlG,OAAO,EAAA,SAAU,CAAE,aAAAmG,CAAAA,CAAAA,CAAe,OAAAC,CAAAA,CAAQ,CAAG,CAAA,CAC3CD,CACE,CAAA,CACE,QAAU,CAAA,CACR,gDAAkD,CAAA,CAChD,aAAe,CAAA,OACjB,EACA,+CAAiD,CAAA,CAC/C,aAAe,CAAA,KACjB,CACF,CACF,CACA,CAAA,CACE,aAAe,CAAA,CAAA,CACjB,CACF,EACF,CAAC","file":"index.mjs","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import { useMemo } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\n\nexport const useColors = (colors?: { profit: string; loss: string }) => {\n const _colors = useMemo(() => {\n const themeColors = getThemeColors();\n return {\n profit: colors?.profit || themeColors.profit,\n loss: colors?.loss || themeColors.loss,\n primary: themeColors.primary,\n primaryLight: themeColors.primaryLight,\n };\n }, [colors]);\n\n return _colors;\n};\n","export const getThemeColors = () => {\n const root = document.documentElement;\n const computedStyle = getComputedStyle(root);\n\n const colors = {\n primary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary\")\n ),\n primaryLight: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary-light\")\n ),\n secondary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-secondary\")\n ),\n success: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-success\")\n ),\n warning: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-warning\")\n ),\n danger: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-danger\")),\n info: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-info\")),\n loss: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-loss\")\n ),\n profit: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-profit\")\n ),\n };\n\n return colors;\n};\n\nconst convertToRGB = (color: string) => {\n return `rgb(${color.split(\" \").join(\",\")})`;\n};\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\nimport { Flex } from \"@orderly.network/ui\";\n// import { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnLChartDataItem = {\n date: string;\n pnl: number;\n};\n\nexport type PnLChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: PnLChartDataItem[];\n invisible?: boolean;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height } = props;\n\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n />\n );\n};\n\nexport const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index, width, containerWidth } = props;\n\n const _x =\n index === 0\n ? 48\n : containerWidth > 0\n ? containerWidth - 10\n : width + payload.offset;\n\n return (\n <g transform={`translate(${_x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor={index === 0 ? \"start\" : \"end\"}\n // textAnchor={\"start\"}\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, stroke, fill } = props;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nexport const PnLBarChart = (props: PnLChartProps) => {\n const { invisible } = props;\n const colors = useColors(props.colors);\n const widthRef = useRef(0);\n\n return (\n // @ts-ignore\n <ResponsiveContainer\n className={cn(invisible && \"chart-invisible\")}\n onResize={(width, height) => {\n // console.log(\"width\", width, height);\n widthRef.current = width;\n }}\n >\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -10, top: 10, right: 10, bottom: 30 }}\n >\n {!invisible && (\n // @ts-ignore\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip />}\n />\n )}\n\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n <ReferenceLine y={0} stroke=\"rgba(0,0,0,0.04)\" />\n\n {!invisible && (\n // @ts-ignore\n <Bar dataKey=\"pnl\" shape={<RoundedRectangle />}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.pnl > 0 ? colors.profit : colors.loss}\n />\n );\n })}\n </Bar>\n )}\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickFormatter={(value) => tickFormatter(value)}\n tickLine={false}\n axisLine={false}\n dataKey={\"pnl\"}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel containerWidth={widthRef.current} />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n />\n </BarChart>\n </ResponsiveContainer>\n );\n};\n","import { Box, Flex, Text } from \"@orderly.network/ui\";\n\nexport const OrderlyChartTooltip = (props: {\n label: string;\n value: string | number;\n unit?: string;\n prefix?: React.ReactNode;\n titleClassName?: string;\n coloring?: boolean;\n dp?: number;\n rm?: number;\n}) => {\n const {\n label,\n value,\n prefix,\n unit = \"USDC\",\n coloring = false,\n dp,\n rm,\n } = props;\n return (\n <Box intensity={600} p={3} r=\"md\">\n <Flex direction={\"row\"} className={props.titleClassName}>\n {prefix}\n <Text.numeral\n unit={unit}\n as=\"div\"\n size=\"sm\"\n coloring={coloring}\n showIdentifier={coloring}\n unitClassName=\"oui-text-base-contrast-54 oui-ml-1\"\n weight=\"semibold\"\n rm={rm}\n dp={dp}\n >\n {value}\n </Text.numeral>\n </Flex>\n <Text size=\"2xs\" intensity={54} weight=\"semibold\">\n {label}\n </Text>\n </Box>\n );\n};\n","import { numberToHumanStyle } from \"@orderly.network/utils\";\n\nexport const tickFormatter = (value: number) => {\n let absValue = Math.abs(value);\n const dp = absValue === 0 ? 0 : absValue <= 10 ? 2 : absValue <= 100 ? 1 : 0;\n\n const formatted = numberToHumanStyle(absValue, dp);\n return value < 0 ? `-${formatted}` : formatted;\n};\n","export const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index } = props;\n\n return (\n <g transform={`translate(${x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor=\"end\"\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n","import { useMemo, useRef } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\nimport { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n ReferenceLine,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: any;\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nconst PnlLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n const dataTransfer = (data: any[]) => {\n const series: any[] = [];\n\n data?.reduce((acc, item) => {\n acc += item.pnl;\n series.push({\n ...item,\n pnl: acc,\n _pnl: item.pnl,\n // date: new Date(item.date).getTime(),\n });\n return acc;\n }, 0);\n\n return series;\n };\n\n const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n data={data}\n margin={{ top: 20, right: 10, left: -10, bottom: 0 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n // scale={\"time\"}\n // type=\"number\"\n // range={}\n />\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"pnl\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <ReferenceLine y={0} stroke=\"#000\" /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"pnl\"\n stroke={colors.primaryLight}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { PnlLineChart };\n","import { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n Tooltip,\n Label,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type AssetChartDataItem = {\n date: string;\n account_value: number;\n};\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: AssetChartDataItem[];\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n />\n );\n }\n\n return null;\n};\n\nconst AssetLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n // const dataTransfer = (data: any[]) => {\n // const series: any[] = [];\n\n // data.reduce((acc, item) => {\n // acc += item.pnl;\n // series.push({ ...item, pnl: acc, _pnl: item.pnl });\n // return acc;\n // }, 0);\n\n // return series;\n // };\n\n // const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n width={530}\n height={180}\n data={props.data}\n margin={{ top: 20, right: 10, left: -20, bottom: -10 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n ></XAxis>\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"account_value\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <Legend /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"account_value\"\n stroke={colors.profit}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { AssetLineChart };\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\n\nexport type VolChartDataItem = {\n date: string;\n volume: number;\n opacity?: string | number;\n};\n\nexport type VolChartTooltip = {\n rm?: number;\n dp?: number;\n};\n\nexport type VolChartProps = {\n colors?: {\n fill: string;\n };\n data: VolChartDataItem[];\n tooltip?: VolChartTooltip;\n className?: string;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height, opacity } = props;\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n opacity={opacity}\n />\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, payload, stroke, fill } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (\n props: TooltipProps<any, any> & { tooltip?: VolChartTooltip }\n) => {\n const { active, payload, label, tooltip } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label}\n value={payload[0].value}\n // prefix=\"Commission\"\n titleClassName=\"oui-gap-4\"\n rm={tooltip?.rm}\n dp={tooltip?.dp}\n />\n );\n }\n\n return null;\n};\n\nexport const VolBarChart = (props: VolChartProps) => {\n const colors = useColors(\n props.colors?.fill\n ? { profit: props.colors?.fill, loss: props.colors?.fill }\n : undefined\n );\n\n const isEmpty = props.data.reduce((a, b) => a + b.volume, 0) === 0;\n const maxVolume = props.data.reduce((a,b) => (a > b.volume ? a : b.volume), 0);\n const decimal = maxVolume <= 10 ? 2 : (maxVolume <= 100 ? 1 : 0);\n\n return (\n // @ts-ignore\n <Box className={cn(props.className)}>\n {/* @ts-ignore */}\n <ResponsiveContainer>\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -0, top: 6, right: 0, bottom: 20 }}\n >\n {/* @ts-ignore */}\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip tooltip={props.tooltip} />}\n />\n <CartesianGrid\n vertical={false}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.08}\n repeatCount={6}\n />\n <ReferenceLine y={0} stroke=\"#000\" />\n {/* @ts-ignore */}\n <Bar dataKey=\"volume\" shape={<RoundedRectangle />} minPointSize={1}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.volume > 0 ? colors.profit : colors.loss}\n opacity={entry.opacity}\n />\n );\n })}\n </Bar>\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n dataKey={\"volume\"}\n tickFormatter={(value, index) => {\n if (isEmpty) return `${index * 100}`;\n return numberToHumanStyle(value, decimal);\n }}\n width={45}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n stroke=\"rgb(229, 231, 235)\"\n strokeOpacity={0.2}\n />\n </BarChart>\n </ResponsiveContainer>\n </Box>\n );\n};\nfunction numberToHumanStyle(number: number, decimalPlaces: number = 0): string {\n const abbreviations = [\"\", \"K\", \"M\", \"B\", \"T\"];\n\n let index = 0;\n while (number >= 1000 && index < abbreviations.length - 1) {\n number /= 1000;\n index++;\n }\n\n const roundedNumber = toFixedWithoutRounding(number, decimalPlaces);\n\n return `${roundedNumber}${abbreviations[index]}`;\n}\n\nfunction toFixedWithoutRounding(num: number, fix: number): string {\n const numStr = num.toString();\n const decimalIndex = numStr.indexOf(\".\");\n\n if (decimalIndex === -1 || fix === 0) {\n return numStr.split(\".\")[0];\n }\n\n const cutoffIndex = decimalIndex + fix + 1;\n\n return numStr.slice(0, cutoffIndex);\n}\n","import plugin from \"tailwindcss/plugin\";\n\nexport const chartPlugin = () =>\n plugin(function ({ addComponents, addBase }) {\n addComponents(\n {\n \".xAxis\": {\n \".recharts-cartesian-axis-tick:first-child text\": {\n \"text-anchor\": \"start\",\n },\n \".recharts-cartesian-axis-tick:last-child text\": {\n \"text-anchor\": \"end\",\n },\n },\n },\n {\n respectPrefix: false,\n }\n );\n });\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tailwindcss@3.4.4_ts-node@10.9.2_@swc+core@1.4.12_@swc+helpers@0.5.15__@types+node@22.9.0_typescript@5.6.3_/node_modules/tailwindcss/lib/util/createPlugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.4_ts-node@10.9.2_@swc+core@1.4.12_@swc+helpers@0.5.15__@types+node@22.9.0_typescript@5.6.3_/node_modules/tailwindcss/lib/public/create-plugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.4_ts-node@10.9.2_@swc+core@1.4.12_@swc+helpers@0.5.15__@types+node@22.9.0_typescript@5.6.3_/node_modules/tailwindcss/plugin.js","../src/orderly/useColors.ts","../src/utils/theme.ts","../src/orderly/pnlBar.tsx","../src/orderly/customTooltip.tsx","../src/utils/yTickFormatter.ts","../src/orderly/pnlLine.tsx","../src/orderly/xAxisLabel.tsx","../src/orderly/assetLine.tsx","../src/orderly/volBar.tsx","../src/tailwindcss/theme.ts"],"names":["require_createPlugin","__commonJSMin","exports","_default","createPlugin","plugin","config","pluginFunction","configFunction","optionsFunction","options","require_create_plugin","_createPlugin","_interop_require_default","obj","require_plugin","module","useMemo","getThemeColors","root","computedStyle","convertToRGB","color","useColors","colors","themeColors","BarChart","XAxis","YAxis","ResponsiveContainer","Bar","Cell","Tooltip","CartesianGrid","ReferenceLine","Cross","Box","Flex","Text","jsx","jsxs","OrderlyChartTooltip","props","label","value","prefix","unit","coloring","dp","rm","cn","useRef","numberToHumanStyle","tickFormatter","absValue","formatted","RoundedRectangle","fill","x","y","width","height","absHeight","XAxisLabel","stroke","payload","index","containerWidth","_x","CustomizedCross","CustomTooltip","active","todayStr","PnLBarChart","invisible","widthRef","entry","LineChart","Line","PnlLineChart","dataTransfer","data","series","acc","item","AssetLineChart","opacity","tooltip","VolBarChart","isEmpty","b","maxVolume","decimal","number","decimalPlaces","abbreviations","toFixedWithoutRounding","num","fix","numStr","decimalIndex","cutoffIndex","import_plugin","chartPlugin","addComponents","addBase"],"mappings":"ygBAAA,IAAAA,EAAAC,EAAAC,GAAA,cACA,OAAO,eAAeA,EAAS,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,UAAW,CACtC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOC,EACX,CACJ,CAAC,EACD,SAASC,EAAaC,EAAQC,EAAQ,CAClC,MAAO,CACH,QAASD,EACT,OAAAC,CACJ,CACJ,CACAF,EAAa,YAAc,SAASG,EAAgBC,EAAiB,KAAK,CAAC,GAAI,CAC3E,IAAMC,EAAkB,SAASC,EAAS,CACtC,MAAO,CACH,UAAWA,EACX,QAASH,EAAeG,CAAO,EAC/B,OAAQF,EAAeE,CAAO,CAClC,CACJ,EACA,OAAAD,EAAgB,oBAAsB,GAGtCA,EAAgB,iBAAmBF,EACnCE,EAAgB,iBAAmBD,EAC5BC,CACX,EACA,IAAMN,GAAWC,IC/BjB,IAAAO,EAAAV,EAAAC,GAAA,cACA,OAAO,eAAeA,EAAS,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,UAAW,CACtC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOC,EACX,CACJ,CAAC,EACD,IAAMS,GAA8BC,GAAyB,GAA+B,EAC5F,SAASA,GAAyBC,EAAK,CACnC,OAAOA,GAAOA,EAAI,WAAaA,EAAM,CACjC,QAASA,CACb,CACJ,CACA,IAAMX,GAAWS,GAAc,UChB/B,IAAAG,EAAAd,EAAA,CAAAC,GAAAc,IAAA,kBAAIZ,EAAe,IACnBY,EAAO,SAAWZ,EAAa,WAAaA,EAAe,CAAE,QAASA,CAAa,GAAG,UCDtF,OAAS,WAAAa,MAA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AmG,EAAe,QAAAC,CAAQ,EAAG,CAC3CD,EACE,CACE,SAAU,CACR,iDAAkD,CAChD,cAAe,OACjB,EACA,gDAAiD,CAC/C,cAAe,KACjB,CACF,CACF,EACA,CACE,cAAe,EACjB,CACF,CACF,CAAC","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import { useMemo } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\n\nexport const useColors = (colors?: { profit: string; loss: string }) => {\n const _colors = useMemo(() => {\n const themeColors = getThemeColors();\n return {\n profit: colors?.profit || themeColors.profit,\n loss: colors?.loss || themeColors.loss,\n primary: themeColors.primary,\n primaryLight: themeColors.primaryLight,\n };\n }, [colors]);\n\n return _colors;\n};\n","export const getThemeColors = () => {\n const root = document.documentElement;\n const computedStyle = getComputedStyle(root);\n\n const colors = {\n primary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary\")\n ),\n primaryLight: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-primary-light\")\n ),\n secondary: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-secondary\")\n ),\n success: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-success\")\n ),\n warning: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-warning\")\n ),\n danger: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-danger\")),\n info: convertToRGB(computedStyle.getPropertyValue(\"--oui-color-info\")),\n loss: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-loss\")\n ),\n profit: convertToRGB(\n computedStyle.getPropertyValue(\"--oui-color-trading-profit\")\n ),\n };\n\n return colors;\n};\n\nconst convertToRGB = (color: string) => {\n return `rgb(${color.split(\" \").join(\",\")})`;\n};\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\nimport { Flex } from \"@orderly.network/ui\";\n// import { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnLChartDataItem = {\n date: string;\n pnl: number;\n};\n\nexport type PnLChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: PnLChartDataItem[];\n invisible?: boolean;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height } = props;\n\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n />\n );\n};\n\nexport const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index, width, containerWidth } = props;\n\n const _x =\n index === 0\n ? 48\n : containerWidth > 0\n ? containerWidth - 10\n : width + payload.offset;\n\n return (\n <g transform={`translate(${_x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor={index === 0 ? \"start\" : \"end\"}\n // textAnchor={\"start\"}\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, stroke, fill } = props;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nexport const PnLBarChart = (props: PnLChartProps) => {\n const { invisible } = props;\n const colors = useColors(props.colors);\n const widthRef = useRef(0);\n\n return (\n // @ts-ignore\n <ResponsiveContainer\n className={cn(invisible && \"chart-invisible\")}\n onResize={(width, height) => {\n // console.log(\"width\", width, height);\n widthRef.current = width;\n }}\n >\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -10, top: 10, right: 10, bottom: 30 }}\n >\n {!invisible && (\n // @ts-ignore\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip />}\n />\n )}\n\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n <ReferenceLine y={0} stroke=\"rgba(0,0,0,0.04)\" />\n\n {!invisible && (\n // @ts-ignore\n <Bar dataKey=\"pnl\" shape={<RoundedRectangle />}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.pnl > 0 ? colors.profit : colors.loss}\n />\n );\n })}\n </Bar>\n )}\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickFormatter={(value) => tickFormatter(value)}\n tickLine={false}\n axisLine={false}\n dataKey={\"pnl\"}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel containerWidth={widthRef.current} />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n />\n </BarChart>\n </ResponsiveContainer>\n );\n};\n","import { Box, Flex, Text } from \"@orderly.network/ui\";\n\nexport const OrderlyChartTooltip = (props: {\n label: string;\n value: string | number;\n unit?: string;\n prefix?: React.ReactNode;\n titleClassName?: string;\n coloring?: boolean;\n dp?: number;\n rm?: number;\n}) => {\n const {\n label,\n value,\n prefix,\n unit = \"USDC\",\n coloring = false,\n dp,\n rm,\n } = props;\n return (\n <Box intensity={600} p={3} r=\"md\">\n <Flex direction={\"row\"} className={props.titleClassName}>\n {prefix}\n <Text.numeral\n unit={unit}\n as=\"div\"\n size=\"sm\"\n coloring={coloring}\n showIdentifier={coloring}\n unitClassName=\"oui-text-base-contrast-54 oui-ml-1\"\n weight=\"semibold\"\n rm={rm}\n dp={dp}\n >\n {value}\n </Text.numeral>\n </Flex>\n <Text size=\"2xs\" intensity={54} weight=\"semibold\">\n {label}\n </Text>\n </Box>\n );\n};\n","import { numberToHumanStyle } from \"@orderly.network/utils\";\n\nexport const tickFormatter = (value: number) => {\n let absValue = Math.abs(value);\n const dp = absValue === 0 ? 0 : absValue <= 10 ? 2 : absValue <= 100 ? 1 : 0;\n\n const formatted = numberToHumanStyle(absValue, dp);\n return value < 0 ? `-${formatted}` : formatted;\n};\n","import { useMemo, useRef } from \"react\";\nimport { getThemeColors } from \"../utils/theme\";\nimport { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n ReferenceLine,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: any;\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n coloring\n />\n );\n }\n\n return null;\n};\n\nconst PnlLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n const dataTransfer = (data: any[]) => {\n const series: any[] = [];\n\n data?.reduce((acc, item) => {\n acc += item.pnl;\n series.push({\n ...item,\n pnl: acc,\n _pnl: item.pnl,\n // date: new Date(item.date).getTime(),\n });\n return acc;\n }, 0);\n\n return series;\n };\n\n const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n data={data}\n margin={{ top: 20, right: 10, left: -10, bottom: 0 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n // scale={\"time\"}\n // type=\"number\"\n // range={}\n />\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"pnl\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <ReferenceLine y={0} stroke=\"#000\" /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"pnl\"\n stroke={colors.primaryLight}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { PnlLineChart };\n","export const XAxisLabel = (props: any) => {\n const { x, y, stroke, payload, index } = props;\n\n return (\n <g transform={`translate(${x},${y - 6})`}>\n <text\n x={0}\n y={0}\n dy={16}\n textAnchor=\"end\"\n fontSize={10}\n fill={\"rgba(255,255,255,0.54)\"}\n >\n {index === 0 ? payload.value : \"Now\"}\n </text>\n </g>\n );\n};\n","import { useColors } from \"./useColors\";\n// import { Line } from \"../line/line\";\nimport {\n LineChart,\n XAxis,\n YAxis,\n Line,\n CartesianGrid,\n Tooltip,\n Label,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { XAxisLabel } from \"./xAxisLabel\";\nimport { useRef } from \"react\";\nimport { numberToHumanStyle } from \"@orderly.network/utils\";\nimport { tickFormatter } from \"../utils/yTickFormatter\";\n\nexport type AssetChartDataItem = {\n date: string;\n account_value: number;\n};\n\nexport type PnlLineChartProps = {\n colors?: {\n profit: string;\n loss: string;\n };\n data: AssetChartDataItem[];\n invisible?: boolean;\n};\n\nconst CustomTooltip = (props: TooltipProps<any, any>) => {\n const { active, payload, label } = props;\n\n const todayStr = useRef(new Date().toISOString().split(\"T\")[0]);\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label === todayStr.current ? \"Now\" : label}\n value={payload[0].value}\n />\n );\n }\n\n return null;\n};\n\nconst AssetLineChart = (props: PnlLineChartProps) => {\n const colors = useColors(props.colors);\n\n // const dataTransfer = (data: any[]) => {\n // const series: any[] = [];\n\n // data.reduce((acc, item) => {\n // acc += item.pnl;\n // series.push({ ...item, pnl: acc, _pnl: item.pnl });\n // return acc;\n // }, 0);\n\n // return series;\n // };\n\n // const data = useMemo(() => dataTransfer(props.data), [props.data]);\n\n return (\n // @ts-ignore\n <ResponsiveContainer className={props.invisible ? \"chart-invisible\" : \"\"}>\n {/* @ts-ignore */}\n <LineChart\n width={530}\n height={180}\n data={props.data}\n margin={{ top: 20, right: 10, left: -20, bottom: -10 }}\n >\n <CartesianGrid vertical={false} stroke=\"#FFFFFF\" strokeOpacity={0.04} />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n interval={props.data.length - 2}\n // tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tick={<XAxisLabel />}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.04}\n ></XAxis>\n {/* @ts-ignore */}\n <YAxis\n dataKey=\"account_value\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n tickFormatter={(value) => tickFormatter(value)}\n />\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Tooltip\n cursor={{ strokeDasharray: \"3 2\", strokeOpacity: 0.16 }}\n content={<CustomTooltip />}\n />\n )}\n\n {/* <Legend /> */}\n {/* @ts-ignore */}\n {!props.invisible && (\n // @ts-ignore\n <Line\n type=\"natural\"\n dataKey=\"account_value\"\n stroke={colors.profit}\n strokeWidth={2}\n dot={false}\n isAnimationActive={false}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport { AssetLineChart };\n","import { useColors } from \"./useColors\";\nimport {\n BarChart,\n XAxis,\n YAxis,\n ResponsiveContainer,\n Bar,\n Cell,\n Tooltip,\n CartesianGrid,\n ReferenceLine,\n Cross,\n} from \"recharts\";\nimport type { TooltipProps } from \"recharts\";\nimport { OrderlyChartTooltip } from \"./customTooltip\";\nimport { Box, cn } from \"@orderly.network/ui\";\n\nexport type VolChartDataItem = {\n date: string;\n volume: number;\n opacity?: string | number;\n};\n\nexport type VolChartTooltip = {\n rm?: number;\n dp?: number;\n};\n\nexport type VolChartProps = {\n colors?: {\n fill: string;\n };\n data: VolChartDataItem[];\n tooltip?: VolChartTooltip;\n className?: string;\n};\n\nconst RoundedRectangle = (props: any) => {\n const { fill, x, y, width, height, opacity } = props;\n const absHeight = Math.abs(height);\n\n return (\n <rect\n rx={2}\n x={x}\n y={height > 0 ? y : y + height}\n width={width}\n height={absHeight}\n stroke=\"none\"\n fill={fill}\n opacity={opacity}\n />\n );\n};\n\nconst CustomizedCross = (props: any) => {\n const { width, height, payload, stroke, fill } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n return (\n // @ts-ignore\n <Cross\n // y={props.y + props.top}\n x={props.x + props.width / 2}\n top={props.top}\n height={height}\n width={1}\n stroke={\"rgba(255,255,255,0.16)\"}\n strokeDasharray={\"3 2\"}\n fill={\"none\"}\n />\n );\n};\n\nconst CustomTooltip = (\n props: TooltipProps<any, any> & { tooltip?: VolChartTooltip }\n) => {\n const { active, payload, label, tooltip } = props;\n\n if (payload?.[0]?.value === 0) return null;\n\n if (active && payload && payload.length) {\n return (\n <OrderlyChartTooltip\n label={label}\n value={payload[0].value}\n // prefix=\"Commission\"\n titleClassName=\"oui-gap-4\"\n rm={tooltip?.rm}\n dp={tooltip?.dp}\n />\n );\n }\n\n return null;\n};\n\nexport const VolBarChart = (props: VolChartProps) => {\n const colors = useColors(\n props.colors?.fill\n ? { profit: props.colors?.fill, loss: props.colors?.fill }\n : undefined\n );\n\n const isEmpty = props.data.reduce((a, b) => a + b.volume, 0) === 0;\n const maxVolume = props.data.reduce((a,b) => (a > b.volume ? a : b.volume), 0);\n const decimal = maxVolume <= 10 ? 2 : (maxVolume <= 100 ? 1 : 0);\n\n return (\n // @ts-ignore\n <Box className={cn(props.className)}>\n {/* @ts-ignore */}\n <ResponsiveContainer>\n {/* @ts-ignore */}\n <BarChart\n data={props.data}\n margin={{ left: -0, top: 6, right: 0, bottom: 20 }}\n >\n {/* @ts-ignore */}\n <Tooltip\n // cursor={{ fillOpacity: 0.1 }}\n cursor={<CustomizedCross />}\n content={<CustomTooltip tooltip={props.tooltip} />}\n />\n <CartesianGrid\n vertical={false}\n stroke=\"#FFFFFF\"\n strokeOpacity={0.08}\n repeatCount={6}\n />\n <ReferenceLine y={0} stroke=\"#000\" />\n {/* @ts-ignore */}\n <Bar dataKey=\"volume\" shape={<RoundedRectangle />} minPointSize={1}>\n {props.data.map((entry, index) => {\n return (\n // @ts-ignore\n <Cell\n key={`cell-${index}`}\n fill={entry.volume > 0 ? colors.profit : colors.loss}\n opacity={entry.opacity}\n />\n );\n })}\n </Bar>\n {/* @ts-ignore */}\n <YAxis\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n tickLine={false}\n axisLine={false}\n dataKey={\"volume\"}\n tickFormatter={(value, index) => {\n if (isEmpty) return `${index * 100}`;\n return numberToHumanStyle(value, decimal);\n }}\n width={45}\n />\n {/* @ts-ignore */}\n <XAxis\n dataKey=\"date\"\n // axisLine={false}\n tickLine={false}\n interval={props.data.length - 2}\n // tick={renderQuarterTick}\n height={1}\n // scale=\"time\"\n tick={{ fontSize: 10, fill: \"rgba(255,255,255,0.54)\" }}\n stroke=\"rgb(229, 231, 235)\"\n strokeOpacity={0.2}\n />\n </BarChart>\n </ResponsiveContainer>\n </Box>\n );\n};\nfunction numberToHumanStyle(number: number, decimalPlaces: number = 0): string {\n const abbreviations = [\"\", \"K\", \"M\", \"B\", \"T\"];\n\n let index = 0;\n while (number >= 1000 && index < abbreviations.length - 1) {\n number /= 1000;\n index++;\n }\n\n const roundedNumber = toFixedWithoutRounding(number, decimalPlaces);\n\n return `${roundedNumber}${abbreviations[index]}`;\n}\n\nfunction toFixedWithoutRounding(num: number, fix: number): string {\n const numStr = num.toString();\n const decimalIndex = numStr.indexOf(\".\");\n\n if (decimalIndex === -1 || fix === 0) {\n return numStr.split(\".\")[0];\n }\n\n const cutoffIndex = decimalIndex + fix + 1;\n\n return numStr.slice(0, cutoffIndex);\n}\n","import plugin from \"tailwindcss/plugin\";\n\nimport { PluginCreator } from \"tailwindcss/types/config\";\n\nexport const chartPlugin: PluginCreator = () =>\n plugin(function ({ addComponents, addBase }) {\n addComponents(\n {\n \".xAxis\": {\n \".recharts-cartesian-axis-tick:first-child text\": {\n \"text-anchor\": \"start\",\n },\n \".recharts-cartesian-axis-tick:last-child text\": {\n \"text-anchor\": \"end\",\n },\n },\n },\n {\n respectPrefix: false,\n }\n );\n });\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderly.network/chart",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1-alpha.0",
|
|
4
4
|
"description": "Charting library for Orderly Network",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react-dom": "^18.2.0",
|
|
24
24
|
"tailwindcss": "^3.4.4",
|
|
25
25
|
"tsup": "^8.1.0",
|
|
26
|
-
"tsconfig": "0.3.
|
|
26
|
+
"tsconfig": "0.3.16"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "^18.3.1",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"d3-selection": "^3.0.0",
|
|
37
37
|
"d3-shape": "^3.2.0",
|
|
38
38
|
"recharts": "^2.12.7",
|
|
39
|
-
"@orderly.network/
|
|
40
|
-
"@orderly.network/
|
|
39
|
+
"@orderly.network/utils": "2.0.1-alpha.0",
|
|
40
|
+
"@orderly.network/ui": "2.0.1-alpha.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsup",
|