@geosynk/vsw-ui 0.5.1 → 0.5.2
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/README.md +83 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://geosynk.com.au/" target="_blank" rel="noopener noreferrer">
|
|
3
|
+
<img src="https://geosynk.com.au/images/logo/LOGO_MAIN1.svg" alt="Geosynk" width="380" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
1
7
|
# @geosynk/vsw-ui
|
|
2
8
|
|
|
9
|
+
[](https://www.npmjs.com/package/@geosynk/vsw-ui)
|
|
10
|
+
[](https://github.com/geosynk-lab/vsw-ui/actions/workflows/ci.yml)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
[](https://geosynk.com.au/)
|
|
13
|
+
[](https://developers.vertigisstudio.com/docs/web/overview/)
|
|
14
|
+
|
|
3
15
|
Shared UI for VertiGIS Studio Web apps: components, design tokens, the MUI theme, icons and page templates, plus a
|
|
4
16
|
showcase that shows every component in every state. Apps take their whole look from here, so every panel looks and
|
|
5
|
-
behaves the same.
|
|
17
|
+
behaves the same, in light and dark, on desktop and touch.
|
|
6
18
|
|
|
7
19
|
- **What to use for what:** [COMPONENTS.md](COMPONENTS.md) ("for X use Y" and the hard rules). It ships in the package,
|
|
8
20
|
so an app reads the rules for exactly the version it installed.
|
|
9
|
-
- **The same catalogue as data:** [contract/components.json](contract/components.json): all
|
|
21
|
+
- **The same catalogue as data:** [contract/components.json](contract/components.json): all 81 public components, their
|
|
10
22
|
entry point, what each is for and which imports it replaces.
|
|
11
23
|
- **Rules for people and agents working in this repo:** [AGENTS.md](AGENTS.md).
|
|
12
24
|
|
|
13
|
-
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 🚀 Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @geosynk/vsw-ui
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Peer dependencies: React 18+, `@mui/material` and `@mui/icons-material` 7, Emotion, `@vertigis/web` 5.42+ and
|
|
34
|
+
`lucide-react`. The sub-entry points need their own optional peers: TanStack Table and Virtual for `data-grid`, Nivo
|
|
35
|
+
0.99 for `charts`, `react-colorful` for `color`.
|
|
36
|
+
|
|
37
|
+
| Entry point | Contents |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `@geosynk/vsw-ui` | Theme provider, tokens, icons, controls, layout blocks and page templates |
|
|
40
|
+
| `@geosynk/vsw-ui/data-grid` | `DataGrid` (TanStack Table, virtualised) |
|
|
41
|
+
| `@geosynk/vsw-ui/charts` | `ChartCard`, chart palette and a Nivo theme from the host tokens |
|
|
42
|
+
| `@geosynk/vsw-ui/color` | `ColorField` and `ColorSwatchBar` |
|
|
43
|
+
| `@geosynk/vsw-ui/eslint` | ESLint preset that blocks the imports vsw-ui replaces |
|
|
44
|
+
| `@geosynk/vsw-ui/COMPONENTS.md`, `@geosynk/vsw-ui/contract/components.json` | The rules and catalogue for the installed version |
|
|
45
|
+
|
|
46
|
+
## 💡 Using it in an app
|
|
14
47
|
|
|
15
48
|
```tsx
|
|
16
49
|
import { VsuiThemeProvider, Button, IconButton, SidebarPanel } from "@geosynk/vsw-ui";
|
|
@@ -33,13 +66,38 @@ export default [...sdkConfig, ...vswUi];
|
|
|
33
66
|
It blocks the imports vsw-ui replaces (MUI controls, MUI X DataGrid and date pickers, icon libraries, hand-built TanStack
|
|
34
67
|
tables), and each error names the vsw-ui component to use instead. It is built from `contract/components.json`.
|
|
35
68
|
|
|
36
|
-
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🎨 With the VertiGIS SDK skills
|
|
72
|
+
|
|
73
|
+
[VertiGIS SDK AI Skills](https://github.com/geosynk-lab/vertigis-sdk-skills) teach coding agents (Claude Code, Cursor,
|
|
74
|
+
Copilot, Antigravity, Gemini) the VertiGIS Web SDK. The pieces have one job each:
|
|
75
|
+
|
|
76
|
+
| Piece | Owns |
|
|
77
|
+
|---|---|
|
|
78
|
+
| VertiGIS Web SDK | the platform: layout, models, commands, Designer |
|
|
79
|
+
| vsw-ui | everything visual, plus the rules for using it (`COMPONENTS.md`, `contract/components.json`) |
|
|
80
|
+
| Web SDK skill | SDK know-how, and pointing agents to vsw-ui |
|
|
81
|
+
|
|
82
|
+
Install the skill in an app:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npx skills add geosynk-lab/vertigis-sdk-skills --skill vertigis-web-sdk-skill
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
When a project depends on `@geosynk/vsw-ui`:
|
|
89
|
+
|
|
90
|
+
- `initiate` (and `upgrade`) write a short UI section in AGENTS.md that points at
|
|
91
|
+
`node_modules/@geosynk/vsw-ui/COMPONENTS.md`, so agents read the rules for the installed version, and create
|
|
92
|
+
`.vertigis-rules.json` with `"profile": "vsw-ui"`.
|
|
93
|
+
- The validator's `vsw-ui` profile turns off the rules about building tokens, a theme or component styling (vsw-ui
|
|
94
|
+
checks those once in its own CI) and adds `UI_IMPORT` (reads the installed contract, so an import of
|
|
95
|
+
`@mui/x-data-grid` fails with "use DataGrid from @geosynk/vsw-ui/data-grid") and `APP_COSMETIC_CSS` (app CSS may only
|
|
96
|
+
lay things out). Every report lists the profile and what it hid.
|
|
37
97
|
|
|
38
|
-
|
|
39
|
-
AGENTS.md gets a short UI section that points at the installed `COMPONENTS.md`, and the rule validator runs with
|
|
40
|
-
`"profile": "vsw-ui"` in `.vertigis-rules.json`, where `UI_IMPORT` reads the same contract.
|
|
98
|
+
---
|
|
41
99
|
|
|
42
|
-
##
|
|
100
|
+
## 🛠️ Developing vsw-ui
|
|
43
101
|
|
|
44
102
|
| Script | What it does |
|
|
45
103
|
|---|---|
|
|
@@ -49,6 +107,7 @@ AGENTS.md gets a short UI section that points at the installed `COMPONENTS.md`,
|
|
|
49
107
|
| `npm run typecheck` / `npm run lint` | Types; ESLint (the showcase is held to the same import gate as apps) |
|
|
50
108
|
| `npm run verify:styles` | Zero-cosmetic-`sx` check |
|
|
51
109
|
| `npm run check:contract` | Fails when `contract/components.json` and the real exports disagree, and tests the ESLint gate |
|
|
110
|
+
| `npm test` | Unit tests (Vitest) |
|
|
52
111
|
| `npm run test:screenshots` | With the showcase running: compares every section in light and dark with `tests/screenshots/` |
|
|
53
112
|
|
|
54
113
|
After an intended visual change, review the new images in `tests/screenshots/__actual__/` and refresh the baselines with
|
|
@@ -63,6 +122,12 @@ repo's overrides in `.vertigis-rules.json` and known debt in `.vertigis-baseline
|
|
|
63
122
|
(also `--port`, `--type`, `--key`, `--cert`, `--ca`; see the
|
|
64
123
|
[VertiGIS Web SDK docs](https://developers.vertigis.com/docs/web/sdk-overview/)).
|
|
65
124
|
|
|
125
|
+
### Releasing
|
|
126
|
+
|
|
127
|
+
CI checks every pull request and push to `main`. Publishing a GitHub release with a tag such as `v0.5.2` publishes that
|
|
128
|
+
version to npm with provenance (npm trusted publishing, no token in the repo). A pre-release tag (`v1.2.0-beta.1`) goes
|
|
129
|
+
to the `next` channel.
|
|
130
|
+
|
|
66
131
|
## Upgrading
|
|
67
132
|
|
|
68
133
|
- VertiGIS Web SDK: `npx @vertigis/web-sdk@latest upgrade`
|
|
@@ -73,3 +138,13 @@ repo's overrides in `.vertigis-rules.json` and known debt in `.vertigis-baseline
|
|
|
73
138
|
|
|
74
139
|
[VertiGIS Studio Web SDK documentation](https://developers.vertigis.com/docs/web/sdk-overview/) on the
|
|
75
140
|
[VertiGIS Studio Developer Center](https://developers.vertigis.com/docs/web/overview/).
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## About Geosynk
|
|
145
|
+
|
|
146
|
+
[Geosynk](https://geosynk.com.au/) is an Australian geospatial engineering and software consultancy delivering
|
|
147
|
+
enterprise GIS architecture, custom VertiGIS solutions and modern web applications.
|
|
148
|
+
|
|
149
|
+
- **Website:** [geosynk.com.au](https://geosynk.com.au/)
|
|
150
|
+
- **Issues and feature requests:** [github.com/geosynk-lab/vsw-ui/issues](https://github.com/geosynk-lab/vsw-ui/issues)
|