@linxiraos/pi-utils 1.1.20 → 1.1.22

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +6 -6
  2. package/README.md +1 -1
  3. package/THIRD-PARTY-NOTICES.txt +3 -40
  4. package/dist/types/dirs.d.ts +26 -4
  5. package/dist/types/file-lock.d.ts +2 -6
  6. package/dist/types/fs-open.d.ts +16 -0
  7. package/dist/types/index.d.ts +13 -0
  8. package/dist/types/logger/rotating-file.d.ts +9 -0
  9. package/dist/types/mermaid-ascii.d.ts +12 -4
  10. package/dist/types/postmortem.d.ts +23 -0
  11. package/dist/types/procmgr.d.ts +3 -0
  12. package/dist/types/stderr-guard.d.ts +23 -4
  13. package/dist/types/stream.d.ts +11 -4
  14. package/package.json +2 -2
  15. package/src/cli.ts +1 -1
  16. package/src/dirs.ts +54 -12
  17. package/src/file-lock.ts +7 -9
  18. package/src/fs-open.ts +31 -0
  19. package/src/index.ts +40 -0
  20. package/src/logger/rotating-file.ts +22 -9
  21. package/src/logger.ts +10 -9
  22. package/src/mermaid-ascii.ts +13 -7
  23. package/src/module-timer.ts +7 -4
  24. package/src/postmortem.ts +57 -0
  25. package/src/procmgr.ts +18 -18
  26. package/src/ptree.ts +3 -3
  27. package/src/runtime-install.ts +43 -7
  28. package/src/sqlite.ts +29 -2
  29. package/src/stderr-guard.ts +53 -21
  30. package/src/stream.ts +26 -8
  31. package/dist/types/vendor/mermaid-ascii/ascii/ansi.d.ts +0 -41
  32. package/dist/types/vendor/mermaid-ascii/ascii/canvas.d.ts +0 -89
  33. package/dist/types/vendor/mermaid-ascii/ascii/class-diagram.d.ts +0 -7
  34. package/dist/types/vendor/mermaid-ascii/ascii/converter.d.ts +0 -12
  35. package/dist/types/vendor/mermaid-ascii/ascii/draw.d.ts +0 -66
  36. package/dist/types/vendor/mermaid-ascii/ascii/edge-bundling.d.ts +0 -48
  37. package/dist/types/vendor/mermaid-ascii/ascii/edge-routing.d.ts +0 -43
  38. package/dist/types/vendor/mermaid-ascii/ascii/er-diagram.d.ts +0 -7
  39. package/dist/types/vendor/mermaid-ascii/ascii/grid.d.ts +0 -56
  40. package/dist/types/vendor/mermaid-ascii/ascii/index.d.ts +0 -65
  41. package/dist/types/vendor/mermaid-ascii/ascii/multiline-utils.d.ts +0 -27
  42. package/dist/types/vendor/mermaid-ascii/ascii/pathfinder.d.ts +0 -17
  43. package/dist/types/vendor/mermaid-ascii/ascii/sequence.d.ts +0 -7
  44. package/dist/types/vendor/mermaid-ascii/ascii/shapes/circle.d.ts +0 -11
  45. package/dist/types/vendor/mermaid-ascii/ascii/shapes/corners.d.ts +0 -34
  46. package/dist/types/vendor/mermaid-ascii/ascii/shapes/diamond.d.ts +0 -11
  47. package/dist/types/vendor/mermaid-ascii/ascii/shapes/hexagon.d.ts +0 -11
  48. package/dist/types/vendor/mermaid-ascii/ascii/shapes/index.d.ts +0 -26
  49. package/dist/types/vendor/mermaid-ascii/ascii/shapes/rectangle.d.ts +0 -31
  50. package/dist/types/vendor/mermaid-ascii/ascii/shapes/rounded.d.ts +0 -11
  51. package/dist/types/vendor/mermaid-ascii/ascii/shapes/special.d.ts +0 -59
  52. package/dist/types/vendor/mermaid-ascii/ascii/shapes/stadium.d.ts +0 -17
  53. package/dist/types/vendor/mermaid-ascii/ascii/shapes/state.d.ts +0 -30
  54. package/dist/types/vendor/mermaid-ascii/ascii/shapes/types.d.ts +0 -55
  55. package/dist/types/vendor/mermaid-ascii/ascii/types.d.ts +0 -206
  56. package/dist/types/vendor/mermaid-ascii/ascii/validate.d.ts +0 -51
  57. package/dist/types/vendor/mermaid-ascii/ascii/xychart.d.ts +0 -2
  58. package/dist/types/vendor/mermaid-ascii/class/parser.d.ts +0 -6
  59. package/dist/types/vendor/mermaid-ascii/class/types.d.ts +0 -102
  60. package/dist/types/vendor/mermaid-ascii/er/parser.d.ts +0 -6
  61. package/dist/types/vendor/mermaid-ascii/er/types.d.ts +0 -76
  62. package/dist/types/vendor/mermaid-ascii/index.d.ts +0 -1
  63. package/dist/types/vendor/mermaid-ascii/multiline-utils.d.ts +0 -9
  64. package/dist/types/vendor/mermaid-ascii/parser.d.ts +0 -7
  65. package/dist/types/vendor/mermaid-ascii/sequence/parser.d.ts +0 -6
  66. package/dist/types/vendor/mermaid-ascii/sequence/types.d.ts +0 -130
  67. package/dist/types/vendor/mermaid-ascii/text-metrics.d.ts +0 -23
  68. package/dist/types/vendor/mermaid-ascii/types.d.ts +0 -114
  69. package/dist/types/vendor/mermaid-ascii/xychart/colors.d.ts +0 -25
  70. package/dist/types/vendor/mermaid-ascii/xychart/parser.d.ts +0 -6
  71. package/dist/types/vendor/mermaid-ascii/xychart/types.d.ts +0 -145
  72. package/src/vendor/mermaid-ascii/NOTICE +0 -33
  73. package/src/vendor/mermaid-ascii/ascii/ansi.ts +0 -409
  74. package/src/vendor/mermaid-ascii/ascii/canvas.ts +0 -478
  75. package/src/vendor/mermaid-ascii/ascii/class-diagram.ts +0 -699
  76. package/src/vendor/mermaid-ascii/ascii/converter.ts +0 -271
  77. package/src/vendor/mermaid-ascii/ascii/draw.ts +0 -1389
  78. package/src/vendor/mermaid-ascii/ascii/edge-bundling.ts +0 -328
  79. package/src/vendor/mermaid-ascii/ascii/edge-routing.ts +0 -297
  80. package/src/vendor/mermaid-ascii/ascii/er-diagram.ts +0 -441
  81. package/src/vendor/mermaid-ascii/ascii/grid.ts +0 -593
  82. package/src/vendor/mermaid-ascii/ascii/index.ts +0 -187
  83. package/src/vendor/mermaid-ascii/ascii/multiline-utils.ts +0 -78
  84. package/src/vendor/mermaid-ascii/ascii/pathfinder.ts +0 -277
  85. package/src/vendor/mermaid-ascii/ascii/sequence.ts +0 -460
  86. package/src/vendor/mermaid-ascii/ascii/shapes/circle.ts +0 -27
  87. package/src/vendor/mermaid-ascii/ascii/shapes/corners.ts +0 -127
  88. package/src/vendor/mermaid-ascii/ascii/shapes/diamond.ts +0 -27
  89. package/src/vendor/mermaid-ascii/ascii/shapes/hexagon.ts +0 -27
  90. package/src/vendor/mermaid-ascii/ascii/shapes/index.ts +0 -101
  91. package/src/vendor/mermaid-ascii/ascii/shapes/rectangle.ts +0 -175
  92. package/src/vendor/mermaid-ascii/ascii/shapes/rounded.ts +0 -27
  93. package/src/vendor/mermaid-ascii/ascii/shapes/special.ts +0 -296
  94. package/src/vendor/mermaid-ascii/ascii/shapes/stadium.ts +0 -114
  95. package/src/vendor/mermaid-ascii/ascii/shapes/state.ts +0 -192
  96. package/src/vendor/mermaid-ascii/ascii/shapes/types.ts +0 -73
  97. package/src/vendor/mermaid-ascii/ascii/types.ts +0 -273
  98. package/src/vendor/mermaid-ascii/ascii/validate.ts +0 -120
  99. package/src/vendor/mermaid-ascii/ascii/xychart.ts +0 -875
  100. package/src/vendor/mermaid-ascii/class/parser.ts +0 -290
  101. package/src/vendor/mermaid-ascii/class/types.ts +0 -121
  102. package/src/vendor/mermaid-ascii/er/parser.ts +0 -181
  103. package/src/vendor/mermaid-ascii/er/types.ts +0 -91
  104. package/src/vendor/mermaid-ascii/index.ts +0 -14
  105. package/src/vendor/mermaid-ascii/multiline-utils.ts +0 -30
  106. package/src/vendor/mermaid-ascii/parser.ts +0 -645
  107. package/src/vendor/mermaid-ascii/sequence/parser.ts +0 -207
  108. package/src/vendor/mermaid-ascii/sequence/types.ts +0 -146
  109. package/src/vendor/mermaid-ascii/text-metrics.ts +0 -74
  110. package/src/vendor/mermaid-ascii/types.ts +0 -164
  111. package/src/vendor/mermaid-ascii/xychart/colors.ts +0 -140
  112. package/src/vendor/mermaid-ascii/xychart/parser.ts +0 -115
  113. package/src/vendor/mermaid-ascii/xychart/types.ts +0 -150
@@ -1,140 +0,0 @@
1
- // ============================================================================
2
- // XY Chart — shared color palette
3
- //
4
- // Generates monochromatic shades from the theme accent color.
5
- // Series 0 = accent (or blue fallback). Series 1+ are darker/lighter
6
- // shades of the same hue with subtle hue drift to stay in the same
7
- // color family (like navy ↔ cyan from blue).
8
- //
9
- // Used by both the SVG and ASCII renderers.
10
- // ============================================================================
11
-
12
- /** Default accent for charts when the theme doesn't provide one. */
13
- export const CHART_ACCENT_FALLBACK = '#3b82f6' // blue-500
14
-
15
- // ---------------------------------------------------------------------------
16
- // HSL ↔ Hex conversion
17
- // ---------------------------------------------------------------------------
18
-
19
- function hexToHsl(hex: string): [number, number, number] {
20
- const h = hex.replace('#', '')
21
- const ri = parseInt(h.substring(0, 2), 16) / 255
22
- const gi = parseInt(h.substring(2, 4), 16) / 255
23
- const bi = parseInt(h.substring(4, 6), 16) / 255
24
-
25
- const max = Math.max(ri, gi, bi)
26
- const min = Math.min(ri, gi, bi)
27
- const l = (max + min) / 2
28
-
29
- if (max === min) return [0, 0, l * 100]
30
-
31
- const d = max - min
32
- const s = l > 0.5 ? d / (2 - max - min) : d / (max + min)
33
-
34
- let hue: number
35
- if (max === ri) hue = ((gi - bi) / d + (gi < bi ? 6 : 0)) / 6
36
- else if (max === gi) hue = ((bi - ri) / d + 2) / 6
37
- else hue = ((ri - gi) / d + 4) / 6
38
-
39
- return [hue * 360, s * 100, l * 100]
40
- }
41
-
42
- function hslToHex(h: number, s: number, l: number): string {
43
- const si = s / 100
44
- const li = l / 100
45
-
46
- const c = (1 - Math.abs(2 * li - 1)) * si
47
- const x = c * (1 - Math.abs(((h / 60) % 2) - 1))
48
- const m = li - c / 2
49
-
50
- let r: number, g: number, b: number
51
- if (h < 60) { r = c; g = x; b = 0 }
52
- else if (h < 120) { r = x; g = c; b = 0 }
53
- else if (h < 180) { r = 0; g = c; b = x }
54
- else if (h < 240) { r = 0; g = x; b = c }
55
- else if (h < 300) { r = x; g = 0; b = c }
56
- else { r = c; g = 0; b = x }
57
-
58
- const toHex = (v: number) => Math.round((v + m) * 255).toString(16).padStart(2, '0')
59
- return `#${toHex(r)}${toHex(g)}${toHex(b)}`
60
- }
61
-
62
- // ---------------------------------------------------------------------------
63
- // Hex ↔ RGB conversion
64
- // ---------------------------------------------------------------------------
65
-
66
- function hexToRgb(hex: string): [number, number, number] {
67
- const h = hex.replace('#', '')
68
- return [
69
- parseInt(h.substring(0, 2), 16),
70
- parseInt(h.substring(2, 4), 16),
71
- parseInt(h.substring(4, 6), 16),
72
- ]
73
- }
74
-
75
- function rgbToHex(r: number, g: number, b: number): string {
76
- const toHex = (v: number) => Math.round(Math.max(0, Math.min(255, v))).toString(16).padStart(2, '0')
77
- return `#${toHex(r)}${toHex(g)}${toHex(b)}`
78
- }
79
-
80
- // ---------------------------------------------------------------------------
81
- // Public API
82
- // ---------------------------------------------------------------------------
83
-
84
- /** Check whether a string is a valid 6-digit hex color (e.g. "#3b82f6"). */
85
- export function isValidHex(color: string): boolean {
86
- return /^#[0-9a-fA-F]{6}$/.test(color)
87
- }
88
-
89
- /**
90
- * Detect whether a background color is dark (lightness < 50%).
91
- */
92
- export function isDarkBackground(bgHex: string): boolean {
93
- return hexToHsl(bgHex)[2] < 50
94
- }
95
-
96
- /**
97
- * Mix two hex colors in RGB space.
98
- * `ratio` controls how much of `fgHex` shows: 0 = pure bg, 1 = pure fg.
99
- * Equivalent to alpha-compositing fg over bg at the given opacity.
100
- */
101
- export function mixHexColors(bgHex: string, fgHex: string, ratio: number): string {
102
- const [br, bg, bb] = hexToRgb(bgHex)
103
- const [fr, fg, fb] = hexToRgb(fgHex)
104
- const inv = 1 - ratio
105
- return rgbToHex(br * inv + fr * ratio, bg * inv + fg * ratio, bb * inv + fb * ratio)
106
- }
107
-
108
- /**
109
- * Get the hex color for a series index.
110
- * Index 0 returns the accent color as-is.
111
- * Index 1+ alternate between darker and lighter shades of the same hue
112
- * with subtle hue drift (±8-12° per tier) to stay in the same family.
113
- *
114
- * When `bgColor` is provided, shade direction adapts to the background:
115
- * - Light bg: odd = darker, even = lighter (default)
116
- * - Dark bg: odd = lighter, even = darker (so shades stay visible)
117
- */
118
- export function getSeriesColor(index: number, accentColor: string, bgColor?: string): string {
119
- if (index === 0) return accentColor
120
- // Fall back to defaults when inputs aren't valid hex (e.g. CSS variable refs like "var(--accent)")
121
- const safeAccent = isValidHex(accentColor) ? accentColor : CHART_ACCENT_FALLBACK
122
- const safeBg = bgColor && isValidHex(bgColor) ? bgColor : undefined
123
- const [h, s] = hexToHsl(safeAccent)
124
- const chartS = Math.max(55, Math.min(85, s))
125
-
126
- const tier = Math.ceil(index / 2)
127
- const oddIndex = index % 2 === 1
128
-
129
- // On dark backgrounds, flip: odd = lighter, even = darker
130
- const dark = safeBg && isDarkBackground(safeBg) ? !oddIndex : oddIndex
131
- const l = dark
132
- ? Math.max(25, 48 - tier * 13)
133
- : Math.min(78, 55 + tier * 11)
134
-
135
- // Subtle hue drift: darker shades shift slightly negative, lighter shift positive
136
- const hShift = (dark ? -8 : 12) * tier
137
- const newH = ((h + hShift) % 360 + 360) % 360
138
-
139
- return hslToHex(newH, chartS, l)
140
- }
@@ -1,115 +0,0 @@
1
- import type { XYChart, XYAxis, XYChartSeries } from './types'
2
-
3
- // ============================================================================
4
- // XY Chart parser
5
- //
6
- // Parses Mermaid xychart-beta syntax into a typed XYChart structure.
7
- //
8
- // Supported directives:
9
- // xychart-beta [horizontal]
10
- // title "Chart Title"
11
- // x-axis [label1, label2, ...] — categorical
12
- // x-axis min --> max — numeric range
13
- // x-axis "Axis Title" [label1, ...] — with title
14
- // x-axis "Axis Title" min --> max — with title
15
- // y-axis (same patterns)
16
- // bar [val1, val2, ...]
17
- // line [val1, val2, ...]
18
- // ============================================================================
19
-
20
- /**
21
- * Parse a Mermaid xychart-beta diagram from preprocessed lines.
22
- * Lines should already be trimmed and comment-stripped.
23
- */
24
- export function parseXYChart(lines: string[]): XYChart {
25
- const xAxis: XYAxis = {}
26
- const yAxis: XYAxis = {}
27
- const series: XYChartSeries[] = []
28
- let title: string | undefined
29
- let horizontal = false
30
-
31
- for (const line of lines) {
32
- // Header line — detect horizontal
33
- if (/^xychart(-beta)?\b/i.test(line)) {
34
- if (/\bhorizontal\b/i.test(line)) horizontal = true
35
- continue
36
- }
37
-
38
- // Title
39
- const titleMatch = line.match(/^title\s+"([^"]+)"/)
40
- if (titleMatch) {
41
- title = titleMatch[1]
42
- continue
43
- }
44
-
45
- // x-axis with categories: x-axis "Title" [a, b, c] or x-axis [a, b, c]
46
- const xCatMatch = line.match(/^x-axis\s+(?:"([^"]*)"\s*)?\[([^\]]+)\]/)
47
- if (xCatMatch) {
48
- if (xCatMatch[1]) xAxis.title = xCatMatch[1]
49
- xAxis.categories = xCatMatch[2]!.split(',').map(s => s.trim())
50
- continue
51
- }
52
-
53
- // x-axis with range: x-axis "Title" min --> max or x-axis min --> max
54
- const xRangeMatch = line.match(/^x-axis\s+(?:"([^"]*)"\s+)?(-?\d+(?:\.\d+)?)\s*-->\s*(-?\d+(?:\.\d+)?)/)
55
- if (xRangeMatch) {
56
- if (xRangeMatch[1]) xAxis.title = xRangeMatch[1]
57
- xAxis.range = { min: parseFloat(xRangeMatch[2]!), max: parseFloat(xRangeMatch[3]!) }
58
- continue
59
- }
60
-
61
- // y-axis with range: y-axis "Title" min --> max or y-axis min --> max
62
- const yRangeMatch = line.match(/^y-axis\s+(?:"([^"]*)"\s+)?(-?\d+(?:\.\d+)?)\s*-->\s*(-?\d+(?:\.\d+)?)/)
63
- if (yRangeMatch) {
64
- if (yRangeMatch[1]) yAxis.title = yRangeMatch[1]
65
- yAxis.range = { min: parseFloat(yRangeMatch[2]!), max: parseFloat(yRangeMatch[3]!) }
66
- continue
67
- }
68
-
69
- // y-axis with just title (no range)
70
- const yTitleOnly = line.match(/^y-axis\s+"([^"]+)"\s*$/)
71
- if (yTitleOnly) {
72
- yAxis.title = yTitleOnly[1]
73
- continue
74
- }
75
-
76
- // bar [...]
77
- const barMatch = line.match(/^bar\s+\[([^\]]+)\]/)
78
- if (barMatch) {
79
- series.push({ type: 'bar', data: parseNumericArray(barMatch[1]!) })
80
- continue
81
- }
82
-
83
- // line [...]
84
- const lineMatch = line.match(/^line\s+\[([^\]]+)\]/)
85
- if (lineMatch) {
86
- series.push({ type: 'line', data: parseNumericArray(lineMatch[1]!) })
87
- continue
88
- }
89
- }
90
-
91
- // Auto-derive y-axis range from data if not specified
92
- if (!yAxis.range && series.length > 0) {
93
- const allValues = series.flatMap(s => s.data)
94
- let min = Math.min(...allValues)
95
- let max = Math.max(...allValues)
96
- const span = max - min || 1
97
- // Add 10% padding
98
- min = min - span * 0.1
99
- max = max + span * 0.1
100
- // Floor to 0 if all values are positive and min is close to 0
101
- if (min > 0 && min < span * 0.5) min = 0
102
- yAxis.range = { min, max }
103
- }
104
-
105
- // Fallback y-axis range
106
- if (!yAxis.range) {
107
- yAxis.range = { min: 0, max: 100 }
108
- }
109
-
110
- return { title, horizontal, xAxis, yAxis, series }
111
- }
112
-
113
- function parseNumericArray(str: string): number[] {
114
- return str.split(',').map(s => parseFloat(s.trim()))
115
- }
@@ -1,150 +0,0 @@
1
- // ============================================================================
2
- // XY Chart types
3
- //
4
- // Models the parsed and positioned representations of a Mermaid xychart-beta
5
- // diagram. Supports bar charts, line charts, and combinations with categorical
6
- // or numeric x-axes.
7
- // ============================================================================
8
-
9
- /** Parsed XY chart — logical structure from mermaid text */
10
- export interface XYChart {
11
- /** Optional chart title */
12
- title?: string
13
- /** Chart orientation: vertical (default) or horizontal */
14
- horizontal: boolean
15
- /** X-axis configuration */
16
- xAxis: XYAxis
17
- /** Y-axis configuration */
18
- yAxis: XYAxis
19
- /** Data series (bar and/or line) */
20
- series: XYChartSeries[]
21
- }
22
-
23
- /** Axis configuration — categorical (labels) or numeric (range) */
24
- export interface XYAxis {
25
- /** Optional axis title/label */
26
- title?: string
27
- /** Categorical labels (e.g., ["jan", "feb", "mar"]) — mutually exclusive with range */
28
- categories?: string[]
29
- /** Numeric range — mutually exclusive with categories */
30
- range?: { min: number; max: number }
31
- }
32
-
33
- /** A single data series (bar or line) */
34
- export interface XYChartSeries {
35
- /** Series type */
36
- type: 'bar' | 'line'
37
- /** Data values — one per category, or evenly spaced across numeric range */
38
- data: number[]
39
- }
40
-
41
- // ============================================================================
42
- // Positioned XY chart — ready for SVG rendering
43
- // ============================================================================
44
-
45
- export interface PositionedXYChart {
46
- width: number
47
- height: number
48
- /** Whether this is a horizontal (rotated) chart */
49
- horizontal?: boolean
50
- /** Title text and position (if present) */
51
- title?: PositionedTitle
52
- /** Positioned x-axis with tick marks and labels */
53
- xAxis: PositionedAxis
54
- /** Positioned y-axis with tick marks and labels */
55
- yAxis: PositionedAxis
56
- /** The plot area bounds (inside axes) */
57
- plotArea: PlotArea
58
- /** Positioned bar groups */
59
- bars: PositionedBar[]
60
- /** Positioned line polylines */
61
- lines: PositionedLine[]
62
- /** Horizontal grid lines for readability */
63
- gridLines: GridLine[]
64
- /** Legend items (shown when multiple series) */
65
- legend: LegendItem[]
66
- }
67
-
68
- export interface LegendItem {
69
- /** Display label */
70
- label: string
71
- /** Position of the swatch/icon */
72
- x: number
73
- y: number
74
- /** Series type determines swatch shape (rect for bar, line+dot for line) */
75
- type: 'bar' | 'line'
76
- /** Series index within its type (for layout grouping) */
77
- seriesIndex: number
78
- /** Global color index across all series (for unified color assignment) */
79
- colorIndex: number
80
- }
81
-
82
- export interface PositionedTitle {
83
- text: string
84
- x: number
85
- y: number
86
- }
87
-
88
- export interface PositionedAxis {
89
- /** Optional axis title text and position */
90
- title?: { text: string; x: number; y: number; rotate?: number }
91
- /** Tick positions along the axis */
92
- ticks: AxisTick[]
93
- /** Axis line: start and end coordinates */
94
- line: { x1: number; y1: number; x2: number; y2: number }
95
- }
96
-
97
- export interface AxisTick {
98
- /** Label text for this tick */
99
- label: string
100
- /** Position of the tick mark on the axis */
101
- x: number
102
- y: number
103
- /** End of the tick mark (short perpendicular line) */
104
- tx: number
105
- ty: number
106
- /** Label anchor position */
107
- labelX: number
108
- labelY: number
109
- /** Text anchor for label */
110
- textAnchor: 'start' | 'middle' | 'end'
111
- }
112
-
113
- export interface PlotArea {
114
- x: number
115
- y: number
116
- width: number
117
- height: number
118
- }
119
-
120
- export interface PositionedBar {
121
- /** Bar rectangle in SVG coordinates */
122
- x: number
123
- y: number
124
- width: number
125
- height: number
126
- /** Original data value */
127
- value: number
128
- /** Category label for this bar (e.g. "Jan") */
129
- label?: string
130
- /** Series index within bar type (for layout grouping) */
131
- seriesIndex: number
132
- /** Global color index across all series */
133
- colorIndex: number
134
- }
135
-
136
- export interface PositionedLine {
137
- /** Polyline points */
138
- points: Array<{ x: number; y: number; value: number; label?: string }>
139
- /** Series index within line type (for layout grouping) */
140
- seriesIndex: number
141
- /** Global color index across all series */
142
- colorIndex: number
143
- }
144
-
145
- export interface GridLine {
146
- x1: number
147
- y1: number
148
- x2: number
149
- y2: number
150
- }