@ramme-io/create-app 3.4.6 → 3.5.1
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/index.js +3 -3
- package/package.json +1 -1
- package/template/.claude/settings.json +17 -0
- package/template/.claude/skills/ramme-design/SKILL.md +55 -0
- package/template/.claude/skills/ramme-scaffold-view/SKILL.md +52 -0
- package/template/AGENTS.md +6 -1
- package/template/CHANGELOG.md +36 -0
- package/template/package.json +1 -1
- package/template-device/CHANGELOG.md +17 -0
- package/template-device/package.json +1 -1
- package/template-device/server.mjs +11 -1
- package/template-device/server.test.mjs +6 -0
package/index.js
CHANGED
|
@@ -67,9 +67,9 @@ const appSlug =
|
|
|
67
67
|
// at ^4.0.0 while its home server needed 4.1.0, pnpm 12 (which skips versions
|
|
68
68
|
// published in the last day) installed 4.0.0, and the server crashed on start.
|
|
69
69
|
const RELEASE_VERSIONS = {
|
|
70
|
-
'@ramme-io/ui': '^5.
|
|
71
|
-
'@ramme-io/kernel': '^8.1.
|
|
72
|
-
'@ramme-io/shared': '^4.
|
|
70
|
+
'@ramme-io/ui': '^5.5.1',
|
|
71
|
+
'@ramme-io/kernel': '^8.1.7',
|
|
72
|
+
'@ramme-io/shared': '^4.7.0',
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
try {
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"PostToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/node_modules/@ramme-io/ui/bin/ramme-ui.mjs\" check --hook",
|
|
11
|
+
"timeout": 10
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ramme-design
|
|
3
|
+
description: Build or change UI in this Ramme app. Use this whenever you are about to write a component, a page, a layout, a form, a dashboard or a modal; whenever you touch Tailwind classes, colors, spacing or theming; and whenever someone asks to make a screen look better, bolder, cleaner or more polished. Use it before writing the component, not after — it answers "does this already exist?" from the live component manifest, and "what may I style it with?" from the live Tailwind preset.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ramme design system
|
|
7
|
+
|
|
8
|
+
This app is built on `@ramme-io/ui` and `@ramme-io/kernel`, which have already
|
|
9
|
+
made the decisions a design skill would otherwise invent: themes, a fluid type
|
|
10
|
+
scale, a catalogue of components and colour tokens that adapt across every
|
|
11
|
+
theme. **You assemble, you do not paint.**
|
|
12
|
+
|
|
13
|
+
This skill holds no rules. They are in `AGENTS.md`, and each step names the
|
|
14
|
+
section that governs it. The commands answer from the installed packages:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm exec ramme-ui find <query> # does it already exist?
|
|
18
|
+
pnpm exec ramme-ui tokens [group] # what may I style it with?
|
|
19
|
+
pnpm exec ramme-ui check --changed # did I break a rule?
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 1. Reuse before you build
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm exec ramme-ui find sheet
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`find` reads every group of the manifest. If nothing matches, widen the term:
|
|
29
|
+
components are named for their shape, so a slide-over panel is a `Sheet`. →
|
|
30
|
+
AGENTS.md, "What is already wired" and "Component sourcing".
|
|
31
|
+
|
|
32
|
+
## 2. Style only with semantic tokens
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm exec ramme-ui tokens colors
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`bg-card`, `text-muted-foreground`, `border-border`: never a numeric shade such
|
|
39
|
+
as `bg-blue-500`, and never a hex colour. → AGENTS.md, "Do Not".
|
|
40
|
+
|
|
41
|
+
## 3. Pages sit inside the layout
|
|
42
|
+
|
|
43
|
+
The dashboard layout owns the viewport, the sidebar and the header; a page owns
|
|
44
|
+
only what renders inside it. → AGENTS.md, "Canonical Layout Exemplar" and
|
|
45
|
+
"Do Not".
|
|
46
|
+
|
|
47
|
+
## 4. Before you say it works
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm exec ramme-ui check --changed
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
In Claude Code this also runs on every edit, from `.claude/settings.json`, and
|
|
54
|
+
blocks an edit that adds a finding. State what the checks printed; a skipped
|
|
55
|
+
check is said, not implied.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ramme-scaffold-view
|
|
3
|
+
description: Add a new page or view to this Ramme app. Use this whenever you are asked for a new screen, page, route, tab, dashboard view or settings panel — before writing it. It builds the view only from the layouts this app already has, and holds it to the four view states (loading, empty, error, ready).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Scaffold a view
|
|
7
|
+
|
|
8
|
+
A new view is built from the layout this app already has, never beside it. This
|
|
9
|
+
skill holds no rules: each step names the `AGENTS.md` section that governs it.
|
|
10
|
+
Styling is `ramme-design`'s job.
|
|
11
|
+
|
|
12
|
+
## 1. Start from the layout and the exemplar
|
|
13
|
+
|
|
14
|
+
The layout is `src/templates/dashboard/DashboardLayout.tsx`, and
|
|
15
|
+
`src/pages/InventoryManager.tsx` is the page to copy. If the view needs a shell
|
|
16
|
+
this app does not have, **stop and ask** rather than inventing one. →
|
|
17
|
+
AGENTS.md, "Canonical Layout Exemplar".
|
|
18
|
+
|
|
19
|
+
## 2. Find every block the view needs
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm exec ramme-ui find <query>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Once per block: the table, the chart, the empty message, the loading
|
|
26
|
+
placeholder. `EmptyState`, `Skeleton`, `Alert`, `DataTable` and `SmartTable`
|
|
27
|
+
already exist. → AGENTS.md, "Component sourcing".
|
|
28
|
+
|
|
29
|
+
## 3. Type the data as `ViewState<T>` and render all four states
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import type { ViewState } from '@ramme-io/shared';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`loading`, `empty`, `error` (with `message`) and `ready` (with `data`, and
|
|
36
|
+
`sample` when it is demo data). Render every one. An unrendered `empty` is the
|
|
37
|
+
most common defect: a list with no rows drawn as a blank panel reads as broken,
|
|
38
|
+
when it should say there is nothing yet and why.
|
|
39
|
+
|
|
40
|
+
## 4. Add the route
|
|
41
|
+
|
|
42
|
+
The page goes in `src/features/<domain>/pages/`, then into the component
|
|
43
|
+
registry and the sitemap. → AGENTS.md, "Route Addition Flow".
|
|
44
|
+
|
|
45
|
+
## 5. Check it
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm exec ramme-ui check --changed
|
|
49
|
+
pnpm typecheck
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
State what they printed; a skipped check is said, not implied.
|
package/template/AGENTS.md
CHANGED
|
@@ -226,7 +226,12 @@ created, this file was written out under every name the common agents look for:
|
|
|
226
226
|
| Windsurf | `.windsurfrules` |
|
|
227
227
|
| anything else | point it at `AGENTS.md` |
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
Claude Code also gets two skills in `.claude/skills/` (`ramme-design` for
|
|
230
|
+
styling, `ramme-scaffold-view` for a new page) and a hook in
|
|
231
|
+
`.claude/settings.json` that runs `ramme-ui check` on every file it writes and
|
|
232
|
+
blocks an edit that adds a raw colour or a raw `<button>`.
|
|
233
|
+
|
|
234
|
+
The rule files are copies of this file, written once when the project was created. They
|
|
230
235
|
do not re-sync on their own, so when you change the rules: **edit `AGENTS.md`,
|
|
231
236
|
then copy it over the others.** `AGENTS.md` is the one meant to be read by a
|
|
232
237
|
human; the rest exist only because each agent looks for a different filename.
|
package/template/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# ramme-starter
|
|
2
2
|
|
|
3
|
+
## 2.0.36
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a4fc9a0]
|
|
8
|
+
- @ramme-io/ui@5.5.1
|
|
9
|
+
- @ramme-io/kernel@8.1.7
|
|
10
|
+
|
|
11
|
+
## 2.0.35
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [a2d254d]
|
|
16
|
+
- Updated dependencies [b73a647]
|
|
17
|
+
- @ramme-io/ui@5.5.0
|
|
18
|
+
- @ramme-io/shared@4.7.0
|
|
19
|
+
- @ramme-io/kernel@8.1.7
|
|
20
|
+
|
|
21
|
+
## 2.0.34
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [0641ce3]
|
|
26
|
+
- Updated dependencies [5668795]
|
|
27
|
+
- Updated dependencies [6540175]
|
|
28
|
+
- Updated dependencies [049e0a8]
|
|
29
|
+
- Updated dependencies [2377a28]
|
|
30
|
+
- Updated dependencies [1909202]
|
|
31
|
+
- Updated dependencies [07cd720]
|
|
32
|
+
- Updated dependencies [c541387]
|
|
33
|
+
- Updated dependencies [5816d8c]
|
|
34
|
+
- Updated dependencies [b3bab23]
|
|
35
|
+
- @ramme-io/ui@5.4.0
|
|
36
|
+
- @ramme-io/shared@4.6.0
|
|
37
|
+
- @ramme-io/kernel@8.1.6
|
|
38
|
+
|
|
3
39
|
## 2.0.33
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
package/template/package.json
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# ramme-home
|
|
2
2
|
|
|
3
|
+
## 0.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [b73a647]
|
|
8
|
+
- @ramme-io/shared@4.7.0
|
|
9
|
+
|
|
10
|
+
## 0.1.7
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [5668795]
|
|
15
|
+
- Updated dependencies [6540175]
|
|
16
|
+
- Updated dependencies [2377a28]
|
|
17
|
+
- Updated dependencies [1909202]
|
|
18
|
+
- @ramme-io/shared@4.6.0
|
|
19
|
+
|
|
3
20
|
## 0.1.6
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Two kinds of caller:
|
|
9
9
|
*
|
|
10
|
-
* boards the
|
|
10
|
+
* boards the calls in DEVICE_PROTOCOL (@ramme-io/shared) — the same
|
|
11
11
|
* calls, answered the same way, as ramme.io. server.test.mjs holds
|
|
12
12
|
* this file to them.
|
|
13
13
|
* you the page at / (your boards, and a box to send an app), and the
|
|
@@ -187,6 +187,16 @@ export const createHandler = ({
|
|
|
187
187
|
return { status: 200, bytes: readFileSync(path), type: 'application/octet-stream' };
|
|
188
188
|
},
|
|
189
189
|
|
|
190
|
+
[`GET ${DEVICE_PROTOCOL.podcasts.path}`]: ({ query }) => {
|
|
191
|
+
// Podcasts are found in a directory on the internet, which this server
|
|
192
|
+
// does not reach: a board here follows no shows, and is told so the
|
|
193
|
+
// same way ramme.io tells a board that follows none.
|
|
194
|
+
const id = DeviceIdSchema.safeParse(query.get('id'));
|
|
195
|
+
if (!id.success) return json(400, { error: 'BAD_DEVICE_ID' });
|
|
196
|
+
if (query.get('ep') !== null) return json(404, { error: 'NOT_FOUND' });
|
|
197
|
+
return json(200, { shows: [] });
|
|
198
|
+
},
|
|
199
|
+
|
|
190
200
|
[`POST ${DEVICE_PROTOCOL.voice.path}`]: async ({ query, raw }) => {
|
|
191
201
|
const id = DeviceIdSchema.safeParse(query.get('id'));
|
|
192
202
|
if (!id.success) return json(400, { error: 'BAD_DEVICE_ID' });
|
|
@@ -72,6 +72,12 @@ describe('a board', () => {
|
|
|
72
72
|
expect(call('GET', `${DEVICE_PROTOCOL.photo.path}?id=${ID}&hash=${hash}`).status).toBe(404);
|
|
73
73
|
expect(call('GET', `${DEVICE_PROTOCOL.photo.path}?id=${ID}&hash=nope`).status).toBe(400);
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
it('follows no podcasts here, and is told so as ramme.io would', () => {
|
|
77
|
+
expect(call('GET', `${DEVICE_PROTOCOL.podcasts.path}?id=${ID}`)).toMatchObject({ status: 200, json: { shows: [] } });
|
|
78
|
+
expect(call('GET', `${DEVICE_PROTOCOL.podcasts.path}?id=${ID}&ep=1.0123456789`).status).toBe(404);
|
|
79
|
+
expect(call('GET', `${DEVICE_PROTOCOL.podcasts.path}?id=nope`).status).toBe(400);
|
|
80
|
+
});
|
|
75
81
|
});
|
|
76
82
|
|
|
77
83
|
describe('sending', () => {
|