@squadbase/vantage-template 0.2.1-dev1.e5598dc → 0.2.1-dev1.f53990f
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) => (
|
|
@@ -538,3 +538,7 @@ function KpiRow({ items }: { items: Kpi[] }) { /* … */ } // 子の部品は
|
|
|
538
538
|
- 日本語アプリで `"en"` のままだと、スライドの文節改行(`word-break: auto-phrase`)が効かず、見出しが単語の途中で折れる。
|
|
539
539
|
スライドのツールバー文言も `lang` で切り替わる(`"ja"` なら日本語、`en*` なら英語)。
|
|
540
540
|
- 値は消さない。指定が無いと `"en"` 扱いになる。
|
|
541
|
+
|
|
542
|
+
## 前の世代の語
|
|
543
|
+
|
|
544
|
+
`server-logic`(サーバーロジック)はこのプロジェクトに無い前の世代の語で、サーバー側は `server/api` の手書きエンドポイントと保存済み Query で成り立っており、作るときは `callSubagent` に `upsertQuery` を渡して委譲する。
|
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.5281ad9",
|
|
10
|
+
"@squadbase/vantage-sdk": "0.1.2-dev1.3931a3f",
|
|
11
11
|
"date-fns": "^4.1.0",
|
|
12
12
|
"lucide-react": "^0.468.0",
|
|
13
13
|
"react": "^19.3.1",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
"@floating-ui/utils": ["@floating-ui/utils@0.2.12", "", {}, "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww=="],
|
|
98
98
|
|
|
99
|
-
"@hono/node-server": ["@hono/node-server@2.1.
|
|
99
|
+
"@hono/node-server": ["@hono/node-server@2.1.11", "", { "peerDependencies": { "hono": "^4 || ^5.0.0-0" } }, "sha512-KzKz9vl4vvr1vgLHamj+g5uonbrj5NwAdO3yzOS6cd2HjALVeOgTgeZOyAzNxejbkfOOPIcvuf/Tg8l1pEFLog=="],
|
|
100
100
|
|
|
101
101
|
"@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="],
|
|
102
102
|
|
|
@@ -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.5281ad9", "", { "dependencies": { "@base-ui/react": "^1.6.0", "@hono/node-server": "^2.1.8", "@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.18", "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-AtqZSCP/b9UxpQfnvuMGTUag2o653YanD+5dWxpQwkzBR8kmNjiTZUDPOPNgFndTOEn/1IgBokB58mymYzmhsQ=="],
|
|
200
200
|
|
|
201
|
-
"@squadbase/vantage-sdk": ["@squadbase/vantage-sdk@0.1.2-dev1.
|
|
201
|
+
"@squadbase/vantage-sdk": ["@squadbase/vantage-sdk@0.1.2-dev1.3931a3f", "", {}, "sha512-Vbk44pOOU/MeCJE4cUFXEVCLhnHXoKQDem0O8Rp8Tq/EKX80Vt4HlmyqHvA97kg8+fgfI8vpSav1OdqRpdRpeg=="],
|
|
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
|
|
|
@@ -462,7 +462,7 @@
|
|
|
462
462
|
|
|
463
463
|
"devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="],
|
|
464
464
|
|
|
465
|
-
"dompurify": ["dompurify@3.4.
|
|
465
|
+
"dompurify": ["dompurify@3.4.17", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w=="],
|
|
466
466
|
|
|
467
467
|
"echarts": ["echarts@6.1.0", "", { "dependencies": { "tslib": "2.3.0", "zrender": "6.1.0" } }, "sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA=="],
|
|
468
468
|
|
|
@@ -512,7 +512,7 @@
|
|
|
512
512
|
|
|
513
513
|
"hastscript": ["hastscript@9.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0" } }, "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w=="],
|
|
514
514
|
|
|
515
|
-
"hono": ["hono@4.13.
|
|
515
|
+
"hono": ["hono@4.13.19", "", {}, "sha512-KmXvQAXwcAHV+muzbIwoJ23niEB5nMoDVr9WcRkU8mvjUECm/1+7v4Jgp7P7a+H6MLFrh+vXrGonGrGS+RQfkA=="],
|
|
516
516
|
|
|
517
517
|
"html-to-image": ["html-to-image@1.11.13", "", {}, "sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg=="],
|
|
518
518
|
|
|
@@ -756,13 +756,13 @@
|
|
|
756
756
|
|
|
757
757
|
"scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="],
|
|
758
758
|
|
|
759
|
-
"seroval": ["seroval@1.
|
|
759
|
+
"seroval": ["seroval@1.6.11", "", {}, "sha512-hpb6XnMCGN/A+79Uf8V7/iTGkyyyazNn5X0CoCAp7Uy9vT3RT8jZ9GLcnxGoVjg3P8AArbe4ZVHq6C8oT2a0kA=="],
|
|
760
760
|
|
|
761
761
|
"seroval-plugins": ["seroval-plugins@1.5.6", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-HXuLAX2pu/UByPpaeo/TaMfvMIi+1QqIoPJYCcAtU8QkVNwgR6MPlGuCQTErV1JwraaMbYaWVIBX7mppzGLATQ=="],
|
|
762
762
|
|
|
763
763
|
"shiki": ["shiki@3.23.0", "", { "dependencies": { "@shikijs/core": "3.23.0", "@shikijs/engine-javascript": "3.23.0", "@shikijs/engine-oniguruma": "3.23.0", "@shikijs/langs": "3.23.0", "@shikijs/themes": "3.23.0", "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA=="],
|
|
764
764
|
|
|
765
|
-
"source-map-js": ["source-map-js@1.2.
|
|
765
|
+
"source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="],
|
|
766
766
|
|
|
767
767
|
"space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="],
|
|
768
768
|
|
|
@@ -870,8 +870,6 @@
|
|
|
870
870
|
|
|
871
871
|
"parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
|
|
872
872
|
|
|
873
|
-
"postcss/source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="],
|
|
874
|
-
|
|
875
873
|
"react-remove-scroll/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
|
876
874
|
|
|
877
875
|
"react-remove-scroll-bar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
|
@@ -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.5281ad9",
|
|
16
|
+
"@squadbase/vantage-sdk": "0.1.2-dev1.3931a3f",
|
|
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.f53990f",
|
|
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": "f53990f5914835e52bc2e0c3f7019b1b93d0bec0",
|
|
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",
|