@gravitee/graphene-charts 2.36.3-feat-password-input.efed5fc → 2.36.3
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/USAGE_GUIDE.md +38 -0
- package/dist/base/ChartContainer/ChartContainer.d.ts.map +1 -1
- package/dist/base/ChartLegend/ChartLegend.d.ts +7 -1
- package/dist/base/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/base/ChartTooltip/ChartTooltip.d.ts +7 -1
- package/dist/base/ChartTooltip/ChartTooltip.d.ts.map +1 -1
- package/dist/charts/DoughnutChart/DoughnutChart.d.ts.map +1 -1
- package/dist/charts/TraceWaterfall/TraceWaterfall.d.ts +22 -0
- package/dist/charts/TraceWaterfall/TraceWaterfall.d.ts.map +1 -0
- package/dist/charts/TraceWaterfall/fixtures.d.ts +12 -0
- package/dist/charts/TraceWaterfall/fixtures.d.ts.map +1 -0
- package/dist/charts/TraceWaterfall/formatDuration.d.ts +24 -0
- package/dist/charts/TraceWaterfall/formatDuration.d.ts.map +1 -0
- package/dist/charts/TraceWaterfall/index.d.ts +5 -0
- package/dist/charts/TraceWaterfall/index.d.ts.map +1 -0
- package/dist/charts/TraceWaterfall/types.d.ts +20 -0
- package/dist/charts/TraceWaterfall/types.d.ts.map +1 -0
- package/dist/dashboard-grid/DashboardGrid.d.ts.map +1 -1
- package/dist/dashboard-grid/DashboardWidget.d.ts.map +1 -1
- package/dist/dashboard-grid/index.js +49 -47
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4286 -1654
- package/dist/lib/format.d.ts +18 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/sanitize-css-ident.d.ts +8 -0
- package/dist/lib/sanitize-css-ident.d.ts.map +1 -0
- package/dist/lib/surface.d.ts +8 -0
- package/dist/lib/surface.d.ts.map +1 -0
- package/dist/lineage/AnimatedEdge.d.ts +12 -0
- package/dist/lineage/AnimatedEdge.d.ts.map +1 -0
- package/dist/lineage/BaseNode.d.ts +6 -0
- package/dist/lineage/BaseNode.d.ts.map +1 -0
- package/dist/lineage/LineageSkeleton.d.ts +13 -0
- package/dist/lineage/LineageSkeleton.d.ts.map +1 -0
- package/dist/lineage/LineageViewer.d.ts +3 -0
- package/dist/lineage/LineageViewer.d.ts.map +1 -0
- package/dist/lineage/StatusLegend.d.ts +2 -0
- package/dist/lineage/StatusLegend.d.ts.map +1 -0
- package/dist/lineage/highlight.d.ts +21 -0
- package/dist/lineage/highlight.d.ts.map +1 -0
- package/dist/lineage/index.d.ts +10 -0
- package/dist/lineage/index.d.ts.map +1 -0
- package/dist/lineage/index.js +624 -0
- package/dist/lineage/layout.d.ts +7 -0
- package/dist/lineage/layout.d.ts.map +1 -0
- package/dist/lineage/styles.css +1139 -0
- package/dist/lineage/types.d.ts +114 -0
- package/dist/lineage/types.d.ts.map +1 -0
- package/dist/primitives/Axis.d.ts +10 -2
- package/dist/primitives/Axis.d.ts.map +1 -1
- package/dist/primitives/CartesianChart.d.ts.map +1 -1
- package/dist/primitives/CartesianContext.d.ts +8 -0
- package/dist/primitives/CartesianContext.d.ts.map +1 -1
- package/dist/primitives/ReferenceLine.d.ts +3 -1
- package/dist/primitives/ReferenceLine.d.ts.map +1 -1
- package/dist/primitives/TooltipPortal.d.ts +17 -0
- package/dist/primitives/TooltipPortal.d.ts.map +1 -0
- package/dist/primitives-BnaI6bnw.js +1043 -0
- package/dist/series/AreaSeries.d.ts +3 -1
- package/dist/series/AreaSeries.d.ts.map +1 -1
- package/dist/series/BarSeries.d.ts +3 -1
- package/dist/series/BarSeries.d.ts.map +1 -1
- package/dist/series/LineSeries.d.ts +3 -1
- package/dist/series/LineSeries.d.ts.map +1 -1
- package/dist/surface-k4U7sG_T.js +5 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +15 -4
package/USAGE_GUIDE.md
CHANGED
|
@@ -13,6 +13,8 @@ Browse the live documentation and component catalog on the dedicated [Storybook]
|
|
|
13
13
|
| `@gravitee/graphene-charts` | React chart components and primitives (`ChartCard`, `ChartContainer`, `ChartTooltip`, `ChartTooltipContent`, `ChartLegend`, `ChartLegendContent`, `AreaChart`, `BarChart`, `DoughnutChart`, `LineChart`, `Metric`, `CartesianChart`, `LineSeries`, `AreaSeries`, `BarSeries`, `Grid`, `XAxis`, `YAxis`) |
|
|
14
14
|
| `@gravitee/graphene-charts/dashboard-grid` | Dashboard layout engine (`DashboardGrid`, `DashboardWidget`) and adapter utilities |
|
|
15
15
|
| `@gravitee/graphene-charts/dashboard-grid/styles.css` | Required RGL stylesheet (import in your app entry) |
|
|
16
|
+
| `@gravitee/graphene-charts/lineage` | Read-only graph engine (`LineageViewer`, `BaseNode`, `computeHighlight`) for service maps, OTel traces, and business-object lineage |
|
|
17
|
+
| `@gravitee/graphene-charts/lineage/styles.css` | Required React Flow stylesheet (import in your app entry) |
|
|
16
18
|
|
|
17
19
|
The package intentionally ships **no stylesheet entry**: `@gravitee/graphene-core` is the single source of truth for the Graphene theme (tokens, Tailwind preset, chart palette, fonts) and is a required peer dependency. Chart-component runtime styles (mount animation, focus ring) are injected at render time by the components themselves via React's `<style precedence>` hoisting, so consumers have nothing extra to import.
|
|
18
20
|
|
|
@@ -428,6 +430,42 @@ Key props:
|
|
|
428
430
|
- `footer` — Bottom slot (legend, status, links)
|
|
429
431
|
- `noPadding` — Removes horizontal padding for full-bleed charts
|
|
430
432
|
|
|
433
|
+
### Recipe: a dependency graph with LineageViewer
|
|
434
|
+
|
|
435
|
+
```tsx
|
|
436
|
+
import { LineageViewer } from '@gravitee/graphene-charts/lineage';
|
|
437
|
+
import '@gravitee/graphene-charts/lineage/styles.css';
|
|
438
|
+
|
|
439
|
+
const nodes = [
|
|
440
|
+
{ id: 'gateway', data: { label: 'API Gateway', badge: 'entry', status: 'healthy' } },
|
|
441
|
+
{ id: 'auth', data: { label: 'Auth Service', status: 'degraded' } },
|
|
442
|
+
{ id: 'db', data: { label: 'PostgreSQL', badge: 'storage', status: 'healthy' } },
|
|
443
|
+
];
|
|
444
|
+
|
|
445
|
+
const edges = [
|
|
446
|
+
{ id: 'e1', source: 'gateway', target: 'auth' },
|
|
447
|
+
{ id: 'e2', source: 'auth', target: 'db', status: 'degraded' },
|
|
448
|
+
];
|
|
449
|
+
|
|
450
|
+
export function ServiceMap() {
|
|
451
|
+
return (
|
|
452
|
+
<div className="h-[600px]">
|
|
453
|
+
<LineageViewer nodes={nodes} edges={edges} onNodeSelect={(node) => node && openDrawer(node)} />
|
|
454
|
+
</div>
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
`LineageViewer` is a **read-only** graph engine (service maps, OTel traces, business-object
|
|
460
|
+
lineage). It is static by default (no pan/zoom) so it sits cleanly in a tile; opt into
|
|
461
|
+
`pannable`, `zoomable`, `showControls`, `fullscreenable`, `showMinimap` as needed. Nodes carry
|
|
462
|
+
a `status` (`healthy` / `degraded` / `error`) and optional `metrics`; edges support `status`,
|
|
463
|
+
`label`, and `weight` (thickness). Hover or click a node to highlight its dependencies
|
|
464
|
+
(`highlightMode="neighbors" | "path"`). Follows the shared `state` contract
|
|
465
|
+
(`loading` / `empty` / `ready`).
|
|
466
|
+
|
|
467
|
+
> Memoize `nodes` / `edges` to avoid re-layout on every render.
|
|
468
|
+
|
|
431
469
|
## Tokens you can rely on
|
|
432
470
|
|
|
433
471
|
`@gravitee/graphene-charts` reads the following variables from the shared Graphene preset. They are safe to override at the app root.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartContainer.d.ts","sourceRoot":"","sources":["../../../src/base/ChartContainer/ChartContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartContainer.d.ts","sourceRoot":"","sources":["../../../src/base/ChartContainer/ChartContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGnE,UAAU,iBAAiB;IACzB,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ;AAID,wBAAgB,cAAc,sBAM7B;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACtE,MAAM,EAAE,WAAW,CAAC;CACrB;AA6BD,iBAAS,cAAc,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAsChG;AAED;;;;;GAKG;AACH,iBAAS,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,2CAmBtE;AAED,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -18,8 +18,14 @@ export interface ChartLegendContentProps extends React.ComponentProps<'div'> {
|
|
|
18
18
|
verticalAlign?: 'top' | 'bottom';
|
|
19
19
|
/** Horizontal alignment of legend items. @default 'start' */
|
|
20
20
|
align?: 'start' | 'center' | 'end';
|
|
21
|
+
/** Callback when a legend item is hovered; receives the dataKey. Injected by the parent chart. */
|
|
22
|
+
onItemHover?: (dataKey: string) => void;
|
|
23
|
+
/** Callback when the pointer leaves a legend item. Injected by the parent chart. */
|
|
24
|
+
onItemLeave?: () => void;
|
|
25
|
+
/** Currently hovered legend key for visual feedback. Injected by the parent chart. */
|
|
26
|
+
hoveredLegendKey?: string | null;
|
|
21
27
|
}
|
|
22
|
-
declare function ChartLegendContent({ items, hideIcon, nameKey, verticalAlign: _verticalAlign, align, className, ...props }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
declare function ChartLegendContent({ items, hideIcon, nameKey, verticalAlign: _verticalAlign, align, onItemHover, onItemLeave, hoveredLegendKey, className, ...props }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
29
|
export interface ChartLegendProps {
|
|
24
30
|
content: React.ReactElement;
|
|
25
31
|
/** Where to render the legend relative to the chart body. Defaults to `'bottom'`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../src/base/ChartLegend/ChartLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../src/base/ChartLegend/ChartLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC1E,oDAAoD;IACpD,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACjC,6DAA6D;IAC7D,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,kGAAkG;IAClG,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAQD,iBAAS,kBAAkB,CAAC,EAC1B,KAAU,EACV,QAAgB,EAChB,OAAO,EACP,aAAa,EAAE,cAAc,EAC7B,KAAe,EACf,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,kDA8CzB;AASD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,qFAAqF;IACrF,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAClC;AAED,iBAAS,WAAW,CAAC,EAAE,OAAO,EAAE,aAAwB,EAAE,EAAE,gBAAgB,QAY3E;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -32,8 +32,14 @@ export interface ChartTooltipContentProps extends React.ComponentProps<'div'> {
|
|
|
32
32
|
labelClassName?: string;
|
|
33
33
|
/** Format each item's value. Defaults to `.toLocaleString()` for numbers. */
|
|
34
34
|
valueFormatter?: (value: number | string, item: ChartTooltipItem, index: number) => React.ReactNode;
|
|
35
|
+
/** Show a footer row with the sum of all numeric item values. */
|
|
36
|
+
showTotal?: boolean;
|
|
37
|
+
/** Label for the total row. @default "Total" */
|
|
38
|
+
totalLabel?: string;
|
|
39
|
+
/** Format the total value. Defaults to `.toLocaleString()`. */
|
|
40
|
+
totalFormatter?: (total: number) => React.ReactNode;
|
|
35
41
|
}
|
|
36
|
-
declare function ChartTooltipContent({ label, items, active, hideLabel, hideIndicator, indicator, labelKey, nameKey, labelFormatter, labelClassName, valueFormatter, className, ...props }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
42
|
+
declare function ChartTooltipContent({ label, items, active, hideLabel, hideIndicator, indicator, labelKey, nameKey, labelFormatter, labelClassName, valueFormatter: valueFormatterProp, showTotal, totalLabel, totalFormatter, className, ...props }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
37
43
|
export interface ChartTooltipProps {
|
|
38
44
|
/** The tooltip content element. Receives `label`, `items`, `active` at render time. */
|
|
39
45
|
content: React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTooltip.d.ts","sourceRoot":"","sources":["../../../src/base/ChartTooltip/ChartTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartTooltip.d.ts","sourceRoot":"","sources":["../../../src/base/ChartTooltip/ChartTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC3E,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uDAAuD;IACvD,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEtC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/E,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAEpG,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACrD;AAeD,iBAAS,mBAAmB,CAAC,EAC3B,KAAK,EACL,KAAU,EACV,MAAa,EACb,SAAiB,EACjB,aAAqB,EACrB,SAAiB,EACjB,QAAQ,EACR,OAAO,EACP,cAAc,EACd,cAAc,EACd,cAAc,EAAE,kBAAkB,EAClC,SAAiB,EACjB,UAAoB,EACpB,cAAsC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,kDA8G1B;AASD,MAAM,WAAW,iBAAiB;IAChC,uFAAuF;IACvF,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;CAC7B;AAED,iBAAS,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,QAYnD;AAED,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoughnutChart.d.ts","sourceRoot":"","sources":["../../../src/charts/DoughnutChart/DoughnutChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DoughnutChart.d.ts","sourceRoot":"","sources":["../../../src/charts/DoughnutChart/DoughnutChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAI1E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;AAE7F,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,gEAAgE;IAChE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,oBAAoB,GAAG,sBAAsB,CAAC;IACvD,2FAA2F;IAC3F,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5E,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1B;AAwCD,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,QAAQ,EACZ,EAAE,kBAAkB,2CAmCpB;AA6UD,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChartState } from '../../types';
|
|
2
|
+
import { TraceWaterfallRow } from './types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export interface TraceWaterfallProps extends Omit<React.ComponentProps<'div'>, 'onSelect'> {
|
|
5
|
+
spans: TraceWaterfallRow[];
|
|
6
|
+
/** Lifecycle state. When omitted, inferred from spans length. */
|
|
7
|
+
state?: ChartState;
|
|
8
|
+
selectedSpanId?: string;
|
|
9
|
+
/** Fired when a span row is selected (click or keyboard Enter). Receives the full span. */
|
|
10
|
+
onSpanSelect?: (span: TraceWaterfallRow) => void;
|
|
11
|
+
/** Called when a span row is hovered. */
|
|
12
|
+
onSpanHover?: (span: TraceWaterfallRow) => void;
|
|
13
|
+
/** Called when the cursor leaves a span row. */
|
|
14
|
+
onSpanLeave?: () => void;
|
|
15
|
+
/** When true, all parent spans start collapsed. */
|
|
16
|
+
defaultCollapsed?: boolean;
|
|
17
|
+
/** Custom render for the hover card content. When omitted, the built-in detail card is used. */
|
|
18
|
+
renderTooltip?: (span: TraceWaterfallRow) => React.ReactNode;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function TraceWaterfall({ spans, state, selectedSpanId, onSpanSelect, onSpanHover, onSpanLeave, defaultCollapsed, renderTooltip, ariaLabel, className, ...rest }: TraceWaterfallProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=TraceWaterfall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceWaterfall.d.ts","sourceRoot":"","sources":["../../../src/charts/TraceWaterfall/TraceWaterfall.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAUlE,OAAO,KAAK,EAAwB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAwDvE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACxF,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,iEAAiE;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,yCAAyC;IACzC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAChD,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gGAAgG;IAChG,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuhBD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAwB,EACxB,aAAa,EACb,SAAsC,EACtC,SAAS,EACT,GAAG,IAAI,EACR,EAAE,mBAAmB,2CAkHrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TraceWaterfallRow } from './types';
|
|
2
|
+
/** Sequential parent → child chain across multiple services. */
|
|
3
|
+
export declare const chainSpans: TraceWaterfallRow[];
|
|
4
|
+
/** Parallel sibling spans — microservice fan-out. */
|
|
5
|
+
export declare const parallelSpans: TraceWaterfallRow[];
|
|
6
|
+
/** Trace with cascading error. */
|
|
7
|
+
export declare const errorSpans: TraceWaterfallRow[];
|
|
8
|
+
/** Deep nesting with sub-millisecond spans. */
|
|
9
|
+
export declare const deepTreeSpans: TraceWaterfallRow[];
|
|
10
|
+
/** Realistic API gateway trace with many services. */
|
|
11
|
+
export declare const realisticSpans: TraceWaterfallRow[];
|
|
12
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/charts/TraceWaterfall/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,gEAAgE;AAChE,eAAO,MAAM,UAAU,EAAE,iBAAiB,EAkEzC,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,aAAa,EAAE,iBAAiB,EA6E5C,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,UAAU,EAAE,iBAAiB,EAuDzC,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAmG5C,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,cAAc,EAAE,iBAAiB,EAyH7C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Minimum rendered bar width in pixels so sub-ms spans remain visible. */
|
|
2
|
+
export declare const MIN_BAR_WIDTH_PX = 3;
|
|
3
|
+
/**
|
|
4
|
+
* Formats a nanosecond duration for span labels and axis ticks.
|
|
5
|
+
* Preserves sub-millisecond precision when relevant.
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatDurationNs(ns: number): string;
|
|
8
|
+
/** Returns the trace end offset in nanoseconds (at least 1 to avoid a zero domain). */
|
|
9
|
+
export declare function computeTraceDurationNs(spans: ReadonlyArray<{
|
|
10
|
+
startOffsetNs: number;
|
|
11
|
+
durationNs: number;
|
|
12
|
+
}>): number;
|
|
13
|
+
/** Maps span timing to pixel geometry on the shared timeline. */
|
|
14
|
+
export declare function computeBarGeometry(startOffsetNs: number, durationNs: number, traceDurationNs: number, timelineWidth: number): {
|
|
15
|
+
x: number;
|
|
16
|
+
width: number;
|
|
17
|
+
};
|
|
18
|
+
/** Formats a span duration as a percentage of the total trace duration. */
|
|
19
|
+
export declare function formatTracePercent(durationNs: number, traceDurationNs: number): string;
|
|
20
|
+
/** Returns the number of ticks the time axis should display for a given pixel width. */
|
|
21
|
+
export declare function getTickCount(usableWidth: number): number;
|
|
22
|
+
/** Builds evenly spaced tick values for the time axis. */
|
|
23
|
+
export declare function buildTimeAxisTicks(traceDurationNs: number, tickCount?: number): number[];
|
|
24
|
+
//# sourceMappingURL=formatDuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatDuration.d.ts","sourceRoot":"","sources":["../../../src/charts/TraceWaterfall/formatDuration.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAsBnD;AAED,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,CAAC;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,MAAM,CAOlH;AAED,iEAAiE;AACjE,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,GACpB;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAa9B;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAMtF;AAKD,wFAAwF;AACxF,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED,0DAA0D;AAC1D,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,MAAM,EAAE,CAMnF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TraceWaterfall } from './TraceWaterfall';
|
|
2
|
+
export type { TraceWaterfallProps } from './TraceWaterfall';
|
|
3
|
+
export { buildTimeAxisTicks, computeBarGeometry, computeTraceDurationNs, formatDurationNs, formatTracePercent, } from './formatDuration';
|
|
4
|
+
export type { SpanKind, SpanStatus, TraceWaterfallRow } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/TraceWaterfall/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SpanKind = 'internal' | 'server' | 'client' | 'producer' | 'consumer';
|
|
2
|
+
export type SpanStatus = 'ok' | 'error' | 'unset';
|
|
3
|
+
/** Pre-flattened span row for presentational rendering. */
|
|
4
|
+
export interface TraceWaterfallRow {
|
|
5
|
+
spanId: string;
|
|
6
|
+
parentSpanId?: string;
|
|
7
|
+
/** Operation name (e.g. `GET /api/users`). */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Service that emitted this span (e.g. `api-gateway`). */
|
|
10
|
+
serviceName: string;
|
|
11
|
+
kind: SpanKind;
|
|
12
|
+
status: SpanStatus;
|
|
13
|
+
/** Offset from trace origin in nanoseconds. */
|
|
14
|
+
startOffsetNs: number;
|
|
15
|
+
/** Duration in nanoseconds. */
|
|
16
|
+
durationNs: number;
|
|
17
|
+
/** Nesting depth (0 = root). */
|
|
18
|
+
depth: number;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/charts/TraceWaterfall/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAElF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AA4BhE,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,IAAmB,EACnB,SAA8B,EAC9B,GAAiB,EACjB,WAAW,EACX,cAAc,EACd,UAAuB,EACvB,QAAgB,EAChB,QAAc,EACd,cAAc,EACd,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,QAAQ,EACZ,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AA4BhE,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,IAAmB,EACnB,SAA8B,EAC9B,GAAiB,EACjB,WAAW,EACX,cAAc,EACd,UAAuB,EACvB,QAAgB,EAChB,QAAc,EACd,cAAc,EACd,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,QAAQ,EACZ,EAAE,kBAAkB,2CAsEpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardWidget.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardWidget.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACvE,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EACN,MAAM,EACN,SAAiB,EACjB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,oBAAoB,2CA4CtB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { t as e } from "../utils-ySutDPYb.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { n as t, t as n } from "../surface-k4U7sG_T.js";
|
|
3
|
+
import { useCallback as r, useMemo as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { Responsive as s, horizontalCompactor as c, noCompactor as l, useContainerWidth as u, verticalCompactor as d } from "react-grid-layout";
|
|
5
6
|
//#region src/dashboard-grid/adapters.ts
|
|
6
|
-
function
|
|
7
|
+
function f(e) {
|
|
7
8
|
return {
|
|
8
9
|
i: e.id,
|
|
9
10
|
x: e.x,
|
|
@@ -17,7 +18,7 @@ function u(e) {
|
|
|
17
18
|
static: e.static
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function p(e) {
|
|
21
22
|
return {
|
|
22
23
|
x: e.x,
|
|
23
24
|
y: e.y,
|
|
@@ -27,37 +28,37 @@ function d(e) {
|
|
|
27
28
|
}
|
|
28
29
|
//#endregion
|
|
29
30
|
//#region src/dashboard-grid/DashboardGrid.tsx
|
|
30
|
-
var
|
|
31
|
+
var m = 12, h = 150, g = [16, 16], _ = {
|
|
31
32
|
lg: 1200,
|
|
32
33
|
md: 996,
|
|
33
34
|
sm: 768,
|
|
34
35
|
xs: 480,
|
|
35
36
|
xxs: 0
|
|
36
|
-
},
|
|
37
|
+
}, v = {
|
|
37
38
|
lg: 12,
|
|
38
39
|
md: 10,
|
|
39
40
|
sm: 6,
|
|
40
41
|
xs: 4,
|
|
41
42
|
xxs: 2
|
|
42
|
-
},
|
|
43
|
-
vertical:
|
|
44
|
-
horizontal:
|
|
45
|
-
none:
|
|
43
|
+
}, y = {
|
|
44
|
+
vertical: d,
|
|
45
|
+
horizontal: c,
|
|
46
|
+
none: l
|
|
46
47
|
};
|
|
47
|
-
function
|
|
48
|
-
let { width: k, containerRef: A, mounted: j } =
|
|
49
|
-
...
|
|
48
|
+
function b({ widgets: t, cols: n = m, rowHeight: c = h, gap: l = g, breakpoints: d, breakpointCols: b, compaction: x = "vertical", editable: S = !1, minWidth: C = 960, onLayoutChange: w, children: T, className: E, style: D, ...O }) {
|
|
49
|
+
let { width: k, containerRef: A, mounted: j } = u(), M = i(() => t.map(f), [t]), N = i(() => ({ lg: M }), [M]), P = i(() => b ? {
|
|
50
|
+
...v,
|
|
50
51
|
...b
|
|
51
52
|
} : {
|
|
52
|
-
...
|
|
53
|
-
lg:
|
|
54
|
-
}, [b,
|
|
53
|
+
...v,
|
|
54
|
+
lg: n
|
|
55
|
+
}, [b, n]), F = i(() => [l[0], l[1]], [l]), I = i(() => ({ enabled: S }), [S]), L = i(() => ({ enabled: S }), [S]), R = r((e) => {
|
|
55
56
|
if (!w) return;
|
|
56
57
|
let t = /* @__PURE__ */ new Map();
|
|
57
|
-
for (let n of e) t.set(n.i,
|
|
58
|
+
for (let n of e) t.set(n.i, p(n));
|
|
58
59
|
w(t);
|
|
59
60
|
}, [w]), z = C === 0 ? void 0 : typeof C == "number" ? `${C}px` : C;
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ o("div", {
|
|
61
62
|
ref: A,
|
|
62
63
|
className: e("relative w-full", E),
|
|
63
64
|
style: {
|
|
@@ -65,21 +66,22 @@ function v({ widgets: o, cols: s = f, rowHeight: l = p, gap: v = m, breakpoints:
|
|
|
65
66
|
...D
|
|
66
67
|
},
|
|
67
68
|
...O,
|
|
68
|
-
children: [/* @__PURE__ */
|
|
69
|
+
children: [/* @__PURE__ */ a("style", {
|
|
69
70
|
precedence: "graphene-charts",
|
|
70
71
|
children: "\n .react-grid-item.react-grid-placeholder {\n background: var(--muted);\n border-radius: var(--radius, 0.5rem);\n opacity: 0.5;\n }\n "
|
|
71
|
-
}), j && /* @__PURE__ */
|
|
72
|
+
}), j && /* @__PURE__ */ a(s, {
|
|
72
73
|
width: k,
|
|
73
74
|
layouts: N,
|
|
74
|
-
breakpoints:
|
|
75
|
+
breakpoints: d ?? _,
|
|
75
76
|
cols: P,
|
|
76
|
-
rowHeight:
|
|
77
|
+
rowHeight: c,
|
|
77
78
|
margin: F,
|
|
79
|
+
containerPadding: [0, 0],
|
|
78
80
|
dragConfig: I,
|
|
79
81
|
resizeConfig: L,
|
|
80
|
-
compactor:
|
|
82
|
+
compactor: y[x],
|
|
81
83
|
onLayoutChange: R,
|
|
82
|
-
children:
|
|
84
|
+
children: t.map((e) => /* @__PURE__ */ a("div", {
|
|
83
85
|
className: "min-h-0 overflow-hidden",
|
|
84
86
|
children: T(e)
|
|
85
87
|
}, e.id))
|
|
@@ -88,42 +90,42 @@ function v({ widgets: o, cols: s = f, rowHeight: l = p, gap: v = m, breakpoints:
|
|
|
88
90
|
}
|
|
89
91
|
//#endregion
|
|
90
92
|
//#region src/dashboard-grid/DashboardWidget.tsx
|
|
91
|
-
function
|
|
92
|
-
let
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
className: e("flex h-full flex-col
|
|
95
|
-
...
|
|
93
|
+
function x({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u = !1, children: d, className: f, ...p }) {
|
|
94
|
+
let m = r || i || c;
|
|
95
|
+
return /* @__PURE__ */ o("div", {
|
|
96
|
+
className: e("flex h-full flex-col", n, t, "@container", f),
|
|
97
|
+
...p,
|
|
96
98
|
children: [
|
|
97
|
-
|
|
99
|
+
m && /* @__PURE__ */ o("div", {
|
|
98
100
|
className: "flex shrink-0 items-start justify-between gap-2 px-4 pt-4 @[400px]:px-5",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ o("div", {
|
|
100
102
|
className: "min-w-0 flex-1",
|
|
101
|
-
children: [
|
|
103
|
+
children: [r && /* @__PURE__ */ o("div", {
|
|
102
104
|
className: "flex items-center gap-2",
|
|
103
|
-
children: [
|
|
105
|
+
children: [s && /* @__PURE__ */ a(s, { className: "size-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ a("span", {
|
|
104
106
|
className: "truncate text-sm font-semibold tracking-tight text-foreground",
|
|
105
|
-
children:
|
|
107
|
+
children: r
|
|
106
108
|
})]
|
|
107
|
-
}), (
|
|
108
|
-
className: e("mt-0.5 block truncate text-xs text-muted-foreground", !
|
|
109
|
-
title:
|
|
110
|
-
children:
|
|
109
|
+
}), (i || r) && /* @__PURE__ */ a("span", {
|
|
110
|
+
className: e("mt-0.5 block truncate text-xs text-muted-foreground", !i && "invisible"),
|
|
111
|
+
title: i,
|
|
112
|
+
children: i || "\xA0"
|
|
111
113
|
})]
|
|
112
|
-
}),
|
|
114
|
+
}), c && /* @__PURE__ */ a("div", {
|
|
113
115
|
className: "shrink-0",
|
|
114
|
-
children:
|
|
116
|
+
children: c
|
|
115
117
|
})]
|
|
116
118
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
className: e("min-h-0 flex-1",
|
|
119
|
-
children:
|
|
119
|
+
/* @__PURE__ */ a("div", {
|
|
120
|
+
className: e("min-h-0 flex-1", u ? "px-0 pb-0" : "px-4 pb-4 @[400px]:px-5 @[400px]:pb-5", !m && !u && "pt-4 @[400px]:pt-5"),
|
|
121
|
+
children: d
|
|
120
122
|
}),
|
|
121
|
-
|
|
123
|
+
l && /* @__PURE__ */ a("div", {
|
|
122
124
|
className: "shrink-0 border-t border-border/20 px-4 py-2.5 text-xs text-muted-foreground @[400px]:px-5 dark:border-white/[0.04]",
|
|
123
|
-
children:
|
|
125
|
+
children: l
|
|
124
126
|
})
|
|
125
127
|
]
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
130
|
//#endregion
|
|
129
|
-
export {
|
|
131
|
+
export { b as DashboardGrid, x as DashboardWidget, p as rglLayoutItemToWidgetLayout, f as widgetToRGLLayoutItem };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { cn } from './lib/utils';
|
|
2
|
+
export { compactTick } from './lib/format';
|
|
2
3
|
export type { ChartConfig, ChartSeriesConfig, ChartState, ChartThemeColors, Margin } from './types';
|
|
3
4
|
export { CHART_THEMES, DEFAULT_MARGIN } from './types';
|
|
4
5
|
export * from './base/ChartCard';
|
|
@@ -10,7 +11,8 @@ export type { CartesianChartProps, CartesianDataPoint } from './primitives/Carte
|
|
|
10
11
|
export { Grid } from './primitives/Grid';
|
|
11
12
|
export { ReferenceLine } from './primitives/ReferenceLine';
|
|
12
13
|
export type { ReferenceLineProps } from './primitives/ReferenceLine';
|
|
13
|
-
export { CategoryAxis as XAxis, ValueAxis as YAxis } from './primitives/Axis';
|
|
14
|
+
export { CategoryAxis, ValueAxis, CategoryAxis as XAxis, ValueAxis as YAxis } from './primitives/Axis';
|
|
15
|
+
export type { CategoryAxisProps, ValueAxisProps } from './primitives/Axis';
|
|
14
16
|
export { LineSeries } from './series/LineSeries';
|
|
15
17
|
export type { LineSeriesProps } from './series/LineSeries';
|
|
16
18
|
export type { CurveType } from './series/curves';
|
|
@@ -24,4 +26,5 @@ export * from './charts/Metric';
|
|
|
24
26
|
export * from './charts/MetricGroup';
|
|
25
27
|
export * from './charts/LineChart';
|
|
26
28
|
export * from './charts/AreaChart';
|
|
29
|
+
export * from './charts/TraceWaterfall';
|
|
27
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,IAAI,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACvG,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|