@squadbase/vantage-template 0.2.1-dev1.b54c84c → 0.2.1-dev1.dc2528f
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/base-template/AGENTS.md
CHANGED
|
@@ -468,7 +468,7 @@ Squadbase のチャットは、回答の根拠になったグラフ・表・KPI
|
|
|
468
468
|
|
|
469
469
|
```tsx
|
|
470
470
|
<DashboardCardPreset data-sq-ref="revenue-trend" title="売上の推移">
|
|
471
|
-
<
|
|
471
|
+
<LineChart data={trend} index="month" categories={["revenue"]} format="currency" height={320} />
|
|
472
472
|
</DashboardCardPreset>
|
|
473
473
|
|
|
474
474
|
{kpis.map((kpi) => (
|
package/base-template/bun.lock
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"name": "vibe-app",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@squadbase/react": "^0.1.0",
|
|
9
|
-
"@squadbase/vantage": "0.7.1-dev1.
|
|
10
|
-
"@squadbase/vantage-sdk": "0.1.2-dev1.
|
|
9
|
+
"@squadbase/vantage": "0.7.1-dev1.bb6bd72",
|
|
10
|
+
"@squadbase/vantage-sdk": "0.1.2-dev1.edf023b",
|
|
11
11
|
"date-fns": "^4.1.0",
|
|
12
12
|
"lucide-react": "^0.468.0",
|
|
13
13
|
"react": "^19.3.1",
|
|
@@ -196,9 +196,9 @@
|
|
|
196
196
|
|
|
197
197
|
"@squadbase/react": ["@squadbase/react@0.1.0", "", { "dependencies": { "zod": "^4.3.6" }, "peerDependencies": { "@types/react": "17.x || 18.x || 19.x", "react": "17.x || 18.x || 19.x" }, "optionalPeers": ["@types/react"] }, "sha512-k+Dpyj7eH+Yjydw54iEluCjYDae086d12hWgBjNMpw4wLbQGz3CrJ6Yipodg8n1cKUt7zvwddlcTHd79bgKsXg=="],
|
|
198
198
|
|
|
199
|
-
"@squadbase/vantage": ["@squadbase/vantage@0.7.1-dev1.
|
|
199
|
+
"@squadbase/vantage": ["@squadbase/vantage@0.7.1-dev1.bb6bd72", "", { "dependencies": { "@base-ui/react": "^1.6.0", "@hono/node-server": "^2.1.5", "@streamdown/code": "^1.1.1", "@tailwindcss/vite": "^4.3.3", "@tanstack/react-query": "^5.101.2", "@tanstack/react-router": "^1.170.17", "@tanstack/react-table": "^8.21.3", "@vitejs/plugin-react": "^6.1.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "date-fns": "^4.1.0", "echarts": "^6.0.0", "esbuild": "0.28.1", "fflate": "^0.8.3", "hono": "^4.13.13", "html-to-image": "^1.11.13", "lucide-react": "^0.468.0", "papaparse": "^5.7.0", "picocolors": "^1.1.1", "react-day-picker": "^10.0.1", "read-excel-file": "^9.3.10", "shiki": "3.23.0", "streamdown": "^2.5.0", "tailwind-merge": "3.6.0", "tailwindcss": "^4.3.3", "tw-animate-css": "^1.0.0", "vite": "^8.3.4" }, "peerDependencies": { "react": ">=18.2.0", "react-dom": ">=18.2.0", "typescript": ">=5.0.0" }, "optionalPeers": ["typescript"], "bin": { "vantage": "dist/cli.js" } }, "sha512-UAhHyh1uOws16HDfKkH9parSpMkWtLxoOnpBtoWciCtD1+npaNNMGr6PFJv4we4hRDOiNxC3y6prn8/QIqvSeA=="],
|
|
200
200
|
|
|
201
|
-
"@squadbase/vantage-sdk": ["@squadbase/vantage-sdk@0.1.2-dev1.
|
|
201
|
+
"@squadbase/vantage-sdk": ["@squadbase/vantage-sdk@0.1.2-dev1.edf023b", "", {}, "sha512-0fvJqJPchqzDKY8WA9HUUJ9sSRGQqXzYqTq40BP4LG+Z3/neG5+jGV9JwsrouHf7RW5fiueC5j86+ThxxOKc8w=="],
|
|
202
202
|
|
|
203
203
|
"@streamdown/code": ["@streamdown/code@1.1.1", "", { "dependencies": { "shiki": "^3.19.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0" } }, "sha512-i7HTNuDgZWb+VdrNVOam9gQhIc5MSSDXKWXgbUrn/4vSRaSMM+Rtl10MQj4wLWPNpF7p80waJsAqFP8HZfb0Jg=="],
|
|
204
204
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@squadbase/react": "^0.1.0",
|
|
15
|
-
"@squadbase/vantage": "0.7.1-dev1.
|
|
16
|
-
"@squadbase/vantage-sdk": "0.1.2-dev1.
|
|
15
|
+
"@squadbase/vantage": "0.7.1-dev1.bb6bd72",
|
|
16
|
+
"@squadbase/vantage-sdk": "0.1.2-dev1.edf023b",
|
|
17
17
|
"date-fns": "^4.1.0",
|
|
18
18
|
"lucide-react": "^0.468.0",
|
|
19
19
|
"react": "^19.3.1",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { definePage } from "@squadbase/vantage"
|
|
2
2
|
import {
|
|
3
|
+
BarChart,
|
|
3
4
|
DashboardCardPreset,
|
|
4
|
-
|
|
5
|
+
DonutChart,
|
|
6
|
+
KpiCard,
|
|
5
7
|
PageShell,
|
|
6
8
|
PageShellContent,
|
|
7
9
|
PageShellDescription,
|
|
8
10
|
PageShellHeader,
|
|
9
11
|
PageShellHeading,
|
|
10
12
|
PageShellTitle,
|
|
11
|
-
|
|
12
|
-
Sparkline,
|
|
13
|
-
type EChartsOption,
|
|
13
|
+
SampleData,
|
|
14
14
|
} from "@squadbase/vantage/components"
|
|
15
15
|
|
|
16
16
|
export const page = definePage({
|
|
@@ -20,49 +20,32 @@ export const page = definePage({
|
|
|
20
20
|
placeholder: true,
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
+
// Sample KPIs. `KpiCard` derives the change (direction, rate, colour) from `value` and
|
|
24
|
+
// `comparison.previous`, and draws the sparkline from `history` (oldest first).
|
|
23
25
|
const METRICS = [
|
|
24
|
-
{ label: "Metric 1", value:
|
|
25
|
-
{ label: "Metric 2", value:
|
|
26
|
-
{ label: "Metric 3", value:
|
|
27
|
-
{ label: "Metric 4", value:
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
// Sample charts. `EChart` paints series with `--chart-1..5` and the sparklines
|
|
31
|
-
// use `--primary` (both from `styles.css`), so a theme change shows up here.
|
|
32
|
-
const BAR_OPTION: EChartsOption = {
|
|
33
|
-
legend: { top: 0 },
|
|
34
|
-
grid: { top: 36, right: 8, bottom: 24, left: 36 },
|
|
35
|
-
xAxis: { type: "category", data: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] },
|
|
36
|
-
yAxis: { type: "value" },
|
|
37
|
-
series: [
|
|
38
|
-
{ name: "Series A", type: "bar", data: [12, 18, 15, 22, 26, 24] },
|
|
39
|
-
{ name: "Series B", type: "bar", data: [8, 11, 13, 12, 16, 19] },
|
|
40
|
-
{ name: "Series C", type: "bar", data: [5, 7, 6, 9, 8, 11] },
|
|
41
|
-
],
|
|
42
|
-
}
|
|
26
|
+
{ label: "Metric 1", value: 1234, previous: 1120, history: [3, 4, 3, 5, 6, 5, 7], format: "number" },
|
|
27
|
+
{ label: "Metric 2", value: 5678, previous: 5810, history: [6, 5, 6, 4, 5, 6, 6], format: "number" },
|
|
28
|
+
{ label: "Metric 3", value: 0.901, previous: 0.874, history: [2, 3, 5, 4, 6, 7, 8], format: "percent" },
|
|
29
|
+
{ label: "Metric 4", value: 12300, previous: 11200, history: [5, 6, 4, 6, 5, 7, 6], format: "currency" },
|
|
30
|
+
] as const
|
|
43
31
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{ name: "Category B", value: 25 },
|
|
55
|
-
{ name: "Category C", value: 18 },
|
|
56
|
-
{ name: "Category D", value: 12 },
|
|
57
|
-
{ name: "Category E", value: 10 },
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
}
|
|
32
|
+
// Sample charts. The typed charts paint series with `--chart-1..5` (from `styles.css`),
|
|
33
|
+
// so a theme change shows up here.
|
|
34
|
+
const MONTHLY = [
|
|
35
|
+
{ month: "Jan", "Series A": 12, "Series B": 8, "Series C": 5 },
|
|
36
|
+
{ month: "Feb", "Series A": 18, "Series B": 11, "Series C": 7 },
|
|
37
|
+
{ month: "Mar", "Series A": 15, "Series B": 13, "Series C": 6 },
|
|
38
|
+
{ month: "Apr", "Series A": 22, "Series B": 12, "Series C": 9 },
|
|
39
|
+
{ month: "May", "Series A": 26, "Series B": 16, "Series C": 8 },
|
|
40
|
+
{ month: "Jun", "Series A": 24, "Series B": 19, "Series C": 11 },
|
|
41
|
+
]
|
|
62
42
|
|
|
63
|
-
const
|
|
64
|
-
{
|
|
65
|
-
{
|
|
43
|
+
const CATEGORIES = [
|
|
44
|
+
{ category: "Category A", value: 35 },
|
|
45
|
+
{ category: "Category B", value: 25 },
|
|
46
|
+
{ category: "Category C", value: 18 },
|
|
47
|
+
{ category: "Category D", value: 12 },
|
|
48
|
+
{ category: "Category E", value: 10 },
|
|
66
49
|
]
|
|
67
50
|
|
|
68
51
|
export default function HomePage() {
|
|
@@ -82,27 +65,35 @@ export default function HomePage() {
|
|
|
82
65
|
</PageShellHeader>
|
|
83
66
|
|
|
84
67
|
<PageShellContent>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
68
|
+
<SampleData>
|
|
69
|
+
<section className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4">
|
|
70
|
+
{METRICS.map((metric) => (
|
|
71
|
+
<KpiCard
|
|
72
|
+
key={metric.label}
|
|
73
|
+
label={metric.label}
|
|
74
|
+
value={metric.value}
|
|
75
|
+
format={metric.format}
|
|
76
|
+
comparison={{ previous: metric.previous, vs: "prior-period" }}
|
|
77
|
+
history={metric.history}
|
|
94
78
|
/>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</section>
|
|
79
|
+
))}
|
|
80
|
+
</section>
|
|
98
81
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
82
|
+
<section className="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
|
83
|
+
<DashboardCardPreset title="Chart 1">
|
|
84
|
+
<BarChart
|
|
85
|
+
data={MONTHLY}
|
|
86
|
+
index="month"
|
|
87
|
+
categories={["Series A", "Series B", "Series C"]}
|
|
88
|
+
height={256}
|
|
89
|
+
ariaLabel="Chart 1"
|
|
90
|
+
/>
|
|
91
|
+
</DashboardCardPreset>
|
|
92
|
+
<DashboardCardPreset title="Chart 2">
|
|
93
|
+
<DonutChart data={CATEGORIES} index="category" categories={["value"]} height={256} ariaLabel="Chart 2" />
|
|
103
94
|
</DashboardCardPreset>
|
|
104
|
-
|
|
105
|
-
</
|
|
95
|
+
</section>
|
|
96
|
+
</SampleData>
|
|
106
97
|
</PageShellContent>
|
|
107
98
|
</PageShell>
|
|
108
99
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squadbase/vantage-template",
|
|
3
|
-
"version": "0.2.1-dev1.
|
|
3
|
+
"version": "0.2.1-dev1.dc2528f",
|
|
4
4
|
"description": "CLI tool for initializing and customizing Squadbase Vantage projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"squadbase",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@ai-sdk/openai": "2.0.122",
|
|
51
51
|
"ai": "^5.0.52"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "dc2528f21f9fc5f331cec10f073c2397d6b49a75",
|
|
54
54
|
"scripts": {
|
|
55
55
|
"sync-base": "rsync -a --delete --exclude='node_modules' --exclude='dist' --exclude='.vantage' --exclude='*.tsbuildinfo' --exclude='*.log' template/ base-template/ && mv base-template/.gitignore base-template/_gitignore",
|
|
56
56
|
"build": "pnpm run sync-base && tsup",
|