@jskit-ai/agent-docs 0.1.323 → 0.1.325
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/guide/agent/app-extras/assistant.md +8 -5
- package/guide/agent/framework/data-pass.md +160 -0
- package/guide/agent/framework/quality-pass.md +99 -0
- package/guide/agent/framework/visual-identity.md +152 -0
- package/guide/agent/index.md +6 -0
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +4 -4
- package/patterns/shell-foundation/example/package.json +5 -5
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +38 -38
- package/reference/autogen/packages/kernel.md +1 -1
- package/skills/jskit/SKILL.md +5 -1
- package/skills/jskit/references/data-pass.md +155 -0
- package/skills/jskit/references/pattern-index.md +38 -38
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
- package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
- package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
- package/skills/jskit/references/quality-pass.md +94 -0
- package/skills/jskit/references/visual-identity.md +147 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<!-- Generated from `packages/agent-docs/site/guide/framework/visual-identity.md`. -->
|
|
2
|
+
|
|
3
|
+
# Visual identity
|
|
4
|
+
|
|
5
|
+
An identity pass gives an app a look of its own. Genesis's identity pass skill
|
|
6
|
+
(`genesis-identity-pass`) holds the method: study the app's kinds of content,
|
|
7
|
+
choose a style option, then build the theme, the artwork, the logo, the loading
|
|
8
|
+
screen and sign-in, and prove them. This page says where each piece lives in a
|
|
9
|
+
JSKIT app and which checks prove it. Read the [Material 3 rules](material-3.md)
|
|
10
|
+
first: the identity works inside them, never against them, and navigation stays
|
|
11
|
+
must-fix.
|
|
12
|
+
|
|
13
|
+
## Theme: one seed
|
|
14
|
+
|
|
15
|
+
- `src/theme/index.js` is the app's only theme file: `{ seed, colors, icons,
|
|
16
|
+
typography }`, passed to `createMaterialVuetifyOptions()` from
|
|
17
|
+
`@jskit-ai/material-web/client` ([Foundation](material-3.md#foundation)).
|
|
18
|
+
The seed generates the light and dark schemes; change it and both follow.
|
|
19
|
+
- A colour role per kind of content goes in `colors` by camelCase name.
|
|
20
|
+
`colors: { soups: "#B5562B", breads: "#8A6A2F" }` gives `soups`, `on-soups`,
|
|
21
|
+
`soups-container` and `on-soups-container` (and the same for `breads`),
|
|
22
|
+
harmonized toward the seed in both schemes; `{ value: "#F5C518", blend:
|
|
23
|
+
false }` keeps a colour's own hue. Use them by name:
|
|
24
|
+
`<v-chip color="soups-container">`.
|
|
25
|
+
- Interface code uses roles only. `jskit check m3` fails a hex colour outside
|
|
26
|
+
`src/theme/` (`m3/raw-hex`).
|
|
27
|
+
|
|
28
|
+
## Content colours: `src/theme/palettes.js`
|
|
29
|
+
|
|
30
|
+
Every colour that is content rather than interface lives here: named exports
|
|
31
|
+
of frozen plain hex values, each with a comment saying where it is used, as the
|
|
32
|
+
Material 3 page's [exceptions](material-3.md#exceptions) describe.
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
// src/theme/palettes.js
|
|
36
|
+
|
|
37
|
+
// Cover art, per kind of content: the gradient's two stops, the motif's accent and its light colour
|
|
38
|
+
// (src/components/art/CoverArt.vue). `brand` draws items without a kind.
|
|
39
|
+
export const coverPalettes = Object.freeze({
|
|
40
|
+
brand: Object.freeze({ from: "#1F3A5F", to: "#3E7C8C", accent: "#F2B544", light: "#F6EFE3" }),
|
|
41
|
+
soups: Object.freeze({ from: "#7A2E1C", to: "#C8642F", accent: "#F4C95D", light: "#FBEFE1" }),
|
|
42
|
+
breads: Object.freeze({ from: "#5B4320", to: "#A7803E", accent: "#E8D3A2", light: "#FFF8EA" })
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// The logo tile, favicon.svg and the app icons (src/components/BrandLogo.vue).
|
|
46
|
+
export const logoColours = Object.freeze({ from: "#1F3A5F", to: "#3E7C8C", mark: "#F2B544", markShade: "#E07A3F" });
|
|
47
|
+
|
|
48
|
+
// The sign-in brand pane's glow and ink (src/components/AppBrand.vue).
|
|
49
|
+
export const signInPane = Object.freeze({ glow: "#3E7C8C", ink: "#0E1A26" });
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Components read them through bindings (`:fill`, `:stop-color`, or `v-bind()`
|
|
53
|
+
in a scoped `<style>`), never as literals.
|
|
54
|
+
|
|
55
|
+
## Cover art: `src/components/art/CoverArt.vue`
|
|
56
|
+
|
|
57
|
+
- Props `kind` and `seed` (strings) and `height` (a number), declared typed as
|
|
58
|
+
the [client features](client-features.md) guide asks.
|
|
59
|
+
- The root is `<svg viewBox="0 0 400 200" preserveAspectRatio="xMidYMid slice"
|
|
60
|
+
aria-hidden="true" width="100%" :height="height">`: one 2:1 drawing serves a
|
|
61
|
+
card, a strip and a thumbnail.
|
|
62
|
+
- The motifs are data in `src/components/art/motifs.js`, one list of
|
|
63
|
+
`{ tag, ...attributes }` shapes per kind, drawn with `<component
|
|
64
|
+
:is="shape.tag" v-bind="shape.attributes" />`. A native SVG tag (`circle`,
|
|
65
|
+
`path`, `rect`) named as a string is fine; `ui/vuetify-by-name` concerns
|
|
66
|
+
Vuetify components only.
|
|
67
|
+
- The seeded generator from the Genesis skill lives once, in the component's
|
|
68
|
+
module, seeded with `` `${kind}:${seed}` ``; the item's id or slug is the seed.
|
|
69
|
+
- A gradient's `id` carries the kind and the seed (`cover-soups-42`), so two
|
|
70
|
+
covers on one page never share one.
|
|
71
|
+
- A Vitest component test renders one kind and seed twice and gets the same
|
|
72
|
+
markup, and two seeds of one kind and gets different markup.
|
|
73
|
+
|
|
74
|
+
## Where it appears
|
|
75
|
+
|
|
76
|
+
- **Cards:** a flat `v-card` whose first child is `<CoverArt :height="130">`;
|
|
77
|
+
the card's 12dp corners clip it, so the art has no radius of its own. Then
|
|
78
|
+
the title in `text-title-large` (a stretched link that opens the record),
|
|
79
|
+
"By …" in `text-body-medium text-on-surface-variant`, a short description,
|
|
80
|
+
`variant="tonal"` chips (the kind with its icon, the level), and one
|
|
81
|
+
`text-body-small` meta line with small icons
|
|
82
|
+
([Lists, records and forms](material-3.md#lists-records-and-forms)).
|
|
83
|
+
- **Hero card and profile header:** a `CoverArt` strip, with the `v-avatar`
|
|
84
|
+
overlapping its lower edge.
|
|
85
|
+
- **Empty states:** `src/components/art/EmptyArt.vue`: a 224×112 `CoverArt`
|
|
86
|
+
in a wrapper with 28dp corners, the state's icon in a 64dp `v-avatar
|
|
87
|
+
color="surface"` with `<v-icon color="primary">` in its middle and an
|
|
88
|
+
`elevation` class for the soft shadow (a hand-made `box-shadow` fails
|
|
89
|
+
`m3/raw-hex`), then a `text-title-large` line, a `text-body-medium` hint and
|
|
90
|
+
one `variant="tonal"` button.
|
|
91
|
+
- **Logo:** `src/components/BrandLogo.vue` draws the 512×512 tile (`rx="112"`)
|
|
92
|
+
inline from `logoColours`. The app's `favicon.svg` (beside `index.html` in
|
|
93
|
+
the foundation) is the same drawing with its colours written in; its
|
|
94
|
+
comment names `palettes.js` as their source. An app with
|
|
95
|
+
`manifest.webmanifest` lists its icons from the same drawing, and an app with
|
|
96
|
+
a mobile target renders its 1024×1024 PNG `Icon` from it on an opaque
|
|
97
|
+
background.
|
|
98
|
+
- **Loading screen:** `index.html`'s `#startup-shell`, which shows before any
|
|
99
|
+
JavaScript runs. Put the logo inline, the name as `<title>` spells it, and
|
|
100
|
+
the tagline in it; keep its `role="status"` line, its `<noscript>` and its
|
|
101
|
+
Reload link. Its colours are literal because it runs before the theme: take
|
|
102
|
+
them from `palettes.js` and the seed's schemes, and say so in a comment. Its
|
|
103
|
+
rotation runs only inside `@media (prefers-reduced-motion: no-preference)`.
|
|
104
|
+
- **Sign-in:** `src/components/AppBrand.vue`, from the `auth/auth-surface`
|
|
105
|
+
pattern, fills the auth views' `brand` slot. Wide (`compact` false), it is the brand
|
|
106
|
+
pane: a radial glow from `signInPane.glow` into `signInPane.ink`, the logo,
|
|
107
|
+
the name, the tagline and three short lines on what the app does, a large
|
|
108
|
+
faint accent ring and a few soft light bubbles. On phones (`compact`), the
|
|
109
|
+
logo and the name over a `CoverArt` strip of kind `brand`. It holds no
|
|
110
|
+
heading: each auth screen's `h1` is its own.
|
|
111
|
+
|
|
112
|
+
## The Material 3 pieces it uses
|
|
113
|
+
|
|
114
|
+
- **Pages open onto content.** The shell's top app bar carries the page's
|
|
115
|
+
title and actions ([The top app bar carries the page](material-3.md#the-top-app-bar-carries-the-page)):
|
|
116
|
+
no welcome heading or title block.
|
|
117
|
+
- **"New"** is `ShellPrimaryAction`: an extended FAB on compact and medium
|
|
118
|
+
widths, a filled bar button on expanded ones.
|
|
119
|
+
- **Bottom navigation** on phones is the shell's navigation bar, drawn from the
|
|
120
|
+
surface's destinations: keep five or fewer. A surface with fewer than two
|
|
121
|
+
destinations draws no navigation at all, so there is never an empty drawer.
|
|
122
|
+
- **Loading** uses Material skeletons with the content's geometry, never a
|
|
123
|
+
spinner ([Components, state, and feedback](material-3.md#components-state-and-feedback)).
|
|
124
|
+
- **Changing numbers** use `font-variant-numeric: tabular-nums`.
|
|
125
|
+
- **New list items** pop in through a Vue `<TransitionGroup>` with a scoped
|
|
126
|
+
keyframe (from `scale(0.6)` and `opacity: 0` over 600 ms, easing
|
|
127
|
+
`var(--md-sys-motion-easing-emphasized-decelerate)`). `material.css` finishes
|
|
128
|
+
every animation at once under `prefers-reduced-motion: reduce`, so the app
|
|
129
|
+
adds no media query of its own.
|
|
130
|
+
- **Button and chip overlays** take their shape's corners from `material.css`
|
|
131
|
+
(`border-radius: inherit` on the overlay, underlay and ripple). If one still
|
|
132
|
+
spills past its shape, report it at `@jskit-ai/material-web`; never add app
|
|
133
|
+
CSS for it.
|
|
134
|
+
|
|
135
|
+
## Prove it
|
|
136
|
+
|
|
137
|
+
- `npx jskit check m3` reports nothing and `npx jskit check` passes.
|
|
138
|
+
- Take the screenshots with a temporary Playwright spec as the
|
|
139
|
+
[UI pass](ui-pass.md) shows: the main list, a record, an empty
|
|
140
|
+
state, `/auth/login` at 390 and 1280, and the profile, at 390 and 1280 wide,
|
|
141
|
+
in light and dark. Look at every one.
|
|
142
|
+
- Contrast: compute the ratio of each writing colour over each identity colour,
|
|
143
|
+
from the `palettes.js` values and the generated roles
|
|
144
|
+
(`useTheme().current.value.colors`) in both schemes.
|
|
145
|
+
- Layout shift: in the same spec, collect `layout-shift` entries with a
|
|
146
|
+
`PerformanceObserver` while a list loads; their sum stays near zero.
|
|
147
|
+
- Run the Vitest test of `CoverArt.vue` and the affected screens' tests.
|