@squadbase/vantage-template 0.1.0-dev.c40b771 → 0.1.0-dev2.12326b6
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/README.md +1 -1
- package/base-template/.squadbase/skills/vantage-design/SKILL.md +137 -0
- package/base-template/.squadbase/skills/vantage-design/references/extract.md +110 -0
- package/base-template/.squadbase/skills/vantage-design/references/format.md +172 -0
- package/base-template/.squadbase/skills/vantage-design/references/presets.md +110 -0
- package/base-template/.squadbase/skills/vantage-design/scripts/contrast.mjs +166 -0
- package/base-template/AGENTS.md +44 -229
- package/base-template/DESIGN.md +108 -0
- package/base-template/agents/api.md +49 -0
- package/base-template/agents/csv.md +32 -0
- package/base-template/agents/doc.md +73 -0
- package/base-template/agents/page.md +187 -0
- package/base-template/agents/slide.md +41 -0
- package/base-template/agents/xlsx.md +33 -0
- package/base-template/automations/.gitkeep +0 -0
- package/base-template/package-lock.json +84 -10
- package/base-template/package.json +2 -2
- package/base-template/pipelines/pyproject.toml +5 -0
- package/base-template/src/index.tsx +53 -8
- package/package.json +1 -1
- package/ui-templates/chart-grid/pages/index.tsx +1 -1
- package/ui-templates/chart-grid-ja/pages/index.tsx +1 -1
- package/ui-templates/funnel/pages/index.tsx +2 -2
- package/ui-templates/funnel-ja/pages/index.tsx +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { definePage } from "@squadbase/vantage"
|
|
2
2
|
import {
|
|
3
3
|
DashboardCardPreset,
|
|
4
|
+
EChart,
|
|
4
5
|
PageShell,
|
|
5
6
|
PageShellContent,
|
|
6
7
|
PageShellDescription,
|
|
@@ -8,6 +9,8 @@ import {
|
|
|
8
9
|
PageShellHeading,
|
|
9
10
|
PageShellTitle,
|
|
10
11
|
Placeholder,
|
|
12
|
+
Sparkline,
|
|
13
|
+
type EChartsOption,
|
|
11
14
|
} from "@squadbase/vantage/components"
|
|
12
15
|
|
|
13
16
|
export const page = definePage({
|
|
@@ -17,13 +20,49 @@ export const page = definePage({
|
|
|
17
20
|
})
|
|
18
21
|
|
|
19
22
|
const METRICS = [
|
|
20
|
-
{ label: "Metric 1", value: "1,234" },
|
|
21
|
-
{ label: "Metric 2", value: "5,678" },
|
|
22
|
-
{ label: "Metric 3", value: "90.1%" },
|
|
23
|
-
{ label: "Metric 4", value: "$12.3k" },
|
|
23
|
+
{ label: "Metric 1", value: "1,234", trend: [3, 4, 3, 5, 6, 5, 7] },
|
|
24
|
+
{ label: "Metric 2", value: "5,678", trend: [6, 5, 6, 4, 5, 6, 6] },
|
|
25
|
+
{ label: "Metric 3", value: "90.1%", trend: [2, 3, 5, 4, 6, 7, 8] },
|
|
26
|
+
{ label: "Metric 4", value: "$12.3k", trend: [5, 6, 4, 6, 5, 7, 6] },
|
|
24
27
|
]
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
// Sample charts. `EChart` paints series with `--chart-1..5` and the sparklines
|
|
30
|
+
// use `--primary` (both from `styles.css`), so a theme change shows up here.
|
|
31
|
+
const BAR_OPTION: EChartsOption = {
|
|
32
|
+
legend: { top: 0 },
|
|
33
|
+
grid: { top: 36, right: 8, bottom: 24, left: 36 },
|
|
34
|
+
xAxis: { type: "category", data: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] },
|
|
35
|
+
yAxis: { type: "value" },
|
|
36
|
+
series: [
|
|
37
|
+
{ name: "Series A", type: "bar", data: [12, 18, 15, 22, 26, 24] },
|
|
38
|
+
{ name: "Series B", type: "bar", data: [8, 11, 13, 12, 16, 19] },
|
|
39
|
+
{ name: "Series C", type: "bar", data: [5, 7, 6, 9, 8, 11] },
|
|
40
|
+
],
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const PIE_OPTION: EChartsOption = {
|
|
44
|
+
legend: { bottom: 0 },
|
|
45
|
+
series: [
|
|
46
|
+
{
|
|
47
|
+
type: "pie",
|
|
48
|
+
radius: ["45%", "70%"],
|
|
49
|
+
center: ["50%", "45%"],
|
|
50
|
+
label: { show: false },
|
|
51
|
+
data: [
|
|
52
|
+
{ name: "Category A", value: 35 },
|
|
53
|
+
{ name: "Category B", value: 25 },
|
|
54
|
+
{ name: "Category C", value: 18 },
|
|
55
|
+
{ name: "Category D", value: 12 },
|
|
56
|
+
{ name: "Category E", value: 10 },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const CHARTS = [
|
|
63
|
+
{ title: "Chart 1", option: BAR_OPTION },
|
|
64
|
+
{ title: "Chart 2", option: PIE_OPTION },
|
|
65
|
+
]
|
|
27
66
|
|
|
28
67
|
export default function HomePage() {
|
|
29
68
|
return (
|
|
@@ -42,14 +81,20 @@ export default function HomePage() {
|
|
|
42
81
|
{METRICS.map((metric) => (
|
|
43
82
|
<DashboardCardPreset key={metric.label} title={metric.label}>
|
|
44
83
|
<Placeholder className="text-2xl font-bold">{metric.value}</Placeholder>
|
|
84
|
+
<Sparkline
|
|
85
|
+
className="mt-2"
|
|
86
|
+
data={metric.trend.map((value) => ({ value }))}
|
|
87
|
+
color="text-primary"
|
|
88
|
+
area
|
|
89
|
+
/>
|
|
45
90
|
</DashboardCardPreset>
|
|
46
91
|
))}
|
|
47
92
|
</section>
|
|
48
93
|
|
|
49
94
|
<section className="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
|
50
|
-
{CHARTS.map((
|
|
51
|
-
<DashboardCardPreset key={title} title={title}>
|
|
52
|
-
<
|
|
95
|
+
{CHARTS.map((chart) => (
|
|
96
|
+
<DashboardCardPreset key={chart.title} title={chart.title}>
|
|
97
|
+
<EChart option={chart.option} height={256} ariaLabel={chart.title} />
|
|
53
98
|
</DashboardCardPreset>
|
|
54
99
|
))}
|
|
55
100
|
</section>
|
package/package.json
CHANGED
|
@@ -223,7 +223,7 @@ function heatmapOption(
|
|
|
223
223
|
type: "heatmap",
|
|
224
224
|
data: data.map((c) => [xAxis.indexOf(c.x), yAxis.indexOf(c.y), c.value]),
|
|
225
225
|
label: { show: false },
|
|
226
|
-
emphasis: { itemStyle: { shadowBlur: 8
|
|
226
|
+
emphasis: { itemStyle: { shadowBlur: 8 } },
|
|
227
227
|
},
|
|
228
228
|
],
|
|
229
229
|
}
|
|
@@ -223,7 +223,7 @@ function heatmapOption(
|
|
|
223
223
|
type: "heatmap",
|
|
224
224
|
data: data.map((c) => [xAxis.indexOf(c.x), yAxis.indexOf(c.y), c.value]),
|
|
225
225
|
label: { show: false },
|
|
226
|
-
emphasis: { itemStyle: { shadowBlur: 8
|
|
226
|
+
emphasis: { itemStyle: { shadowBlur: 8 } },
|
|
227
227
|
},
|
|
228
228
|
],
|
|
229
229
|
}
|
|
@@ -113,13 +113,13 @@ const summaryCards = [
|
|
|
113
113
|
label: "Best step",
|
|
114
114
|
value: "31.9%",
|
|
115
115
|
sub: "Highest step conversion",
|
|
116
|
-
icon: <TrendingUp className="size-4 text-
|
|
116
|
+
icon: <TrendingUp className="size-4 text-chart-2" />,
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
label: "Biggest drop",
|
|
120
120
|
value: "68.2%",
|
|
121
121
|
sub: "Largest step drop-off",
|
|
122
|
-
icon: <TrendingDown className="size-4 text-
|
|
122
|
+
icon: <TrendingDown className="size-4 text-destructive" />,
|
|
123
123
|
},
|
|
124
124
|
]
|
|
125
125
|
|
|
@@ -112,13 +112,13 @@ const summaryCards = [
|
|
|
112
112
|
label: "最良ステップ",
|
|
113
113
|
value: "31.9%",
|
|
114
114
|
sub: "最も高いステップ転換率",
|
|
115
|
-
icon: <TrendingUp className="size-4 text-
|
|
115
|
+
icon: <TrendingUp className="size-4 text-chart-2" />,
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
label: "最大の離脱",
|
|
119
119
|
value: "68.2%",
|
|
120
120
|
sub: "最大のステップ離脱率",
|
|
121
|
-
icon: <TrendingDown className="size-4 text-
|
|
121
|
+
icon: <TrendingDown className="size-4 text-destructive" />,
|
|
122
122
|
},
|
|
123
123
|
]
|
|
124
124
|
|