vizmatic 0.1.7 → 0.1.8
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/PROMPT.md +10 -10
- package/README.md +10 -10
- package/docs/PROMPT.md +10 -10
- package/docs/assets/examples/presentation-frame_dark.png +0 -0
- package/docs/assets/examples/presentation-frame_light.png +0 -0
- package/docs/assets/examples/sources.json +39 -39
- package/examples/agent-pipeline.tsx +17 -26
- package/examples/animated-pipeline.tsx +3 -7
- package/examples/attention-head.tsx +17 -26
- package/examples/embedding-map.tsx +24 -33
- package/examples/eval-dashboard.tsx +33 -43
- package/examples/model-router.tsx +25 -34
- package/examples/presentation-frame.tsx +23 -31
- package/examples/rag-graph.tsx +26 -35
- package/examples/release-card.tsx +29 -38
- package/examples/research-landscape.tsx +24 -33
- package/examples/spec-anatomy.tsx +33 -43
- package/examples/theme-system.tsx +20 -28
- package/examples/token-matrix.tsx +34 -44
- package/examples/vizmatic-bare.d.ts +30 -0
- package/package.json +1 -1
|
@@ -1,44 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
width = 1040;
|
|
2
|
+
height = 680;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
]}
|
|
36
|
-
/>
|
|
37
|
-
<TextLabel c={c} text="Use raw SVG only where custom geometry is the point." align="center" width={440} />
|
|
38
|
-
</Panel>
|
|
39
|
-
</Row>
|
|
40
|
-
</Scene>
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
export const create = frame.create
|
|
44
|
-
export default frame.default
|
|
4
|
+
<Scene title="Scene spec anatomy" subtitle="strong defaults with escape hatches" gap={18}>
|
|
5
|
+
<Row gap={18} align="stretch">
|
|
6
|
+
<Panel title="Spec fields" tone="purple" width={420} align="center">
|
|
7
|
+
<DataTable
|
|
8
|
+
firstColWidth={110}
|
|
9
|
+
cellWidth={210}
|
|
10
|
+
cellHeight={34}
|
|
11
|
+
rows={[
|
|
12
|
+
['field', 'meaning'],
|
|
13
|
+
['canvas', 'width, height, theme'],
|
|
14
|
+
['layout', 'row, column, flow, grid'],
|
|
15
|
+
['content', 'labels, metrics, chart data'],
|
|
16
|
+
['tone', 'semantic color token'],
|
|
17
|
+
['verify', 'overflow and bounds'],
|
|
18
|
+
]}
|
|
19
|
+
/>
|
|
20
|
+
</Panel>
|
|
21
|
+
<Panel title="Render path" tone="cyan" width={520}>
|
|
22
|
+
<Flow
|
|
23
|
+
direction="vertical"
|
|
24
|
+
stages={[
|
|
25
|
+
{ title: 'Validate', subtitle: 'typed module or schema', tone: 'blue', width: 430 },
|
|
26
|
+
{ title: 'Compose', subtitle: 'React primitive tree', tone: 'purple', width: 430 },
|
|
27
|
+
{ title: 'Render', subtitle: 'Satori + resvg', tone: 'cyan', width: 430 },
|
|
28
|
+
{ title: 'Verify', subtitle: 'crop, contrast, overflow', tone: 'green', width: 430 },
|
|
29
|
+
]}
|
|
30
|
+
/>
|
|
31
|
+
<TextLabel text="Use raw SVG only where custom geometry is the point." align="center" width={440} />
|
|
32
|
+
</Panel>
|
|
33
|
+
</Row>
|
|
34
|
+
</Scene>
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
width = 1040;
|
|
2
|
+
height = 560;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
export const height = 560
|
|
4
|
+
const tones = ['blue', 'purple', 'green', 'warm', 'cyan', 'pink', 'critical', 'ocean'] as const;
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<CalloutCard c={c} tone="ocean" title="Adapters own the brand" detail="Bring your own palette and typography." width={430} />
|
|
25
|
-
</Row>
|
|
26
|
-
</Scene>
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
export const create = frame.create
|
|
30
|
-
export default frame.default
|
|
6
|
+
<Scene title="Theme-aware primitives" subtitle="semantic tones, not hard-coded colors" gap={18}>
|
|
7
|
+
<Row gap={14} wrap width="100%">
|
|
8
|
+
{tones.map((tone) => (
|
|
9
|
+
<Panel key={tone} title={tone} tone={tone} width={225} minHeight={106}>
|
|
10
|
+
<Column gap={9} align="stretch">
|
|
11
|
+
<ToneStrip tone={tone} width={62} />
|
|
12
|
+
<TextLabel text="inherits border, fill, label, and chart color" fontSize={11} />
|
|
13
|
+
</Column>
|
|
14
|
+
</Panel>
|
|
15
|
+
))}
|
|
16
|
+
</Row>
|
|
17
|
+
<Row gap={14}>
|
|
18
|
+
<StepCard tone="purple" title="Spec first" subtitle="models write intent" width={210} />
|
|
19
|
+
<MetricCard tone="green" label="Themes" value="2 modes" detail="dark + light" width={180} />
|
|
20
|
+
<CalloutCard tone="ocean" title="Adapters own the brand" detail="Bring your own palette and typography." width={430} />
|
|
21
|
+
</Row>
|
|
22
|
+
</Scene>
|
|
@@ -1,49 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
width = 1040;
|
|
2
|
+
height = 560;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
export const height = 560
|
|
4
|
+
const heat = ['#172033', '#123044', '#0f4a58', '#126a5b', '#6c7f2c', '#b46b24', '#d54545'];
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
<Scene title="Token matrix view" subtitle="tables and grids use wrapping-safe cells" gap={18}>
|
|
7
|
+
<Row gap={18} align="stretch">
|
|
8
|
+
<Panel title="Attention weights" tone="purple" width={480} align="center">
|
|
9
|
+
<Grid
|
|
10
|
+
cellWidth={48}
|
|
11
|
+
cellHeight={34}
|
|
12
|
+
headerRows={1}
|
|
13
|
+
headerCols={1}
|
|
14
|
+
rows={[
|
|
15
|
+
['', 'the', 'cat', 'sat', 'down'],
|
|
16
|
+
['the', { label: '.91', backgroundColor: heat[6] }, { label: '.04', backgroundColor: heat[1] }, { label: '.03', backgroundColor: heat[1] }, { label: '.02', backgroundColor: heat[0] }],
|
|
17
|
+
['cat', { label: '.10', backgroundColor: heat[2] }, { label: '.70', backgroundColor: heat[5] }, { label: '.14', backgroundColor: heat[3] }, { label: '.06', backgroundColor: heat[1] }],
|
|
18
|
+
['sat', { label: '.05', backgroundColor: heat[1] }, { label: '.22', backgroundColor: heat[4] }, { label: '.61', backgroundColor: heat[5] }, { label: '.12', backgroundColor: heat[2] }],
|
|
19
|
+
['down', { label: '.03', backgroundColor: heat[0] }, { label: '.09', backgroundColor: heat[2] }, { label: '.18', backgroundColor: heat[3] }, { label: '.70', backgroundColor: heat[5] }],
|
|
20
|
+
]}
|
|
21
|
+
/>
|
|
22
|
+
</Panel>
|
|
23
|
+
<Panel title="Feature table" tone="cyan" width={420} align="center">
|
|
24
|
+
<Column gap={12}>
|
|
25
|
+
<DataTable
|
|
26
|
+
firstColWidth={98}
|
|
27
|
+
cellWidth={76}
|
|
19
28
|
rows={[
|
|
20
|
-
['', '
|
|
21
|
-
['
|
|
22
|
-
['
|
|
23
|
-
['
|
|
24
|
-
['down', { label: '.03', backgroundColor: heat[0] }, { label: '.09', backgroundColor: heat[2] }, { label: '.18', backgroundColor: heat[3] }, { label: '.70', backgroundColor: heat[5] }],
|
|
29
|
+
['metric', 'base', 'tuned', 'delta'],
|
|
30
|
+
['BLEU', '31.2', '34.8', '+3.6'],
|
|
31
|
+
['faith', '.72', '.81', '+.09'],
|
|
32
|
+
['latency', '1.3s', '1.1s', '-.2s'],
|
|
25
33
|
]}
|
|
26
34
|
/>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
firstColWidth={98}
|
|
33
|
-
cellWidth={76}
|
|
34
|
-
rows={[
|
|
35
|
-
['metric', 'base', 'tuned', 'delta'],
|
|
36
|
-
['BLEU', '31.2', '34.8', '+3.6'],
|
|
37
|
-
['faith', '.72', '.81', '+.09'],
|
|
38
|
-
['latency', '1.3s', '1.1s', '-.2s'],
|
|
39
|
-
]}
|
|
40
|
-
/>
|
|
41
|
-
<TextLabel c={c} text="Same component renders dark and light themes without rewriting cells." align="center" width={330} />
|
|
42
|
-
</Column>
|
|
43
|
-
</Panel>
|
|
44
|
-
</Row>
|
|
45
|
-
</Scene>
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
export const create = frame.create
|
|
49
|
-
export default frame.default
|
|
35
|
+
<TextLabel text="Same component renders dark and light themes without rewriting cells." align="center" width={330} />
|
|
36
|
+
</Column>
|
|
37
|
+
</Panel>
|
|
38
|
+
</Row>
|
|
39
|
+
</Scene>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export {}
|
|
2
|
+
|
|
3
|
+
type AutoTheme<T> = T extends (props: infer Props) => infer Result
|
|
4
|
+
? (props: Omit<Props, 'c'> & { c?: Props extends { c: infer Theme } ? Theme : never }) => Result
|
|
5
|
+
: T
|
|
6
|
+
|
|
7
|
+
declare global {
|
|
8
|
+
var width: number
|
|
9
|
+
var height: number
|
|
10
|
+
|
|
11
|
+
const BarChart: AutoTheme<typeof import('../src').BarChart>
|
|
12
|
+
const CalloutCard: AutoTheme<typeof import('../src').CalloutCard>
|
|
13
|
+
const Column: AutoTheme<typeof import('../src').Column>
|
|
14
|
+
const DataTable: AutoTheme<typeof import('../src').DataTable>
|
|
15
|
+
const Flow: AutoTheme<typeof import('../src').Flow>
|
|
16
|
+
const GraphDiagram: AutoTheme<typeof import('../src').GraphDiagram>
|
|
17
|
+
const Grid: AutoTheme<typeof import('../src').Grid>
|
|
18
|
+
const LayeredNetwork: AutoTheme<typeof import('../src').LayeredNetwork>
|
|
19
|
+
const LineChart: AutoTheme<typeof import('../src').LineChart>
|
|
20
|
+
const MetricCard: AutoTheme<typeof import('../src').MetricCard>
|
|
21
|
+
const MiniBarChart: AutoTheme<typeof import('../src').MiniBarChart>
|
|
22
|
+
const Panel: AutoTheme<typeof import('../src').Panel>
|
|
23
|
+
const QuadrantChart: AutoTheme<typeof import('../src').QuadrantChart>
|
|
24
|
+
const Row: AutoTheme<typeof import('../src').Row>
|
|
25
|
+
const ScatterPlot: AutoTheme<typeof import('../src').ScatterPlot>
|
|
26
|
+
const Scene: AutoTheme<typeof import('../src').Scene>
|
|
27
|
+
const StepCard: AutoTheme<typeof import('../src').StepCard>
|
|
28
|
+
const TextLabel: AutoTheme<typeof import('../src').TextLabel>
|
|
29
|
+
const ToneStrip: AutoTheme<typeof import('../src').ToneStrip>
|
|
30
|
+
}
|