markgraphy 0.1.1

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 (166) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +154 -0
  3. package/dist/animated/GraphAgni.svelte +430 -0
  4. package/dist/animated/GraphAgni.svelte.d.ts +22 -0
  5. package/dist/animated/GraphAum.svelte +294 -0
  6. package/dist/animated/GraphAum.svelte.d.ts +20 -0
  7. package/dist/animated/GraphBoot.svelte +325 -0
  8. package/dist/animated/GraphBoot.svelte.d.ts +28 -0
  9. package/dist/animated/GraphCron.svelte +476 -0
  10. package/dist/animated/GraphCron.svelte.d.ts +42 -0
  11. package/dist/animated/GraphDamru.svelte +341 -0
  12. package/dist/animated/GraphDamru.svelte.d.ts +18 -0
  13. package/dist/animated/GraphDeps.svelte +245 -0
  14. package/dist/animated/GraphDeps.svelte.d.ts +29 -0
  15. package/dist/animated/GraphDiya.svelte +330 -0
  16. package/dist/animated/GraphDiya.svelte.d.ts +22 -0
  17. package/dist/animated/GraphFire.svelte +246 -0
  18. package/dist/animated/GraphFire.svelte.d.ts +22 -0
  19. package/dist/animated/GraphFlame.svelte +258 -0
  20. package/dist/animated/GraphFlame.svelte.d.ts +14 -0
  21. package/dist/animated/GraphFlowPlayer.svelte +346 -0
  22. package/dist/animated/GraphFlowPlayer.svelte.d.ts +27 -0
  23. package/dist/animated/GraphGanga.svelte +305 -0
  24. package/dist/animated/GraphGanga.svelte.d.ts +20 -0
  25. package/dist/animated/GraphHash.svelte +251 -0
  26. package/dist/animated/GraphHash.svelte.d.ts +20 -0
  27. package/dist/animated/GraphJapa.svelte +253 -0
  28. package/dist/animated/GraphJapa.svelte.d.ts +20 -0
  29. package/dist/animated/GraphLife.svelte +312 -0
  30. package/dist/animated/GraphLife.svelte.d.ts +27 -0
  31. package/dist/animated/GraphMandala.svelte +262 -0
  32. package/dist/animated/GraphMandala.svelte.d.ts +24 -0
  33. package/dist/animated/GraphMandel.svelte +290 -0
  34. package/dist/animated/GraphMandel.svelte.d.ts +27 -0
  35. package/dist/animated/GraphPulse.svelte +248 -0
  36. package/dist/animated/GraphPulse.svelte.d.ts +24 -0
  37. package/dist/animated/GraphRain.svelte +280 -0
  38. package/dist/animated/GraphRain.svelte.d.ts +22 -0
  39. package/dist/animated/GraphScatter.svelte +395 -0
  40. package/dist/animated/GraphScatter.svelte.d.ts +31 -0
  41. package/dist/animated/GraphScope.svelte +197 -0
  42. package/dist/animated/GraphScope.svelte.d.ts +22 -0
  43. package/dist/animated/GraphSequence.svelte +247 -0
  44. package/dist/animated/GraphSequence.svelte.d.ts +18 -0
  45. package/dist/animated/GraphSpinners.svelte +109 -0
  46. package/dist/animated/GraphSpinners.svelte.d.ts +22 -0
  47. package/dist/animated/GraphState.svelte +270 -0
  48. package/dist/animated/GraphState.svelte.d.ts +14 -0
  49. package/dist/animated/GraphStream.svelte +223 -0
  50. package/dist/animated/GraphStream.svelte.d.ts +24 -0
  51. package/dist/animated/GraphSurya.svelte +268 -0
  52. package/dist/animated/GraphSurya.svelte.d.ts +22 -0
  53. package/dist/animated/GraphTerminal.svelte +238 -0
  54. package/dist/animated/GraphTerminal.svelte.d.ts +28 -0
  55. package/dist/animated/GraphTicker.svelte +163 -0
  56. package/dist/animated/GraphTicker.svelte.d.ts +21 -0
  57. package/dist/animated/GraphTypewriter.svelte +130 -0
  58. package/dist/animated/GraphTypewriter.svelte.d.ts +22 -0
  59. package/dist/animated/GraphWorkflow.svelte +570 -0
  60. package/dist/animated/GraphWorkflow.svelte.d.ts +29 -0
  61. package/dist/assets/favicon.svg +21 -0
  62. package/dist/diagram/AmplifierDiagram.svelte +206 -0
  63. package/dist/diagram/AmplifierDiagram.svelte.d.ts +12 -0
  64. package/dist/diagram/AsciiDiagram.svelte +212 -0
  65. package/dist/diagram/AsciiDiagram.svelte.d.ts +24 -0
  66. package/dist/diagram/DiagramEditor.svelte +414 -0
  67. package/dist/diagram/DiagramEditor.svelte.d.ts +3 -0
  68. package/dist/diagram/MetricsTableDiagram.svelte +125 -0
  69. package/dist/diagram/MetricsTableDiagram.svelte.d.ts +18 -0
  70. package/dist/diagram/NestedRadiiDiagram.svelte +218 -0
  71. package/dist/diagram/NestedRadiiDiagram.svelte.d.ts +12 -0
  72. package/dist/diagram/PromptLoopDiagram.svelte +331 -0
  73. package/dist/diagram/PromptLoopDiagram.svelte.d.ts +12 -0
  74. package/dist/diagram/ascii.d.ts +35 -0
  75. package/dist/diagram/ascii.js +83 -0
  76. package/dist/diagram/parser.d.ts +16 -0
  77. package/dist/diagram/parser.js +71 -0
  78. package/dist/frame/Graph.svelte +141 -0
  79. package/dist/frame/Graph.svelte.d.ts +14 -0
  80. package/dist/frame/GraphArrow.svelte +49 -0
  81. package/dist/frame/GraphArrow.svelte.d.ts +9 -0
  82. package/dist/frame/GraphBody.svelte +39 -0
  83. package/dist/frame/GraphBody.svelte.d.ts +10 -0
  84. package/dist/frame/GraphRule.svelte +21 -0
  85. package/dist/frame/GraphRule.svelte.d.ts +6 -0
  86. package/dist/frame/GraphTick.svelte +23 -0
  87. package/dist/frame/GraphTick.svelte.d.ts +9 -0
  88. package/dist/frame/GraphTrack.svelte +29 -0
  89. package/dist/frame/GraphTrack.svelte.d.ts +14 -0
  90. package/dist/frame/clock.d.ts +10 -0
  91. package/dist/frame/clock.js +62 -0
  92. package/dist/frame/glyphs.d.ts +22 -0
  93. package/dist/frame/glyphs.js +53 -0
  94. package/dist/frame/motion.css +27 -0
  95. package/dist/frame/motion.d.ts +24 -0
  96. package/dist/frame/motion.js +47 -0
  97. package/dist/frame/tone.d.ts +11 -0
  98. package/dist/frame/tone.js +64 -0
  99. package/dist/graphs/GraphActivity.svelte +387 -0
  100. package/dist/graphs/GraphActivity.svelte.d.ts +22 -0
  101. package/dist/graphs/GraphBars.svelte +194 -0
  102. package/dist/graphs/GraphBars.svelte.d.ts +20 -0
  103. package/dist/graphs/GraphBullet.svelte +208 -0
  104. package/dist/graphs/GraphBullet.svelte.d.ts +22 -0
  105. package/dist/graphs/GraphCalendar.svelte +203 -0
  106. package/dist/graphs/GraphCalendar.svelte.d.ts +20 -0
  107. package/dist/graphs/GraphCells.svelte +181 -0
  108. package/dist/graphs/GraphCells.svelte.d.ts +18 -0
  109. package/dist/graphs/GraphCompare.svelte +192 -0
  110. package/dist/graphs/GraphCompare.svelte.d.ts +18 -0
  111. package/dist/graphs/GraphCountdown.svelte +96 -0
  112. package/dist/graphs/GraphCountdown.svelte.d.ts +14 -0
  113. package/dist/graphs/GraphDiff.svelte +181 -0
  114. package/dist/graphs/GraphDiff.svelte.d.ts +18 -0
  115. package/dist/graphs/GraphFlow.svelte +137 -0
  116. package/dist/graphs/GraphFlow.svelte.d.ts +21 -0
  117. package/dist/graphs/GraphFunnel.svelte +190 -0
  118. package/dist/graphs/GraphFunnel.svelte.d.ts +21 -0
  119. package/dist/graphs/GraphGantt.svelte +258 -0
  120. package/dist/graphs/GraphGantt.svelte.d.ts +25 -0
  121. package/dist/graphs/GraphHeatmap.svelte +287 -0
  122. package/dist/graphs/GraphHeatmap.svelte.d.ts +22 -0
  123. package/dist/graphs/GraphInvoice.svelte +294 -0
  124. package/dist/graphs/GraphInvoice.svelte.d.ts +34 -0
  125. package/dist/graphs/GraphKpi.svelte +166 -0
  126. package/dist/graphs/GraphKpi.svelte.d.ts +17 -0
  127. package/dist/graphs/GraphLatency.svelte +340 -0
  128. package/dist/graphs/GraphLatency.svelte.d.ts +28 -0
  129. package/dist/graphs/GraphMeter.svelte +121 -0
  130. package/dist/graphs/GraphMeter.svelte.d.ts +16 -0
  131. package/dist/graphs/GraphPlot.svelte +226 -0
  132. package/dist/graphs/GraphPlot.svelte.d.ts +18 -0
  133. package/dist/graphs/GraphQuota.svelte +303 -0
  134. package/dist/graphs/GraphQuota.svelte.d.ts +27 -0
  135. package/dist/graphs/GraphRank.svelte +141 -0
  136. package/dist/graphs/GraphRank.svelte.d.ts +21 -0
  137. package/dist/graphs/GraphSlo.svelte +325 -0
  138. package/dist/graphs/GraphSlo.svelte.d.ts +31 -0
  139. package/dist/graphs/GraphSlope.svelte +197 -0
  140. package/dist/graphs/GraphSlope.svelte.d.ts +19 -0
  141. package/dist/graphs/GraphSpark.svelte +125 -0
  142. package/dist/graphs/GraphSpark.svelte.d.ts +15 -0
  143. package/dist/graphs/GraphSpec.svelte +69 -0
  144. package/dist/graphs/GraphSpec.svelte.d.ts +14 -0
  145. package/dist/graphs/GraphStack.svelte +266 -0
  146. package/dist/graphs/GraphStack.svelte.d.ts +25 -0
  147. package/dist/graphs/GraphStat.svelte +103 -0
  148. package/dist/graphs/GraphStat.svelte.d.ts +16 -0
  149. package/dist/graphs/GraphTable.svelte +133 -0
  150. package/dist/graphs/GraphTable.svelte.d.ts +15 -0
  151. package/dist/graphs/GraphTimeline.svelte +164 -0
  152. package/dist/graphs/GraphTimeline.svelte.d.ts +18 -0
  153. package/dist/graphs/GraphTimer.svelte +117 -0
  154. package/dist/graphs/GraphTimer.svelte.d.ts +15 -0
  155. package/dist/graphs/GraphTree.svelte +147 -0
  156. package/dist/graphs/GraphTree.svelte.d.ts +16 -0
  157. package/dist/graphs/GraphUptime.svelte +210 -0
  158. package/dist/graphs/GraphUptime.svelte.d.ts +18 -0
  159. package/dist/graphs/GraphWaffle.svelte +131 -0
  160. package/dist/graphs/GraphWaffle.svelte.d.ts +17 -0
  161. package/dist/graphs/GraphWaterfall.svelte +258 -0
  162. package/dist/graphs/GraphWaterfall.svelte.d.ts +22 -0
  163. package/dist/index.d.ts +147 -0
  164. package/dist/index.js +87 -0
  165. package/dist/themes.css +54 -0
  166. package/package.json +67 -0
@@ -0,0 +1,131 @@
1
+ <script module lang="ts">
2
+ import type { Glyphs } from '../frame/glyphs';
3
+ import type { GraphPalette } from '../frame/tone';
4
+
5
+ /** Share grid of ~100 cells; filled cells carry the accent. */
6
+ export interface GraphWaffleProps {
7
+ title: string;
8
+ value: number;
9
+ cells?: number;
10
+ columns?: number;
11
+ caption?: string;
12
+ glyphs?: Glyphs;
13
+ palette?: GraphPalette;
14
+ corner?: string;
15
+ class?: string;
16
+ }
17
+ </script>
18
+
19
+ <script lang="ts">
20
+ import Graph from '../frame/Graph.svelte';
21
+ import GraphBody from '../frame/GraphBody.svelte';
22
+ import { trackMarks } from '../frame/glyphs';
23
+ import { reveal, stagger } from '../frame/motion';
24
+
25
+ let {
26
+ title,
27
+ value,
28
+ cells = 100,
29
+ columns = 10,
30
+ caption,
31
+ glyphs,
32
+ corner,
33
+ class: className = ''
34
+ }: GraphWaffleProps = $props();
35
+
36
+ const view = $derived.by(() => {
37
+ const clamped = Math.min(1, Math.max(0, value));
38
+ const filled = Math.round(clamped * cells);
39
+ const rowCount = Math.ceil(cells / columns);
40
+ const marks = trackMarks(glyphs, { empty: '░', rest: '░', fill: '█' });
41
+ const percent = Math.round(clamped * 100);
42
+ return { filled, rowCount, marks, percent };
43
+ });
44
+ </script>
45
+
46
+ <Graph {title} {corner} class={className}>
47
+ <GraphBody>
48
+ <div class="wrap">
49
+ <div class="grid" aria-hidden="true">
50
+ {#each Array.from({ length: view.rowCount }) as _, row}
51
+ <div class="wrow" use:reveal={{ delay: stagger(row, 40), amount: 0.4 }}>
52
+ {#each Array.from({ length: columns }) as _, column}
53
+ {@const index = row * columns + column}
54
+ {#if index >= cells}
55
+ <span class="cell"></span>
56
+ {:else}
57
+ <span
58
+ class="cell"
59
+ class:c-accent={index < view.filled}
60
+ class:c-frame={index >= view.filled}
61
+ >
62
+ {index < view.filled ? view.marks.fill : view.marks.empty}
63
+ </span>
64
+ {/if}
65
+ {/each}
66
+ </div>
67
+ {/each}
68
+ </div>
69
+ <p class="pct c-accent">{view.percent}%</p>
70
+ {#if caption}
71
+ <p class="muted">{caption}</p>
72
+ {/if}
73
+ <span class="sr-only">{view.percent} percent{#if caption}. {caption}{/if}</span>
74
+ </div>
75
+ </GraphBody>
76
+ </Graph>
77
+
78
+ <style>
79
+ .wrap {
80
+ display: flex;
81
+ flex-direction: column;
82
+ gap: 1rem;
83
+ }
84
+
85
+ .grid {
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: 0.25rem;
89
+ user-select: none;
90
+ }
91
+
92
+ .wrow {
93
+ display: flex;
94
+ justify-content: center;
95
+ gap: 0.125rem;
96
+ }
97
+
98
+ .cell {
99
+ min-width: 1ch;
100
+ text-align: center;
101
+ }
102
+
103
+ .pct {
104
+ margin: 0;
105
+ }
106
+
107
+ .muted {
108
+ margin: 0;
109
+ color: var(--graph-muted, oklch(0.62 0 0));
110
+ }
111
+
112
+ .c-accent {
113
+ color: var(--graph-accent, oklch(0.78 0.17 155));
114
+ }
115
+
116
+ .c-frame {
117
+ color: var(--graph-frame, oklch(0.6 0 0 / 0.5));
118
+ }
119
+
120
+ .sr-only {
121
+ position: absolute;
122
+ width: 1px;
123
+ height: 1px;
124
+ padding: 0;
125
+ margin: -1px;
126
+ overflow: hidden;
127
+ clip-path: inset(50%);
128
+ white-space: nowrap;
129
+ border-width: 0;
130
+ }
131
+ </style>
@@ -0,0 +1,17 @@
1
+ import type { Glyphs } from '../frame/glyphs';
2
+ import type { GraphPalette } from '../frame/tone';
3
+ /** Share grid of ~100 cells; filled cells carry the accent. */
4
+ export interface GraphWaffleProps {
5
+ title: string;
6
+ value: number;
7
+ cells?: number;
8
+ columns?: number;
9
+ caption?: string;
10
+ glyphs?: Glyphs;
11
+ palette?: GraphPalette;
12
+ corner?: string;
13
+ class?: string;
14
+ }
15
+ declare const GraphWaffle: import("svelte").Component<GraphWaffleProps, {}, "">;
16
+ type GraphWaffle = ReturnType<typeof GraphWaffle>;
17
+ export default GraphWaffle;
@@ -0,0 +1,258 @@
1
+ <script module lang="ts">
2
+ import type { Glyphs } from '../frame/glyphs';
3
+ import type { GraphPalette } from '../frame/tone';
4
+
5
+ /** Running total drawn as floating bars over a shared scale. */
6
+ export type WaterfallKind = 'start' | 'in' | 'out' | 'end';
7
+
8
+ export interface WaterfallItem {
9
+ label: string;
10
+ value: number;
11
+ display?: string;
12
+ kind?: WaterfallKind;
13
+ }
14
+
15
+ export interface GraphWaterfallProps {
16
+ title: string;
17
+ items: WaterfallItem[];
18
+ ticks?: number;
19
+ glyphs?: Glyphs;
20
+ palette?: GraphPalette;
21
+ corner?: string;
22
+ class?: string;
23
+ }
24
+ </script>
25
+
26
+ <script lang="ts">
27
+ import Graph from '../frame/Graph.svelte';
28
+ import GraphBody from '../frame/GraphBody.svelte';
29
+ import GraphRule from '../frame/GraphRule.svelte';
30
+ import GraphTrack from '../frame/GraphTrack.svelte';
31
+ import GraphTick from '../frame/GraphTick.svelte';
32
+ import { trackMarks } from '../frame/glyphs';
33
+ import { isMonoPalette } from '../frame/tone';
34
+ import { reveal, stagger } from '../frame/motion';
35
+
36
+ let {
37
+ title,
38
+ items,
39
+ ticks = 24,
40
+ glyphs,
41
+ palette,
42
+ corner,
43
+ class: className = ''
44
+ }: GraphWaterfallProps = $props();
45
+
46
+ const mono = $derived(isMonoPalette(palette));
47
+
48
+ interface Segment {
49
+ label: string;
50
+ value: number;
51
+ display?: string;
52
+ kind: WaterfallKind;
53
+ from: number;
54
+ to: number;
55
+ start: number;
56
+ end: number;
57
+ }
58
+
59
+ function formatValue(item: { value: number; display?: string }, kind: WaterfallKind) {
60
+ if (item.display) {
61
+ return item.display;
62
+ }
63
+
64
+ const absolute = Math.abs(item.value);
65
+
66
+ if (kind === 'in') {
67
+ return `+${absolute.toLocaleString('en-US')}`;
68
+ }
69
+
70
+ if (kind === 'out') {
71
+ return `−${absolute.toLocaleString('en-US')}`;
72
+ }
73
+
74
+ return item.value.toLocaleString('en-US');
75
+ }
76
+
77
+ const view = $derived.by(() => {
78
+ const marks = trackMarks(glyphs);
79
+ let run = 0;
80
+ const segments: Segment[] = items.map((entry, index) => {
81
+ const kind: WaterfallKind =
82
+ entry.kind ??
83
+ (index === 0
84
+ ? 'start'
85
+ : index === items.length - 1
86
+ ? 'end'
87
+ : entry.value >= 0
88
+ ? 'in'
89
+ : 'out');
90
+ const magnitude = Math.abs(entry.value);
91
+ let from: number;
92
+ let to: number;
93
+
94
+ if (kind === 'start') {
95
+ from = 0;
96
+ to = entry.value;
97
+ run = entry.value;
98
+ } else if (kind === 'in') {
99
+ from = run;
100
+ to = run + magnitude;
101
+ run = to;
102
+ } else if (kind === 'out') {
103
+ to = run;
104
+ from = run - magnitude;
105
+ run = from;
106
+ } else {
107
+ from = 0;
108
+ to = entry.value;
109
+ run = to;
110
+ }
111
+
112
+ return {
113
+ label: entry.label,
114
+ value: entry.value,
115
+ display: entry.display,
116
+ kind,
117
+ from,
118
+ to,
119
+ start: 0,
120
+ end: 0
121
+ };
122
+ });
123
+ const lows = segments.map((segment) => Math.min(segment.from, segment.to));
124
+ const highs = segments.map((segment) => Math.max(segment.from, segment.to));
125
+ const low = Math.min(0, ...lows);
126
+ const high = Math.max(1, ...highs);
127
+ const span = high - low || 1;
128
+
129
+ const column = (value: number) => Math.round(((value - low) / span) * ticks);
130
+
131
+ for (const segment of segments) {
132
+ const start = Math.min(column(segment.from), column(segment.to));
133
+ segment.start = start;
134
+ segment.end = Math.max(column(segment.from), column(segment.to), start + 1);
135
+ }
136
+
137
+ return { segments, marks };
138
+ });
139
+ </script>
140
+
141
+ <Graph {title} {corner} class={className}>
142
+ <GraphBody>
143
+ <ul class="falls" role="list">
144
+ {#each view.segments as segment, index (segment.label)}
145
+ <li class="fall">
146
+ {#if segment.kind === 'end' && index > 0}
147
+ <GraphRule />
148
+ {/if}
149
+ <div class="row" use:reveal={{ delay: stagger(index, 40), amount: 0.4 }}>
150
+ <span class="label">{segment.label}</span>
151
+ <GraphTrack>
152
+ {#each Array.from({ length: ticks }) as _, cell}
153
+ {@const filled = cell >= segment.start && cell < segment.end}
154
+ <GraphTick>
155
+ <span
156
+ class="g"
157
+ class:c-frame={!filled}
158
+ class:c-accent={filled && segment.kind !== 'out' && segment.kind !== 'start'}
159
+ class:c-accent2={filled && segment.kind === 'out' && !mono}
160
+ class:c-muted={filled && segment.kind === 'out' && mono}
161
+ class:c-fg={filled && segment.kind === 'start'}
162
+ >
163
+ {filled ? view.marks.fill : view.marks.empty}
164
+ </span>
165
+ </GraphTick>
166
+ {/each}
167
+ </GraphTrack>
168
+ <span
169
+ class="value"
170
+ class:c-accent={segment.kind === 'end'}
171
+ class:c-accent2={segment.kind === 'out' && !mono}
172
+ class:c-muted={segment.kind === 'out' && mono}
173
+ class:c-fg={segment.kind === 'start' || segment.kind === 'in'}
174
+ >
175
+ {formatValue(segment, segment.kind)}
176
+ </span>
177
+ </div>
178
+ </li>
179
+ {/each}
180
+ </ul>
181
+ <span class="sr-only">
182
+ {view.segments
183
+ .map((segment) => `${segment.label} ${formatValue(segment, segment.kind)}`)
184
+ .join(', ')}
185
+ </span>
186
+ </GraphBody>
187
+ </Graph>
188
+
189
+ <style>
190
+ .falls {
191
+ display: flex;
192
+ flex-direction: column;
193
+ gap: 0.5rem;
194
+ margin: 0;
195
+ padding: 0;
196
+ list-style: none;
197
+ }
198
+
199
+ .fall {
200
+ display: flex;
201
+ flex-direction: column;
202
+ gap: 0.5rem;
203
+ }
204
+
205
+ .row {
206
+ display: grid;
207
+ grid-template-columns: 7rem minmax(0, 1fr) 5.5rem;
208
+ align-items: center;
209
+ column-gap: 1rem;
210
+ }
211
+
212
+ .label {
213
+ overflow: hidden;
214
+ text-overflow: ellipsis;
215
+ white-space: nowrap;
216
+ color: var(--graph-foreground, oklch(0.93 0 0));
217
+ }
218
+
219
+ .g {
220
+ user-select: none;
221
+ }
222
+
223
+ .value {
224
+ text-align: right;
225
+ }
226
+
227
+ .c-accent {
228
+ color: var(--graph-accent, oklch(0.78 0.17 155));
229
+ }
230
+
231
+ .c-accent2 {
232
+ color: var(--graph-accent-2, oklch(0.78 0.12 70));
233
+ }
234
+
235
+ .c-muted {
236
+ color: var(--graph-muted, oklch(0.62 0 0));
237
+ }
238
+
239
+ .c-frame {
240
+ color: var(--graph-frame, oklch(0.6 0 0 / 0.5));
241
+ }
242
+
243
+ .c-fg {
244
+ color: var(--graph-foreground, oklch(0.93 0 0));
245
+ }
246
+
247
+ .sr-only {
248
+ position: absolute;
249
+ width: 1px;
250
+ height: 1px;
251
+ padding: 0;
252
+ margin: -1px;
253
+ overflow: hidden;
254
+ clip-path: inset(50%);
255
+ white-space: nowrap;
256
+ border-width: 0;
257
+ }
258
+ </style>
@@ -0,0 +1,22 @@
1
+ import type { Glyphs } from '../frame/glyphs';
2
+ import type { GraphPalette } from '../frame/tone';
3
+ /** Running total drawn as floating bars over a shared scale. */
4
+ export type WaterfallKind = 'start' | 'in' | 'out' | 'end';
5
+ export interface WaterfallItem {
6
+ label: string;
7
+ value: number;
8
+ display?: string;
9
+ kind?: WaterfallKind;
10
+ }
11
+ export interface GraphWaterfallProps {
12
+ title: string;
13
+ items: WaterfallItem[];
14
+ ticks?: number;
15
+ glyphs?: Glyphs;
16
+ palette?: GraphPalette;
17
+ corner?: string;
18
+ class?: string;
19
+ }
20
+ declare const GraphWaterfall: import("svelte").Component<GraphWaterfallProps, {}, "">;
21
+ type GraphWaterfall = ReturnType<typeof GraphWaterfall>;
22
+ export default GraphWaterfall;
@@ -0,0 +1,147 @@
1
+ export { default as Graph } from './frame/Graph.svelte';
2
+ export { default as GraphBody } from './frame/GraphBody.svelte';
3
+ export { default as GraphRule } from './frame/GraphRule.svelte';
4
+ export { default as GraphTrack } from './frame/GraphTrack.svelte';
5
+ export { default as GraphTick } from './frame/GraphTick.svelte';
6
+ export { default as GraphArrow } from './frame/GraphArrow.svelte';
7
+ export * from './frame/glyphs';
8
+ export * from './frame/tone';
9
+ export * from './frame/motion';
10
+ export * from './frame/clock';
11
+ export { default as GraphActivity } from './graphs/GraphActivity.svelte';
12
+ export type { ActivityDay, GraphActivityProps } from './graphs/GraphActivity.svelte';
13
+ export { default as GraphBars } from './graphs/GraphBars.svelte';
14
+ export type { BarSeries, GraphBarsProps } from './graphs/GraphBars.svelte';
15
+ export { default as GraphBullet } from './graphs/GraphBullet.svelte';
16
+ export type { BulletItem, GraphBulletProps } from './graphs/GraphBullet.svelte';
17
+ export { default as GraphCalendar } from './graphs/GraphCalendar.svelte';
18
+ export type { CalendarMark, GraphCalendarProps } from './graphs/GraphCalendar.svelte';
19
+ export { default as GraphCells } from './graphs/GraphCells.svelte';
20
+ export type { CellGrid, GraphCellsProps } from './graphs/GraphCells.svelte';
21
+ export { default as GraphCompare } from './graphs/GraphCompare.svelte';
22
+ export type { CompareCell, CompareRow, GraphCompareProps } from './graphs/GraphCompare.svelte';
23
+ export { default as GraphCountdown } from './graphs/GraphCountdown.svelte';
24
+ export type { GraphCountdownProps } from './graphs/GraphCountdown.svelte';
25
+ export { default as GraphDiff } from './graphs/GraphDiff.svelte';
26
+ export type { DiffSign, DiffRow, GraphDiffProps } from './graphs/GraphDiff.svelte';
27
+ export { default as GraphFlow } from './graphs/GraphFlow.svelte';
28
+ export type { FlowTone, FlowNode, FlowRow, GraphFlowProps } from './graphs/GraphFlow.svelte';
29
+ export { default as GraphFunnel } from './graphs/GraphFunnel.svelte';
30
+ export type { FunnelStep, GraphFunnelProps } from './graphs/GraphFunnel.svelte';
31
+ export { default as GraphGantt } from './graphs/GraphGantt.svelte';
32
+ export type { GanttItem, GraphGanttProps } from './graphs/GraphGantt.svelte';
33
+ export { default as GraphHeatmap } from './graphs/GraphHeatmap.svelte';
34
+ export type { HeatRow, GraphHeatmapProps } from './graphs/GraphHeatmap.svelte';
35
+ export { default as GraphInvoice } from './graphs/GraphInvoice.svelte';
36
+ export type { InvoiceParty, InvoiceMeta, InvoiceItem, InvoiceTotal, GraphInvoiceProps } from './graphs/GraphInvoice.svelte';
37
+ export { default as GraphKpi } from './graphs/GraphKpi.svelte';
38
+ export type { GraphKpiProps } from './graphs/GraphKpi.svelte';
39
+ export { default as GraphLatency } from './graphs/GraphLatency.svelte';
40
+ export type { LatencyPoint, GraphLatencyProps } from './graphs/GraphLatency.svelte';
41
+ export { default as GraphMeter } from './graphs/GraphMeter.svelte';
42
+ export type { GraphMeterProps } from './graphs/GraphMeter.svelte';
43
+ export { default as GraphPlot } from './graphs/GraphPlot.svelte';
44
+ export type { GraphPlotProps } from './graphs/GraphPlot.svelte';
45
+ export { default as GraphQuota } from './graphs/GraphQuota.svelte';
46
+ export type { GraphQuotaProps } from './graphs/GraphQuota.svelte';
47
+ export { default as GraphRank } from './graphs/GraphRank.svelte';
48
+ export type { RankItem, GraphRankProps } from './graphs/GraphRank.svelte';
49
+ export { default as GraphSlope } from './graphs/GraphSlope.svelte';
50
+ export type { SlopeItem, GraphSlopeProps } from './graphs/GraphSlope.svelte';
51
+ export { default as GraphSlo } from './graphs/GraphSlo.svelte';
52
+ export type { GraphSloProps } from './graphs/GraphSlo.svelte';
53
+ export { default as GraphSpark } from './graphs/GraphSpark.svelte';
54
+ export type { GraphSparkProps } from './graphs/GraphSpark.svelte';
55
+ export { default as GraphSpec } from './graphs/GraphSpec.svelte';
56
+ export type { SpecRow, GraphSpecProps } from './graphs/GraphSpec.svelte';
57
+ export { default as GraphStack } from './graphs/GraphStack.svelte';
58
+ export type { StackSegment, StackRow, GraphStackProps } from './graphs/GraphStack.svelte';
59
+ export { default as GraphStat } from './graphs/GraphStat.svelte';
60
+ export type { StatItem, GraphStatProps } from './graphs/GraphStat.svelte';
61
+ export { default as GraphTable } from './graphs/GraphTable.svelte';
62
+ export type { Cell, GraphTableProps } from './graphs/GraphTable.svelte';
63
+ export { default as GraphTimeline } from './graphs/GraphTimeline.svelte';
64
+ export type { GraphTimelineProps } from './graphs/GraphTimeline.svelte';
65
+ export { default as GraphTimer } from './graphs/GraphTimer.svelte';
66
+ export type { TimerKind, GraphTimerProps } from './graphs/GraphTimer.svelte';
67
+ export { default as GraphTree } from './graphs/GraphTree.svelte';
68
+ export type { TreeNode, GraphTreeProps } from './graphs/GraphTree.svelte';
69
+ export { default as GraphUptime } from './graphs/GraphUptime.svelte';
70
+ export type { UptimeStatus, GraphUptimeProps } from './graphs/GraphUptime.svelte';
71
+ export { default as GraphWaffle } from './graphs/GraphWaffle.svelte';
72
+ export type { GraphWaffleProps } from './graphs/GraphWaffle.svelte';
73
+ export { default as GraphWaterfall } from './graphs/GraphWaterfall.svelte';
74
+ export type { WaterfallKind, WaterfallItem, GraphWaterfallProps } from './graphs/GraphWaterfall.svelte';
75
+ export { default as AmplifierDiagram } from './diagram/AmplifierDiagram.svelte';
76
+ export type { AmplifierDiagramProps } from './diagram/AmplifierDiagram.svelte';
77
+ export { default as AsciiDiagram } from './diagram/AsciiDiagram.svelte';
78
+ export type { AsciiDiagramProps } from './diagram/AsciiDiagram.svelte';
79
+ export { default as DiagramEditor } from './diagram/DiagramEditor.svelte';
80
+ export { default as MetricsTableDiagram } from './diagram/MetricsTableDiagram.svelte';
81
+ export type { MetricRow, MetricsTableDiagramProps } from './diagram/MetricsTableDiagram.svelte';
82
+ export { default as NestedRadiiDiagram } from './diagram/NestedRadiiDiagram.svelte';
83
+ export type { NestedRadiiDiagramProps } from './diagram/NestedRadiiDiagram.svelte';
84
+ export { default as PromptLoopDiagram } from './diagram/PromptLoopDiagram.svelte';
85
+ export type { PromptLoopDiagramProps } from './diagram/PromptLoopDiagram.svelte';
86
+ export { alignBoxLines, escapeHtml, formatDiagramHtml } from './diagram/parser';
87
+ export type { DiagramToken, HighlightRule } from './diagram/parser';
88
+ export { dashEdge, overlayRow, padEnd, padRow, padStart, splitLabeledEdge } from './diagram/ascii';
89
+ export type { ArtCell, ArtSeg } from './diagram/ascii';
90
+ export { default as GraphAgni } from './animated/GraphAgni.svelte';
91
+ export type { GraphAgniProps } from './animated/GraphAgni.svelte';
92
+ export { default as GraphAum } from './animated/GraphAum.svelte';
93
+ export type { GraphAumProps } from './animated/GraphAum.svelte';
94
+ export { default as GraphBoot } from './animated/GraphBoot.svelte';
95
+ export type { GraphBootStep, GraphBootProps } from './animated/GraphBoot.svelte';
96
+ export { default as GraphCron } from './animated/GraphCron.svelte';
97
+ export type { GraphCronProps } from './animated/GraphCron.svelte';
98
+ export { default as GraphDamru } from './animated/GraphDamru.svelte';
99
+ export type { GraphDamruProps } from './animated/GraphDamru.svelte';
100
+ export { default as GraphDeps } from './animated/GraphDeps.svelte';
101
+ export type { DepNode, GraphDepsProps } from './animated/GraphDeps.svelte';
102
+ export { default as GraphDiya } from './animated/GraphDiya.svelte';
103
+ export type { GraphDiyaProps } from './animated/GraphDiya.svelte';
104
+ export { default as GraphFire } from './animated/GraphFire.svelte';
105
+ export type { GraphFireProps } from './animated/GraphFire.svelte';
106
+ export { default as GraphFlame } from './animated/GraphFlame.svelte';
107
+ export type { GraphFlameProps } from './animated/GraphFlame.svelte';
108
+ export { default as GraphFlowPlayer } from './animated/GraphFlowPlayer.svelte';
109
+ export type { FlowStep, GraphFlowPlayerProps } from './animated/GraphFlowPlayer.svelte';
110
+ export { default as GraphGanga } from './animated/GraphGanga.svelte';
111
+ export type { GraphGangaProps } from './animated/GraphGanga.svelte';
112
+ export { default as GraphHash } from './animated/GraphHash.svelte';
113
+ export type { GraphHashProps } from './animated/GraphHash.svelte';
114
+ export { default as GraphJapa } from './animated/GraphJapa.svelte';
115
+ export type { GraphJapaProps } from './animated/GraphJapa.svelte';
116
+ export { default as GraphLife } from './animated/GraphLife.svelte';
117
+ export type { GraphLifeProps } from './animated/GraphLife.svelte';
118
+ export { default as GraphMandel } from './animated/GraphMandel.svelte';
119
+ export type { GraphMandelProps } from './animated/GraphMandel.svelte';
120
+ export { default as GraphMandala } from './animated/GraphMandala.svelte';
121
+ export type { GraphMandalaProps } from './animated/GraphMandala.svelte';
122
+ export { default as GraphPulse } from './animated/GraphPulse.svelte';
123
+ export type { PulseStatus, GraphPulseProps } from './animated/GraphPulse.svelte';
124
+ export { default as GraphRain } from './animated/GraphRain.svelte';
125
+ export type { GraphRainProps } from './animated/GraphRain.svelte';
126
+ export { default as GraphScatter } from './animated/GraphScatter.svelte';
127
+ export type { ScatterPoint, GraphScatterProps } from './animated/GraphScatter.svelte';
128
+ export { default as GraphScope } from './animated/GraphScope.svelte';
129
+ export type { ScopeMode, GraphScopeProps } from './animated/GraphScope.svelte';
130
+ export { default as GraphSequence } from './animated/GraphSequence.svelte';
131
+ export type { GraphSequenceProps } from './animated/GraphSequence.svelte';
132
+ export { default as GraphSpinners } from './animated/GraphSpinners.svelte';
133
+ export type { SpinnerKind, GraphSpinnersProps } from './animated/GraphSpinners.svelte';
134
+ export { default as GraphState } from './animated/GraphState.svelte';
135
+ export type { GraphStateProps } from './animated/GraphState.svelte';
136
+ export { default as GraphStream } from './animated/GraphStream.svelte';
137
+ export type { StreamKind, GraphStreamProps } from './animated/GraphStream.svelte';
138
+ export { default as GraphSurya } from './animated/GraphSurya.svelte';
139
+ export type { GraphSuryaProps } from './animated/GraphSurya.svelte';
140
+ export { default as GraphTerminal } from './animated/GraphTerminal.svelte';
141
+ export type { TerminalLine, GraphTerminalProps } from './animated/GraphTerminal.svelte';
142
+ export { default as GraphTicker } from './animated/GraphTicker.svelte';
143
+ export type { TickerItem, GraphTickerProps } from './animated/GraphTicker.svelte';
144
+ export { default as GraphTypewriter } from './animated/GraphTypewriter.svelte';
145
+ export type { GraphTypewriterProps } from './animated/GraphTypewriter.svelte';
146
+ export { default as GraphWorkflow } from './animated/GraphWorkflow.svelte';
147
+ export type { WorkflowTone, WorkflowNode, WorkflowEdge, GraphWorkflowProps } from './animated/GraphWorkflow.svelte';
package/dist/index.js ADDED
@@ -0,0 +1,87 @@
1
+ // Markgraphy — ASCII-framed Svelte graphs for markdown.
2
+ // Glyphs draw the chart: a dashed frame, `+` corners, `[ TITLE ]` on the top
3
+ // edge, one accent color. No SVG, no canvas, no dependencies.
4
+ // Frame primitives
5
+ export { default as Graph } from './frame/Graph.svelte';
6
+ export { default as GraphBody } from './frame/GraphBody.svelte';
7
+ export { default as GraphRule } from './frame/GraphRule.svelte';
8
+ export { default as GraphTrack } from './frame/GraphTrack.svelte';
9
+ export { default as GraphTick } from './frame/GraphTick.svelte';
10
+ export { default as GraphArrow } from './frame/GraphArrow.svelte';
11
+ // Glyphs, tones, motion, clock
12
+ export * from './frame/glyphs';
13
+ export * from './frame/tone';
14
+ export * from './frame/motion';
15
+ export * from './frame/clock';
16
+ // Graphs
17
+ export { default as GraphActivity } from './graphs/GraphActivity.svelte';
18
+ export { default as GraphBars } from './graphs/GraphBars.svelte';
19
+ export { default as GraphBullet } from './graphs/GraphBullet.svelte';
20
+ export { default as GraphCalendar } from './graphs/GraphCalendar.svelte';
21
+ export { default as GraphCells } from './graphs/GraphCells.svelte';
22
+ export { default as GraphCompare } from './graphs/GraphCompare.svelte';
23
+ export { default as GraphCountdown } from './graphs/GraphCountdown.svelte';
24
+ export { default as GraphDiff } from './graphs/GraphDiff.svelte';
25
+ export { default as GraphFlow } from './graphs/GraphFlow.svelte';
26
+ export { default as GraphFunnel } from './graphs/GraphFunnel.svelte';
27
+ export { default as GraphGantt } from './graphs/GraphGantt.svelte';
28
+ export { default as GraphHeatmap } from './graphs/GraphHeatmap.svelte';
29
+ export { default as GraphInvoice } from './graphs/GraphInvoice.svelte';
30
+ export { default as GraphKpi } from './graphs/GraphKpi.svelte';
31
+ export { default as GraphLatency } from './graphs/GraphLatency.svelte';
32
+ export { default as GraphMeter } from './graphs/GraphMeter.svelte';
33
+ export { default as GraphPlot } from './graphs/GraphPlot.svelte';
34
+ export { default as GraphQuota } from './graphs/GraphQuota.svelte';
35
+ export { default as GraphRank } from './graphs/GraphRank.svelte';
36
+ export { default as GraphSlope } from './graphs/GraphSlope.svelte';
37
+ export { default as GraphSlo } from './graphs/GraphSlo.svelte';
38
+ export { default as GraphSpark } from './graphs/GraphSpark.svelte';
39
+ export { default as GraphSpec } from './graphs/GraphSpec.svelte';
40
+ export { default as GraphStack } from './graphs/GraphStack.svelte';
41
+ export { default as GraphStat } from './graphs/GraphStat.svelte';
42
+ export { default as GraphTable } from './graphs/GraphTable.svelte';
43
+ export { default as GraphTimeline } from './graphs/GraphTimeline.svelte';
44
+ export { default as GraphTimer } from './graphs/GraphTimer.svelte';
45
+ export { default as GraphTree } from './graphs/GraphTree.svelte';
46
+ export { default as GraphUptime } from './graphs/GraphUptime.svelte';
47
+ export { default as GraphWaffle } from './graphs/GraphWaffle.svelte';
48
+ export { default as GraphWaterfall } from './graphs/GraphWaterfall.svelte';
49
+ // Diagrams — raw ASCII/Unicode figures with live tokens, plus players and an editor
50
+ export { default as AmplifierDiagram } from './diagram/AmplifierDiagram.svelte';
51
+ export { default as AsciiDiagram } from './diagram/AsciiDiagram.svelte';
52
+ export { default as DiagramEditor } from './diagram/DiagramEditor.svelte';
53
+ export { default as MetricsTableDiagram } from './diagram/MetricsTableDiagram.svelte';
54
+ export { default as NestedRadiiDiagram } from './diagram/NestedRadiiDiagram.svelte';
55
+ export { default as PromptLoopDiagram } from './diagram/PromptLoopDiagram.svelte';
56
+ export { alignBoxLines, escapeHtml, formatDiagramHtml } from './diagram/parser';
57
+ export { dashEdge, overlayRow, padEnd, padRow, padStart, splitLabeledEdge } from './diagram/ascii';
58
+ // Animated — live glyph components: typewriters, scopes, sims, and strips
59
+ export { default as GraphAgni } from './animated/GraphAgni.svelte';
60
+ export { default as GraphAum } from './animated/GraphAum.svelte';
61
+ export { default as GraphBoot } from './animated/GraphBoot.svelte';
62
+ export { default as GraphCron } from './animated/GraphCron.svelte';
63
+ export { default as GraphDamru } from './animated/GraphDamru.svelte';
64
+ export { default as GraphDeps } from './animated/GraphDeps.svelte';
65
+ export { default as GraphDiya } from './animated/GraphDiya.svelte';
66
+ export { default as GraphFire } from './animated/GraphFire.svelte';
67
+ export { default as GraphFlame } from './animated/GraphFlame.svelte';
68
+ export { default as GraphFlowPlayer } from './animated/GraphFlowPlayer.svelte';
69
+ export { default as GraphGanga } from './animated/GraphGanga.svelte';
70
+ export { default as GraphHash } from './animated/GraphHash.svelte';
71
+ export { default as GraphJapa } from './animated/GraphJapa.svelte';
72
+ export { default as GraphLife } from './animated/GraphLife.svelte';
73
+ export { default as GraphMandel } from './animated/GraphMandel.svelte';
74
+ export { default as GraphMandala } from './animated/GraphMandala.svelte';
75
+ export { default as GraphPulse } from './animated/GraphPulse.svelte';
76
+ export { default as GraphRain } from './animated/GraphRain.svelte';
77
+ export { default as GraphScatter } from './animated/GraphScatter.svelte';
78
+ export { default as GraphScope } from './animated/GraphScope.svelte';
79
+ export { default as GraphSequence } from './animated/GraphSequence.svelte';
80
+ export { default as GraphSpinners } from './animated/GraphSpinners.svelte';
81
+ export { default as GraphState } from './animated/GraphState.svelte';
82
+ export { default as GraphStream } from './animated/GraphStream.svelte';
83
+ export { default as GraphSurya } from './animated/GraphSurya.svelte';
84
+ export { default as GraphTerminal } from './animated/GraphTerminal.svelte';
85
+ export { default as GraphTicker } from './animated/GraphTicker.svelte';
86
+ export { default as GraphTypewriter } from './animated/GraphTypewriter.svelte';
87
+ export { default as GraphWorkflow } from './animated/GraphWorkflow.svelte';