@squadbase/vantage 0.5.3-dev.71d2349 → 0.6.0-dev.3cc6138
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/NOTICE +73 -0
- package/README.md +3 -3
- package/dist/add-S62E5MSP.js +6 -0
- package/dist/add-S62E5MSP.js.map +1 -0
- package/dist/{build-756WIEVI.js → build-XXKKX6KB.js} +10 -10
- package/dist/{build-756WIEVI.js.map → build-XXKKX6KB.js.map} +1 -1
- package/dist/{check-KZ5PHCA6.js → check-X2TDOILH.js} +8 -8
- package/dist/{check-KZ5PHCA6.js.map → check-X2TDOILH.js.map} +1 -1
- package/dist/{chunk-L3TW4FNA.js → chunk-46PPUW6Y.js} +34 -13
- package/dist/chunk-46PPUW6Y.js.map +1 -0
- package/dist/chunk-5ZOP4SQR.js +47 -0
- package/dist/chunk-5ZOP4SQR.js.map +1 -0
- package/dist/{chunk-BAM33YZ6.js → chunk-B45WAO5Q.js} +6 -5
- package/dist/chunk-B45WAO5Q.js.map +1 -0
- package/dist/{chunk-HQDEYCDP.js → chunk-CIJWVFJD.js} +3 -3
- package/dist/{chunk-HQDEYCDP.js.map → chunk-CIJWVFJD.js.map} +1 -1
- package/dist/chunk-FVWU275X.js +91 -0
- package/dist/chunk-FVWU275X.js.map +1 -0
- package/dist/{chunk-VXAV2435.js → chunk-KLEIVDUV.js} +30 -7
- package/dist/chunk-KLEIVDUV.js.map +1 -0
- package/dist/{chunk-RA6Z3OX3.js → chunk-LCN36MYX.js} +61 -9
- package/dist/chunk-LCN36MYX.js.map +1 -0
- package/dist/{chunk-JC6MT5UU.js → chunk-MXI3PZFT.js} +3 -3
- package/dist/{chunk-JC6MT5UU.js.map → chunk-MXI3PZFT.js.map} +1 -1
- package/dist/chunk-PLST5Q7T.js +2221 -0
- package/dist/chunk-PLST5Q7T.js.map +1 -0
- package/dist/chunk-PVTHHV7X.js +105 -0
- package/dist/chunk-PVTHHV7X.js.map +1 -0
- package/dist/{chunk-EHPJXDJU.js → chunk-SVNOWE5U.js} +4 -2
- package/dist/chunk-SVNOWE5U.js.map +1 -0
- package/dist/{chunk-C4MQRWXS.js → chunk-TDUIW7LD.js} +17 -3
- package/dist/chunk-TDUIW7LD.js.map +1 -0
- package/dist/{chunk-X44ZTKID.js → chunk-V2FV5OJ6.js} +61 -9
- package/dist/chunk-V2FV5OJ6.js.map +1 -0
- package/dist/{chunk-PSEYFYAP.js → chunk-VVOXG6ZU.js} +68 -8
- package/dist/chunk-VVOXG6ZU.js.map +1 -0
- package/dist/{chunk-D4Y5RWJA.js → chunk-YE4CPCXX.js} +81 -21
- package/dist/chunk-YE4CPCXX.js.map +1 -0
- package/dist/cli.js +15 -14
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +5 -35
- package/dist/client/index.js +1 -1
- package/dist/components/index.js +3 -2212
- package/dist/components/index.js.map +1 -1
- package/dist/{dev-EILX2VTF.js → dev-4MQQDHA4.js} +10 -10
- package/dist/{dev-EILX2VTF.js.map → dev-4MQQDHA4.js.map} +1 -1
- package/dist/{docs-GP2ZHIQF.js → docs-OTFWTCPW.js} +4 -4
- package/dist/{docs-GP2ZHIQF.js.map → docs-OTFWTCPW.js.map} +1 -1
- package/dist/{doctor-FXZLMGC3.js → doctor-QXA6DURZ.js} +8 -8
- package/dist/{doctor-FXZLMGC3.js.map → doctor-QXA6DURZ.js.map} +1 -1
- package/dist/manifest-ttGMFi-Z.d.ts +43 -0
- package/dist/{preview-WBQPCTTT.js → preview-HVOM27FS.js} +4 -4
- package/dist/{preview-WBQPCTTT.js.map → preview-HVOM27FS.js.map} +1 -1
- package/dist/query/index.js +1 -102
- package/dist/query/index.js.map +1 -1
- package/dist/router/index.d.ts +10 -0
- package/dist/router/index.js +2 -89
- package/dist/router/index.js.map +1 -1
- package/dist/{routes-WCN4KSZY.js → routes-2QRAKMGK.js} +17 -8
- package/dist/routes-2QRAKMGK.js.map +1 -0
- package/dist/{search-GLKCJXSI.js → search-7A43AZ7M.js} +4 -4
- package/dist/{search-GLKCJXSI.js.map → search-7A43AZ7M.js.map} +1 -1
- package/dist/server/node.d.ts +1 -1
- package/dist/server/node.js +6 -1
- package/dist/server/node.js.map +1 -1
- package/dist/slide/index.d.ts +230 -0
- package/dist/slide/index.js +1571 -0
- package/dist/slide/index.js.map +1 -0
- package/dist/table/index.d.ts +107 -0
- package/dist/table/index.js +680 -0
- package/dist/table/index.js.map +1 -0
- package/dist/types-DQjLpLCs.d.ts +121 -0
- package/dist/ui/index.js +3 -41
- package/dist/ui/index.js.map +1 -1
- package/dist/{upgrade-S64IXL42.js → upgrade-2QCP7UQQ.js} +9 -9
- package/dist/upgrade-2QCP7UQQ.js.map +1 -0
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +5 -5
- package/docs/en/agent-skills.md +19 -12
- package/docs/en/changelog.md +77 -0
- package/docs/en/cli-reference.md +8 -4
- package/docs/en/pages-and-metadata.md +17 -0
- package/docs/en/routing.md +75 -3
- package/docs/en/ui-and-theming.md +76 -0
- package/docs/index.json +2 -2
- package/docs/ja/agent-skills.md +18 -11
- package/docs/ja/changelog.md +75 -0
- package/docs/ja/cli-reference.md +8 -4
- package/docs/ja/pages-and-metadata.md +17 -0
- package/docs/ja/routing.md +71 -3
- package/docs/ja/ui-and-theming.md +74 -0
- package/package.json +17 -3
- package/skills/vantage-app/SKILL.md +4 -0
- package/skills/vantage-pitfalls/SKILL.md +41 -1
- package/skills/vantage-slide/SKILL.md +264 -0
- package/skills/vantage-slide/references/morph.md +102 -0
- package/skills/vantage-slide/references/steps.md +57 -0
- package/skills/vantage-slide/references/tokens.md +87 -0
- package/skills/vantage-slide/references/transitions.md +196 -0
- package/templates/AGENTS.md +28 -230
- package/templates/agents/api.md +49 -0
- package/templates/agents/csv.md +32 -0
- package/templates/agents/page.md +185 -0
- package/templates/agents/slide.md +34 -0
- package/templates/agents/xlsx.md +33 -0
- package/theme.css +28 -0
- package/dist/add-PPCBMWEN.js +0 -6
- package/dist/add-PPCBMWEN.js.map +0 -1
- package/dist/chunk-BAM33YZ6.js.map +0 -1
- package/dist/chunk-C4MQRWXS.js.map +0 -1
- package/dist/chunk-D4Y5RWJA.js.map +0 -1
- package/dist/chunk-EHPJXDJU.js.map +0 -1
- package/dist/chunk-L3TW4FNA.js.map +0 -1
- package/dist/chunk-PSEYFYAP.js.map +0 -1
- package/dist/chunk-RA6Z3OX3.js.map +0 -1
- package/dist/chunk-VXAV2435.js.map +0 -1
- package/dist/chunk-X44ZTKID.js.map +0 -1
- package/dist/routes-WCN4KSZY.js.map +0 -1
- package/dist/types-De3mo_hv.d.ts +0 -59
- package/dist/upgrade-S64IXL42.js.map +0 -1
package/docs/en/agent-skills.md
CHANGED
|
@@ -14,6 +14,7 @@ All of these target an agent that is **building a Vantage app**.
|
|
|
14
14
|
|---|---|
|
|
15
15
|
| `vantage-app` | Creating an app, and growing a single-file `index.tsx` SPA into a fullstack app with `server/api`, nested layouts, dynamic routes, and 404/error pages |
|
|
16
16
|
| `vantage-add-feature` | Adding a page / API / UI / block (`vantage add` through to `check` / `routes`) |
|
|
17
|
+
| `vantage-slide` | Writing a slide deck in `.slide.tsx` (the 1920×1080 canvas's vertical budget, the type scale, stepped reveals, transitions and morph, what a pptx export needs) |
|
|
17
18
|
| `vantage-pitfalls` | A pitfalls reference (Base UI ≠ Radix, `SelectValue` behavior, never importing `server/` from the client, and more) |
|
|
18
19
|
| `project-storage` | Working with Squadbase Project Storage (uploaded files) from the browser — listing, embedding images / video / PDFs, uploading. For apps running on Squadbase |
|
|
19
20
|
|
|
@@ -42,6 +43,7 @@ Bundled skills:
|
|
|
42
43
|
vantage-add-feature .claude/skills/vantage-add-feature/
|
|
43
44
|
vantage-app .claude/skills/vantage-app/
|
|
44
45
|
vantage-pitfalls not placed
|
|
46
|
+
vantage-slide not placed
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
With `--force`, the copies that were found are rewritten **where they are** (an explicit `--dir`
|
|
@@ -59,6 +61,7 @@ your-app/
|
|
|
59
61
|
├── vantage-app/SKILL.md
|
|
60
62
|
├── vantage-add-feature/SKILL.md
|
|
61
63
|
├── vantage-pitfalls/SKILL.md
|
|
64
|
+
├── vantage-slide/SKILL.md (its references/ ride along)
|
|
62
65
|
└── project-storage/SKILL.md
|
|
63
66
|
```
|
|
64
67
|
|
|
@@ -79,25 +82,28 @@ skill based on the task at hand. For other agents, pass whatever directory that
|
|
|
79
82
|
- **The Squadbase template ships them pre-placed.** Apps created from the template already contain
|
|
80
83
|
`.claude/skills/`. For a hand-made app, add them with `vantage add skill`.
|
|
81
84
|
|
|
82
|
-
## `AGENTS.md` (the app map)
|
|
85
|
+
## `AGENTS.md` + `agents/*.md` (the app map and knowledge files)
|
|
83
86
|
|
|
84
87
|
If a skill is a procedure, `AGENTS.md` is **the map an agent reads first**. It gathers Vantage's
|
|
85
|
-
invariants, the import-subpath map,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
invariants, the import-subpath map, directory layout, and env conventions onto a single page, and
|
|
89
|
+
points into `agents/` via a "what are you writing → which file to read" table.
|
|
90
|
+
`agents/page.md` (regular pages), `agents/api.md` (`server/`), `agents/slide.md`
|
|
91
|
+
(`.slide.tsx`), `agents/xlsx.md`, and `agents/csv.md` are static, per-artifact-type references —
|
|
92
|
+
each is only needed when writing that kind of file. Deeper procedures are delegated to the skills
|
|
93
|
+
above by name, so nothing is duplicated.
|
|
88
94
|
|
|
89
|
-
Like the skills, its **source of truth lives in the package**, and `vantage add agents` places
|
|
90
|
-
into the app root.
|
|
95
|
+
Like the skills, its **source of truth lives in the package**, and `vantage add agents` places
|
|
96
|
+
`AGENTS.md` together with `agents/*.md` into the app root.
|
|
91
97
|
|
|
92
98
|
```bash
|
|
93
|
-
vantage add agents # place AGENTS.md into the app root
|
|
99
|
+
vantage add agents # place AGENTS.md + agents/*.md into the app root
|
|
94
100
|
vantage add agents --force # overwrite an existing copy
|
|
95
101
|
```
|
|
96
102
|
|
|
97
|
-
A placed `AGENTS.md`
|
|
98
|
-
differs, and never creates
|
|
99
|
-
changes, a
|
|
100
|
-
ships
|
|
103
|
+
A placed `AGENTS.md` + `agents/*.md` are kept in sync by `vantage upgrade` (it rewrites only the
|
|
104
|
+
files whose content differs, and never creates them in an app that hasn't opted in). When a
|
|
105
|
+
framework convention changes, a source-of-truth edit reaches apps through `upgrade`. The Squadbase
|
|
106
|
+
template ships them pre-placed.
|
|
101
107
|
|
|
102
108
|
## Separation of concerns
|
|
103
109
|
|
|
@@ -108,6 +114,7 @@ the following:
|
|
|
108
114
|
An agent without a browser reads the same content through [`vantage docs`](cli-reference)
|
|
109
115
|
(`vantage docs button` for the prop table, `vantage docs --json` for machine-readable output,
|
|
110
116
|
`vantage search <what you want>` when the name is unknown).
|
|
111
|
-
- **`AGENTS.md`** (a static map) — where things live and how the project is laid out; placed
|
|
117
|
+
- **`AGENTS.md`** (a static map) — where things live and how the project is laid out; placed
|
|
118
|
+
together with `agents/*.md` (static, per-artifact-type references) via `vantage add agents`.
|
|
112
119
|
- **Each other** — shared material like pitfalls is not copied into every skill; skills
|
|
113
120
|
**cross-reference by name** instead (e.g. `vantage-app`'s procedure points at `vantage-pitfalls`).
|
package/docs/en/changelog.md
CHANGED
|
@@ -9,6 +9,83 @@ What changed in each Vantage release. Newest is on top.
|
|
|
9
9
|
> minor release may include backwards-incompatible changes. A patch is limited to
|
|
10
10
|
> backwards-compatible additions and bug fixes.
|
|
11
11
|
|
|
12
|
+
## v0.6.0
|
|
13
|
+
|
|
14
|
+
What you can drop in `src/` is no longer just `.tsx`. A `.csv` or `.xlsx` becomes a page you can
|
|
15
|
+
read as a table, and `<name>.slide.tsx` becomes a slide deck — both sitting in the nav alongside
|
|
16
|
+
your dashboard pages.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`.csv` / `.xlsx` become pages.** Drop `src/data/june.xlsx`, open `/data/june`, and the sheet
|
|
21
|
+
is readable in the browser — no download, no spreadsheet app. URLs are built exactly the way a
|
|
22
|
+
`.tsx` page's are (`index.csv` maps to its directory), and the page appears in `vantage routes`
|
|
23
|
+
and in a `useRoutes()` nav alongside everything else. An `.xlsx` with several sheets gets tabs,
|
|
24
|
+
and every file page offers the original file for download.
|
|
25
|
+
|
|
26
|
+
The title is derived from the file name (`june.xlsx` → "June"). Parsing happens in the browser,
|
|
27
|
+
so dev, the build output and the deployed app all return the same thing for the same URL.
|
|
28
|
+
Formulas, charts and cell formatting are not reproduced — readable as values is the contract.
|
|
29
|
+
Prefix a file with `_` to keep it out of routing.
|
|
30
|
+
|
|
31
|
+
It is drawn **as a spreadsheet**: column letters across the top, row numbers down the side, the
|
|
32
|
+
file's first row frozen as the header, sheet tabs along the bottom, and ruling that runs past
|
|
33
|
+
the data. Read-only — no toolbar and no sorting (a selected cell copies with `Cmd/Ctrl+C`).
|
|
34
|
+
|
|
35
|
+
- **A new `@squadbase/vantage/table` subpath.** The table viewer behind those pages. Use
|
|
36
|
+
`FilePageView` directly to render a file you kept out of routing from a page of your own, with
|
|
37
|
+
your own `definePage` (`TableViewer` takes one parsed sheet, `SheetGrid` is the grid itself).
|
|
38
|
+
|
|
39
|
+
- **`<name>.slide.tsx` becomes a slide deck.** `.slide` is a page-kind suffix and never reaches the
|
|
40
|
+
URL (`src/june.slide.tsx` → `/june`). The file is an ordinary React component returning a
|
|
41
|
+
`<SlideDeck>`, so `definePage` and the nav work as they do for any other page.
|
|
42
|
+
|
|
43
|
+
Slides are authored against a fixed 1920×1080 canvas in absolute pixels and scaled to fit.
|
|
44
|
+
Keyboard and click navigate, the current slide lives in the URL as `?p=`, and the toolbar
|
|
45
|
+
**exports the deck as a pptx**. The export bakes each slide as an image, so the file needs no
|
|
46
|
+
font on the receiving machine and non-Latin text survives intact.
|
|
47
|
+
|
|
48
|
+
A reader picks one of three views: **list + slide** (the default, a thumbnail rail down the
|
|
49
|
+
left), **the slide alone** (`L` closes the rail), and **fullscreen** (`F`, where the rail steps
|
|
50
|
+
aside). The rail's state rides in `?rail=`, so a link can hand someone either one; only a deck
|
|
51
|
+
that should start closed says so, with `<SlideDeck rail={false}>`.
|
|
52
|
+
|
|
53
|
+
- **A new `@squadbase/vantage/slide` subpath.** `SlideDeck`, `Slide`, `Steps`, `Step`,
|
|
54
|
+
`MorphElement`, `useSlideNumber`, `useIsActiveSlide` — including stepped reveals, page
|
|
55
|
+
transitions, and morphing a shared element across two slides (Keynote's "Magic Move"). The
|
|
56
|
+
runtime is ported from [open-slide](https://github.com/1weiho/open-slide) (MIT); attribution
|
|
57
|
+
ships in the package's `NOTICE`.
|
|
58
|
+
|
|
59
|
+
- **A `vantage-slide` skill now ships with Vantage.** How to budget the canvas vertically, the type
|
|
60
|
+
scale, stepped reveals, the design principles behind transitions, the rules morph rests on, and
|
|
61
|
+
what breaks a pptx export. Place it like any other skill with `vantage add skill --all`.
|
|
62
|
+
|
|
63
|
+
- **New `--slide-*` theme tokens.** They default to aliases of the app's own tokens, so a deck
|
|
64
|
+
follows light and dark without doing anything. Override them per deck with
|
|
65
|
+
`<SlideDeck theme={{ … }}>`.
|
|
66
|
+
|
|
67
|
+
- **Three more static diagnostics** (eleven in total: seven errors, four warnings).
|
|
68
|
+
`UNSUPPORTED_PAGE_FILE` (warning — an extension with no viewer never becomes a route, so this is
|
|
69
|
+
what tells you why the file never showed up), `FILE_PAGE_TOO_LARGE` (warning — over 25 MB), and
|
|
70
|
+
`INVALID_PAGE_VARIANT` (error — a suffix on a file that cannot be a route, like
|
|
71
|
+
`_layout.slide.tsx`).
|
|
72
|
+
|
|
73
|
+
- **`AGENTS.md` is now a map, plus `agents/*.md` per-artifact-type knowledge files.** One file
|
|
74
|
+
each for regular pages, API, slides, xlsx, and csv (`agents/page.md` / `agents/api.md` /
|
|
75
|
+
`agents/slide.md` / `agents/xlsx.md` / `agents/csv.md`); `AGENTS.md` keeps only the
|
|
76
|
+
invariants and a "what are you writing → which file to read" index table. An agent only needs
|
|
77
|
+
to open the one file for the kind it's about to write. `vantage add agents` places the whole
|
|
78
|
+
set (`AGENTS.md` + `agents/`) into the app root, and `vantage upgrade` re-syncs it (files not
|
|
79
|
+
in the bundle are never deleted).
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
- The `RouteInfo` returned by `useRoutes()` gained **`kind`** (`"module"` | `"file"`) and
|
|
84
|
+
**`variant`** (`"slide"`), so a nav can group or badge by what a page is. Existing nav code keeps
|
|
85
|
+
working unchanged.
|
|
86
|
+
- `vantage routes` now labels file pages and slide decks by kind (`--json` gains `kind`, `variant`
|
|
87
|
+
and `unrouted`).
|
|
88
|
+
|
|
12
89
|
## v0.5.3
|
|
13
90
|
|
|
14
91
|
Adds a bundled skill for working with Squadbase Project Storage from the browser.
|
package/docs/en/cli-reference.md
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
| `vantage preview` | Run the production build locally (fullstack default `:4173`; spa via Vite preview) |
|
|
14
14
|
| `vantage check` | Static checks (routes, boundaries, forbidden files). Exit 1 on error |
|
|
15
15
|
| `vantage routes` | Print the page + API URL map (`--pages` / `--apis` for one side only, `--detail` for each route's spec) |
|
|
16
|
-
| `vantage add <kind> <name>` | Scaffold or place a `page` / `api` / `ui` / `block` / `skill` / `agents` (`--force` to overwrite; `skill` scans for copies already placed and skips them, `--dir` picks the destination) |
|
|
16
|
+
| `vantage add <kind> <name>` | Scaffold or place a `page` / `api` / `ui` / `block` / `skill` / `agents` (`AGENTS.md` + `agents/*.md`) (`--force` to overwrite; `skill` scans for copies already placed and skips them, `--dir` picks the destination) |
|
|
17
17
|
| `vantage docs [name]` | Show the bundled guide and component reference |
|
|
18
18
|
| `vantage search <query>` | Search that same reference in full text (natural language or `--regex`) |
|
|
19
19
|
| `vantage doctor` | Diagnose environment / installation health |
|
|
20
|
-
| `vantage upgrade` | Regenerate artifacts and sync a placed `AGENTS.md` from the canonical
|
|
20
|
+
| `vantage upgrade` | Regenerate artifacts and sync a placed `AGENTS.md` + `agents/*.md` from the canonical copies |
|
|
21
21
|
|
|
22
22
|
## Quick mode (pass a path directly)
|
|
23
23
|
|
|
@@ -418,7 +418,7 @@ phases are `scan` (route discovery), `diagnostics` (the static checks),
|
|
|
418
418
|
|
|
419
419
|
## Static diagnostics (`check`)
|
|
420
420
|
|
|
421
|
-
`vantage check` detects these
|
|
421
|
+
`vantage check` detects these eleven diagnostics (seven errors, four warnings).
|
|
422
422
|
|
|
423
423
|
| Code | Severity | Meaning |
|
|
424
424
|
|---|---|---|
|
|
@@ -428,8 +428,11 @@ phases are `scan` (route discovery), `diagnostics` (the static checks),
|
|
|
428
428
|
| `MISSING_DEFAULT_EXPORT` | error | A page has no default export |
|
|
429
429
|
| `INVALID_API_EXPORT` | error | An API exports no valid HTTP method |
|
|
430
430
|
| `CLIENT_IMPORTS_SERVER` | error | Client code imports from `server/` |
|
|
431
|
+
| `INVALID_PAGE_VARIANT` | error | A page-kind suffix such as `.slide` sits on a file that cannot be a route (`_layout.slide.tsx`, …) |
|
|
431
432
|
| `SUSPICIOUS_ROUTE_DIR` | warning | A scaffolding-looking directory (`pages/`, `app/`, `utils/`, …) shows up in a URL |
|
|
432
433
|
| `PUBLIC_ENV_MISUSE` | warning | Client reads a non-`PUBLIC_` env variable |
|
|
434
|
+
| `UNSUPPORTED_PAGE_FILE` | warning | A file with an extension Vantage has no viewer for (`.xls`, `.ods`, …); it does not become a route |
|
|
435
|
+
| `FILE_PAGE_TOO_LARGE` | warning | A data-file page is over 25 MB, so it will render an error instead of a table |
|
|
433
436
|
|
|
434
437
|
None of them import or run your code — the checks are purely static.
|
|
435
438
|
|
|
@@ -454,4 +457,5 @@ That's the end of the app-author guide. Start from the smallest `index.tsx` and
|
|
|
454
457
|
UI as you need them.
|
|
455
458
|
|
|
456
459
|
To hand those procedures to an AI agent, place the bundled [Agents and Skills](agent-skills)
|
|
457
|
-
with `vantage add skill`, and place the app map `AGENTS.md`
|
|
460
|
+
with `vantage add skill`, and place the app map `AGENTS.md` plus its per-artifact-type
|
|
461
|
+
knowledge files `agents/*.md` with `vantage add agents`.
|
|
@@ -43,6 +43,23 @@ export default function MonthlyAnalysis() {
|
|
|
43
43
|
> The **export name must be `page`** in `export const page = definePage({...})`. A different name means
|
|
44
44
|
> the metadata is not read.
|
|
45
45
|
|
|
46
|
+
## Titles for data-file pages
|
|
47
|
+
|
|
48
|
+
A `.csv` / `.xlsx` [file page](routing#pages-that-are-not-tsx) cannot carry a `definePage`, so
|
|
49
|
+
its title is **derived from the file name**.
|
|
50
|
+
|
|
51
|
+
| File | `title` |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `june.xlsx` | `June` |
|
|
54
|
+
| `sales_by_region.csv` | `Sales By Region` |
|
|
55
|
+
| `salesByRegion.csv` | `Sales By Region` |
|
|
56
|
+
| `kpi/index.csv` | `KPI` (`index` borrows its directory; an all-caps token is kept as an acronym) |
|
|
57
|
+
| `index.csv` at the root | none — same as a root `index.tsx` with no `definePage` |
|
|
58
|
+
|
|
59
|
+
No `navLabel` is set, so the nav shows the same string. To change it, **rename the file** — or
|
|
60
|
+
prefix it with `_` to stop it routing and render it from a `.tsx` page with `FilePageView`, where a
|
|
61
|
+
`definePage` of your own applies.
|
|
62
|
+
|
|
46
63
|
## Relationship to Fast Refresh
|
|
47
64
|
|
|
48
65
|
Even with a non-component export like `page`, Vantage handles it internally so React Fast Refresh
|
package/docs/en/routing.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File-based routing
|
|
2
2
|
|
|
3
|
-
> Dropping a file creates a route. Conventions for pages, layouts, dynamic params
|
|
3
|
+
> Dropping a file creates a route. Conventions for pages, layouts, dynamic params and 404/error, plus the pages that are not .tsx (csv / xlsx / slides).
|
|
4
4
|
|
|
5
5
|
In Vantage, **where you place a file is its URL**. You never configure a router.
|
|
6
6
|
|
|
@@ -36,11 +36,79 @@ The "File" column below is relative to the page-scan root above.
|
|
|
36
36
|
| `_layout.tsx` | Layout for that directory (nestable) |
|
|
37
37
|
| `_404.tsx` | Not-found UI (**root only**) |
|
|
38
38
|
| `_error.tsx` | Error UI (**root only**) |
|
|
39
|
+
| `monthly-report.slide.tsx` | `/monthly-report` (a slide deck) |
|
|
40
|
+
| `sales-export.csv` | `/sales-export` (drawn as a table) |
|
|
41
|
+
| `data/june.xlsx` | `/data/june` (same) |
|
|
39
42
|
|
|
40
43
|
- `[name]` → dynamic param, `[...name]` → catchall.
|
|
41
44
|
- `index` maps to its own directory (the name drops from the URL).
|
|
42
45
|
- Files starting with `_` are reserved (`_layout`/`_404`/`_error`) or private (not routed).
|
|
43
46
|
|
|
47
|
+
## Pages that are not `.tsx`
|
|
48
|
+
|
|
49
|
+
Routes do not come only from `.tsx` / `.jsx`. **`.csv` and `.xlsx`** become pages you can read as a
|
|
50
|
+
table, and **`<name>.slide.tsx`** becomes a slide deck. Both build their URL exactly the way a
|
|
51
|
+
`.tsx` page does, and both appear in `vantage routes` and in a `useRoutes()` nav alongside it.
|
|
52
|
+
|
|
53
|
+
### Data files (`.csv` / `.xlsx`)
|
|
54
|
+
|
|
55
|
+
Drop `src/data/june.xlsx`, open `/data/june`, and the sheet is readable in the browser — no
|
|
56
|
+
download, no spreadsheet app. An `.xlsx` with several sheets gets tabs, and every file page offers
|
|
57
|
+
the original file for download.
|
|
58
|
+
|
|
59
|
+
It is drawn **as a spreadsheet** — column letters across the top, row numbers down the side, the
|
|
60
|
+
file's first row frozen as the header, ruling that runs past the data, and sheet tabs along the
|
|
61
|
+
bottom. It is read-only: no editing and no sorting (though a selected cell copies with
|
|
62
|
+
`Cmd/Ctrl+C`). Data that needs sorting or filtering belongs behind `server/api/`, rendered with
|
|
63
|
+
`DataTable`.
|
|
64
|
+
|
|
65
|
+
- **The title is derived from the file name** (`june.xlsx` → "June"; `index.csv` borrows its
|
|
66
|
+
directory). A data file cannot carry a `definePage`, so renaming the file is how you rename
|
|
67
|
+
the page.
|
|
68
|
+
- **Parsing happens in the browser.** Dev, the build output and the deployed app all run the same
|
|
69
|
+
code over the same bytes, which is what makes the same URL return the same thing. A file over
|
|
70
|
+
25 MB shows an error on its own page (`vantage check` warns first, with `FILE_PAGE_TOO_LARGE`).
|
|
71
|
+
- Formulas, charts and cell formatting are not reproduced. **Readable as values** is the contract.
|
|
72
|
+
- Prefix a file with `_` to keep it out of routing (`_june.xlsx`). That is also how you render one
|
|
73
|
+
yourself: stop it routing, then use `FilePageView` from `@squadbase/vantage/table`.
|
|
74
|
+
|
|
75
|
+
> [!WARNING]
|
|
76
|
+
> **An extension with no viewer does not become a route.** Dropping `.xls`, `.ods` or `.tsv` does not
|
|
77
|
+
> even produce a 404 — the file appears in neither the nav nor `vantage routes`. The
|
|
78
|
+
> `UNSUPPORTED_PAGE_FILE` warning from `vantage check` is the only place that says so.
|
|
79
|
+
|
|
80
|
+
### Slides (`.slide.tsx`)
|
|
81
|
+
|
|
82
|
+
`.slide` is a **page-kind suffix** and never reaches the URL (`src/june.slide.tsx` → `/june`). The
|
|
83
|
+
file itself is an ordinary React component returning a `<SlideDeck>`, so `definePage` and the nav
|
|
84
|
+
work exactly as they do for any other page.
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import { definePage } from "@squadbase/vantage";
|
|
88
|
+
import { Slide, SlideDeck } from "@squadbase/vantage/slide";
|
|
89
|
+
|
|
90
|
+
export const page = definePage({ title: "June review", navLabel: "June" });
|
|
91
|
+
|
|
92
|
+
export default function Deck() {
|
|
93
|
+
return (
|
|
94
|
+
<SlideDeck>
|
|
95
|
+
<Slide>…</Slide>
|
|
96
|
+
<Slide>…</Slide>
|
|
97
|
+
</SlideDeck>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Slides are authored against a fixed 1920×1080 canvas and scaled to fit. Keyboard and click
|
|
103
|
+
navigate, `L` toggles the slide list beside it, `F` goes fullscreen, and the toolbar exports the
|
|
104
|
+
deck as a pptx. See
|
|
105
|
+
[UI & theming](ui-and-theming).
|
|
106
|
+
|
|
107
|
+
> [!WARNING]
|
|
108
|
+
> Only a page module that becomes a route may carry `.slide`. `_layout.slide.tsx` and
|
|
109
|
+
> `deck.slide.ts` raise `INVALID_PAGE_VARIANT`. And since `june.slide.tsx` and `june.tsx` — like
|
|
110
|
+
> `sales.csv` and `sales.tsx` — resolve to the same URL, having both is a `ROUTE_CONFLICT`.
|
|
111
|
+
|
|
44
112
|
## Directories that are never routed
|
|
45
113
|
|
|
46
114
|
These directories are never scanned, at any depth. Put whatever code you like here.
|
|
@@ -150,6 +218,8 @@ Each entry is a `RouteInfo`:
|
|
|
150
218
|
| `index` | `boolean` | Whether it is a directory's index route |
|
|
151
219
|
| `label` | `string` | Display name: `navLabel`, else `title`, else `path` |
|
|
152
220
|
| `title` / `description` / `navLabel` | `string \| undefined` | Values from [`definePage`](pages-and-metadata) |
|
|
221
|
+
| `kind` | `"module" \| "file"` | What the page is drawn from; `"file"` is a `.csv` / `.xlsx` |
|
|
222
|
+
| `variant` | `"slide" \| undefined` | The page-kind suffix the file carried |
|
|
153
223
|
|
|
154
224
|
`useCurrentRoute()` returns the route being rendered, or `undefined` on the 404 route. Beyond the
|
|
155
225
|
"you are here" check above, it fits breadcrumbs and page headings.
|
|
@@ -191,8 +261,10 @@ setSegments((prev) => [...prev, "enterprise"]);
|
|
|
191
261
|
|
|
192
262
|
## HMR and route regeneration
|
|
193
263
|
|
|
194
|
-
Adding or removing a `.tsx` page or a `server/api` file regenerates routes and triggers
|
|
195
|
-
reload. Editing a page body applies in place via React Fast Refresh.
|
|
264
|
+
Adding or removing a `.tsx` page, a data file or a `server/api` file regenerates routes and triggers
|
|
265
|
+
a full reload. Editing a page body applies in place via React Fast Refresh. Editing the *contents*
|
|
266
|
+
of a `.csv` / `.xlsx` also triggers a full reload — it is fetched at runtime from a fixed URL, so
|
|
267
|
+
nothing in the module graph changes when its bytes do.
|
|
196
268
|
|
|
197
269
|
## What to read next
|
|
198
270
|
|
|
@@ -40,6 +40,82 @@ In `/components` (a selection): `PageShell`, `AppShell`, `DashboardCard`, `DataT
|
|
|
40
40
|
|
|
41
41
|
Props and usage for every component live in the [Components](components) tab.
|
|
42
42
|
|
|
43
|
+
## UI behind its own subpath
|
|
44
|
+
|
|
45
|
+
Three pieces carry heavy dependencies, so they live behind their own subpath and only reach the
|
|
46
|
+
apps that import them.
|
|
47
|
+
|
|
48
|
+
| Subpath | What it holds |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `@squadbase/vantage/markdown` | `MarkdownRenderer` (isolated because Shiki pulls in every language grammar) |
|
|
51
|
+
| `@squadbase/vantage/table` | `TableViewer` / `FilePageView` (the csv/xlsx parsers, loaded dynamically) |
|
|
52
|
+
| `@squadbase/vantage/slide` | The slide primitives (pptx export, loaded dynamically) |
|
|
53
|
+
|
|
54
|
+
Re-exporting them from the `/components` barrel would put an import edge on every app that only
|
|
55
|
+
wanted `DataTable`, and a bundler cannot drop that.
|
|
56
|
+
|
|
57
|
+
### The table viewer (`/table`)
|
|
58
|
+
|
|
59
|
+
A `.csv` or `.xlsx` under `src/` [becomes a page on its own](routing). Reach for this directly
|
|
60
|
+
only when you want to set the title yourself, or embed a table inside a dashboard page.
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { FilePageView, TableViewer, SheetGrid, loadWorkbook } from "@squadbase/vantage/table";
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
| Name | What it does |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `FilePageView` | The file page itself: give it a URL and it fetches, parses and renders |
|
|
69
|
+
| `TableViewer` | One sheet in a frame — fills the rest of the viewport, sheet tabs and counts along the bottom |
|
|
70
|
+
| `SheetGrid` | The spreadsheet grid itself. Put it in a parent with a definite height |
|
|
71
|
+
| `loadWorkbook` | URL → parsed sheets |
|
|
72
|
+
|
|
73
|
+
It looks **like a spreadsheet**: column letters across the top, row numbers down the side, the
|
|
74
|
+
file's first row frozen as the header, ruling that runs past the data. It is read-only — no
|
|
75
|
+
toolbar, no sorting, no pagination (a selected cell copies with `Cmd/Ctrl+C`). Sorting and
|
|
76
|
+
filtering are [`DataTable`](parts/data-table)'s job, not the viewer's. Colours come
|
|
77
|
+
from the app's theme tokens, so dark mode follows.
|
|
78
|
+
|
|
79
|
+
### Slides (`/slide`)
|
|
80
|
+
|
|
81
|
+
A `<name>.slide.tsx` [becomes a slide-deck page](routing).
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import {
|
|
85
|
+
MorphElement, Slide, SlideDeck, Step, Steps, useSlideNumber,
|
|
86
|
+
} from "@squadbase/vantage/slide";
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
| Name | Role |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `SlideDeck` | The deck. `theme` overrides tokens; `embedded` renders it in the page flow; `rail={false}` starts with the slide list closed |
|
|
92
|
+
| `Slide` | One slide. `transition` declares its enter/exit |
|
|
93
|
+
| `Steps` / `Step` | Stepped reveals — `→` opens one at a time |
|
|
94
|
+
| `MorphElement` | Carries the same object across two slides (same `id` on both) |
|
|
95
|
+
| `useSlideNumber` | `{ current, total }`, for a page-number footer |
|
|
96
|
+
| `useIsActiveSlide` | Whether this is the instance the audience is watching; gate entrance animations on it |
|
|
97
|
+
|
|
98
|
+
A reader picks one of three views — **list + slide** (the default: a thumbnail rail down the left),
|
|
99
|
+
**the slide alone** (`L` closes the rail and the slide fills the viewport), and **fullscreen** (`F`,
|
|
100
|
+
where the rail steps aside). None of them is decided in code, and the rail's state rides in
|
|
101
|
+
`?rail=`, so a link can hand someone either one. Only a deck that should start closed says so, with
|
|
102
|
+
`<SlideDeck rail={false}>`; an `embedded` deck starts closed already, having no width to spare. The
|
|
103
|
+
rail is painted purely from mixes of the deck's own `--slide-bg` and `--slide-fg`, so it carries no
|
|
104
|
+
colour of its own.
|
|
105
|
+
|
|
106
|
+
Slides are authored against a **fixed 1920×1080 canvas** in absolute pixels and scaled to fit.
|
|
107
|
+
Colour and type come from the `--slide-*` tokens, which default to aliases of the app's own tokens
|
|
108
|
+
under "Override theme tokens" below — so **a deck follows dark mode without doing anything**.
|
|
109
|
+
|
|
110
|
+
How to actually write one — the canvas's vertical budget, the type scale, the design principles
|
|
111
|
+
behind transitions, the rules morph rests on, and what breaks a pptx export — lives in the bundled
|
|
112
|
+
**`vantage-slide` skill** ([Agent skills](agent-skills)).
|
|
113
|
+
|
|
114
|
+
> [!NOTE]
|
|
115
|
+
> Do not use `@squadbase/vantage/ui` primitives inside a slide. The kit is built in rem against
|
|
116
|
+
> Tailwind for dashboards, so projecting a scaled 1920×1080 canvas leaves a `text-sm` button at an
|
|
117
|
+
> effective 8px — unreadable.
|
|
118
|
+
|
|
43
119
|
## Tailwind just works
|
|
44
120
|
|
|
45
121
|
Write Tailwind utilities in `className` and they apply. You never write `tailwind.config` or
|
package/docs/index.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"section": "guide",
|
|
29
29
|
"sectionTitle": "ガイド",
|
|
30
30
|
"title": "ファイルベースルーティング",
|
|
31
|
-
"description": "ファイルを置くだけでルートが生まれる。ページ・レイアウト・動的パラメータ・404/error
|
|
31
|
+
"description": "ファイルを置くだけでルートが生まれる。ページ・レイアウト・動的パラメータ・404/error の規約と、tsx 以外のページ(csv / xlsx / スライド)。",
|
|
32
32
|
"file": "ja/routing.md",
|
|
33
33
|
"order": 1
|
|
34
34
|
},
|
|
@@ -720,7 +720,7 @@
|
|
|
720
720
|
"section": "guide",
|
|
721
721
|
"sectionTitle": "Guide",
|
|
722
722
|
"title": "File-based routing",
|
|
723
|
-
"description": "Dropping a file creates a route. Conventions for pages, layouts, dynamic params
|
|
723
|
+
"description": "Dropping a file creates a route. Conventions for pages, layouts, dynamic params and 404/error, plus the pages that are not .tsx (csv / xlsx / slides).",
|
|
724
724
|
"file": "en/routing.md",
|
|
725
725
|
"order": 1
|
|
726
726
|
},
|
package/docs/ja/agent-skills.md
CHANGED
|
@@ -14,6 +14,7 @@ Vantage は **Claude Code の Agent Skills** を同梱しています。Skill
|
|
|
14
14
|
|---|---|
|
|
15
15
|
| `vantage-app` | アプリの新規作成と、`index.tsx` 単体の SPA から `server/api`・ネストレイアウト・動的ルート・404/error を備えた fullstack への拡張 |
|
|
16
16
|
| `vantage-add-feature` | ページ / API / UI / ブロックの追加(`vantage add` + `check` / `routes` までの一連) |
|
|
17
|
+
| `vantage-slide` | `.slide.tsx` でスライドデッキを書く(1920×1080 キャンバスの縦方向の予算、タイプスケール、段階表示、トランジションとモーフ、pptx 書き出しの前提) |
|
|
17
18
|
| `vantage-pitfalls` | 落とし穴リファレンス(Base UI ≠ Radix、`SelectValue` の挙動、クライアントから `server/` を import しない など) |
|
|
18
19
|
| `project-storage` | Squadbase の Project Storage(アップロード済みファイル)をブラウザから扱う(一覧、画像 / 動画 / PDF の埋め込み、アップロード)。Squadbase 上で動くアプリ向け |
|
|
19
20
|
|
|
@@ -42,6 +43,7 @@ Bundled skills:
|
|
|
42
43
|
vantage-add-feature .claude/skills/vantage-add-feature/
|
|
43
44
|
vantage-app .claude/skills/vantage-app/
|
|
44
45
|
vantage-pitfalls not placed
|
|
46
|
+
vantage-slide not placed
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
`--force` を付けると、**見つかった場所をそのまま**新しい内容で書き換えます(`--dir` を明示した
|
|
@@ -59,6 +61,7 @@ your-app/
|
|
|
59
61
|
├── vantage-app/SKILL.md
|
|
60
62
|
├── vantage-add-feature/SKILL.md
|
|
61
63
|
├── vantage-pitfalls/SKILL.md
|
|
64
|
+
├── vantage-slide/SKILL.md (references/ も一緒に配られる)
|
|
62
65
|
└── project-storage/SKILL.md
|
|
63
66
|
```
|
|
64
67
|
|
|
@@ -79,24 +82,27 @@ Skill の手順を読み込んで実行します。他のエージェントに
|
|
|
79
82
|
- **Squadbase テンプレートには配置済み**です。テンプレートから作ったアプリには、最初から
|
|
80
83
|
`.claude/skills/` が入っています。手で作ったアプリには `vantage add skill` で足してください。
|
|
81
84
|
|
|
82
|
-
## `AGENTS.md`(
|
|
85
|
+
## `AGENTS.md` + `agents/*.md`(アプリの地図と知識ファイル)
|
|
83
86
|
|
|
84
87
|
Skill が「手順書」なら、`AGENTS.md` は**エージェントが最初に読む「地図」**です。Vantage の
|
|
85
|
-
不変条件・import
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
不変条件・import サブパスの地図・ディレクトリ構造・env の最小レシピを 1 ページにまとめ、
|
|
89
|
+
「何を書くか → どのファイルを読むか」という表で `agents/` 配下の知識ファイルへ誘導します。
|
|
90
|
+
`agents/page.md`(通常ページ)・`agents/api.md`(`server/`)・`agents/slide.md`
|
|
91
|
+
(`.slide.tsx`)・`agents/xlsx.md`・`agents/csv.md` は、それぞれの種類のファイルを書くときだけ
|
|
92
|
+
読めばよい種類ごとの静的リファレンスです。手順の深掘りは上の Skill へ名前で誘導し、内容は
|
|
93
|
+
重複させません。
|
|
88
94
|
|
|
89
|
-
Skill と同じく **source-of-truth はパッケージ内**にあり、`vantage add agents`
|
|
90
|
-
|
|
95
|
+
Skill と同じく **source-of-truth はパッケージ内**にあり、`vantage add agents` で `AGENTS.md` と
|
|
96
|
+
`agents/*.md` をまとめてアプリルートへ配置します。
|
|
91
97
|
|
|
92
98
|
```bash
|
|
93
|
-
vantage add agents # AGENTS.md をアプリルートに配置
|
|
99
|
+
vantage add agents # AGENTS.md + agents/*.md をアプリルートに配置
|
|
94
100
|
vantage add agents --force # 既存を上書き
|
|
95
101
|
```
|
|
96
102
|
|
|
97
|
-
配置済みの `AGENTS.md` は `vantage upgrade` で正本と同期されます(
|
|
98
|
-
|
|
99
|
-
`upgrade` でアプリへ反映されます。Squadbase テンプレートには最初から配置済みです。
|
|
103
|
+
配置済みの `AGENTS.md` + `agents/*.md` は `vantage upgrade` で正本と同期されます(差分がある
|
|
104
|
+
ファイルだけ書き換え、まだ配置していないアプリには作りません)。フレームワークの規約が変わっても、
|
|
105
|
+
**正本の更新**が `upgrade` でアプリへ反映されます。Squadbase テンプレートには最初から配置済みです。
|
|
100
106
|
|
|
101
107
|
## 責務の切り分け
|
|
102
108
|
|
|
@@ -106,6 +112,7 @@ Skill は「**手順を伴うワークフロー**」だけを担います。次
|
|
|
106
112
|
エージェントには、同じ内容が [`vantage docs`](cli-reference) でそのまま読めます
|
|
107
113
|
(`vantage docs button` で props の表、`vantage docs --json` で機械可読。名前が
|
|
108
114
|
分からなければ `vantage search <やりたいこと>`)。
|
|
109
|
-
- **`AGENTS.md`**(静的な地図)― 構成やファイルの居場所。`
|
|
115
|
+
- **`AGENTS.md`**(静的な地図)― 構成やファイルの居場所。`agents/*.md`(種類ごとの静的
|
|
116
|
+
リファレンス)と合わせて `vantage add agents` で配置します。
|
|
110
117
|
- Skill 同士 ― 落とし穴などの共通内容は各 Skill に写経せず、**名前で相互参照**します
|
|
111
118
|
(例: `vantage-app` の手順中から `vantage-pitfalls` を指す)。
|
package/docs/ja/changelog.md
CHANGED
|
@@ -8,6 +8,81 @@ Vantage のリリースごとの変更点です。新しいものが上に来ま
|
|
|
8
8
|
> まだプロトタイプ(**0.x**)です。0.x の間は **minor が実質のメジャー**扱いで、後方互換性の
|
|
9
9
|
> ない変更は minor で入ることがあります。patch は後方互換の機能追加とバグ修正のみです。
|
|
10
10
|
|
|
11
|
+
## v0.6.0
|
|
12
|
+
|
|
13
|
+
`src/` に置けるものが `.tsx` だけではなくなりました。`.csv` / `.xlsx` はそのまま表として
|
|
14
|
+
読めるページになり、`<name>.slide.tsx` はスライドデッキになります。どちらもナビに
|
|
15
|
+
ダッシュボードのページと同格で並びます。
|
|
16
|
+
|
|
17
|
+
### 追加
|
|
18
|
+
|
|
19
|
+
- **`.csv` / `.xlsx` がページになります。** `src/data/june.xlsx` を置いて `/data/june` を
|
|
20
|
+
開くと、ダウンロードせずブラウザ上で表として読めます。URL の作り方は `.tsx` と同じ
|
|
21
|
+
(`index.csv` はディレクトリにマップ)で、`vantage routes` にも `useRoutes()` のナビにも
|
|
22
|
+
同格で並びます。xlsx は複数シートを切り替えられ、元ファイルのダウンロード導線も付きます。
|
|
23
|
+
|
|
24
|
+
タイトルはファイル名から導かれます(`june.xlsx` → 「June」)。パースはブラウザで行われるので、
|
|
25
|
+
dev・ビルド後・デプロイ後で同じ URL が同じものを返します。数式・グラフ・セル書式は
|
|
26
|
+
再現されません(値として読めれば十分、という設計)。ページにしたくないファイルは `_` を
|
|
27
|
+
前置してください。
|
|
28
|
+
|
|
29
|
+
ビューアは**表計算ソフトの見た目**です —— 列は A / B / C、左に行番号、ファイルの 1 行目は
|
|
30
|
+
ヘッダとして固定、シートのタブは下端、罫線はデータの外まで続きます。読み取り専用で、
|
|
31
|
+
ツールバーもソートもありません(セルを選んで `Cmd/Ctrl+C` でコピーはできます)。
|
|
32
|
+
|
|
33
|
+
- **`@squadbase/vantage/table` サブパスを追加しました。** ファイルページを描いている表ビューア
|
|
34
|
+
そのものです。`FilePageView` を直接使えば、`_` を前置してルート化を止めたファイルを自分の
|
|
35
|
+
`definePage` 付きのページから描けます(`TableViewer` はパース済みの 1 シート、`SheetGrid` は
|
|
36
|
+
グリッド本体)。
|
|
37
|
+
|
|
38
|
+
- **`<name>.slide.tsx` がスライドデッキになります。** `.slide` はページ種別サフィックスで、
|
|
39
|
+
URL には出ません(`src/june.slide.tsx` → `/june`)。中身は `<SlideDeck>` を返す普通の React
|
|
40
|
+
コンポーネントなので、`definePage` もナビも通常のページと同じように効きます。
|
|
41
|
+
|
|
42
|
+
1920×1080 の固定キャンバスに絶対 px で書き、画面サイズに合わせて縮小されます。キーボードと
|
|
43
|
+
クリックで送れ、現在位置は `?p=` として URL に入り、ツールバーから **pptx を書き出せます**。
|
|
44
|
+
書き出しは各スライドを画像として焼くので、受け取り側にフォントが要らず日本語も欠けません。
|
|
45
|
+
|
|
46
|
+
見え方は読み手が 3 通りから選べます — **一覧 + スライド**(既定。左にサムネイル列)、
|
|
47
|
+
**スライドのみ**(`L` で一覧を閉じる)、**全画面**(`F`。一覧は退く)。一覧の開閉は `?rail=` に
|
|
48
|
+
入るのでその状態のリンクも共有できます。閉じた状態から始めたいデッキだけ
|
|
49
|
+
`<SlideDeck rail={false}>` と書きます(`embedded` は既定で閉)。
|
|
50
|
+
|
|
51
|
+
- **`@squadbase/vantage/slide` サブパスを追加しました。** `SlideDeck`・`Slide`・`Steps`・`Step`・
|
|
52
|
+
`MorphElement`・`useSlideNumber`・`useIsActiveSlide`。段階表示、ページ間トランジション、
|
|
53
|
+
2 枚にまたがる同一要素のモーフ(Keynote の「マジックムーブ」相当)を含みます。ランタイムは
|
|
54
|
+
[open-slide](https://github.com/1weiho/open-slide)(MIT)から移植したもので、帰属は
|
|
55
|
+
パッケージ同梱の `NOTICE` にあります。
|
|
56
|
+
|
|
57
|
+
- **`vantage-slide` skill を同梱しました。** キャンバスの縦方向の予算の取り方、タイプスケール、
|
|
58
|
+
段階表示、トランジションの設計原則、モーフの規則、pptx 書き出しが壊れる条件。配置は他の
|
|
59
|
+
skill と同じ `vantage add skill --all`。
|
|
60
|
+
|
|
61
|
+
- **`--slide-*` テーマトークンを追加しました。** 既定はアプリ自身のトークンへの別名なので、
|
|
62
|
+
デッキは何もしなくてもライト / ダークに追従します。`<SlideDeck theme={{ … }}>` でデッキ単位に
|
|
63
|
+
上書きできます。
|
|
64
|
+
|
|
65
|
+
- **静的診断が 3 つ増えました**(合計 11: エラー 7・警告 4)。`UNSUPPORTED_PAGE_FILE`(警告 ―
|
|
66
|
+
ビューアの無い拡張子はルートにならないので、置いても出てこない理由を告げる)、
|
|
67
|
+
`FILE_PAGE_TOO_LARGE`(警告 ― 25MB 超)、`INVALID_PAGE_VARIANT`(エラー ―
|
|
68
|
+
`_layout.slide.tsx` のように、ルートにならないファイルにサフィックスが付いている)。
|
|
69
|
+
|
|
70
|
+
- **`AGENTS.md` を「地図」+ `agents/*.md`(種類ごとの知識ファイル)に分割しました。** 通常
|
|
71
|
+
ページ・API・スライド・xlsx・csv のそれぞれに 1 ファイル(`agents/page.md` /
|
|
72
|
+
`agents/api.md` / `agents/slide.md` / `agents/xlsx.md` / `agents/csv.md`)があり、
|
|
73
|
+
`AGENTS.md` は不変条件と「何を書くか → どのファイルを読むか」の索引表だけを持ちます。
|
|
74
|
+
書こうとしている種類のファイルだけを読めば済むぶん、エージェントが最初に読み込む量が
|
|
75
|
+
減ります。`vantage add agents` はこのセット一式をアプリルート(`AGENTS.md` + `agents/`)へ
|
|
76
|
+
配置し、`vantage upgrade` はまとめて再同期します(バンドルに無いファイルは消しません)。
|
|
77
|
+
|
|
78
|
+
### 変更
|
|
79
|
+
|
|
80
|
+
- `useRoutes()` が返す `RouteInfo` に **`kind`**(`"module"` | `"file"`)と
|
|
81
|
+
**`variant`**(`"slide"`)が増えました。ナビをダッシュボード / スライド / データで分けたり、
|
|
82
|
+
種類ごとにアイコンを変えたりできます。既存のナビのコードは変更なしで動きます。
|
|
83
|
+
- `vantage routes` がファイルページとスライドを種類つきで表示するようになりました
|
|
84
|
+
(`--json` にも `kind` / `variant` / `unrouted` が出ます)。
|
|
85
|
+
|
|
11
86
|
## v0.5.3
|
|
12
87
|
|
|
13
88
|
Squadbase の Project Storage をブラウザから扱うための Skill を同梱しました。`^0.5.0` を
|
package/docs/ja/cli-reference.md
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
| `vantage preview` | 本番ビルドをローカルで起動(fullstack は既定 `:4173`、spa は Vite プレビュー) |
|
|
14
14
|
| `vantage check` | 静的検査(ルート・境界・禁止ファイル)。エラーがあれば exit 1 |
|
|
15
15
|
| `vantage routes` | ページ + API の URL マップを表示(`--pages` / `--apis` で片側だけ、`--detail` で仕様つき) |
|
|
16
|
-
| `vantage add <kind> <name>` | `page` / `api` / `ui` / `block` / `skill` / `agents` を雛形生成・配置(`--force` で上書き、`skill` は配置済みを走査してスキップ・`--dir` で配置先を指定) |
|
|
16
|
+
| `vantage add <kind> <name>` | `page` / `api` / `ui` / `block` / `skill` / `agents`(`AGENTS.md` + `agents/*.md`)を雛形生成・配置(`--force` で上書き、`skill` は配置済みを走査してスキップ・`--dir` で配置先を指定) |
|
|
17
17
|
| `vantage docs [name]` | 同梱のガイド + コンポーネントリファレンスを表示 |
|
|
18
18
|
| `vantage search <query>` | 同じリファレンスを全文検索(自然言語 or `--regex`) |
|
|
19
19
|
| `vantage doctor` | 環境・インストールの健全性を診断 |
|
|
20
|
-
| `vantage upgrade` | 生成成果物を再生成し、配置済みの `AGENTS.md` を正本から同期 |
|
|
20
|
+
| `vantage upgrade` | 生成成果物を再生成し、配置済みの `AGENTS.md` + `agents/*.md` を正本から同期 |
|
|
21
21
|
|
|
22
22
|
## クイックモード(パスを直接渡す)
|
|
23
23
|
|
|
@@ -411,7 +411,7 @@ VANTAGE_PROFILE=1 vantage dev
|
|
|
411
411
|
|
|
412
412
|
## 静的診断(`check`)
|
|
413
413
|
|
|
414
|
-
`vantage check` が検出する診断は次の
|
|
414
|
+
`vantage check` が検出する診断は次の 11 種類です(エラー 7・警告 4)。
|
|
415
415
|
|
|
416
416
|
| コード | 深刻度 | 意味 |
|
|
417
417
|
|---|---|---|
|
|
@@ -421,8 +421,11 @@ VANTAGE_PROFILE=1 vantage dev
|
|
|
421
421
|
| `MISSING_DEFAULT_EXPORT` | エラー | ページに default export がない |
|
|
422
422
|
| `INVALID_API_EXPORT` | エラー | API が有効な HTTP メソッドをエクスポートしていない |
|
|
423
423
|
| `CLIENT_IMPORTS_SERVER` | エラー | クライアントが `server/` から import している |
|
|
424
|
+
| `INVALID_PAGE_VARIANT` | エラー | `.slide` などのページ種別サフィックスが、ルートにならないファイルに付いている(`_layout.slide.tsx` など) |
|
|
424
425
|
| `SUSPICIOUS_ROUTE_DIR` | 警告 | `pages/`・`app/`・`utils/` など、足場に見えるディレクトリ名が URL に出ている |
|
|
425
426
|
| `PUBLIC_ENV_MISUSE` | 警告 | クライアントが `PUBLIC_` 以外の env を読んでいる |
|
|
427
|
+
| `UNSUPPORTED_PAGE_FILE` | 警告 | ビューアの無い拡張子(`.xls`・`.ods` など)を置いている。ルートにならない |
|
|
428
|
+
| `FILE_PAGE_TOO_LARGE` | 警告 | データファイルページが 25MB を超えている。そのページはエラー表示になる |
|
|
426
429
|
|
|
427
430
|
いずれもユーザーコードを import・実行しません(純粋に静的な検査です)。
|
|
428
431
|
|
|
@@ -447,4 +450,5 @@ dist/
|
|
|
447
450
|
ページ・API・UI を足していってください。
|
|
448
451
|
|
|
449
452
|
AI エージェントに手順ごと渡したいときは、同梱の [エージェントと Skills](agent-skills) を
|
|
450
|
-
`vantage add skill` で、アプリの地図となる `AGENTS.md`
|
|
453
|
+
`vantage add skill` で、アプリの地図となる `AGENTS.md` と種類ごとの知識ファイル `agents/*.md` を
|
|
454
|
+
`vantage add agents` で配置してください。
|