@silverpoint/react 0.1.1 → 0.2.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/activity-grid.js +3 -2
- package/dist/area-chart.js +3 -2
- package/dist/bar-chart.js +3 -2
- package/dist/bubble-chart.js +3 -2
- package/dist/bullet-chart.js +3 -2
- package/dist/candlestick-chart.js +3 -2
- package/dist/chord-ring.js +3 -2
- package/dist/{chunk-FDROMD5U.js → chunk-2NQ4DXLT.js} +2 -2
- package/dist/{chunk-INZGRNO3.js → chunk-46S63XYT.js} +10 -3
- package/dist/chunk-46S63XYT.js.map +1 -0
- package/dist/chunk-4GQ5X2WK.js +10 -0
- package/dist/chunk-4GQ5X2WK.js.map +1 -0
- package/dist/{chunk-4DUH2UHE.js → chunk-4LS7B7CK.js} +2 -2
- package/dist/{chunk-CXXCUD4B.js → chunk-6KPX5HYV.js} +2 -2
- package/dist/{chunk-6FZO4SMF.js → chunk-74ONV2GE.js} +2 -2
- package/dist/{chunk-ORIH4UQP.js → chunk-7KED5KUU.js} +2 -2
- package/dist/{chunk-Y7WZS3VB.js → chunk-A42AKCPS.js} +2 -2
- package/dist/{chunk-WLHXHAEV.js → chunk-CERHTEML.js} +2 -2
- package/dist/{chunk-2JXPSUCK.js → chunk-DTBEXYYC.js} +2 -2
- package/dist/{chunk-JCIEWEQC.js → chunk-E5LIZKJT.js} +2 -2
- package/dist/{chunk-R6PUPQUI.js → chunk-FQHAHZBR.js} +2 -2
- package/dist/{chunk-HH2RZCH6.js → chunk-FZMY6NWJ.js} +2 -2
- package/dist/{chunk-5LQGSI6N.js → chunk-GBTH55AM.js} +2 -2
- package/dist/{chunk-KTBGRGB7.js → chunk-GYUTG5R2.js} +2 -2
- package/dist/{chunk-NAYUAF7O.js → chunk-H3UH7F5S.js} +2 -2
- package/dist/{chunk-AQMWZQ2P.js → chunk-H4NCK6RE.js} +2 -2
- package/dist/{chunk-LOIVX5IV.js → chunk-J5OOZDFF.js} +2 -2
- package/dist/{chunk-BIIINOXE.js → chunk-JRAHTS5O.js} +2 -2
- package/dist/{chunk-2Q2ZZTUW.js → chunk-KDQHOND7.js} +2 -2
- package/dist/{chunk-G2A5PWIR.js → chunk-NHUVAE4Z.js} +2 -2
- package/dist/{chunk-NOVLEZPR.js → chunk-NW2SQ6QW.js} +2 -2
- package/dist/chunk-OD6N2ATZ.js +45 -0
- package/dist/chunk-OD6N2ATZ.js.map +1 -0
- package/dist/{chunk-DZPDZGM7.js → chunk-OFDVE64G.js} +2 -2
- package/dist/{chunk-V3PBT4XB.js → chunk-P53KSCPE.js} +2 -2
- package/dist/{chunk-2OAPH7JN.js → chunk-PWFDYIXV.js} +2 -2
- package/dist/{chunk-HYQLSAEO.js → chunk-TAQOBBF7.js} +2 -2
- package/dist/{chunk-DYK3SUIZ.js → chunk-TKQ2PQDW.js} +2 -2
- package/dist/{chunk-RUC577P7.js → chunk-UXVYCPFL.js} +2 -2
- package/dist/{chunk-CCFFHU7V.js → chunk-VISNFHPM.js} +2 -2
- package/dist/{chunk-YS5YVHK5.js → chunk-WHZ4ALRI.js} +2 -2
- package/dist/{chunk-CI4PGKUI.js → chunk-WICFKWEZ.js} +2 -2
- package/dist/{chunk-BHZNDYU3.js → chunk-WNX4XCL6.js} +22 -12
- package/dist/chunk-WNX4XCL6.js.map +1 -0
- package/dist/{chunk-O2DNGRM7.js → chunk-WOKDS6AK.js} +2 -2
- package/dist/{chunk-PBT76UXS.js → chunk-X2ACXB2U.js} +2 -2
- package/dist/{chunk-KPWHWNZH.js → chunk-XWSCKTPG.js} +2 -2
- package/dist/{chunk-M3X7JONW.js → chunk-ZKLVP4JE.js} +2 -2
- package/dist/composed-chart.js +3 -2
- package/dist/coxcomb-chart.js +3 -2
- package/dist/create-server-chart-DJQCtKVM.d.ts +17 -0
- package/dist/dashboard-link.d.ts +20 -0
- package/dist/dashboard-link.js +27 -0
- package/dist/dashboard-link.js.map +1 -0
- package/dist/dashboard-markup-_EoDs-s-.d.ts +21 -0
- package/dist/dashboard.d.ts +22 -0
- package/dist/dashboard.js +18 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/donut-chart.js +3 -2
- package/dist/funnel-chart.js +3 -2
- package/dist/gauge-arc.js +3 -2
- package/dist/heatmap-chart.js +3 -2
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/dist/kpi-card.js +3 -2
- package/dist/line-chart.js +3 -2
- package/dist/meter-chart.js +3 -2
- package/dist/orbit-chart.js +3 -2
- package/dist/polar-bar-chart.js +3 -2
- package/dist/pyramid-chart.js +3 -2
- package/dist/radar-chart.js +3 -2
- package/dist/radial-arc-group.js +3 -2
- package/dist/radial-rings.js +3 -2
- package/dist/range-band-chart.js +3 -2
- package/dist/sankey-chart.js +3 -2
- package/dist/scatter-chart.js +3 -2
- package/dist/server/activity-grid.d.ts +9 -2
- package/dist/server/activity-grid.js +1 -1
- package/dist/server/area-chart.d.ts +9 -2
- package/dist/server/area-chart.js +1 -1
- package/dist/server/bar-chart.d.ts +9 -2
- package/dist/server/bar-chart.js +1 -1
- package/dist/server/bubble-chart.d.ts +9 -2
- package/dist/server/bubble-chart.js +1 -1
- package/dist/server/bullet-chart.d.ts +9 -2
- package/dist/server/bullet-chart.js +1 -1
- package/dist/server/candlestick-chart.d.ts +9 -2
- package/dist/server/candlestick-chart.js +1 -1
- package/dist/server/chord-ring.d.ts +9 -2
- package/dist/server/chord-ring.js +1 -1
- package/dist/server/composed-chart.d.ts +9 -2
- package/dist/server/composed-chart.js +1 -1
- package/dist/server/coxcomb-chart.d.ts +9 -2
- package/dist/server/coxcomb-chart.js +1 -1
- package/dist/server/dashboard.d.ts +15 -0
- package/dist/server/dashboard.js +15 -0
- package/dist/server/dashboard.js.map +1 -0
- package/dist/server/donut-chart.d.ts +9 -2
- package/dist/server/donut-chart.js +1 -1
- package/dist/server/funnel-chart.d.ts +9 -2
- package/dist/server/funnel-chart.js +1 -1
- package/dist/server/gauge-arc.d.ts +9 -2
- package/dist/server/gauge-arc.js +1 -1
- package/dist/server/heatmap-chart.d.ts +9 -2
- package/dist/server/heatmap-chart.js +1 -1
- package/dist/server/kpi-card.d.ts +9 -2
- package/dist/server/kpi-card.js +1 -1
- package/dist/server/line-chart.d.ts +9 -2
- package/dist/server/line-chart.js +1 -1
- package/dist/server/meter-chart.d.ts +9 -2
- package/dist/server/meter-chart.js +1 -1
- package/dist/server/orbit-chart.d.ts +9 -2
- package/dist/server/orbit-chart.js +1 -1
- package/dist/server/polar-bar-chart.d.ts +9 -2
- package/dist/server/polar-bar-chart.js +1 -1
- package/dist/server/pyramid-chart.d.ts +9 -2
- package/dist/server/pyramid-chart.js +1 -1
- package/dist/server/radar-chart.d.ts +9 -2
- package/dist/server/radar-chart.js +1 -1
- package/dist/server/radial-arc-group.d.ts +9 -2
- package/dist/server/radial-arc-group.js +1 -1
- package/dist/server/radial-rings.d.ts +9 -2
- package/dist/server/radial-rings.js +1 -1
- package/dist/server/range-band-chart.d.ts +9 -2
- package/dist/server/range-band-chart.js +1 -1
- package/dist/server/sankey-chart.d.ts +9 -2
- package/dist/server/sankey-chart.js +1 -1
- package/dist/server/scatter-chart.d.ts +9 -2
- package/dist/server/scatter-chart.js +1 -1
- package/dist/server/sparkline-rows.d.ts +9 -2
- package/dist/server/sparkline-rows.js +1 -1
- package/dist/server/stacked-bar-chart.d.ts +9 -2
- package/dist/server/stacked-bar-chart.js +1 -1
- package/dist/server/step-chart.d.ts +9 -2
- package/dist/server/step-chart.js +1 -1
- package/dist/server/stream-chart.d.ts +9 -2
- package/dist/server/stream-chart.js +1 -1
- package/dist/server/treemap-chart.d.ts +9 -2
- package/dist/server/treemap-chart.js +1 -1
- package/dist/server/volvelle-chart.d.ts +9 -2
- package/dist/server/volvelle-chart.js +1 -1
- package/dist/server/waterfall-chart.d.ts +9 -2
- package/dist/server/waterfall-chart.js +1 -1
- package/dist/server/wind-rose.d.ts +9 -2
- package/dist/server/wind-rose.js +1 -1
- package/dist/sparkline-rows.js +3 -2
- package/dist/stacked-bar-chart.js +3 -2
- package/dist/step-chart.js +3 -2
- package/dist/stream-chart.js +3 -2
- package/dist/treemap-chart.js +3 -2
- package/dist/volvelle-chart.js +3 -2
- package/dist/waterfall-chart.js +3 -2
- package/dist/wind-rose.js +3 -2
- package/package.json +21 -3
- package/dist/chunk-BHZNDYU3.js.map +0 -1
- package/dist/chunk-INZGRNO3.js.map +0 -1
- package/dist/create-server-chart-B0LbkpQP.d.ts +0 -16
- /package/dist/{chunk-FDROMD5U.js.map → chunk-2NQ4DXLT.js.map} +0 -0
- /package/dist/{chunk-4DUH2UHE.js.map → chunk-4LS7B7CK.js.map} +0 -0
- /package/dist/{chunk-CXXCUD4B.js.map → chunk-6KPX5HYV.js.map} +0 -0
- /package/dist/{chunk-6FZO4SMF.js.map → chunk-74ONV2GE.js.map} +0 -0
- /package/dist/{chunk-ORIH4UQP.js.map → chunk-7KED5KUU.js.map} +0 -0
- /package/dist/{chunk-Y7WZS3VB.js.map → chunk-A42AKCPS.js.map} +0 -0
- /package/dist/{chunk-WLHXHAEV.js.map → chunk-CERHTEML.js.map} +0 -0
- /package/dist/{chunk-2JXPSUCK.js.map → chunk-DTBEXYYC.js.map} +0 -0
- /package/dist/{chunk-JCIEWEQC.js.map → chunk-E5LIZKJT.js.map} +0 -0
- /package/dist/{chunk-R6PUPQUI.js.map → chunk-FQHAHZBR.js.map} +0 -0
- /package/dist/{chunk-HH2RZCH6.js.map → chunk-FZMY6NWJ.js.map} +0 -0
- /package/dist/{chunk-5LQGSI6N.js.map → chunk-GBTH55AM.js.map} +0 -0
- /package/dist/{chunk-KTBGRGB7.js.map → chunk-GYUTG5R2.js.map} +0 -0
- /package/dist/{chunk-NAYUAF7O.js.map → chunk-H3UH7F5S.js.map} +0 -0
- /package/dist/{chunk-AQMWZQ2P.js.map → chunk-H4NCK6RE.js.map} +0 -0
- /package/dist/{chunk-LOIVX5IV.js.map → chunk-J5OOZDFF.js.map} +0 -0
- /package/dist/{chunk-BIIINOXE.js.map → chunk-JRAHTS5O.js.map} +0 -0
- /package/dist/{chunk-2Q2ZZTUW.js.map → chunk-KDQHOND7.js.map} +0 -0
- /package/dist/{chunk-G2A5PWIR.js.map → chunk-NHUVAE4Z.js.map} +0 -0
- /package/dist/{chunk-NOVLEZPR.js.map → chunk-NW2SQ6QW.js.map} +0 -0
- /package/dist/{chunk-DZPDZGM7.js.map → chunk-OFDVE64G.js.map} +0 -0
- /package/dist/{chunk-V3PBT4XB.js.map → chunk-P53KSCPE.js.map} +0 -0
- /package/dist/{chunk-2OAPH7JN.js.map → chunk-PWFDYIXV.js.map} +0 -0
- /package/dist/{chunk-HYQLSAEO.js.map → chunk-TAQOBBF7.js.map} +0 -0
- /package/dist/{chunk-DYK3SUIZ.js.map → chunk-TKQ2PQDW.js.map} +0 -0
- /package/dist/{chunk-RUC577P7.js.map → chunk-UXVYCPFL.js.map} +0 -0
- /package/dist/{chunk-CCFFHU7V.js.map → chunk-VISNFHPM.js.map} +0 -0
- /package/dist/{chunk-YS5YVHK5.js.map → chunk-WHZ4ALRI.js.map} +0 -0
- /package/dist/{chunk-CI4PGKUI.js.map → chunk-WICFKWEZ.js.map} +0 -0
- /package/dist/{chunk-O2DNGRM7.js.map → chunk-WOKDS6AK.js.map} +0 -0
- /package/dist/{chunk-PBT76UXS.js.map → chunk-X2ACXB2U.js.map} +0 -0
- /package/dist/{chunk-KPWHWNZH.js.map → chunk-XWSCKTPG.js.map} +0 -0
- /package/dist/{chunk-M3X7JONW.js.map → chunk-ZKLVP4JE.js.map} +0 -0
package/dist/activity-grid.js
CHANGED
package/dist/area-chart.js
CHANGED
package/dist/bar-chart.js
CHANGED
package/dist/bubble-chart.js
CHANGED
package/dist/bullet-chart.js
CHANGED
package/dist/chord-ring.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/step-chart.tsx
|
|
7
7
|
import { stepChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var StepChart = createClientChart(stepChart);
|
|
|
10
10
|
export {
|
|
11
11
|
StepChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-2NQ4DXLT.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/server/create-server-chart.tsx
|
|
2
|
+
import { diagnose, inCell, instanceId } from "@silverpoint/core";
|
|
2
3
|
import { renderChart } from "@silverpoint/grounds";
|
|
3
4
|
|
|
4
5
|
// src/chart-svg.tsx
|
|
@@ -12,6 +13,7 @@ function Path({ path }) {
|
|
|
12
13
|
"data-role": path.role,
|
|
13
14
|
"data-paint": path.paint,
|
|
14
15
|
"data-dash": path.dash ?? void 0,
|
|
16
|
+
"data-weight": path.weight ?? void 0,
|
|
15
17
|
fill: path.fill ?? void 0
|
|
16
18
|
}
|
|
17
19
|
);
|
|
@@ -86,8 +88,13 @@ function ChartFrame({ rendered, className, rootProps, rootRef, overlay }) {
|
|
|
86
88
|
// src/server/create-server-chart.tsx
|
|
87
89
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
88
90
|
function createServerChart(recipe) {
|
|
89
|
-
function Chart(
|
|
90
|
-
const
|
|
91
|
+
function Chart({ dashboardCell, ...own }) {
|
|
92
|
+
const { props, width } = inCell(own, dashboardCell, recipe);
|
|
93
|
+
if (process.env.NODE_ENV !== "production") {
|
|
94
|
+
if (props.id === void 0) diagnose("SP002", recipe.name, { property: "id", message: "A server chart outside a Dashboard needs an `id`; a fixed one is used, which two such charts on a page would share." });
|
|
95
|
+
if (width === void 0) diagnose("SP003", recipe.name, { property: "width", message: "A server chart cannot be measured: pass `width`, or place it in a Dashboard." });
|
|
96
|
+
}
|
|
97
|
+
const rendered = renderChart(recipe, props, { id: props.id ?? instanceId(recipe.name, "server"), width });
|
|
91
98
|
return /* @__PURE__ */ jsx3(ChartFrame, { rendered, className: props.className });
|
|
92
99
|
}
|
|
93
100
|
Chart.displayName = recipe.name;
|
|
@@ -97,4 +104,4 @@ function createServerChart(recipe) {
|
|
|
97
104
|
export {
|
|
98
105
|
createServerChart
|
|
99
106
|
};
|
|
100
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-46S63XYT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server/create-server-chart.tsx","../src/chart-svg.tsx","../src/chart-frame.tsx"],"sourcesContent":["import { diagnose, inCell, instanceId, type ChartRecipe, type CommonChartProps } from '@silverpoint/core';\nimport { renderChart } from '@silverpoint/grounds';\nimport { ChartFrame } from '../chart-frame';\nimport type { CellChartProps } from '../dashboard-markup';\n\n/**\n * Props of a server chart: pure SVG, no client JavaScript (REQ-104); interaction props do not\n * exist here. Nothing can be measured on the server and a server component has no mount position\n * to derive a unique id from (TD §6), so a chart standing alone passes `id`, `width` and `height`;\n * inside a `Dashboard` the cell supplies them (REQ-206, REQ-209).\n */\nexport type ServerChartProps<P extends CommonChartProps> = Omit<P, 'id' | 'width' | 'height'> & {\n readonly id?: string;\n readonly width?: number;\n readonly height?: number;\n readonly onActiveChange?: never;\n readonly onSelect?: never;\n};\n\n/** The server component of a recipe, for React Server Components and static rendering. */\nexport function createServerChart<P extends CommonChartProps>(recipe: ChartRecipe<P>) {\n function Chart({ dashboardCell, ...own }: ServerChartProps<P> & CellChartProps) {\n const { props, width } = inCell(own as unknown as P, dashboardCell, recipe);\n if (process.env.NODE_ENV !== 'production') {\n if (props.id === undefined) diagnose('SP002', recipe.name, { property: 'id', message: 'A server chart outside a Dashboard needs an `id`; a fixed one is used, which two such charts on a page would share.' });\n if (width === undefined) diagnose('SP003', recipe.name, { property: 'width', message: 'A server chart cannot be measured: pass `width`, or place it in a Dashboard.' });\n }\n const rendered = renderChart(recipe, props, { id: props.id ?? instanceId(recipe.name, 'server'), width });\n return <ChartFrame rendered={rendered} className={props.className} />;\n }\n Chart.displayName = recipe.name;\n return Chart;\n}\n","import type { PathView, SvgView } from '@silverpoint/core';\n\nfunction Path({ path }: { readonly path: PathView }) {\n return (\n <path\n d={path.d}\n part={path.part}\n data-role={path.role}\n data-paint={path.paint}\n data-dash={path.dash ?? undefined}\n data-weight={path.weight ?? undefined}\n fill={path.fill ?? undefined}\n />\n );\n}\n\n/** Writes the core's SVG view one field to one attribute; computes nothing (Art. 2). */\nexport function ChartSvg({ view }: { readonly view: SvgView }) {\n const { svg } = view;\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={svg.viewBox}\n width={svg.width}\n height={svg.height}\n className={svg.class}\n data-substrate={svg.substrate}\n data-mode={svg.mode}\n role={svg.role}\n aria-labelledby={svg.labelledby}\n >\n <title id={view.title.id}>{view.title.text}</title>\n <desc id={view.desc.id}>{view.desc.text}</desc>\n {view.patterns.length > 0 && (\n <defs>\n {view.patterns.map((pattern) => (\n <pattern\n key={pattern.id}\n id={pattern.id}\n width={pattern.width}\n height={pattern.height}\n patternUnits=\"userSpaceOnUse\"\n patternTransform={pattern.transform}\n >\n {pattern.paths.map((path, index) => (\n <Path key={index} path={path} />\n ))}\n </pattern>\n ))}\n </defs>\n )}\n {view.paths.map((path, index) => (\n <Path key={index} path={path} />\n ))}\n {view.texts.map((text, index) => (\n <text key={index} x={text.x} y={text.y} part={text.part} data-kind={text.kind} textAnchor={text.anchor}>\n {text.text}\n </text>\n ))}\n </svg>\n );\n}\n","import type { DataTable } from '@silverpoint/core';\nimport type { RenderedChart } from '@silverpoint/grounds';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { ChartSvg } from './chart-svg';\n\nfunction Table({ table, id, visibility }: { readonly table: DataTable; readonly id: string; readonly visibility: string }) {\n return (\n <div className=\"sp-table-box\" data-visibility={visibility}>\n <table className=\"sp-table\" id={id} data-visibility={visibility}>\n <caption>{table.caption}</caption>\n <thead>\n <tr>\n {table.columns.map((column, index) => (\n <th key={index} scope=\"col\">\n {column}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {table.rows.map((row, index) => (\n <tr key={index}>\n {row.map((cell, column) =>\n column === 0 ? (\n <th key={column} scope=\"row\">\n {cell}\n </th>\n ) : (\n <td key={column}>{cell}</td>\n ),\n )}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\nexport interface ChartFrameProps {\n readonly rendered: RenderedChart;\n readonly className?: string;\n /** Interaction handlers and focus attributes, supplied by the client component only. */\n readonly rootProps?: HTMLAttributes<HTMLDivElement>;\n readonly rootRef?: Ref<HTMLDivElement>;\n /** Readout and marker, drawn over the chart by the client component. */\n readonly overlay?: ReactNode;\n}\n\n/** The chart's DOM: root, SVG, overlay and tabular alternative (API Spec §10). */\nexport function ChartFrame({ rendered, className, rootProps, rootRef, overlay }: ChartFrameProps) {\n const classes = ['sp-root', `sp-ground-${rendered.ground}`, className].filter(Boolean).join(' ');\n return (\n <div\n className={classes}\n data-substrate={rendered.substrate}\n data-chrome={rendered.chrome}\n data-status={rendered.status}\n ref={rootRef}\n {...rootProps}\n >\n <ChartSvg view={rendered.view} />\n {overlay}\n {rendered.dataTable !== 'none' && (\n <Table table={rendered.table} id={rendered.ids.table} visibility={rendered.dataTable} />\n )}\n </div>\n );\n}\n"],"mappings":"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","names":["jsx","jsxs","jsx"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/link-context.ts"],"sourcesContent":["import type { LinkState } from '@silverpoint/core';\nimport { createContext } from 'react';\n\n/** A linked dashboard's one reactive value, and how a chart sets it (TD DD-016, REQ-216). */\nexport interface DashboardLinkValue {\n readonly key: string;\n readonly state: LinkState | null;\n set(next: LinkState | null): void;\n}\n\nexport const DashboardLinkContext = createContext<DashboardLinkValue | null>(null);\n"],"mappings":";;;AACA,SAAS,qBAAqB;AASvB,IAAM,uBAAuB,cAAyC,IAAI;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/bar-chart.tsx
|
|
7
7
|
import { barChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var BarChart = createClientChart(barChart);
|
|
|
10
10
|
export {
|
|
11
11
|
BarChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-4LS7B7CK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/line-chart.tsx
|
|
7
7
|
import { lineChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var LineChart = createClientChart(lineChart);
|
|
|
10
10
|
export {
|
|
11
11
|
LineChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-6KPX5HYV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/bubble-chart.tsx
|
|
7
7
|
import { bubbleChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var BubbleChart = createClientChart(bubbleChart);
|
|
|
10
10
|
export {
|
|
11
11
|
BubbleChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-74ONV2GE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/area-chart.tsx
|
|
7
7
|
import { areaChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var AreaChart = createClientChart(areaChart);
|
|
|
10
10
|
export {
|
|
11
11
|
AreaChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-7KED5KUU.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/composed-chart.tsx
|
|
7
7
|
import { composedChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var ComposedChart = createClientChart(composedChart);
|
|
|
10
10
|
export {
|
|
11
11
|
ComposedChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-A42AKCPS.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/radial-arc-group.tsx
|
|
7
7
|
import { radialArcGroup } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var RadialArcGroup = createClientChart(radialArcGroup);
|
|
|
10
10
|
export {
|
|
11
11
|
RadialArcGroup
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-CERHTEML.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/stacked-bar-chart.tsx
|
|
7
7
|
import { stackedBarChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var StackedBarChart = createClientChart(stackedBarChart);
|
|
|
10
10
|
export {
|
|
11
11
|
StackedBarChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-DTBEXYYC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/sparkline-rows.tsx
|
|
7
7
|
import { sparklineRows } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var SparklineRows = createClientChart(sparklineRows);
|
|
|
10
10
|
export {
|
|
11
11
|
SparklineRows
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-E5LIZKJT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/funnel-chart.tsx
|
|
7
7
|
import { funnelChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var FunnelChart = createClientChart(funnelChart);
|
|
|
10
10
|
export {
|
|
11
11
|
FunnelChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-FQHAHZBR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/treemap-chart.tsx
|
|
7
7
|
import { treemapChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var TreemapChart = createClientChart(treemapChart);
|
|
|
10
10
|
export {
|
|
11
11
|
TreemapChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-FZMY6NWJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/polar-bar-chart.tsx
|
|
7
7
|
import { polarBarChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var PolarBarChart = createClientChart(polarBarChart);
|
|
|
10
10
|
export {
|
|
11
11
|
PolarBarChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-GBTH55AM.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/heatmap-chart.tsx
|
|
7
7
|
import { heatmapChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var HeatmapChart = createClientChart(heatmapChart);
|
|
|
10
10
|
export {
|
|
11
11
|
HeatmapChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-GYUTG5R2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/orbit-chart.tsx
|
|
7
7
|
import { orbitChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var OrbitChart = createClientChart(orbitChart);
|
|
|
10
10
|
export {
|
|
11
11
|
OrbitChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-H3UH7F5S.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/gauge-arc.tsx
|
|
7
7
|
import { gaugeArc } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var GaugeArc = createClientChart(gaugeArc);
|
|
|
10
10
|
export {
|
|
11
11
|
GaugeArc
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-H4NCK6RE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/meter-chart.tsx
|
|
7
7
|
import { meterChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var MeterChart = createClientChart(meterChart);
|
|
|
10
10
|
export {
|
|
11
11
|
MeterChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-J5OOZDFF.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/stream-chart.tsx
|
|
7
7
|
import { streamChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var StreamChart = createClientChart(streamChart);
|
|
|
10
10
|
export {
|
|
11
11
|
StreamChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-JRAHTS5O.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/pyramid-chart.tsx
|
|
7
7
|
import { pyramidChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var PyramidChart = createClientChart(pyramidChart);
|
|
|
10
10
|
export {
|
|
11
11
|
PyramidChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-KDQHOND7.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/coxcomb-chart.tsx
|
|
7
7
|
import { coxcombChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var CoxcombChart = createClientChart(coxcombChart);
|
|
|
10
10
|
export {
|
|
11
11
|
CoxcombChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-NHUVAE4Z.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/waterfall-chart.tsx
|
|
7
7
|
import { waterfallChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var WaterfallChart = createClientChart(waterfallChart);
|
|
|
10
10
|
export {
|
|
11
11
|
WaterfallChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-NW2SQ6QW.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/dashboard-markup.tsx
|
|
2
|
+
import { dashboardView } from "@silverpoint/core";
|
|
3
|
+
import { Children, cloneElement, isValidElement } from "react";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function DashboardCell({ children }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
7
|
+
}
|
|
8
|
+
var asStyle = (vars) => vars;
|
|
9
|
+
function DashboardMarkup({ children, wrapGrid, ...props }) {
|
|
10
|
+
const given = Children.toArray(children).map((child) => {
|
|
11
|
+
const marked = isValidElement(child) && child.type === DashboardCell;
|
|
12
|
+
const content = marked ? child.props.children : child;
|
|
13
|
+
const chart = isValidElement(content) ? content : void 0;
|
|
14
|
+
return { cell: marked ? child.props.cell : void 0, id: chart?.props.id, content, chart };
|
|
15
|
+
});
|
|
16
|
+
const view = dashboardView(props, given.map(({ cell, id }) => ({ cell, id })));
|
|
17
|
+
const Heading = view.heading ? `h${view.heading.level}` : void 0;
|
|
18
|
+
const grid = /* @__PURE__ */ jsx("div", { className: "sp-dashboard-grid", part: "dashboard-grid", children: view.cells.map((cell) => {
|
|
19
|
+
const { chart, content } = given[cell.child];
|
|
20
|
+
return /* @__PURE__ */ jsx("article", { className: "sp-dashboard-cell", part: "dashboard-cell", "aria-labelledby": cell.labelledby, style: asStyle(cell.style), children: chart ? cloneElement(chart, { dashboardCell: cell.context }) : content }, cell.context.chartId);
|
|
21
|
+
}) });
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
"section",
|
|
24
|
+
{
|
|
25
|
+
className: view.section.className,
|
|
26
|
+
part: "dashboard",
|
|
27
|
+
"data-substrate": view.section.substrate,
|
|
28
|
+
"aria-labelledby": view.section.labelledby,
|
|
29
|
+
"aria-describedby": view.section.describedby,
|
|
30
|
+
"aria-label": view.section.label,
|
|
31
|
+
style: asStyle(view.section.style),
|
|
32
|
+
children: [
|
|
33
|
+
Heading && view.heading && /* @__PURE__ */ jsx(Heading, { className: "sp-dashboard-title", part: "dashboard-title", id: view.heading.id, children: view.heading.text }),
|
|
34
|
+
view.description && /* @__PURE__ */ jsx("p", { className: "sp-dashboard-description", part: "dashboard-description", id: view.description.id, children: view.description.text }),
|
|
35
|
+
wrapGrid ? wrapGrid(grid) : grid
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
DashboardCell,
|
|
43
|
+
DashboardMarkup
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-OD6N2ATZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/dashboard-markup.tsx"],"sourcesContent":["import { dashboardView, type DashboardCellContext, type DashboardProps } from '@silverpoint/core';\nimport { Children, cloneElement, isValidElement, type CSSProperties, type ReactElement, type ReactNode } from 'react';\n\nexport interface DashboardCellProps {\n /** The layout cell this child fills. Omitted: next in source order, span 1 (API Spec §7.1). */\n readonly cell?: string;\n /** The chart. A single element receives the cell's id, size and configuration. */\n readonly children?: ReactNode;\n}\n\n/**\n * Marks a child of `Dashboard` with its layout cell. Rendered on its own it is its children; inside\n * a dashboard, the dashboard reads its `cell` and emits it as an `article` (REQ-200).\n */\nexport function DashboardCell({ children }: DashboardCellProps) {\n return <>{children}</>;\n}\n\n/** The internal prop through which a cell hands its chart id, box and config (TD §3.3). */\nexport interface CellChartProps {\n readonly dashboardCell?: DashboardCellContext;\n}\n\nconst asStyle = (vars: Readonly<Record<string, string>>) => vars as CSSProperties;\n\n/**\n * The dashboard's DOM (API Spec §10), shared by the client and server entries. It computes\n * nothing: the core's `dashboardView` gives every attribute, and each cell's chart gets its\n * context as a prop, which crosses a Server Components boundary as plain data (Art. 2).\n */\nexport function DashboardMarkup({ children, wrapGrid, ...props }: DashboardProps & { readonly children?: ReactNode; readonly wrapGrid?: (grid: ReactNode) => ReactNode }) {\n const given = Children.toArray(children).map((child) => {\n const marked = isValidElement<DashboardCellProps>(child) && child.type === DashboardCell;\n const content = marked ? child.props.children : child;\n const chart = isValidElement<{ id?: string }>(content) ? content : undefined;\n return { cell: marked ? child.props.cell : undefined, id: chart?.props.id, content, chart };\n });\n const view = dashboardView(props, given.map(({ cell, id }) => ({ cell, id })));\n const Heading = view.heading ? (`h${view.heading.level}` as const) : undefined;\n const grid = (\n <div className=\"sp-dashboard-grid\" part=\"dashboard-grid\">\n {view.cells.map((cell) => {\n const { chart, content } = given[cell.child]!;\n return (\n <article key={cell.context.chartId} className=\"sp-dashboard-cell\" part=\"dashboard-cell\" aria-labelledby={cell.labelledby} style={asStyle(cell.style)}>\n {chart ? cloneElement(chart as ReactElement<CellChartProps>, { dashboardCell: cell.context }) : content}\n </article>\n );\n })}\n </div>\n );\n return (\n <section\n className={view.section.className}\n part=\"dashboard\"\n data-substrate={view.section.substrate}\n aria-labelledby={view.section.labelledby}\n aria-describedby={view.section.describedby}\n aria-label={view.section.label}\n style={asStyle(view.section.style)}\n >\n {Heading && view.heading && (\n <Heading className=\"sp-dashboard-title\" part=\"dashboard-title\" id={view.heading.id}>\n {view.heading.text}\n </Heading>\n )}\n {view.description && (\n <p className=\"sp-dashboard-description\" part=\"dashboard-description\" id={view.description.id}>\n {view.description.text}\n </p>\n )}\n {wrapGrid ? wrapGrid(grid) : grid}\n </section>\n );\n}\n"],"mappings":";AAAA,SAAS,qBAAqE;AAC9E,SAAS,UAAU,cAAc,sBAA6E;AAcrG,wBAqCL,YArCK;AADF,SAAS,cAAc,EAAE,SAAS,GAAuB;AAC9D,SAAO,gCAAG,UAAS;AACrB;AAOA,IAAM,UAAU,CAAC,SAA2C;AAOrD,SAAS,gBAAgB,EAAE,UAAU,UAAU,GAAG,MAAM,GAA2G;AACxK,QAAM,QAAQ,SAAS,QAAQ,QAAQ,EAAE,IAAI,CAAC,UAAU;AACtD,UAAM,SAAS,eAAmC,KAAK,KAAK,MAAM,SAAS;AAC3E,UAAM,UAAU,SAAS,MAAM,MAAM,WAAW;AAChD,UAAM,QAAQ,eAAgC,OAAO,IAAI,UAAU;AACnE,WAAO,EAAE,MAAM,SAAS,MAAM,MAAM,OAAO,QAAW,IAAI,OAAO,MAAM,IAAI,SAAS,MAAM;AAAA,EAC5F,CAAC;AACD,QAAM,OAAO,cAAc,OAAO,MAAM,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC;AAC7E,QAAM,UAAU,KAAK,UAAW,IAAI,KAAK,QAAQ,KAAK,KAAe;AACrE,QAAM,OACJ,oBAAC,SAAI,WAAU,qBAAoB,MAAK,kBACrC,eAAK,MAAM,IAAI,CAAC,SAAS;AACxB,UAAM,EAAE,OAAO,QAAQ,IAAI,MAAM,KAAK,KAAK;AAC3C,WACE,oBAAC,aAAmC,WAAU,qBAAoB,MAAK,kBAAiB,mBAAiB,KAAK,YAAY,OAAO,QAAQ,KAAK,KAAK,GAChJ,kBAAQ,aAAa,OAAuC,EAAE,eAAe,KAAK,QAAQ,CAAC,IAAI,WADpF,KAAK,QAAQ,OAE3B;AAAA,EAEJ,CAAC,GACH;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,QAAQ;AAAA,MACxB,MAAK;AAAA,MACL,kBAAgB,KAAK,QAAQ;AAAA,MAC7B,mBAAiB,KAAK,QAAQ;AAAA,MAC9B,oBAAkB,KAAK,QAAQ;AAAA,MAC/B,cAAY,KAAK,QAAQ;AAAA,MACzB,OAAO,QAAQ,KAAK,QAAQ,KAAK;AAAA,MAEhC;AAAA,mBAAW,KAAK,WACf,oBAAC,WAAQ,WAAU,sBAAqB,MAAK,mBAAkB,IAAI,KAAK,QAAQ,IAC7E,eAAK,QAAQ,MAChB;AAAA,QAED,KAAK,eACJ,oBAAC,OAAE,WAAU,4BAA2B,MAAK,yBAAwB,IAAI,KAAK,YAAY,IACvF,eAAK,YAAY,MACpB;AAAA,QAED,WAAW,SAAS,IAAI,IAAI;AAAA;AAAA;AAAA,EAC/B;AAEJ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/radar-chart.tsx
|
|
7
7
|
import { radarChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var RadarChart = createClientChart(radarChart);
|
|
|
10
10
|
export {
|
|
11
11
|
RadarChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-OFDVE64G.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/sankey-chart.tsx
|
|
7
7
|
import { sankeyChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var SankeyChart = createClientChart(sankeyChart);
|
|
|
10
10
|
export {
|
|
11
11
|
SankeyChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-P53KSCPE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/chord-ring.tsx
|
|
7
7
|
import { chordRing } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var ChordRing = createClientChart(chordRing);
|
|
|
10
10
|
export {
|
|
11
11
|
ChordRing
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-PWFDYIXV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/volvelle-chart.tsx
|
|
7
7
|
import { volvelleChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var VolvelleChart = createClientChart(volvelleChart);
|
|
|
10
10
|
export {
|
|
11
11
|
VolvelleChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-TAQOBBF7.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/scatter-chart.tsx
|
|
7
7
|
import { scatterChart } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var ScatterChart = createClientChart(scatterChart);
|
|
|
10
10
|
export {
|
|
11
11
|
ScatterChart
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-TKQ2PQDW.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/wind-rose.tsx
|
|
7
7
|
import { windRose } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var WindRose = createClientChart(windRose);
|
|
|
10
10
|
export {
|
|
11
11
|
WindRose
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-UXVYCPFL.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
createClientChart
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WNX4XCL6.js";
|
|
5
5
|
|
|
6
6
|
// src/kpi-card.tsx
|
|
7
7
|
import { kpiCard } from "@silverpoint/core";
|
|
@@ -10,4 +10,4 @@ var KpiCard = createClientChart(kpiCard);
|
|
|
10
10
|
export {
|
|
11
11
|
KpiCard
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-VISNFHPM.js.map
|