@squadbase/vantage 0.6.2 → 0.7.0-dev1.1197de7

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 (357) hide show
  1. package/dist/add-4GHF2TX2.js +6 -0
  2. package/dist/add-4GHF2TX2.js.map +1 -0
  3. package/dist/{build-O5TVNH4E.js → build-U7GO26HR.js} +9 -9
  4. package/dist/{build-O5TVNH4E.js.map → build-U7GO26HR.js.map} +1 -1
  5. package/dist/{check-WFBEDHDR.js → check-MRVAIHG5.js} +7 -7
  6. package/dist/{check-WFBEDHDR.js.map → check-MRVAIHG5.js.map} +1 -1
  7. package/dist/{chunk-QDZA5JSL.js → chunk-AABMKHEU.js} +4 -4
  8. package/dist/{chunk-QDZA5JSL.js.map → chunk-AABMKHEU.js.map} +1 -1
  9. package/dist/{chunk-PVTHHV7X.js → chunk-ANZLVSEP.js} +28 -7
  10. package/dist/chunk-ANZLVSEP.js.map +1 -0
  11. package/dist/chunk-CKWPK4RO.js +50 -0
  12. package/dist/chunk-CKWPK4RO.js.map +1 -0
  13. package/dist/chunk-EG4PX726.js +678 -0
  14. package/dist/chunk-EG4PX726.js.map +1 -0
  15. package/dist/{chunk-3G43C6OL.js → chunk-GNXCX4WE.js} +46 -3
  16. package/dist/chunk-GNXCX4WE.js.map +1 -0
  17. package/dist/chunk-LYUGDHSF.js +61 -0
  18. package/dist/chunk-LYUGDHSF.js.map +1 -0
  19. package/dist/{chunk-RPZAALCX.js → chunk-MQUIAP66.js} +321 -165
  20. package/dist/chunk-MQUIAP66.js.map +1 -0
  21. package/dist/chunk-P2KIHF65.js +152 -0
  22. package/dist/chunk-P2KIHF65.js.map +1 -0
  23. package/dist/{chunk-BCE22JSM.js → chunk-PJ4SPXHS.js} +52 -16
  24. package/dist/chunk-PJ4SPXHS.js.map +1 -0
  25. package/dist/{chunk-ZVANIULZ.js → chunk-RNTDBX6S.js} +4 -4
  26. package/dist/{chunk-ZVANIULZ.js.map → chunk-RNTDBX6S.js.map} +1 -1
  27. package/dist/{chunk-PXRX5PEC.js → chunk-ROHNXP7J.js} +73 -4
  28. package/dist/chunk-ROHNXP7J.js.map +1 -0
  29. package/dist/chunk-S5MDTHH7.js +466 -0
  30. package/dist/chunk-S5MDTHH7.js.map +1 -0
  31. package/dist/chunk-SDJTTMLK.js +1877 -0
  32. package/dist/chunk-SDJTTMLK.js.map +1 -0
  33. package/dist/{chunk-EP6JHXSR.js → chunk-SHZM3EXB.js} +68 -12
  34. package/dist/chunk-SHZM3EXB.js.map +1 -0
  35. package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
  36. package/dist/chunk-U736PVHY.js.map +1 -0
  37. package/dist/{chunk-JGRMRXXZ.js → chunk-UWSQUHX6.js} +4 -99
  38. package/dist/chunk-UWSQUHX6.js.map +1 -0
  39. package/dist/chunk-XRKSIC5Z.js +176 -0
  40. package/dist/chunk-XRKSIC5Z.js.map +1 -0
  41. package/dist/chunk-YJQCB3UP.js +10764 -0
  42. package/dist/chunk-YJQCB3UP.js.map +1 -0
  43. package/dist/cli.js +15 -11
  44. package/dist/cli.js.map +1 -1
  45. package/dist/client/index.d.ts +34 -3
  46. package/dist/client/index.js +211 -12
  47. package/dist/client/index.js.map +1 -1
  48. package/dist/components/index.d.ts +2389 -31
  49. package/dist/components/index.js +7 -4
  50. package/dist/delta-text-tav2Lh5d.d.ts +17 -0
  51. package/dist/{dev-NZRLOQCL.js → dev-O42JFQ64.js} +24 -13
  52. package/dist/dev-O42JFQ64.js.map +1 -0
  53. package/dist/doc/index.d.ts +215 -2
  54. package/dist/doc/index.js +423 -5
  55. package/dist/doc/index.js.map +1 -1
  56. package/dist/{docs-ZGDJUHJI.js → docs-JVP4RPKT.js} +3 -3
  57. package/dist/{docs-ZGDJUHJI.js.map → docs-JVP4RPKT.js.map} +1 -1
  58. package/dist/{doctor-VFKEMR54.js → doctor-YD3XAAOT.js} +8 -8
  59. package/dist/doctor-YD3XAAOT.js.map +1 -0
  60. package/dist/format-D34piCei.d.ts +250 -0
  61. package/dist/geo-japan-7BMSOJRX.js +8 -0
  62. package/dist/geo-japan-7BMSOJRX.js.map +1 -0
  63. package/dist/geo-us-GVOG7VXH.js +8 -0
  64. package/dist/geo-us-GVOG7VXH.js.map +1 -0
  65. package/dist/geo-world-35HL56UU.js +8 -0
  66. package/dist/geo-world-35HL56UU.js.map +1 -0
  67. package/dist/markdown/index.js +1 -1
  68. package/dist/markdown/index.js.map +1 -1
  69. package/dist/{preview-QDCIVVSR.js → preview-T6CLSQVX.js} +12 -4
  70. package/dist/preview-T6CLSQVX.js.map +1 -0
  71. package/dist/query/index.d.ts +0 -11
  72. package/dist/query/index.js +2 -2
  73. package/dist/{routes-RHP5FVGD.js → routes-PVKNT777.js} +6 -6
  74. package/dist/{routes-RHP5FVGD.js.map → routes-PVKNT777.js.map} +1 -1
  75. package/dist/{search-RFBELGY7.js → search-5LC4XPB5.js} +3 -3
  76. package/dist/{search-RFBELGY7.js.map → search-5LC4XPB5.js.map} +1 -1
  77. package/dist/slide/index.d.ts +272 -1
  78. package/dist/slide/index.js +1086 -19
  79. package/dist/slide/index.js.map +1 -1
  80. package/dist/table/index.js +13 -10
  81. package/dist/table/index.js.map +1 -1
  82. package/dist/ui/index.d.ts +148 -12
  83. package/dist/ui/index.js +1339 -88
  84. package/dist/ui/index.js.map +1 -1
  85. package/dist/{upgrade-GF2P67M6.js → upgrade-6DT7ADRP.js} +7 -7
  86. package/dist/{upgrade-GF2P67M6.js.map → upgrade-6DT7ADRP.js.map} +1 -1
  87. package/dist/vite/index.d.ts +10 -0
  88. package/dist/vite/index.js +4 -4
  89. package/docs/en/agent-skills.md +1 -1
  90. package/docs/en/changelog.md +82 -0
  91. package/docs/en/cli-reference.md +30 -0
  92. package/docs/en/components.md +42 -17
  93. package/docs/en/doc/delta-text.md +40 -0
  94. package/docs/en/doc/doc-action-items.md +49 -0
  95. package/docs/en/doc/doc-callout.md +38 -0
  96. package/docs/en/doc/doc-data-table.md +60 -0
  97. package/docs/en/doc/doc-executive-summary.md +64 -0
  98. package/docs/en/doc/doc-figure.md +56 -0
  99. package/docs/en/doc/doc-key-findings.md +61 -0
  100. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  101. package/docs/en/doc/doc-notes-and-sources.md +43 -0
  102. package/docs/en/doc/doc-report-header.md +46 -0
  103. package/docs/en/pages-and-metadata.md +15 -0
  104. package/docs/en/parts/area-chart.md +99 -0
  105. package/docs/en/parts/bar-chart.md +91 -0
  106. package/docs/en/parts/bar-list.md +50 -0
  107. package/docs/en/parts/category-bar.md +37 -0
  108. package/docs/en/parts/chart-frame.md +39 -0
  109. package/docs/en/parts/data-table.md +22 -0
  110. package/docs/en/parts/delta.md +51 -0
  111. package/docs/en/parts/donut-chart.md +72 -0
  112. package/docs/en/parts/draft-chart.md +42 -0
  113. package/docs/en/parts/format.md +43 -0
  114. package/docs/en/parts/funnel-steps.md +2 -1
  115. package/docs/en/parts/heatmap.md +53 -0
  116. package/docs/en/parts/kpi-card.md +58 -0
  117. package/docs/en/parts/legend.md +35 -0
  118. package/docs/en/parts/line-chart.md +94 -0
  119. package/docs/en/parts/metric-value.md +3 -2
  120. package/docs/en/parts/page-shell.md +2 -2
  121. package/docs/en/parts/progress-circle.md +33 -0
  122. package/docs/en/parts/sample-data.md +39 -0
  123. package/docs/en/parts/scatter-chart.md +56 -0
  124. package/docs/en/parts/sparkline.md +1 -1
  125. package/docs/en/parts/tracker.md +36 -0
  126. package/docs/en/parts/trend-indicator.md +17 -1
  127. package/docs/en/parts/updated-at.md +30 -0
  128. package/docs/en/parts/waterfall-chart.md +56 -0
  129. package/docs/en/slide/slide-chart-full.md +48 -0
  130. package/docs/en/slide/slide-chart-insight.md +52 -0
  131. package/docs/en/slide/slide-columns.md +46 -0
  132. package/docs/en/slide/slide-comparison.md +68 -0
  133. package/docs/en/slide/slide-cover.md +39 -0
  134. package/docs/en/slide/slide-exec-summary.md +47 -0
  135. package/docs/en/slide/slide-heading.md +38 -0
  136. package/docs/en/slide/slide-kpi-grid.md +55 -0
  137. package/docs/en/slide/slide-kpi-hero.md +58 -0
  138. package/docs/en/slide/slide-next-actions.md +49 -0
  139. package/docs/en/slide/slide-scorecard-table.md +54 -0
  140. package/docs/en/slide/slide-section.md +44 -0
  141. package/docs/en/slide/slide-source-line.md +34 -0
  142. package/docs/en/ui/alert-dialog.md +42 -0
  143. package/docs/en/ui/avatar.md +31 -0
  144. package/docs/en/ui/combobox.md +74 -0
  145. package/docs/en/ui/drawer.md +41 -0
  146. package/docs/en/ui/empty.md +1 -1
  147. package/docs/en/ui/error-state.md +4 -3
  148. package/docs/en/ui/field.md +42 -0
  149. package/docs/en/ui/hover-card.md +21 -0
  150. package/docs/en/ui/kbd.md +17 -0
  151. package/docs/en/ui/loading.md +1 -1
  152. package/docs/en/ui/pagination.md +36 -0
  153. package/docs/en/ui/radio-group.md +21 -0
  154. package/docs/en/ui/toast.md +44 -0
  155. package/docs/en/ui/toggle-group.md +4 -3
  156. package/docs/en/ui-and-theming.md +1 -1
  157. package/docs/index.json +1222 -132
  158. package/docs/ja/agent-skills.md +1 -1
  159. package/docs/ja/changelog.md +84 -0
  160. package/docs/ja/cli-reference.md +29 -0
  161. package/docs/ja/components.md +68 -101
  162. package/docs/ja/doc/delta-text.md +40 -0
  163. package/docs/ja/doc/doc-action-items.md +49 -0
  164. package/docs/ja/doc/doc-callout.md +38 -0
  165. package/docs/ja/doc/doc-data-table.md +60 -0
  166. package/docs/ja/doc/doc-executive-summary.md +64 -0
  167. package/docs/ja/doc/doc-figure.md +56 -0
  168. package/docs/ja/doc/doc-key-findings.md +61 -0
  169. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  170. package/docs/ja/doc/doc-notes-and-sources.md +43 -0
  171. package/docs/ja/doc/doc-report-header.md +46 -0
  172. package/docs/ja/page-types/csv.md +83 -0
  173. package/docs/ja/page-types/doc.md +83 -0
  174. package/docs/ja/page-types/excel.md +82 -0
  175. package/docs/ja/page-types/slide.md +133 -0
  176. package/docs/ja/page-types.md +47 -0
  177. package/docs/ja/pages-and-metadata.md +15 -0
  178. package/docs/ja/parts/area-chart.md +85 -0
  179. package/docs/ja/parts/bar-chart.md +95 -0
  180. package/docs/ja/parts/bar-list.md +58 -0
  181. package/docs/ja/parts/category-bar.md +36 -0
  182. package/docs/ja/parts/chart-frame.md +36 -0
  183. package/docs/ja/parts/data-table.md +22 -0
  184. package/docs/ja/parts/delta.md +51 -0
  185. package/docs/ja/parts/donut-chart.md +66 -0
  186. package/docs/ja/parts/draft-chart.md +40 -0
  187. package/docs/ja/parts/echart.md +3 -0
  188. package/docs/ja/parts/format.md +44 -0
  189. package/docs/ja/parts/funnel-steps.md +27 -8
  190. package/docs/ja/parts/heatmap.md +45 -0
  191. package/docs/ja/parts/kpi-card.md +56 -0
  192. package/docs/ja/parts/legend.md +36 -0
  193. package/docs/ja/parts/line-chart.md +84 -0
  194. package/docs/ja/parts/metric-value.md +3 -2
  195. package/docs/ja/parts/page-shell.md +2 -2
  196. package/docs/ja/parts/progress-circle.md +34 -0
  197. package/docs/ja/parts/sample-data.md +61 -0
  198. package/docs/ja/parts/scatter-chart.md +69 -0
  199. package/docs/ja/parts/sparkline.md +2 -2
  200. package/docs/ja/parts/tracker.md +32 -0
  201. package/docs/ja/parts/trend-indicator.md +17 -1
  202. package/docs/ja/parts/updated-at.md +27 -0
  203. package/docs/ja/parts/waterfall-chart.md +61 -0
  204. package/docs/ja/routing.md +8 -86
  205. package/docs/ja/slide/slide-chart-full.md +48 -0
  206. package/docs/ja/slide/slide-chart-insight.md +52 -0
  207. package/docs/ja/slide/slide-columns.md +46 -0
  208. package/docs/ja/slide/slide-comparison.md +68 -0
  209. package/docs/ja/slide/slide-cover.md +39 -0
  210. package/docs/ja/slide/slide-exec-summary.md +47 -0
  211. package/docs/ja/slide/slide-heading.md +38 -0
  212. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  213. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  214. package/docs/ja/slide/slide-next-actions.md +49 -0
  215. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  216. package/docs/ja/slide/slide-section.md +44 -0
  217. package/docs/ja/slide/slide-source-line.md +34 -0
  218. package/docs/ja/ui/alert-dialog.md +41 -0
  219. package/docs/ja/ui/avatar.md +31 -0
  220. package/docs/ja/ui/combobox.md +74 -0
  221. package/docs/ja/ui/drawer.md +41 -0
  222. package/docs/ja/ui/empty.md +1 -1
  223. package/docs/ja/ui/error-state.md +4 -3
  224. package/docs/ja/ui/field.md +42 -0
  225. package/docs/ja/ui/hover-card.md +21 -0
  226. package/docs/ja/ui/kbd.md +16 -0
  227. package/docs/ja/ui/loading.md +1 -1
  228. package/docs/ja/ui/pagination.md +36 -0
  229. package/docs/ja/ui/radio-group.md +21 -0
  230. package/docs/ja/ui/toast.md +46 -0
  231. package/docs/ja/ui/toggle-group.md +4 -3
  232. package/docs/ja/ui-and-theming.md +14 -7
  233. package/package.json +43 -29
  234. package/registry/parts.json +5221 -0
  235. package/registry/ui/accordion.tsx +76 -0
  236. package/registry/ui/alert-dialog.tsx +189 -0
  237. package/registry/ui/alert.tsx +80 -0
  238. package/registry/ui/app-shell.tsx +424 -0
  239. package/registry/ui/area-chart.tsx +3960 -0
  240. package/registry/ui/attention-list.tsx +465 -0
  241. package/registry/ui/avatar.tsx +110 -0
  242. package/registry/ui/badge.tsx +56 -0
  243. package/registry/ui/bar-chart.tsx +3954 -0
  244. package/registry/ui/bar-list.tsx +3998 -0
  245. package/registry/ui/box-plot-chart.tsx +4214 -0
  246. package/registry/ui/breadcrumb.tsx +128 -0
  247. package/registry/ui/button.tsx +62 -0
  248. package/registry/ui/calendar.tsx +223 -0
  249. package/registry/ui/card.tsx +107 -0
  250. package/registry/ui/category-bar.tsx +1498 -0
  251. package/registry/ui/chart-frame.tsx +1612 -0
  252. package/registry/ui/checkbox.tsx +30 -0
  253. package/registry/ui/collapsible.tsx +23 -0
  254. package/registry/ui/combo-chart.tsx +1852 -0
  255. package/registry/ui/combobox.tsx +310 -0
  256. package/registry/ui/command.tsx +198 -0
  257. package/registry/ui/dashboard-card.tsx +219 -0
  258. package/registry/ui/data-table.tsx +899 -158
  259. package/registry/ui/date-range-picker.tsx +544 -0
  260. package/registry/ui/delta.tsx +352 -0
  261. package/registry/ui/dialog.tsx +161 -0
  262. package/registry/ui/donut-chart.tsx +4006 -0
  263. package/registry/ui/drawer.tsx +229 -0
  264. package/registry/ui/dropdown-menu.tsx +274 -0
  265. package/registry/ui/echart.tsx +1178 -0
  266. package/registry/ui/field.tsx +240 -0
  267. package/registry/ui/filter-bar.tsx +553 -0
  268. package/registry/ui/forecast-chart.tsx +4734 -0
  269. package/registry/ui/funnel-steps.tsx +3843 -0
  270. package/registry/ui/heatmap.tsx +2027 -0
  271. package/registry/ui/histogram-chart.tsx +4284 -0
  272. package/registry/ui/hover-card.tsx +52 -0
  273. package/registry/ui/input-group.tsx +160 -0
  274. package/registry/ui/input.tsx +24 -0
  275. package/registry/ui/kbd.tsx +30 -0
  276. package/registry/ui/kpi-card.tsx +907 -0
  277. package/registry/ui/label.tsx +22 -0
  278. package/registry/ui/legend.tsx +3817 -0
  279. package/registry/ui/line-chart.tsx +3958 -0
  280. package/registry/ui/metric-value.tsx +62 -0
  281. package/registry/ui/multi-select.tsx +382 -0
  282. package/registry/ui/page-shell.tsx +441 -0
  283. package/registry/ui/pagination.tsx +140 -0
  284. package/registry/ui/paired-chart.tsx +4086 -0
  285. package/registry/ui/pivot-table.tsx +1260 -0
  286. package/registry/ui/placeholder.tsx +36 -0
  287. package/registry/ui/popover.tsx +92 -0
  288. package/registry/ui/progress-circle.tsx +1033 -0
  289. package/registry/ui/progress.tsx +85 -0
  290. package/registry/ui/radio-group.tsx +39 -0
  291. package/registry/ui/sample-data.tsx +230 -0
  292. package/registry/ui/scatter-chart.tsx +4503 -0
  293. package/registry/ui/scroll-area.tsx +56 -0
  294. package/registry/ui/searchable-select.tsx +352 -0
  295. package/registry/ui/section-header.tsx +43 -0
  296. package/registry/ui/segmented-control.tsx +76 -0
  297. package/registry/ui/select.tsx +255 -0
  298. package/registry/ui/separator.tsx +27 -0
  299. package/registry/ui/sheet.tsx +139 -0
  300. package/registry/ui/sidebar.tsx +725 -0
  301. package/registry/ui/skeleton.tsx +17 -0
  302. package/registry/ui/slider.tsx +56 -0
  303. package/registry/ui/sparkline.tsx +230 -0
  304. package/registry/ui/spinner.tsx +14 -0
  305. package/registry/ui/states.tsx +247 -0
  306. package/registry/ui/status-badge.tsx +286 -0
  307. package/registry/ui/switch.tsx +34 -0
  308. package/registry/ui/table.tsx +118 -0
  309. package/registry/ui/tabs.tsx +84 -0
  310. package/registry/ui/textarea.tsx +22 -0
  311. package/registry/ui/toast.tsx +250 -0
  312. package/registry/ui/toggle-group.tsx +91 -0
  313. package/registry/ui/toggle.tsx +47 -0
  314. package/registry/ui/tooltip.tsx +72 -0
  315. package/registry/ui/tracker.tsx +1015 -0
  316. package/registry/ui/treemap.tsx +1917 -0
  317. package/registry/ui/trend-indicator.tsx +217 -0
  318. package/registry/ui/updated-at.tsx +276 -0
  319. package/registry/ui/waterfall-chart.tsx +4561 -0
  320. package/skills/vantage-add-feature/SKILL.md +14 -7
  321. package/skills/vantage-design/SKILL.md +62 -52
  322. package/skills/vantage-design/references/extract.md +26 -27
  323. package/skills/vantage-design/references/format.md +12 -172
  324. package/skills/vantage-design/references/presets.md +50 -110
  325. package/skills/vantage-pitfalls/SKILL.md +10 -1
  326. package/skills/vantage-slide/SKILL.md +71 -36
  327. package/templates/AGENTS.md +54 -16
  328. package/templates/agents/api.md +36 -0
  329. package/templates/agents/csv.md +2 -1
  330. package/templates/agents/doc.md +52 -3
  331. package/templates/agents/page.md +91 -10
  332. package/templates/agents/slide.md +90 -4
  333. package/templates/agents/xlsx.md +2 -1
  334. package/theme.css +247 -132
  335. package/dist/add-EISGSZAH.js +0 -6
  336. package/dist/add-EISGSZAH.js.map +0 -1
  337. package/dist/chunk-3G43C6OL.js.map +0 -1
  338. package/dist/chunk-5ZOP4SQR.js +0 -47
  339. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  340. package/dist/chunk-A2UUGASH.js.map +0 -1
  341. package/dist/chunk-BCE22JSM.js.map +0 -1
  342. package/dist/chunk-DTDVSFRY.js +0 -29
  343. package/dist/chunk-DTDVSFRY.js.map +0 -1
  344. package/dist/chunk-EP6JHXSR.js.map +0 -1
  345. package/dist/chunk-JGRMRXXZ.js.map +0 -1
  346. package/dist/chunk-KLEIVDUV.js +0 -165
  347. package/dist/chunk-KLEIVDUV.js.map +0 -1
  348. package/dist/chunk-LSRMRIXA.js +0 -2227
  349. package/dist/chunk-LSRMRIXA.js.map +0 -1
  350. package/dist/chunk-PVTHHV7X.js.map +0 -1
  351. package/dist/chunk-PXRX5PEC.js.map +0 -1
  352. package/dist/chunk-RPZAALCX.js.map +0 -1
  353. package/dist/chunk-T3FLAGI6.js +0 -316
  354. package/dist/chunk-T3FLAGI6.js.map +0 -1
  355. package/dist/dev-NZRLOQCL.js.map +0 -1
  356. package/dist/doctor-VFKEMR54.js.map +0 -1
  357. package/dist/preview-QDCIVVSR.js.map +0 -1
@@ -2,14 +2,16 @@
2
2
 
3
3
  > Reference for the bundled shadcn/ui (Base UI) kit and the composite dashboard components.
4
4
 
5
- Vantage ships **shadcn/ui** as-is. Nothing to install, nothing to copy — just import. There are three
6
- public entry points, and **the sidebar is sectioned by those three**.
5
+ Vantage ships **shadcn/ui** as-is. Nothing to install, nothing to copy — just import. There are five
6
+ public entry points, and **the sidebar is sectioned by those five** (`/slide` and `/doc` hold the blocks for slide and document pages).
7
7
 
8
8
  | Subpath | What's in it | Count |
9
9
  | --- | --- | --- |
10
10
  | [`@squadbase/vantage/ui`](ui/button) | The shadcn/ui primitives (Base UI build) plus utilities like `cn()` | 37 |
11
11
  | [`@squadbase/vantage/components`](parts/page-shell) | Dashboard parts composed from them | 15 |
12
12
  | [`@squadbase/vantage/markdown`](markdown/markdown-renderer) | Markdown rendering alone (kept apart — it's heavy) | 1 |
13
+ | [`@squadbase/vantage/slide`](slide/slide-cover) | Blocks for the content of one slide in a `.slide.tsx` (7: cover, summary, KPI, chart, scorecard, next actions) | 7 |
14
+ | [`@squadbase/vantage/doc`](doc/doc-report-header) | Section and part blocks placed inside `<Document>` in a `.doc.tsx` | 8 |
13
15
 
14
16
  ```tsx
15
17
  import { Button, Card, Badge } from "@squadbase/vantage/ui";
@@ -113,7 +115,12 @@ here they're grouped by what they're for.
113
115
 
114
116
  ## `@squadbase/vantage/components`
115
117
 
116
- Dashboard parts composed from `ui/`.
118
+ Dashboard parts composed from `ui/`. Their source of truth is SquadKit; Vantage re-exports them.
119
+
120
+ Show a KPI with [`KpiCard`](parts/kpi-card) and a change with
121
+ [`Delta`](parts/delta) (pass `comparison` and `polarity`).
122
+ [`TrendIndicator`](parts/trend-indicator) is deprecated. Number formatting and the
123
+ change calculation live in [format / comparison](parts/format).
117
124
 
118
125
  | Component | What it is |
119
126
  | --- | --- |
@@ -130,8 +137,10 @@ Dashboard parts composed from `ui/`.
130
137
  | [`SegmentedControl`](parts/segmented-control) | Single-choice segments |
131
138
  | [`SearchableSelect`](parts/searchable-select) | Single choice with search |
132
139
  | [`MultiSelect`](parts/multi-select) | Multiple choice with search |
140
+ | [`KpiCard`](parts/kpi-card) | One KPI as a card: value, change, previous actual, conclusion |
141
+ | [`Delta`](parts/delta) | The change against a comparison, derived from the values |
133
142
  | [`MetricValue`](parts/metric-value) | A KPI's number and unit |
134
- | [`TrendIndicator`](parts/trend-indicator) | An arrow and a percentage |
143
+ | [`TrendIndicator`](parts/trend-indicator) | Deprecated — use `Delta` |
135
144
  | [`StatusBadge`](parts/status-badge) | A dot-and-label status badge |
136
145
  | [`Placeholder`](parts/placeholder) | An inline marker for sample data |
137
146
 
@@ -141,6 +150,15 @@ A subpath holding only [`MarkdownRenderer`](markdown/markdown-renderer). Markdow
141
150
  rendering carries Shiki with every language grammar; mixed into the `components` barrel it would add
142
151
  over 10 MB to every build, so it is deliberately kept apart.
143
152
 
153
+ ## `@squadbase/vantage/slide` and `@squadbase/vantage/doc`
154
+
155
+ Blocks for [slide](page-types/slide) and [document](page-types/doc) pages. They live on their own subpaths, apart from `/components`, and `vantage add` does not copy them — import and use them.
156
+
157
+ - **slide**: the content of one `<Slide>` (not `<Slide>` itself). [`SlideCover`](slide/slide-cover) / [`SlideExecSummary`](slide/slide-exec-summary) / [`SlideKpiHero`](slide/slide-kpi-hero) / [`SlideKpiGrid`](slide/slide-kpi-grid) / [`SlideChartInsight`](slide/slide-chart-insight) / [`SlideScorecardTable`](slide/slide-scorecard-table) / [`SlideNextActions`](slide/slide-next-actions) / [`SlideSection`](slide/slide-section) / [`SlideComparison`](slide/slide-comparison) / [`SlideChartFull`](slide/slide-chart-full)
158
+ - **slide parts**: parts used inside a slide (not whole slides). [`SlideHeading`](slide/slide-heading) / [`SlideSourceLine`](slide/slide-source-line) / [`SlideColumns`, `SlideColumn`](slide/slide-columns)
159
+ - **doc**: sections and parts placed inside `<Document>` (`DocFigure` / `DocDataTable` / `DocCallout` go inside a section). [`DocReportHeader`](doc/doc-report-header) / [`DocExecutiveSummary`](doc/doc-executive-summary) / [`DocKpiScorecard`](doc/doc-kpi-scorecard) / [`DocFigure`](doc/doc-figure) / [`DocDataTable`](doc/doc-data-table) / [`DocCallout`](doc/doc-callout) / [`DocKeyFindings`](doc/doc-key-findings) / [`DocActionItems`](doc/doc-action-items) / [`DocNotesAndSources`](doc/doc-notes-and-sources)
160
+ - **doc parts**: a part placed inside a sentence (also usable in slides). [`DeltaText`](doc/delta-text)
161
+
144
162
  ## Putting it together
145
163
 
146
164
  ```tsx
@@ -154,9 +172,8 @@ import {
154
172
  PageShellHeaderEnd,
155
173
  PageShellActions,
156
174
  PageShellContent,
175
+ KpiCard,
157
176
  DashboardCardPreset,
158
- MetricValue,
159
- TrendIndicator,
160
177
  EChart,
161
178
  type EChartsOption,
162
179
  } from "@squadbase/vantage/components";
@@ -184,17 +201,25 @@ export default function Overview() {
184
201
 
185
202
  <PageShellContent>
186
203
  <div className="grid gap-4 md:grid-cols-3">
187
- <DashboardCardPreset title="Revenue">
188
- <MetricValue className="my-0">$12,400</MetricValue>
189
- <TrendIndicator value={12.4} direction="up" />
190
- </DashboardCardPreset>
191
- <DashboardCardPreset title="New customers">
192
- <MetricValue className="my-0">128</MetricValue>
193
- <TrendIndicator value={3.1} direction="down" />
194
- </DashboardCardPreset>
195
- <DashboardCardPreset title="Churn">
196
- <MetricValue className="my-0">2.1%</MetricValue>
197
- </DashboardCardPreset>
204
+ <KpiCard
205
+ label="Revenue"
206
+ value={1_240_000}
207
+ format="currency"
208
+ comparison={{ previous: 1_103_000, vs: "prior-period" }}
209
+ />
210
+ <KpiCard
211
+ label="New customers"
212
+ value={128}
213
+ format="number"
214
+ comparison={{ previous: 132, vs: "prior-period" }}
215
+ />
216
+ <KpiCard
217
+ label="Churn"
218
+ value={0.021}
219
+ format={{ type: "percent", digits: 1 }}
220
+ comparison={{ previous: 0.026, vs: "prior-period" }}
221
+ polarity="lower-is-better"
222
+ />
198
223
  </div>
199
224
 
200
225
  <DashboardCardPreset title="Monthly revenue" className="mt-4">
@@ -0,0 +1,40 @@
1
+ # DeltaText
2
+
3
+ > [Part] An inline change — ▲ ▼ and a signed value — for documents and slides.
4
+
5
+ A change as a bare inline `span`: a mark plus a signed value ("▲ +3.2%"), so print and colour-blind readers get the direction; colour only adds good or bad. It sets no text size and takes the size of the line it sits in. It is a **part** usable in both documents and slides, not a section or a slide block.
6
+
7
+ ```tsx
8
+ import { DeltaText } from "@squadbase/vantage/doc";
9
+ import type { DeltaTextProps } from "@squadbase/vantage/doc";
10
+ // The same part is available from the slide subpath
11
+ // import { DeltaText } from "@squadbase/vantage/slide";
12
+ ```
13
+
14
+ > [!NOTE]
15
+ > This is **a part to place inside a sentence**. It has no dimensions or text size of its own and follows the line it sits in. It is separate from the dashboard `Delta`.
16
+
17
+ ## Props
18
+
19
+ | Prop | Type | Default | Description |
20
+ | --- | --- | --- | --- |
21
+ | `value` | `number \| null` | | The change itself; its direction comes from the sign. `null` shows 「—」. **Required.** |
22
+ | `format` | `ValueFormat` | | How to format the value (`"percent"`, `"currency"`, …). Printed with an explicit sign. |
23
+ | `betterWhen` | `"up" \| "down"` | `"up"` | Which direction is good; decides the colour. Use `"down"` for churn and cost. |
24
+ | `comparisonLabel` | `string` | | Name of the comparison ("vs last month"). Printed before the change, muted. |
25
+
26
+ ## Usage
27
+
28
+ ```tsx
29
+ import { DeltaText } from "@squadbase/vantage/doc";
30
+
31
+ <p>
32
+ Revenue in September was ¥540M (<DeltaText value={0.074} format="percent" comparisonLabel="vs last month" />).
33
+ Churn is 1.8% (<DeltaText value={-0.006} format="percent" betterWhen="down" comparisonLabel="vs last month" />).
34
+ </p>
35
+ ```
36
+
37
+ ## Notes
38
+
39
+ - Zero is shown as 「→」 in the muted colour.
40
+ - The spoken words (「増」, 「減」, 「横ばい」, 「改善」, 「悪化」) in the accessible label are fixed in Japanese.
@@ -0,0 +1,49 @@
1
+ # DocActionItems
2
+
3
+ > What to do next — action, owner, due date, expected effect and priority.
4
+
5
+ The recommendations section: action, owner, due date, expected effect and priority. The default `table` is a table; `asks` is a short bulleted list of requests to the reader (introductions, a decision, a hire). Priority is only the word 高 / 中 / 低, with no badge and no colour.
6
+
7
+ ```tsx
8
+ import { DocActionItems } from "@squadbase/vantage/doc";
9
+ import type { DocActionItemsProps, DocActionItem, DocActionPriority } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `action` is a `ReactNode`; Markdown strings are not parsed. The table headings ("対応", "担当", "期限", "期待する効果", "優先度"), the priority words (高 / 中 / 低) and the "まで" after a due date in `asks` are fixed in Japanese and cannot be overridden. Write `action`, `owner`, `due` and `impact` in English yourself; the default heading "推奨する対応" is Japanese, so pass `title`. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `title` | `string` | `"推奨する対応"` | Heading text. |
20
+ | `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
21
+ | `items` | `DocActionItem[]` | | Actions, most important first. **Required.** |
22
+ | `items[].action` | `ReactNode` | | What to do. **Required.** |
23
+ | `items[].owner` | `string` | | Owner. |
24
+ | `items[].due` | `string` | | Due date, shown as written ("2026-11-15", "11 月末"). |
25
+ | `items[].impact` | `string` | | Expected effect ("解約率 −0.5pt"). Shown in the `table` only. |
26
+ | `items[].priority` | `"high" \| "medium" \| "low"` | | Priority, printed as the word 高 / 中 / 低 (高 in semibold). Shown in the `table` only. |
27
+ | `variant` | `"table" \| "asks"` | `"table"` | A table, or a bulleted list of requests to the reader. |
28
+
29
+ ## Usage
30
+
31
+ ```tsx
32
+ import { Document, DocActionItems } from "@squadbase/vantage/doc";
33
+
34
+ <Document>
35
+ <DocActionItems
36
+ items={[
37
+ { action: "法人プランの導入支援を増員する", owner: "CS 部", due: "2026-11-15", impact: "解約率 −0.5pt", priority: "high" },
38
+ { action: "紹介プログラムの特典を見直す", owner: "マーケティング部", due: "11 月末", impact: "紹介経由の新規 +10 社", priority: "medium" },
39
+ { action: "料金ページの文言を改善する", owner: "プロダクト部", priority: "low" },
40
+ ]}
41
+ />
42
+ </Document>
43
+ ```
44
+
45
+ ## Notes
46
+
47
+ - `due` is shown as written ("2026-11-15", "11 月末"). A missing owner, due or impact shows "—".
48
+ - `variant="asks"` adds only the owner and "`due` まで" (e.g. "(CS 部・11 月末 まで)"); the effect and priority are not shown.
49
+ - When printed, each item of `asks` stays on one page and does not break across pages.
@@ -0,0 +1,38 @@
1
+ # DocCallout
2
+
3
+ > A boxed remark inside the text — a note, insight, warning or decision.
4
+
5
+ A box for the one thing a reader must not miss — a `div` with `role="note"` and a left rule in the kind's semantic colour (a decision is neutral). The kind also prints as a word ("注意", "示唆"), so colour is never the only signal. Don't use it for decoration.
6
+
7
+ ```tsx
8
+ import { DocCallout } from "@squadbase/vantage/doc";
9
+ import type { DocCalloutProps, DocCalloutKind } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **a part to place inside body text or a section**, not a section of its own directly under `<Document>`. The document sets heading and body sizes and the width, so no dimensions are set here. `children` is a `string` or a `ReactNode`; Markdown strings are not parsed. The kind words ("補足", "示唆", "注意", "決定事項") are fixed in Japanese and cannot be overridden, so an English callout reads "注意: your title". Write `title` in English. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `kind` | `"note" \| "insight" \| "warning" \| "decision"` | `"note"` | Kind: note (補足) / insight (示唆) / warning (注意) / decision (決定事項). |
20
+ | `title` | `string` | | Heading of the box, one short line. When given, it prints as "<kind word>: <title>". Omit it and only the kind word shows. A title equal to the kind word is shown once. |
21
+ | `children` | `ReactNode` | | The body. A `string` becomes a paragraph. Markdown strings are not parsed. **Required.** |
22
+
23
+ ## Usage
24
+
25
+ ```tsx
26
+ import { Document, DocCallout } from "@squadbase/vantage/doc";
27
+
28
+ <Document>
29
+ <DocCallout kind="warning" title="9 月の数値は速報値">
30
+ 10 月 10 日の確定で変わることがあります。
31
+ </DocCallout>
32
+ </Document>
33
+ ```
34
+
35
+ ## Notes
36
+
37
+ - The kind word is added by the block; do not repeat it in `title`, which should hold only the heading itself.
38
+ - When printed, it stays on one page and does not break across pages.
@@ -0,0 +1,60 @@
1
+ # DocDataTable
2
+
3
+ > A table with the notes a printed table needs — title, unit, total row, footnotes and source.
4
+
5
+ A table with what a printed table needs: title, unit, right-aligned numbers, a total row, highlighted rows, footnotes and a source line. It is a plain `table` styled by `<Document>`, which also keeps rows together when printed. For screens that need sorting or scrolling, use `DataTable`.
6
+
7
+ ```tsx
8
+ import { DocDataTable } from "@squadbase/vantage/doc";
9
+ import type { DocDataTableProps, DocTableColumn, DocTableRow, DocTableCell } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **a part to place inside body text or a section**, not a section of its own directly under `<Document>`. The document sets heading and body sizes and the width, so no dimensions are set here. A cell is a string or a number; a `ReactNode` is not accepted. The caption labels "出典" and "データ時点" are fixed in Japanese and cannot be overridden; column labels, `title`, `unit` and footnotes are yours, so write them in English. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Description |
18
+ | --- | --- | --- |
19
+ | `title` | `string` | Table title, as a caption above the table. |
20
+ | `unit` | `string` | Unit or scale ("単位: 百万円"). With a title it follows in parentheses. |
21
+ | `columns` | `DocTableColumn[]` | Columns (`{ key; label; format?: ValueFormat; align?: "left" \| "right" \| "center" }`). Without `format`, numbers use a plain thousands format. Without `align`, a column of numbers is right-aligned and others left-aligned. **Required.** |
22
+ | `rows` | `DocTableRow[]` | Rows: objects keyed by the `key` of `columns`. A cell is a string or a number (`null`, `undefined` and an empty string show "—"). **Required.** |
23
+ | `total` | `DocTableRow` | The total row (`tfoot`), keyed like `rows`. |
24
+ | `highlightRows` | `number[]` | Indexes of the rows to set in semibold (zero-based, indexes into `rows`). |
25
+ | `footnotes` | `{ mark: string; text: string }[]` | Footnotes. Write the same `mark` ("※1") in a cell string to point at one. |
26
+ | `source` | `string` | Source. Shown as "出典: …" in the caption. |
27
+ | `asOf` | `string` | The date the data was taken, as a date only ("2026-10-03"). The block adds the label "データ時点". |
28
+
29
+ ## Usage
30
+
31
+ ```tsx
32
+ import { Document, DocDataTable } from "@squadbase/vantage/doc";
33
+
34
+ <Document>
35
+ <DocDataTable
36
+ title="部門別の売上"
37
+ unit="単位: 百万円"
38
+ columns={[
39
+ { key: "dept", label: "部門" },
40
+ { key: "sales", label: "売上", format: "number" },
41
+ { key: "share", label: "構成比", format: { type: "percent", digits: 1 } },
42
+ ]}
43
+ rows={[
44
+ { dept: "法人営業", sales: 312, share: 0.58 },
45
+ { dept: "パートナー", sales: 148, share: 0.27 },
46
+ { dept: "オンライン ※1", sales: 80, share: 0.15 },
47
+ ]}
48
+ total={{ dept: "合計", sales: 540, share: 1 }}
49
+ highlightRows={[0]}
50
+ footnotes={[{ mark: "※1", text: "9 月から集計対象に追加" }]}
51
+ source="会計システム"
52
+ asOf="2026-10-03"
53
+ />
54
+ </Document>
55
+ ```
56
+
57
+ ## Notes
58
+
59
+ - Numbers line up with `tabular-nums`, and a missing cell shows "—".
60
+ - When printed, a row does not break across pages. A long table may break between rows, and the caption (footnotes and source) stays on one page.
@@ -0,0 +1,64 @@
1
+ # DocExecutiveSummary
2
+
3
+ > The answer first — one conclusion, 3–5 points and optional headline numbers.
4
+
5
+ The answer-first section (BLUF): one conclusion sentence, 3–5 numbered points and up to 3 headline numbers. The direction of each change comes from the sign of the `delta` you pass, and the ▲▼ mark and the sign are always printed, so the direction is clear without colour.
6
+
7
+ ```tsx
8
+ import { DocExecutiveSummary } from "@squadbase/vantage/doc";
9
+ import type { DocExecutiveSummaryProps, DocSummaryMetric } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `conclusion` and `points` are a `string` or a `ReactNode`; Markdown strings are not parsed. The default heading "要旨" and the default comparison name "前期比" are Japanese; on an English page pass `title` and `comparisonLabel` in English. Nothing else is printed by the block here. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `title` | `string` | `"要旨"` | Heading text. |
20
+ | `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
21
+ | `conclusion` | `ReactNode` | | The verdict in one sentence, set in semibold. **Required.** |
22
+ | `points` | `ReactNode[]` | | Supporting points, 3–5, most important first. Shown as a numbered list. **Required.** |
23
+ | `metrics` | `DocSummaryMetric[]` | | Headline numbers (at most 3; any beyond are ignored). |
24
+ | `metrics[].label` | `string` | | Name of the metric. |
25
+ | `metrics[].value` | `number \| null` | | The value. `null` shows "—". |
26
+ | `metrics[].format` | `ValueFormat` | | Format of `value` (`"currency"`, `{ type: "percent", digits: 1 }`, …). |
27
+ | `metrics[].display` | `string` | | When given, shown instead of the formatted value ("about ¥54M"). |
28
+ | `metrics[].delta` | `{ value: number; format?: ValueFormat }` | | The change itself (current − comparison). Direction comes from the sign; the ▲▼ mark and the sign are always printed. Omit for no comparison. Without `format`, the metric's `format` is used. |
29
+ | `metrics[].comparisonLabel` | `string` | `"前期比"` | Name of the comparison (e.g. "前月比"). |
30
+ | `metrics[].betterWhen` | `"up" \| "down"` | `"up"` | Which way is good. Use `"down"` for churn or cost. Colour only adds good / bad. |
31
+
32
+ ## Usage
33
+
34
+ ```tsx
35
+ import { Document, DocExecutiveSummary } from "@squadbase/vantage/doc";
36
+
37
+ <Document>
38
+ <DocExecutiveSummary
39
+ conclusion="9 月の売上は計画を上回ったが、新規獲得は目標に届いていない。"
40
+ points={[
41
+ "売上は 5,390 万円で、計画比 +3.7%。",
42
+ "解約率は 1.8% まで下がり、3 か月連続で改善。",
43
+ "新規獲得は 38 社で、目標の 50 社に未達。",
44
+ ]}
45
+ metrics={[
46
+ { label: "売上", value: 53_900_000, format: "currency", delta: { value: 3_700_000 }, comparisonLabel: "前月比" },
47
+ {
48
+ label: "解約率",
49
+ value: 0.018,
50
+ format: { type: "percent", digits: 1 },
51
+ delta: { value: -0.003, format: { type: "number", digits: 1, unit: "pt", divisor: 0.01 } },
52
+ comparisonLabel: "前月比",
53
+ betterWhen: "down",
54
+ },
55
+ ]}
56
+ />
57
+ </Document>
58
+ ```
59
+
60
+ ## Notes
61
+
62
+ - For a metric where a fall is good, set `betterWhen: "down"` (this flips the good / bad colour; the ▲▼ mark and sign still show the real direction).
63
+ - `delta` is the change itself, not the comparison value. For a rate (churn and the like), give it a `pt` format as in the example so it is not read as a relative change.
64
+ - When printed, each point and each metric tile stays on one page; the section as a whole may break across pages.
@@ -0,0 +1,56 @@
1
+ # DocFigure
2
+
3
+ > The figure convention in one place — a finding title, unit, the chart and a caption with source.
4
+
5
+ The figure convention: a title that states the finding, the unit, the chart (as `children`) and a caption with source and notes, as a real `figure` / `figcaption`. The chart is yours — a typed chart, an `EChart` or an image. A number without a source and a date is unfinished, so `source` and `asOf` are first-class.
6
+
7
+ ```tsx
8
+ import { DocFigure } from "@squadbase/vantage/doc";
9
+ import type { DocFigureProps } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **a part to place inside body text or a section**, not a section of its own directly under `<Document>`. The document sets heading and body sizes and the width, so no dimensions are set here. `children` is the chart (a `ReactNode`). The caption labels "図 N", "出典" and "データ時点" are fixed in Japanese and cannot be overridden; write `title`, `unit` and `notes` in English yourself. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Description |
18
+ | --- | --- | --- |
19
+ | `title` | `string` | The finding as a sentence ("Churn fell two months running"), not the subject. **Required.** |
20
+ | `unit` | `string` | Unit or scale ("単位: %"), shown right under the title. Put definitions and caveats in `notes`. |
21
+ | `number` | `number` | Figure number, shown as "図 N" in the caption. |
22
+ | `source` | `string` | Where the data comes from. Shown as "出典: …" in the caption. |
23
+ | `asOf` | `string` | The date the data was taken, as a date only ("2026-10-03"). The block adds the label "データ時点". |
24
+ | `notes` | `string[]` | Footnotes and definitions, one per line. |
25
+ | `children` | `ReactNode` | The chart; it takes the full column. **Required.** |
26
+
27
+ ## Usage
28
+
29
+ ```tsx
30
+ import { Document, DocFigure } from "@squadbase/vantage/doc";
31
+ import { EChart, type EChartsOption } from "@squadbase/vantage/components";
32
+
33
+ const option: EChartsOption = {
34
+ xAxis: { type: "category", data: ["7 月", "8 月", "9 月"] },
35
+ yAxis: { type: "value" },
36
+ series: [{ type: "line", data: [2.4, 2.1, 1.8] }],
37
+ };
38
+
39
+ <Document>
40
+ <DocFigure
41
+ number={1}
42
+ title="解約率は 2 か月連続で低下"
43
+ unit="単位: %"
44
+ source="課金システム"
45
+ asOf="2026-10-03"
46
+ notes={["解約率は、月初の契約数に対するその月の解約数の割合。"]}
47
+ >
48
+ <EChart option={option} height={240} ariaLabel="解約率の推移(7〜9 月)" />
49
+ </DocFigure>
50
+ </Document>
51
+ ```
52
+
53
+ ## Notes
54
+
55
+ - Do not give the chart in `children` its own `title`; the title goes in the `title` of `DocFigure`. If the chart needs an accessible name, use `ariaLabel`.
56
+ - A figure does not break across pages when printed.
@@ -0,0 +1,61 @@
1
+ # DocKeyFindings
2
+
3
+ > 3–5 findings — a concluding headline, evidence and an optional number.
4
+
5
+ The "what we learned" section: 3–5 findings, each a numbered `h3` headline that states the conclusion, the evidence under it and optionally one number. The direction of the change comes from the sign of the `delta` you pass, and the ▲▼ mark and sign are always printed.
6
+
7
+ ```tsx
8
+ import { DocKeyFindings } from "@squadbase/vantage/doc";
9
+ import type { DocKeyFindingsProps, DocFinding, DocFindingMetric } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `evidence` is a `string` or a `ReactNode`; Markdown strings are not parsed. The default heading "主要な発見" and the default comparison name "前期比" are Japanese; on an English page pass `title` and `comparisonLabel` in English. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `title` | `string` | `"主要な発見"` | Section heading. |
20
+ | `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
21
+ | `findings` | `DocFinding[]` | | Findings (`{ headline: string; evidence: ReactNode; metric?: DocFindingMetric }`), 3–5, most important first. **Required.** |
22
+ | `findings[].metric` | `DocFindingMetric` | | One number to go with the finding, with the fields below. |
23
+ | `findings[].metric[].label` | `string` | | Name of the metric. |
24
+ | `findings[].metric[].value` | `number \| null` | | The value. `null` shows "—". |
25
+ | `findings[].metric[].format` | `ValueFormat` | | Format of `value` (`"currency"`, `{ type: "percent", digits: 1 }`, …). |
26
+ | `findings[].metric[].display` | `string` | | When given, shown instead of the formatted value ("about ¥54M"). |
27
+ | `findings[].metric[].delta` | `{ value: number; format?: ValueFormat }` | | The change itself (current − comparison). Direction comes from the sign; the ▲▼ mark and the sign are always printed. Omit for no comparison. Without `format`, the metric's `format` is used. |
28
+ | `findings[].metric[].comparisonLabel` | `string` | `"前期比"` | Name of the comparison (e.g. "前月比"). |
29
+ | `findings[].metric[].betterWhen` | `"up" \| "down"` | `"up"` | Which way is good. Use `"down"` for churn or cost. Colour only adds good / bad. |
30
+
31
+ ## Usage
32
+
33
+ ```tsx
34
+ import { Document, DocKeyFindings } from "@squadbase/vantage/doc";
35
+
36
+ <Document>
37
+ <DocKeyFindings
38
+ findings={[
39
+ {
40
+ headline: "新規契約は法人プランが牽引した",
41
+ evidence: "法人プランの新規が前月比 +20%(20 社 → 24 社)。個人プランは横ばいだった。",
42
+ metric: { label: "法人プランの新規", value: 24, format: { type: "number", unit: "社" }, delta: { value: 4 }, comparisonLabel: "前月比" },
43
+ },
44
+ {
45
+ headline: "解約は導入 3 か月以内に集中している",
46
+ evidence: "解約の 62% が導入から 3 か月以内で、オンボーディングが分かれ目になっている。",
47
+ },
48
+ {
49
+ headline: "紹介経由の契約は定着率が高い",
50
+ evidence: "紹介経由で入った契約の 6 か月継続率は 91% で、広告経由の 74% を上回った。",
51
+ },
52
+ ]}
53
+ />
54
+ </Document>
55
+ ```
56
+
57
+ ## Notes
58
+
59
+ - Write `headline` as a sentence with a verdict, not a topic ("Churn is concentrated in business plans"). With `headingLevel={3}` the findings become `h4`.
60
+ - Keep the numbers in `evidence` consistent with the `metric` (`delta` is the change itself; no rate is computed for you).
61
+ - When printed, each finding stays on one page and does not break across pages.
@@ -0,0 +1,80 @@
1
+ # DocKpiScorecard
2
+
3
+ > Key metrics in one place — actual, change, gap to target and trend.
4
+
5
+ The key metrics in one section: actual, change from the previous period, achievement against target and a small trend. The default `table` prints well; `grid` shows 3–6 metrics as `dl` tiles. The block computes the direction from the sign of `delta` and the achievement rate from `value ÷ target`.
6
+
7
+ ```tsx
8
+ import { DocKpiScorecard } from "@squadbase/vantage/doc";
9
+ import type { DocKpiScorecardProps, DocScorecardMetric } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **one section to place directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. `asOf` and `source` appear in one line under the block. The labels the block prints (the column headings "指標" / "実績" / "目標" / "達成率" / "推移", "達成率" and "目標" in tiles, "データ時点", "出典") are fixed in Japanese and cannot be overridden. Only `title` and `comparisonLabel` can be set, so pass them in English; their defaults ("主要指標", "前期比") are Japanese. For the whole page, see [Document](page-types/doc).
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `title` | `string` | `"主要指標"` | Heading text. |
20
+ | `headingLevel` | `2 \| 3` | `2` | Heading level: 2 directly under `<Document>`, 3 inside another section. |
21
+ | `metrics` | `DocScorecardMetric[]` | | Metrics. **Required.** |
22
+ | `metrics[].label` | `string` | | Name of the metric. |
23
+ | `metrics[].value` | `number \| null` | | The value. `null` shows "—". |
24
+ | `metrics[].format` | `ValueFormat` | | Format of `value` (`"currency"`, `{ type: "percent", digits: 1 }`, …). |
25
+ | `metrics[].display` | `string` | | When given, shown instead of the formatted value ("about ¥54M"). |
26
+ | `metrics[].delta` | `{ value: number; format?: ValueFormat }` | | The change itself (current − comparison). Direction comes from the sign; the ▲▼ mark and the sign are always printed. Omit for no comparison. Without `format`, the metric's `format` is used. |
27
+ | `metrics[].comparisonLabel` | `string` | `"前期比"` | Name of the comparison (e.g. "前月比"). |
28
+ | `metrics[].betterWhen` | `"up" \| "down"` | `"up"` | Which way is good. Use `"down"` for churn or cost. Colour only adds good / bad. |
29
+ | `metrics[].target` | `number` | | The target for the period, shown in the metric's `format`; the achievement rate (value ÷ target) is computed here. |
30
+ | `metrics[].trend` | `{ x: string; y: number }[]` | | One series over time, oldest first; the last point is the current value. Use the same unit as `value`. Omit and the cell shows "—"; with two or more points a `Sparkline` is drawn. |
31
+ | `variant` | `"table" \| "grid"` | `"table"` | Table or tiles. |
32
+ | `asOf` | `string` | | The date the numbers were taken, as a date only ("2026-10-03"). Shown as "データ時点 …" in a line under the block. |
33
+ | `source` | `string` | | Source. Shown as "出典: …" in a line under the block. |
34
+
35
+ ## Usage
36
+
37
+ ```tsx
38
+ import { Document, DocKpiScorecard } from "@squadbase/vantage/doc";
39
+
40
+ <Document>
41
+ <DocKpiScorecard
42
+ asOf="2026-10-03"
43
+ source="会計システム"
44
+ metrics={[
45
+ {
46
+ label: "売上",
47
+ value: 53_900_000,
48
+ format: "currency",
49
+ delta: { value: 3_700_000 },
50
+ comparisonLabel: "前月比",
51
+ target: 52_000_000,
52
+ trend: [
53
+ { x: "5 月", y: 48_000_000 },
54
+ { x: "6 月", y: 49_000_000 },
55
+ { x: "7 月", y: 50_000_000 },
56
+ { x: "8 月", y: 50_200_000 },
57
+ { x: "9 月", y: 53_900_000 },
58
+ ],
59
+ },
60
+ {
61
+ label: "解約率",
62
+ value: 0.018,
63
+ format: { type: "percent", digits: 1 },
64
+ delta: { value: -0.003, format: { type: "number", digits: 1, unit: "pt", divisor: 0.01 } },
65
+ comparisonLabel: "前月比",
66
+ betterWhen: "down",
67
+ target: 0.02,
68
+ },
69
+ { label: "新規獲得", value: 38, format: { type: "number", unit: "社" }, delta: { value: -4 }, comparisonLabel: "前月比", target: 50 },
70
+ ]}
71
+ />
72
+ </Document>
73
+ ```
74
+
75
+ ## Notes
76
+
77
+ - For churn or cost, where a fall is good, set `betterWhen: "down"`. A missing value shows "—".
78
+ - Give `target` and the `y` of `trend` in the same unit as `value` (yen if `value` is yen). `target` is shown in the metric's `format`.
79
+ - The heading of the comparison column in the table is the `comparisonLabel` of the first metric that has one, or "前期比" if none does. There is only one column, so use `variant="grid"` to give each metric its own comparison name.
80
+ - When printed, the `table` keeps each row on one page and the `grid` keeps each tile on one page.
@@ -0,0 +1,43 @@
1
+ # DocNotesAndSources
2
+
3
+ > The end matter of a document — notes, definitions of terms and data sources.
4
+
5
+ The section to put last in a document. It prints numbered notes, definitions of terms and the data sources (with their as-of dates). A part with nothing in it is not drawn; with all three empty nothing renders.
6
+
7
+ ```tsx
8
+ import { DocNotesAndSources } from "@squadbase/vantage/doc";
9
+ import type { DocNotesAndSourcesProps, DocDefinition, DocSource } from "@squadbase/vantage/doc";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **one section placed directly under `<Document>`**. The document sets heading and body sizes and the width, so no dimensions are set here. Markdown strings are not parsed. For the whole page, see [Document](page-types/doc). The sub-headings ("注記", "用語の定義", "出典") and 「(データ時点 …)」 are fixed in Japanese.
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `title` | `string` | `"注記・出典"` | The section heading. |
20
+ | `headingLevel` | `2 \| 3` | `2` | Heading level: `2` directly under `<Document>`, `3` inside another section. The sub-headings go one level lower. |
21
+ | `notes` | `ReactNode[]` | | Notes, printed as a numbered list (provisional figures, exclusions). |
22
+ | `definitions` | `DocDefinition[]` | | Definitions of terms: `{ term: string; description: ReactNode }`. |
23
+ | `sources` | `DocSource[]` | | Data sources: `{ name: string; asOf?: string }`. `asOf` is a date only (e.g. `"2026-10-03"`), printed as 「(データ時点 2026-10-03)」. |
24
+
25
+ ## Usage
26
+
27
+ ```tsx
28
+ import { Document, DocNotesAndSources } from "@squadbase/vantage/doc";
29
+
30
+ <Document>
31
+ {/* …body sections… */}
32
+ <DocNotesAndSources
33
+ notes={["September figures are provisional; final values are posted on October 10.", "Refunds are excluded from revenue."]}
34
+ definitions={[{ term: "Churn rate", description: "Contracts cancelled in the month divided by contracts at the start of the month." }]}
35
+ sources={[{ name: "Contract DB", asOf: "2026-10-03" }, { name: "Accounting system" }]}
36
+ />
37
+ </Document>
38
+ ```
39
+
40
+ ## Notes
41
+
42
+ - Each part is kept together so it does not break across pages when printed.
43
+ - `asOf` is date only; the 「データ時点」 wording is added for you.