@squadbase/vantage 0.6.2-dev1.0017a4d → 0.6.2-dev1.02aab78
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/dist/{build-X5NVCQKT.js → build-YOPOGPQB.js} +7 -7
- package/dist/{build-X5NVCQKT.js.map → build-YOPOGPQB.js.map} +1 -1
- package/dist/{check-ZBIH422T.js → check-FBHT6W6J.js} +5 -5
- package/dist/{check-ZBIH422T.js.map → check-FBHT6W6J.js.map} +1 -1
- package/dist/{chunk-7DZGJQ3P.js → chunk-5C2SEDPH.js} +21 -4
- package/dist/chunk-5C2SEDPH.js.map +1 -0
- package/dist/chunk-6OTTGAPO.js +44 -0
- package/dist/chunk-6OTTGAPO.js.map +1 -0
- package/dist/{chunk-2ICNHUG6.js → chunk-7652CGJJ.js} +10 -3
- package/dist/{chunk-2ICNHUG6.js.map → chunk-7652CGJJ.js.map} +1 -1
- package/dist/{chunk-RU6WKEOG.js → chunk-QOXXOFGL.js} +7 -4
- package/dist/chunk-QOXXOFGL.js.map +1 -0
- package/dist/{chunk-WAMZWZJB.js → chunk-R6MTJAHX.js} +6 -6
- package/dist/chunk-R6MTJAHX.js.map +1 -0
- package/dist/{chunk-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
- package/dist/chunk-S5MDTHH7.js.map +1 -0
- package/dist/{chunk-JKLLFVEU.js → chunk-UWSQUHX6.js} +4 -99
- package/dist/chunk-UWSQUHX6.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/components/index.d.ts +8 -4
- package/dist/components/index.js +1 -1
- package/dist/delta-text-CvwBGJ95.d.ts +15 -0
- package/dist/{dev-4XEDTELV.js → dev-GUKQT6U6.js} +7 -7
- package/dist/{dev-4XEDTELV.js.map → dev-GUKQT6U6.js.map} +1 -1
- package/dist/doc/index.d.ts +22 -1
- package/dist/doc/index.js +45 -72
- package/dist/doc/index.js.map +1 -1
- package/dist/{doctor-5E2VEZPK.js → doctor-B2O3GJDU.js} +5 -5
- package/dist/{doctor-5E2VEZPK.js.map → doctor-B2O3GJDU.js.map} +1 -1
- package/dist/{routes-3SGAFDMC.js → routes-PVKNT777.js} +4 -4
- package/dist/{routes-3SGAFDMC.js.map → routes-PVKNT777.js.map} +1 -1
- package/dist/slide/index.d.ts +96 -1
- package/dist/slide/index.js +414 -297
- package/dist/slide/index.js.map +1 -1
- package/dist/table/index.js +1 -1
- package/dist/{upgrade-JHXZBGQS.js → upgrade-7ZXMCTTR.js} +4 -4
- package/dist/{upgrade-JHXZBGQS.js.map → upgrade-7ZXMCTTR.js.map} +1 -1
- package/dist/vite/index.js +3 -3
- package/docs/en/changelog.md +2 -0
- package/docs/en/components.md +4 -2
- package/docs/en/doc/delta-text.md +40 -0
- package/docs/en/doc/doc-notes-and-sources.md +43 -0
- package/docs/en/pages-and-metadata.md +15 -0
- package/docs/en/parts/delta.md +4 -3
- package/docs/en/parts/kpi-card.md +2 -1
- package/docs/en/slide/slide-chart-full.md +48 -0
- package/docs/en/slide/slide-columns.md +46 -0
- package/docs/en/slide/slide-comparison.md +68 -0
- package/docs/en/slide/slide-heading.md +38 -0
- package/docs/en/slide/slide-section.md +44 -0
- package/docs/en/slide/slide-source-line.md +34 -0
- package/docs/index.json +208 -48
- package/docs/ja/changelog.md +2 -0
- package/docs/ja/components.md +4 -2
- package/docs/ja/doc/delta-text.md +40 -0
- package/docs/ja/doc/doc-notes-and-sources.md +43 -0
- package/docs/ja/page-types/slide.md +1 -0
- package/docs/ja/pages-and-metadata.md +15 -0
- package/docs/ja/parts/delta.md +5 -4
- package/docs/ja/parts/kpi-card.md +2 -1
- package/docs/ja/slide/slide-chart-full.md +48 -0
- package/docs/ja/slide/slide-columns.md +46 -0
- package/docs/ja/slide/slide-comparison.md +68 -0
- package/docs/ja/slide/slide-heading.md +38 -0
- package/docs/ja/slide/slide-section.md +44 -0
- package/docs/ja/slide/slide-source-line.md +34 -0
- package/package.json +2 -2
- package/registry/ui/delta.tsx +7 -4
- package/registry/ui/kpi-card.tsx +9 -4
- package/skills/vantage-pitfalls/SKILL.md +5 -0
- package/skills/vantage-slide/SKILL.md +2 -2
- package/templates/AGENTS.md +4 -2
- package/templates/agents/doc.md +3 -0
- package/templates/agents/slide.md +16 -1
- package/theme.css +7 -4
- package/dist/chunk-7DZGJQ3P.js.map +0 -1
- package/dist/chunk-CEXAQQ5W.js.map +0 -1
- package/dist/chunk-JKLLFVEU.js.map +0 -1
- package/dist/chunk-RU6WKEOG.js.map +0 -1
- package/dist/chunk-WAMZWZJB.js.map +0 -1
package/dist/table/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FILE_PAGE_MAX_ROWS, FILE_PAGE_MAX_BYTES } from '../chunk-C2CX6GLX.js';
|
|
|
2
2
|
import { useQuery } from '../chunk-V3LF7BE7.js';
|
|
3
3
|
import '../chunk-XQUSGIDG.js';
|
|
4
4
|
import { Loading, ErrorState } from '../chunk-2N72FKLB.js';
|
|
5
|
-
import { PageShell, PageShellHeader, PageShellHeading, PageShellTitle, PageShellMeta, PageShellActions, PageShellContent } from '../chunk-
|
|
5
|
+
import { PageShell, PageShellHeader, PageShellHeading, PageShellTitle, PageShellMeta, PageShellActions, PageShellContent } from '../chunk-QOXXOFGL.js';
|
|
6
6
|
import '../chunk-JXFCSF3K.js';
|
|
7
7
|
import '../chunk-2IAPIOPS.js';
|
|
8
8
|
import '../chunk-57GHR5LN.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { syncAgentsFile } from './chunk-AABMKHEU.js';
|
|
2
|
-
import { generateArtifacts } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { generateArtifacts } from './chunk-R6MTJAHX.js';
|
|
3
|
+
import './chunk-S5MDTHH7.js';
|
|
4
4
|
import { scanProject } from './chunk-RNTDBX6S.js';
|
|
5
5
|
import { frameworkVersion, printJson, log } from './chunk-GNXCX4WE.js';
|
|
6
6
|
import './chunk-C2CX6GLX.js';
|
|
@@ -25,5 +25,5 @@ async function upgrade(root, args) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export { upgrade };
|
|
28
|
-
//# sourceMappingURL=upgrade-
|
|
29
|
-
//# sourceMappingURL=upgrade-
|
|
28
|
+
//# sourceMappingURL=upgrade-7ZXMCTTR.js.map
|
|
29
|
+
//# sourceMappingURL=upgrade-7ZXMCTTR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/upgrade.ts"],"names":[],"mappings":";;;;;;;;;;AAWA,eAAsB,OAAA,CAAQ,MAAc,IAAA,EAAmC;AAC7E,EAAA,MAAM,UAAU,gBAAA,EAAiB;AACjC,EAAA,MAAM,KAAA,GAAQ,YAAY,IAAI,CAAA;AAC9B,EAAA,iBAAA,CAAkB,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAKjC,EAAA,MAAM,MAAA,GAAS,eAAe,IAAI,CAAA;AAElC,EAAA,IAAI,IAAA,CAAK,MAAM,IAAA,EAAM;AACnB,IAAA,SAAA,CAAU,EAAE,EAAA,EAAI,IAAA,EAAM,OAAA,EAAS,UAAA,EAAY,EAAC,EAAG,WAAA,EAAa,IAAA,EAAM,YAAA,EAAc,MAAA,KAAW,SAAA,EAAW,CAAA;AACtG,IAAA,OAAO,CAAA;AAAA,EACT;AAEA,EAAA,GAAA,CAAI,KAAA,CAAM,CAAA,gBAAA,EAAc,OAAO,CAAA,CAAE,CAAA;AACjC,EAAA,GAAA,CAAI,GAAG,iCAAiC,CAAA;AACxC,EAAA,IAAI,MAAA,KAAW,SAAA,EAAW,GAAA,CAAI,EAAA,CAAG,kDAAkD,CAAA;AACnF,EAAA,GAAA,CAAI,KAAK,wDAAwD,CAAA;AACjE,EAAA,OAAO,CAAA;AACT","file":"upgrade-
|
|
1
|
+
{"version":3,"sources":["../src/cli/upgrade.ts"],"names":[],"mappings":";;;;;;;;;;AAWA,eAAsB,OAAA,CAAQ,MAAc,IAAA,EAAmC;AAC7E,EAAA,MAAM,UAAU,gBAAA,EAAiB;AACjC,EAAA,MAAM,KAAA,GAAQ,YAAY,IAAI,CAAA;AAC9B,EAAA,iBAAA,CAAkB,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAKjC,EAAA,MAAM,MAAA,GAAS,eAAe,IAAI,CAAA;AAElC,EAAA,IAAI,IAAA,CAAK,MAAM,IAAA,EAAM;AACnB,IAAA,SAAA,CAAU,EAAE,EAAA,EAAI,IAAA,EAAM,OAAA,EAAS,UAAA,EAAY,EAAC,EAAG,WAAA,EAAa,IAAA,EAAM,YAAA,EAAc,MAAA,KAAW,SAAA,EAAW,CAAA;AACtG,IAAA,OAAO,CAAA;AAAA,EACT;AAEA,EAAA,GAAA,CAAI,KAAA,CAAM,CAAA,gBAAA,EAAc,OAAO,CAAA,CAAE,CAAA;AACjC,EAAA,GAAA,CAAI,GAAG,iCAAiC,CAAA;AACxC,EAAA,IAAI,MAAA,KAAW,SAAA,EAAW,GAAA,CAAI,EAAA,CAAG,kDAAkD,CAAA;AACnF,EAAA,GAAA,CAAI,KAAK,wDAAwD,CAAA;AACjE,EAAA,OAAO,CAAA;AACT","file":"upgrade-7ZXMCTTR.js","sourcesContent":["import { generateArtifacts } from \"../core/generate\"\nimport { scanProject } from \"../core/scan\"\nimport { syncAgentsFile } from \"./add\"\nimport { frameworkVersion, log, printJson, type ParsedArgs } from \"./util\"\n\n/**\n * `vantage upgrade` — reconcile generated artifacts with the installed\n * framework version and apply any needed code transforms. v0.1 only\n * regenerates artifacts and re-syncs a managed AGENTS.md + agents/*.md; the\n * migration hook exists for future major versions.\n */\nexport async function upgrade(root: string, args: ParsedArgs): Promise<number> {\n const version = frameworkVersion()\n const model = scanProject(root)\n generateArtifacts({ root, model })\n\n // Keep an adopted AGENTS.md + agents/*.md (the app-author map and its\n // per-artifact-type knowledge files) in step with the framework's canonical\n // copies. No-op when the app never ran `vantage add agents`.\n const agents = syncAgentsFile(root)\n\n if (args.flags.json) {\n printJson({ ok: true, version, transforms: [], regenerated: true, agentsSynced: agents === \"updated\" })\n return 0\n }\n\n log.brand(`upgrade → v${version}`)\n log.ok(\"Regenerated .vantage artifacts.\")\n if (agents === \"updated\") log.ok(\"Synced AGENTS.md and agents/ from the framework.\")\n log.info(\"No breaking code transforms required for this version.\")\n return 0\n}\n"]}
|
package/dist/vite/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { vantagePlugin } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { vantagePlugin } from '../chunk-7652CGJJ.js';
|
|
2
|
+
import '../chunk-R6MTJAHX.js';
|
|
3
|
+
import '../chunk-S5MDTHH7.js';
|
|
4
4
|
import '../chunk-RNTDBX6S.js';
|
|
5
5
|
import '../chunk-46QI6GFC.js';
|
|
6
6
|
import '../chunk-B7LLBNLV.js';
|
package/docs/en/changelog.md
CHANGED
|
@@ -15,6 +15,8 @@ The dev server can now run behind a reverse proxy (2026-09-23).
|
|
|
15
15
|
|
|
16
16
|
### Added
|
|
17
17
|
|
|
18
|
+
- **App display language `lang`.** `export const lang = "ja"` (a literal) in the root `_layout.tsx` becomes `<html lang>`.
|
|
19
|
+
Japanese slides and docs no longer break mid-phrase, and the slide toolbar switches to Japanese. Unset stays `"en"`.
|
|
18
20
|
- **`--host [addr]` and `--allowed-hosts <list|true>`** on `vantage dev` / SPA `vantage preview`.
|
|
19
21
|
Vite rejects with 403 any request whose `Host` header is not `localhost`, so anything with
|
|
20
22
|
**another hostname in front of the server** — a sandbox preview proxy, a tunnel — could not reach
|
package/docs/en/components.md
CHANGED
|
@@ -154,8 +154,10 @@ over 10 MB to every build, so it is deliberately kept apart.
|
|
|
154
154
|
|
|
155
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
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)
|
|
158
|
-
- **
|
|
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)
|
|
159
161
|
|
|
160
162
|
## Putting it together
|
|
161
163
|
|
|
@@ -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,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.
|
|
@@ -60,6 +60,21 @@ No `navLabel` is set, so the nav shows the same string. To change it, **rename t
|
|
|
60
60
|
prefix it with `_` to stop it routing and render it from a `.tsx` page with `FilePageView`, where a
|
|
61
61
|
`definePage` of your own applies.
|
|
62
62
|
|
|
63
|
+
## App display language
|
|
64
|
+
|
|
65
|
+
Export `lang` as a literal from the root `_layout.tsx` and it becomes `<html lang>`.
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
// src/_layout.tsx
|
|
69
|
+
export const lang = "ja"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- The value is a BCP 47 language tag (`"ja"`, `"en"`, `"ja-JP"`, …). Variables and template interpolation are not read.
|
|
73
|
+
- Only the root `_layout.tsx` is read. A `lang` in a nested layout or a page is ignored.
|
|
74
|
+
- A missing or malformed value falls back to `"en"` (malformed values raise a diagnostic). Apps that specify nothing produce the same output as before.
|
|
75
|
+
- With `ja`, Japanese text in slides and doc pages no longer breaks mid-phrase (`word-break: auto-phrase`), and the slide toolbar messages switch to Japanese.
|
|
76
|
+
- In dev, editing `lang` reloads the page automatically.
|
|
77
|
+
|
|
63
78
|
## Relationship to Fast Refresh
|
|
64
79
|
|
|
65
80
|
Even with a non-component export like `page`, Vantage handles it internally so React Fast Refresh
|
package/docs/en/parts/delta.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Shows a change as one line: "↑ +12.4% 前期比". **Direction, rate, colour and wording are all computed
|
|
6
6
|
from `value` and `comparison`** and cannot be passed in, so the arrow and the colour can never disagree.
|
|
7
7
|
Colour is never the only signal — the arrow and the sign always accompany it. For metrics where a rise
|
|
8
|
-
is bad (churn, error rate), pass `
|
|
8
|
+
is bad (churn, error rate), pass `betterWhen="down"` (`polarity` is the older name and still works).
|
|
9
9
|
|
|
10
10
|
It replaces the deprecated [`TrendIndicator`](parts/trend-indicator).
|
|
11
11
|
|
|
@@ -18,7 +18,8 @@ import type { DeltaProps, Comparison, Polarity } from "@squadbase/vantage/compon
|
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| `value` | `number \| null \| undefined` | | The current value. **Required.** The previous one comes from `comparison`. |
|
|
20
20
|
| `comparison` | `Comparison` | | What the value is compared against. **Required**, so the change always carries its label. See below. |
|
|
21
|
-
| `
|
|
21
|
+
| `betterWhen` | `"up" \| "down"` | `"up"` | Which direction is good. Use `"down"` for metrics like churn. Wins over `polarity`. |
|
|
22
|
+
| `polarity` | `"higher-is-better" \| "lower-is-better" \| "neutral"` | `"higher-is-better"` | Deprecated: the older name of `betterWhen`. `"neutral"` (no good or bad colouring) is only available here. |
|
|
22
23
|
| `neutralBand` | `number` | `0.01` | Absolute ratio below which the change reads as flat. Default 1%. |
|
|
23
24
|
| `variant` | `"badge" \| "inline"` | `"badge"` | A bordered badge, or plain text for use inline. |
|
|
24
25
|
| `locale` | `string` | `"ja-JP"` | Locale for the percent. |
|
|
@@ -43,7 +44,7 @@ import type { DeltaProps, Comparison, Polarity } from "@squadbase/vantage/compon
|
|
|
43
44
|
<Delta value={1_240_000} comparison={{ previous: 1_103_000, vs: "prior-period" }} />
|
|
44
45
|
|
|
45
46
|
// A metric where down is good
|
|
46
|
-
<Delta value={0.021} comparison={{ previous: 0.026, vs: "prior-period" }}
|
|
47
|
+
<Delta value={0.021} comparison={{ previous: 0.026, vs: "prior-period" }} betterWhen="down" />
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
The colours come from the `--positive` / `--negative` / `--neutral` tokens. To show a KPI as a whole
|
|
@@ -20,7 +20,8 @@ import type { KpiCardProps, KpiCardSource, Comparison, Polarity, ValueFormat } f
|
|
|
20
20
|
| `format` | `ValueFormat` | `"compact"` | How the value is formatted (see the format / comparison page); also used for previous, target and remaining. |
|
|
21
21
|
| `locale` | `string` | `"ja-JP"` | The formatting locale. |
|
|
22
22
|
| `comparison` | `Comparison` | | What the value is compared against (`{ previous, vs, label? }`). Adds the change and the previous-actual line. |
|
|
23
|
-
| `
|
|
23
|
+
| `betterWhen` | `"up" \| "down"` | `"up"` | Which direction is good. Use `"down"` for metrics like churn. Wins over `polarity`. |
|
|
24
|
+
| `polarity` | `"higher-is-better" \| "lower-is-better" \| "neutral"` | `"higher-is-better"` | Deprecated: the older name of `betterWhen`. `"neutral"` (no good or bad colouring) is only available here. |
|
|
24
25
|
| `neutralBand` | `number` | `0.01` | Absolute ratio below which the change reads as flat. |
|
|
25
26
|
| `showPrevious` | `boolean` | `true` | Show the previous actual ("前期 400"). Needs `comparison`. |
|
|
26
27
|
| `summary` | `string` | | The conclusion sentence, as a **template** whose placeholders (below) the card fills. |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SlideChartFull
|
|
2
|
+
|
|
3
|
+
> One chart across all 12 columns, with a one-line note under it.
|
|
4
|
+
|
|
5
|
+
A slide that gives one chart the full width — for many categories or a long series. A one-line `note` under the chart can say how to read it or what to watch.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideChartFull } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideChartFullProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `chart` | `SlideChartInsightChart` | `{ type: "line" \| "bar" \| "area"; categories: string[]; series: { name: string; data: number[] }[] }`. **Required.** Same shape and rendering as `SlideChartInsight`. Two or more series show a legend. |
|
|
21
|
+
| `note` | `string` | One line under the chart: how to read it or what to watch. About 60 characters at most. |
|
|
22
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). Shown as 「2026-10-01 時点」; don't write 「時点」 yourself. |
|
|
23
|
+
| `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Slide, SlideChartFull } from "@squadbase/vantage/slide";
|
|
29
|
+
|
|
30
|
+
<Slide>
|
|
31
|
+
<SlideChartFull
|
|
32
|
+
title="Revenue hit a record high in September"
|
|
33
|
+
chart={{
|
|
34
|
+
type: "line",
|
|
35
|
+
categories: ["Apr", "May", "Jun", "Jul", "Aug", "Sep"],
|
|
36
|
+
series: [{ name: "Revenue (¥M)", data: [460, 480, 490, 500, 503, 540] }],
|
|
37
|
+
}}
|
|
38
|
+
note="September includes two large deals"
|
|
39
|
+
asOf="2026-10-01"
|
|
40
|
+
source="BI"
|
|
41
|
+
/>
|
|
42
|
+
</Slide>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- The chart is an `EChart` with no animation and no tooltip. The pptx export waits for it (`data-waitfor="canvas"`).
|
|
48
|
+
- To put reading points next to the chart, use `SlideChartInsight` instead.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# SlideColumns
|
|
2
|
+
|
|
3
|
+
> [Part] The 12-column layout of a slide's body — SlideColumns and SlideColumn.
|
|
4
|
+
|
|
5
|
+
The 12-column layout of one slide's body. `SlideColumns` lays out `SlideColumn`s, each taking `span` of the 12 columns (8 / 4, 6 / 6, 4 / 4 / 4, …). It is a **part** for the body row of the grid, not a whole-slide block.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideColumns, SlideColumn } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideColumnsProps, SlideColumnProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a slide part**, not a whole-slide block. Place it as a row in the 12-column grid inside a `<Slide>`; its root does not fill the canvas (100%×100%). All dimensions are fixed inside the part, so do not add your own. For how to build a deck, see [Slide](page-types/slide).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
### SlideColumns
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| `children` | `ReactNode` | | The `SlideColumn`s. **Required.** |
|
|
22
|
+
| `align` | `"start" \| "center" \| "stretch"` | `"stretch"` | Vertical alignment of the columns in the row. |
|
|
23
|
+
|
|
24
|
+
### SlideColumn
|
|
25
|
+
|
|
26
|
+
| Prop | Type | Description |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `span` | `number` | How many of the 12 columns it takes (1–12). **Required.** |
|
|
29
|
+
| `children` | `ReactNode` | The column's content. **Required.** |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { SlideColumns, SlideColumn } from "@squadbase/vantage/slide";
|
|
35
|
+
|
|
36
|
+
<SlideColumns align="center">
|
|
37
|
+
<SlideColumn span={8}>{/* chart */}</SlideColumn>
|
|
38
|
+
<SlideColumn span={4}>{/* reading */}</SlideColumn>
|
|
39
|
+
</SlideColumns>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
- The spans should add up to 12.
|
|
45
|
+
- The gap and the number of columns come from the slide spec.
|
|
46
|
+
- If a column's content must fill the column's height, set `height: "100%"` on that content.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# SlideComparison
|
|
2
|
+
|
|
3
|
+
> A vs B, or before and after — 2 to 3 columns side by side.
|
|
4
|
+
|
|
5
|
+
A slide that compares 2 to 3 columns side by side. Each column has a heading, one main number (with its change) and a few points; an optional `verdict` line sits underneath. The columns share the 12 columns equally (6 / 6 or 4 / 4 / 4).
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideComparison } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideComparisonProps, SlideComparisonColumn } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The conclusion as one sentence (an action title). **Required.** |
|
|
20
|
+
| `columns` | `SlideComparisonColumn[]` | 2 to 3 columns. **Required.** Each column is described below. |
|
|
21
|
+
| `verdict` | `string` | One line saying which side wins or what follows. |
|
|
22
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). Shown as 「2026-10-01 時点」; don't write 「時点」 yourself. |
|
|
23
|
+
| `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
|
|
24
|
+
|
|
25
|
+
### SlideComparisonColumn
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `heading` | `string` | | What the column is ("Old plan", "Before"). **Required.** |
|
|
30
|
+
| `points` | `string[]` | | Short points. **Required.** At most 3 per column, about 24 characters each. Write the same kind of point in each column, in the same order. |
|
|
31
|
+
| `value` | `number \| null` | | The main number. `null` shows 「—」. Formatted by `format`. |
|
|
32
|
+
| `format` | `ValueFormat` | | How to format the value (`"currency"`, `"percent"`, …). Also the default format of `delta`. |
|
|
33
|
+
| `display` | `string` | | A string you already formatted ("¥120M"). Wins over `value`. |
|
|
34
|
+
| `delta` | `{ value: number \| null; format?: ValueFormat }` | | The change of the main number itself (a ratio for `percent`). Its direction comes from the sign. Without `format`, the column's `format` is used. |
|
|
35
|
+
| `comparisonLabel` | `string` | | What `delta` is measured against (「前月比」, 「旧プラン比」). Printed muted before the change. |
|
|
36
|
+
| `betterWhen` | `"up" \| "down"` | `"up"` | Which direction of `delta` is good. Use `"down"` for churn and cost. |
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { Slide, SlideComparison } from "@squadbase/vantage/slide";
|
|
42
|
+
|
|
43
|
+
<Slide>
|
|
44
|
+
<SlideComparison
|
|
45
|
+
title="The new plan churns less than the old one"
|
|
46
|
+
columns={[
|
|
47
|
+
{ heading: "Old plan", value: 0.024, format: "percent", points: ["¥9,800 per month", "No onboarding support"] },
|
|
48
|
+
{
|
|
49
|
+
heading: "New plan",
|
|
50
|
+
value: 0.018,
|
|
51
|
+
format: "percent",
|
|
52
|
+
delta: { value: -0.006 },
|
|
53
|
+
comparisonLabel: "旧プラン比",
|
|
54
|
+
betterWhen: "down",
|
|
55
|
+
points: ["¥12,800 per month", "With onboarding support"],
|
|
56
|
+
},
|
|
57
|
+
]}
|
|
58
|
+
verdict="Onboarding support explains most of the gap"
|
|
59
|
+
asOf="2026-10-01"
|
|
60
|
+
source="BI"
|
|
61
|
+
/>
|
|
62
|
+
</Slide>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Notes
|
|
66
|
+
|
|
67
|
+
- Fewer than 2 or more than 3 columns, or too many or too long points, log a console warning. Split the slide.
|
|
68
|
+
- The change is drawn with `DeltaText` (▲ ▼ and 「増」/「減」). Polarity is set only by `betterWhen`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SlideHeading
|
|
2
|
+
|
|
3
|
+
> [Part] The title of one slide — an action title with an optional eyebrow.
|
|
4
|
+
|
|
5
|
+
The title of one slide: an `h2` at the page size, clamped to 2 lines, with an optional small label above it (`eyebrow`, e.g. the chapter). It is a **part** for the top row of a slide's 12-column grid, not a whole-slide block.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideHeading } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideHeadingProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a slide part**, not a whole-slide block. Place it as a row in the 12-column grid inside a `<Slide>`; its root does not fill the canvas (100%×100%). All dimensions are fixed inside the part, so do not add your own. For how to build a deck, see [Slide](page-types/slide).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The conclusion as one sentence (an action title). Clamped to 2 lines. **Required.** |
|
|
20
|
+
| `eyebrow` | `string` | A short label above the title ("Chapter 2: Churn"). |
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Slide, SlideHeading } from "@squadbase/vantage/slide";
|
|
26
|
+
|
|
27
|
+
<Slide>
|
|
28
|
+
<div style={{ display: "grid", gridTemplateColumns: "repeat(12, 1fr)" }}>
|
|
29
|
+
<SlideHeading title="Churn has fallen every month since June" eyebrow="Chapter 2: Churn" />
|
|
30
|
+
{/* …SlideColumns and so on… */}
|
|
31
|
+
</div>
|
|
32
|
+
</Slide>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- Write the title as the conclusion, not as a topic.
|
|
38
|
+
- It spans all 12 columns of the grid it sits in.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SlideSection
|
|
2
|
+
|
|
3
|
+
> A chapter divider — the chapter title, optionally with an agenda.
|
|
4
|
+
|
|
5
|
+
A slide that divides the deck into chapters. The chapter title sits on the left; with `items` the right side shows a numbered agenda with the `current` chapter emphasised.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideSection } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideSectionProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `title` | `string` | The chapter title. **Required.** |
|
|
20
|
+
| `index` | `number` | The chapter number, shown above the title as two digits ("02"). |
|
|
21
|
+
| `lead` | `string` | One line saying what the chapter answers. |
|
|
22
|
+
| `items` | `string[]` | The chapters of the deck, shown at the right as a numbered agenda. One line each, so about 6 at most. Without it the title takes the full width. |
|
|
23
|
+
| `current` | `number` | The chapter in `items` to emphasise (1-based). |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Slide, SlideSection } from "@squadbase/vantage/slide";
|
|
29
|
+
|
|
30
|
+
<Slide>
|
|
31
|
+
<SlideSection
|
|
32
|
+
index={2}
|
|
33
|
+
title="Churn trends"
|
|
34
|
+
lead="Which segments leave, and when"
|
|
35
|
+
items={["Overview", "Churn trends", "Drivers", "Next actions"]}
|
|
36
|
+
current={2}
|
|
37
|
+
/>
|
|
38
|
+
</Slide>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- It has no reveal steps. If you want one, wrap it yourself (for example in `Steps`).
|
|
44
|
+
- The agenda numbers are assigned from the order of `items`; `index` only controls the chapter number above the title.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# SlideSourceLine
|
|
2
|
+
|
|
3
|
+
> [Part] The footer line of one slide — as-of date, source and page number.
|
|
4
|
+
|
|
5
|
+
The footer line of one slide: the data's as-of date and source, and optionally the page number at the right. It is a **part** for the bottom row of a slide's 12-column grid, not a whole-slide block. It renders nothing when it has nothing to show.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { SlideSourceLine } from "@squadbase/vantage/slide";
|
|
9
|
+
import type { SlideSourceLineProps } from "@squadbase/vantage/slide";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This is **a slide part**, not a whole-slide block. Place it as a row in the 12-column grid inside a `<Slide>`; its root does not fill the canvas (100%×100%). All dimensions are fixed inside the part, so do not add your own. For how to build a deck, see [Slide](page-types/slide).
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-20"`). Shown as 「2026-10-20 時点」; don't write 「時点」 yourself. |
|
|
20
|
+
| `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
|
|
21
|
+
| `page` | `{ current: number; total: number }` | The page number, shown at the right as "3 / 12". Passed in by the caller. |
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { SlideSourceLine } from "@squadbase/vantage/slide";
|
|
27
|
+
|
|
28
|
+
<SlideSourceLine asOf="2026-10-20" source="BI" page={{ current: 3, total: 12 }} />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Notes
|
|
32
|
+
|
|
33
|
+
- The page number is passed through `page` because SquadKit cannot read the slide's position from the framework.
|
|
34
|
+
- 「… 時点」 and 「出典: …」 are fixed in Japanese.
|