@object-ui/plugin-charts 11.2.0 → 11.3.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/CHANGELOG.md +13 -0
- package/dist/index.js +9 -2
- package/dist/index.umd.cjs +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @object-ui/plugin-charts
|
|
2
2
|
|
|
3
|
+
## 11.3.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d88c8ec]
|
|
8
|
+
- Updated dependencies [b7237bb]
|
|
9
|
+
- Updated dependencies [d23d6eb]
|
|
10
|
+
- @object-ui/components@11.3.0
|
|
11
|
+
- @object-ui/i18n@11.3.0
|
|
12
|
+
- @object-ui/core@11.3.0
|
|
13
|
+
- @object-ui/react@11.3.0
|
|
14
|
+
- @object-ui/types@11.3.0
|
|
15
|
+
|
|
3
16
|
## 11.2.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,14 @@ import { SchemaRenderer as we, SchemaRendererContext as Te, useDataScope as B, u
|
|
|
8
8
|
import { AlertCircle as De, ArrowUpRight as Oe } from "lucide-react";
|
|
9
9
|
import { useSafeFieldLabel as ke, useSafeTranslate as Ae } from "@object-ui/i18n";
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var V = Object.defineProperty, H = (e, t
|
|
11
|
+
var V = Object.defineProperty, H = (e, t, n) => () => {
|
|
12
|
+
if (n) throw n[0];
|
|
13
|
+
try {
|
|
14
|
+
return e && (t = e(e = 0)), t;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
throw n = [e], e;
|
|
17
|
+
}
|
|
18
|
+
}, je = (e, t) => {
|
|
12
19
|
let n = {};
|
|
13
20
|
for (var r in e) V(n, r, {
|
|
14
21
|
get: e[r],
|
|
@@ -746,7 +753,7 @@ function Je({ chartType: e = "bar", data: t = [], config: n = {}, xAxisKey: r =
|
|
|
746
753
|
]
|
|
747
754
|
})
|
|
748
755
|
});
|
|
749
|
-
let k = u === "horizontal-bar", N = y(), we = s ? Object.values(s).map((e) => Z(String(e))) : [], Te = Array.from(new Set([
|
|
756
|
+
let k = u === "horizontal-bar", N = y(), we = s ? Object.values(s).map((e) => Z(String(e))) : [], Te = Array.from(/* @__PURE__ */ new Set([
|
|
750
757
|
...N,
|
|
751
758
|
...we,
|
|
752
759
|
...i.map((e, t) => Z(n[e.dataKey]?.color || N[t % N.length] || X))
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@object-ui/core"),require("react"),require("@object-ui/components"),require("react/jsx-runtime"),require("recharts"),require("@object-ui/react"),require("lucide-react"),require("@object-ui/i18n")):typeof define==`function`&&define.amd?define([`exports`,`@object-ui/core`,`react`,`@object-ui/components`,`react/jsx-runtime`,`recharts`,`@object-ui/react`,`lucide-react`,`@object-ui/i18n`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ObjectUIPluginCharts={},e.ObjectUICore,e.React,e.ObjectUIComponents,e.react_jsx_runtime,e.recharts,e.ObjectUIReact,e.lucide_react,e._object_ui_i18n))})(this,function(e,t,n,r,i,a,o,s,c){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var l=Object.create,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,h=(e,t)=>()=>(e&&(t=e(e=0)),t),g=(e,t)=>{let n={};for(var r in e)u(n,r,{get:e[r],enumerable:!0});return t||u(n,Symbol.toStringTag,{value:`Module`}),n},_=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=f(t),a=0,o=i.length,s;a<o;a++)s=i[a],!m.call(e,s)&&s!==n&&u(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=d(t,s))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:l(p(e)),_(t||!e||!e.__esModule?u(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var v=g({default:()=>x});function y(e,t=14){return e.length>t?`${e.slice(0,t-1)}…`:e}function b({x:e,y:t,payload:n}){let r=String(n?.value??``),a=y(r);return(0,i.jsx)(`g`,{transform:`translate(${e},${t})`,children:(0,i.jsxs)(`text`,{dy:10,textAnchor:`end`,transform:`rotate(-32)`,fill:`hsl(var(--muted-foreground))`,fontSize:11,fontFamily:`monospace`,children:[r!==a&&(0,i.jsx)(`title`,{children:r}),a]})})}function x({data:e=[],dataKey:t=`value`,xAxisKey:n=`name`,height:r=400,className:o=``,color:s=`hsl(var(--primary))`}){let c=e.map(e=>String(e?.[n]??``)),l=c.length>4||c.some(e=>e.length>8);return(0,i.jsx)(`div`,{className:`p-2 sm:p-3 md:p-4 rounded-xl border border-border bg-card/40 backdrop-blur-sm shadow-lg shadow-background/5 ${o}`,children:(0,i.jsx)(a.ResponsiveContainer,{width:`100%`,height:r,children:(0,i.jsxs)(a.BarChart,{data:e,margin:{top:10,right:10,left:10,bottom:l?24:5},children:[(0,i.jsxs)(`defs`,{children:[(0,i.jsxs)(`linearGradient`,{id:`barGradient`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,i.jsx)(`stop`,{offset:`0%`,stopColor:s,stopOpacity:1}),(0,i.jsx)(`stop`,{offset:`90%`,stopColor:s,stopOpacity:.6}),(0,i.jsx)(`stop`,{offset:`100%`,stopColor:s,stopOpacity:.3})]}),(0,i.jsxs)(`filter`,{id:`glow`,height:`130%`,children:[(0,i.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`3`,result:`blur`}),(0,i.jsx)(`feOffset`,{in:`blur`,dx:`0`,dy:`0`,result:`offsetBlur`}),(0,i.jsx)(`feFlood`,{floodColor:s,floodOpacity:`0.5`,result:`offsetColor`}),(0,i.jsx)(`feComposite`,{in:`offsetColor`,in2:`offsetBlur`,operator:`in`,result:`offsetBlur`}),(0,i.jsxs)(`feMerge`,{children:[(0,i.jsx)(`feMergeNode`,{in:`offsetBlur`}),(0,i.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),(0,i.jsx)(a.CartesianGrid,{strokeDasharray:`3 3`,stroke:`hsl(var(--border))`,vertical:!1}),(0,i.jsx)(a.XAxis,{dataKey:n,tick:l?(0,i.jsx)(b,{}):{fill:`hsl(var(--muted-foreground))`,fontSize:12,fontFamily:`monospace`},tickLine:!1,axisLine:{stroke:`hsl(var(--border))`},interval:l?0:`preserveStartEnd`,height:l?56:void 0,dy:l?void 0:10}),(0,i.jsx)(a.YAxis,{tick:{fill:`hsl(var(--muted-foreground))`,fontSize:12,fontFamily:`monospace`},tickLine:!1,axisLine:!1}),(0,i.jsx)(a.Tooltip,{cursor:{fill:`hsl(var(--muted))`,opacity:.2},contentStyle:{backgroundColor:`hsl(var(--popover))`,borderColor:`hsl(var(--border))`,color:`hsl(var(--popover-foreground))`,borderRadius:`8px`,fontFamily:`monospace`,boxShadow:`0 4px 6px -1px rgb(0 0 0 / 0.1)`},itemStyle:{color:`hsl(var(--primary))`}}),(0,i.jsx)(a.Legend,{wrapperStyle:{paddingTop:`20px`,fontFamily:`monospace`}}),(0,i.jsx)(a.Bar,{dataKey:t,fill:`url(#barGradient)`,radius:[4,4,0,0],filter:`url(#glow)`,animationDuration:1500})]})})})}var S=h((()=>{}));function C(){let e=n.useContext(A);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function w({id:e,className:t,children:r,config:o,...s}){let c=n.useId(),l=`chart-${e||c.replace(/:/g,``)}`;return(0,i.jsx)(A.Provider,{value:{config:o},children:(0,i.jsxs)(`div`,{"data-slot":`chart`,"data-chart":l,className:O(`block w-full h-[350px] text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground`,t),style:{minHeight:280,minWidth:0,...s.style},...s,children:[(0,i.jsx)(j,{id:l,config:o}),(0,i.jsx)(a.ResponsiveContainer,{width:`100%`,height:`100%`,children:r})]})})}function T({active:e,payload:t,className:r,indicator:a=`dot`,hideLabel:o=!1,hideIndicator:s=!1,label:c,labelFormatter:l,labelClassName:u,formatter:d,color:f,nameKey:p,labelKey:m}){let{config:h}=C(),g=n.useMemo(()=>{if(o||!t?.length)return null;let[e]=t,n=D(h,e,`${m||e?.dataKey||e?.name||`value`}`),r=!m&&typeof c==`string`?h[c]?.label||c:n?.label;return l?(0,i.jsx)(`div`,{className:O(`font-medium`,u),children:l(r,t)}):r?(0,i.jsx)(`div`,{className:O(`font-medium`,u),children:r}):null},[c,l,t,o,u,h,m]);if(!e||!t?.length)return null;let _=t.length===1&&a!==`dot`;return(0,i.jsxs)(`div`,{className:O(`border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl`,r),children:[_?null:g,(0,i.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=D(h,e,`${p||e.name||e.dataKey||`value`}`),r=f||e.payload.fill||e.color;return(0,i.jsx)(`div`,{className:O(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,a===`dot`?`items-center`:``),children:d&&e?.value!==void 0&&e.name?d(e.value,e.name,e,t,e.payload):(0,i.jsxs)(i.Fragment,{children:[n?.icon?(0,i.jsx)(n.icon,{}):!s&&(0,i.jsx)(`div`,{className:O(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,a===`dot`?`h-2.5 w-2.5`:``,a===`line`?`w-1`:``,a===`dashed`?`w-0 border-[1.5px] border-dashed bg-transparent`:``,_&&a===`dashed`?`my-0.5`:``),style:{"--color-bg":r,"--color-border":r}}),(0,i.jsxs)(`div`,{className:O(`flex flex-1 justify-between leading-none`,_?`items-end`:`items-center`),children:[(0,i.jsxs)(`div`,{className:`grid gap-1.5`,children:[_?g:null,(0,i.jsx)(`span`,{className:`text-muted-foreground`,children:n?.label||e.name})]}),e.value&&(0,i.jsx)(`span`,{className:`text-foreground font-mono font-medium tabular-nums`,children:e.value.toLocaleString()})]})]})},e.dataKey)})})]})}function E({className:e,hideIcon:t=!1,payload:n,verticalAlign:r=`bottom`,nameKey:a}){let{config:o}=C();return n?.length?(0,i.jsx)(`div`,{className:O(`flex items-center justify-center gap-4`,r===`top`?`pb-3`:`pt-3`,e),children:n.filter(e=>e.type!==`none`).map(e=>{let n=D(o,e,`${a||e.dataKey||`value`}`);return(0,i.jsxs)(`div`,{className:O(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`),children:[n?.icon&&!t?(0,i.jsx)(n.icon,{}):(0,i.jsx)(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),n?.label]},e.value)})}):null}function D(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var O,k,A,j,M,N,P=h((()=>{O=(...e)=>e.filter(Boolean).join(` `),k={light:``,dark:`.dark`},A=n.createContext(null),j=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?(0,i.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(k).map(([t,r])=>`
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@object-ui/core"),require("react"),require("@object-ui/components"),require("react/jsx-runtime"),require("recharts"),require("@object-ui/react"),require("lucide-react"),require("@object-ui/i18n")):typeof define==`function`&&define.amd?define([`exports`,`@object-ui/core`,`react`,`@object-ui/components`,`react/jsx-runtime`,`recharts`,`@object-ui/react`,`lucide-react`,`@object-ui/i18n`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ObjectUIPluginCharts={},e.ObjectUICore,e.React,e.ObjectUIComponents,e.react_jsx_runtime,e.recharts,e.ObjectUIReact,e.lucide_react,e._object_ui_i18n))})(this,function(e,t,n,r,i,a,o,s,c){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var l=Object.create,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,h=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},g=(e,t)=>{let n={};for(var r in e)u(n,r,{get:e[r],enumerable:!0});return t||u(n,Symbol.toStringTag,{value:`Module`}),n},_=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=f(t),a=0,o=i.length,s;a<o;a++)s=i[a],!m.call(e,s)&&s!==n&&u(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=d(t,s))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:l(p(e)),_(t||!e||!e.__esModule?u(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var v=g({default:()=>x});function y(e,t=14){return e.length>t?`${e.slice(0,t-1)}…`:e}function b({x:e,y:t,payload:n}){let r=String(n?.value??``),a=y(r);return(0,i.jsx)(`g`,{transform:`translate(${e},${t})`,children:(0,i.jsxs)(`text`,{dy:10,textAnchor:`end`,transform:`rotate(-32)`,fill:`hsl(var(--muted-foreground))`,fontSize:11,fontFamily:`monospace`,children:[r!==a&&(0,i.jsx)(`title`,{children:r}),a]})})}function x({data:e=[],dataKey:t=`value`,xAxisKey:n=`name`,height:r=400,className:o=``,color:s=`hsl(var(--primary))`}){let c=e.map(e=>String(e?.[n]??``)),l=c.length>4||c.some(e=>e.length>8);return(0,i.jsx)(`div`,{className:`p-2 sm:p-3 md:p-4 rounded-xl border border-border bg-card/40 backdrop-blur-sm shadow-lg shadow-background/5 ${o}`,children:(0,i.jsx)(a.ResponsiveContainer,{width:`100%`,height:r,children:(0,i.jsxs)(a.BarChart,{data:e,margin:{top:10,right:10,left:10,bottom:l?24:5},children:[(0,i.jsxs)(`defs`,{children:[(0,i.jsxs)(`linearGradient`,{id:`barGradient`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,i.jsx)(`stop`,{offset:`0%`,stopColor:s,stopOpacity:1}),(0,i.jsx)(`stop`,{offset:`90%`,stopColor:s,stopOpacity:.6}),(0,i.jsx)(`stop`,{offset:`100%`,stopColor:s,stopOpacity:.3})]}),(0,i.jsxs)(`filter`,{id:`glow`,height:`130%`,children:[(0,i.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`3`,result:`blur`}),(0,i.jsx)(`feOffset`,{in:`blur`,dx:`0`,dy:`0`,result:`offsetBlur`}),(0,i.jsx)(`feFlood`,{floodColor:s,floodOpacity:`0.5`,result:`offsetColor`}),(0,i.jsx)(`feComposite`,{in:`offsetColor`,in2:`offsetBlur`,operator:`in`,result:`offsetBlur`}),(0,i.jsxs)(`feMerge`,{children:[(0,i.jsx)(`feMergeNode`,{in:`offsetBlur`}),(0,i.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),(0,i.jsx)(a.CartesianGrid,{strokeDasharray:`3 3`,stroke:`hsl(var(--border))`,vertical:!1}),(0,i.jsx)(a.XAxis,{dataKey:n,tick:l?(0,i.jsx)(b,{}):{fill:`hsl(var(--muted-foreground))`,fontSize:12,fontFamily:`monospace`},tickLine:!1,axisLine:{stroke:`hsl(var(--border))`},interval:l?0:`preserveStartEnd`,height:l?56:void 0,dy:l?void 0:10}),(0,i.jsx)(a.YAxis,{tick:{fill:`hsl(var(--muted-foreground))`,fontSize:12,fontFamily:`monospace`},tickLine:!1,axisLine:!1}),(0,i.jsx)(a.Tooltip,{cursor:{fill:`hsl(var(--muted))`,opacity:.2},contentStyle:{backgroundColor:`hsl(var(--popover))`,borderColor:`hsl(var(--border))`,color:`hsl(var(--popover-foreground))`,borderRadius:`8px`,fontFamily:`monospace`,boxShadow:`0 4px 6px -1px rgb(0 0 0 / 0.1)`},itemStyle:{color:`hsl(var(--primary))`}}),(0,i.jsx)(a.Legend,{wrapperStyle:{paddingTop:`20px`,fontFamily:`monospace`}}),(0,i.jsx)(a.Bar,{dataKey:t,fill:`url(#barGradient)`,radius:[4,4,0,0],filter:`url(#glow)`,animationDuration:1500})]})})})}var S=h((()=>{}));function C(){let e=n.useContext(A);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function w({id:e,className:t,children:r,config:o,...s}){let c=n.useId(),l=`chart-${e||c.replace(/:/g,``)}`;return(0,i.jsx)(A.Provider,{value:{config:o},children:(0,i.jsxs)(`div`,{"data-slot":`chart`,"data-chart":l,className:O(`block w-full h-[350px] text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground`,t),style:{minHeight:280,minWidth:0,...s.style},...s,children:[(0,i.jsx)(j,{id:l,config:o}),(0,i.jsx)(a.ResponsiveContainer,{width:`100%`,height:`100%`,children:r})]})})}function T({active:e,payload:t,className:r,indicator:a=`dot`,hideLabel:o=!1,hideIndicator:s=!1,label:c,labelFormatter:l,labelClassName:u,formatter:d,color:f,nameKey:p,labelKey:m}){let{config:h}=C(),g=n.useMemo(()=>{if(o||!t?.length)return null;let[e]=t,n=D(h,e,`${m||e?.dataKey||e?.name||`value`}`),r=!m&&typeof c==`string`?h[c]?.label||c:n?.label;return l?(0,i.jsx)(`div`,{className:O(`font-medium`,u),children:l(r,t)}):r?(0,i.jsx)(`div`,{className:O(`font-medium`,u),children:r}):null},[c,l,t,o,u,h,m]);if(!e||!t?.length)return null;let _=t.length===1&&a!==`dot`;return(0,i.jsxs)(`div`,{className:O(`border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl`,r),children:[_?null:g,(0,i.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=D(h,e,`${p||e.name||e.dataKey||`value`}`),r=f||e.payload.fill||e.color;return(0,i.jsx)(`div`,{className:O(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,a===`dot`?`items-center`:``),children:d&&e?.value!==void 0&&e.name?d(e.value,e.name,e,t,e.payload):(0,i.jsxs)(i.Fragment,{children:[n?.icon?(0,i.jsx)(n.icon,{}):!s&&(0,i.jsx)(`div`,{className:O(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,a===`dot`?`h-2.5 w-2.5`:``,a===`line`?`w-1`:``,a===`dashed`?`w-0 border-[1.5px] border-dashed bg-transparent`:``,_&&a===`dashed`?`my-0.5`:``),style:{"--color-bg":r,"--color-border":r}}),(0,i.jsxs)(`div`,{className:O(`flex flex-1 justify-between leading-none`,_?`items-end`:`items-center`),children:[(0,i.jsxs)(`div`,{className:`grid gap-1.5`,children:[_?g:null,(0,i.jsx)(`span`,{className:`text-muted-foreground`,children:n?.label||e.name})]}),e.value&&(0,i.jsx)(`span`,{className:`text-foreground font-mono font-medium tabular-nums`,children:e.value.toLocaleString()})]})]})},e.dataKey)})})]})}function E({className:e,hideIcon:t=!1,payload:n,verticalAlign:r=`bottom`,nameKey:a}){let{config:o}=C();return n?.length?(0,i.jsx)(`div`,{className:O(`flex items-center justify-center gap-4`,r===`top`?`pb-3`:`pt-3`,e),children:n.filter(e=>e.type!==`none`).map(e=>{let n=D(o,e,`${a||e.dataKey||`value`}`);return(0,i.jsxs)(`div`,{className:O(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`),children:[n?.icon&&!t?(0,i.jsx)(n.icon,{}):(0,i.jsx)(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),n?.label]},e.value)})}):null}function D(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var O,k,A,j,M,N,P=h((()=>{O=(...e)=>e.filter(Boolean).join(` `),k={light:``,dark:`.dark`},A=n.createContext(null),j=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?(0,i.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(k).map(([t,r])=>`
|
|
2
2
|
${r} [data-chart=${e}] {
|
|
3
3
|
${n.map(([e,n])=>{let r=n.theme?.[t]||n.color;return r?` --color-${e}: ${r};`:null}).join(`
|
|
4
4
|
`)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-charts",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Chart components plugin for Object UI, powered by Recharts",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"lucide-react": "^1.
|
|
28
|
-
"recharts": "^3.
|
|
29
|
-
"@object-ui/components": "11.
|
|
30
|
-
"@object-ui/core": "11.
|
|
31
|
-
"@object-ui/i18n": "11.
|
|
32
|
-
"@object-ui/react": "11.
|
|
33
|
-
"@object-ui/types": "11.
|
|
27
|
+
"lucide-react": "^1.22.0",
|
|
28
|
+
"recharts": "^3.9.0",
|
|
29
|
+
"@object-ui/components": "11.3.0",
|
|
30
|
+
"@object-ui/core": "11.3.0",
|
|
31
|
+
"@object-ui/i18n": "11.3.0",
|
|
32
|
+
"@object-ui/react": "11.3.0",
|
|
33
|
+
"@object-ui/types": "11.3.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/react": "19.2.17",
|
|
41
41
|
"@types/react-dom": "19.2.3",
|
|
42
|
-
"@vitejs/plugin-react": "^6.0.
|
|
42
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
43
43
|
"typescript": "^6.0.3",
|
|
44
|
-
"vite": "^8.0
|
|
45
|
-
"vite-plugin-dts": "^5.0.
|
|
44
|
+
"vite": "^8.1.0",
|
|
45
|
+
"vite-plugin-dts": "^5.0.3"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"objectui",
|