@birdapi/velinstyle 1.2.0 → 1.2.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/README.de.md +22 -19
- package/README.md +24 -25
- package/cli/cli-manifest.json +1 -1
- package/cli/docgen/extract-attributes.js +2 -0
- package/cli/index.js +32 -3
- package/cli/transparency.js +221 -0
- package/core/a11y/component-contracts.json +1 -1
- package/core/attributes/registry.js +14 -0
- package/core/meta/schema.js +10 -0
- package/core/transparency/attach.js +74 -0
- package/core/transparency/claims.js +97 -0
- package/core/transparency/doctor.js +142 -0
- package/core/transparency/engine.js +75 -0
- package/core/transparency/export.js +98 -0
- package/core/transparency/index.js +30 -0
- package/core/transparency/migrate.js +130 -0
- package/core/transparency/normalize.js +125 -0
- package/core/transparency/policy.js +105 -0
- package/core/transparency/providers.js +235 -0
- package/core/transparency/registry.js +104 -0
- package/core/transparency/renderer.js +111 -0
- package/core/transparency/reporter.js +113 -0
- package/core/transparency/validator.js +112 -0
- package/dist/chunks/attach-H2ZSEAE6.js +365 -0
- package/dist/chunks/attributes-DZCXX2RZ.js +404 -0
- package/dist/chunks/chunk-CQMTCEI6.js +113 -0
- package/dist/chunks/runtime-entry.js +1 -1
- package/dist/llms.txt +3 -2
- package/dist/search-index.json +28 -2
- package/dist/velin-agent.json +10 -6
- package/dist/velinstyle-components.iife.js +411 -2
- package/dist/velinstyle-components.js +411 -2
- package/dist/velinstyle-components.min.js +113 -113
- package/dist/velinstyle.css +160 -0
- package/dist/velinstyle.min.css +1 -1
- package/package.json +2 -1
- package/packages/velinstyle-skills/catalog.json +1 -1
- package/src/components/transparency.css +138 -0
- package/src/velinstyle.css +1 -0
package/README.de.md
CHANGED
|
@@ -19,7 +19,7 @@ Ein Framework. Eine CLI. Ein Design System. Ein AI-fähiges Ökosystem.
|
|
|
19
19
|
[](https://github.com/SkyliteDesign/velinstyle/stargazers)
|
|
20
20
|
[](https://nodejs.org/)
|
|
21
21
|
[](https://velinstyle.info/docs/getting-started/introduction.html)
|
|
22
|
-
[](https://velinstyle.info/docs/
|
|
22
|
+
[](https://velinstyle.info/docs/getting-started/accessibility.html)
|
|
23
23
|
[](CONTRIBUTING.de.md)
|
|
24
24
|
|
|
25
25
|
```bash
|
|
@@ -32,12 +32,12 @@ npm i @birdapi/velinstyle
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
VelinStyle ist ein **produktives CSS- + Web-Components-Framework** mit **WCAG-2.2-AAA-orientierten Defaults**, einer echten **CLI-Ship-Surface** und den ersten **Design-Intelligence- / AI-Foundation**-Systemen (Beta). Kein externes UI-Framework im Kern.
|
|
35
|
+
VelinStyle ist ein **produktives CSS- + Web-Components-Framework** mit **WCAG-2.2-AAA-orientierten Defaults**, einer echten **CLI-Ship-Surface**, dem **Transparency Framework** (Kennzeichnung + Nachweis, Beta) und den ersten **Design-Intelligence- / AI-Foundation**-Systemen (Beta). Kein externes UI-Framework im Kern.
|
|
36
36
|
|
|
37
37
|
**Passung heute:** Marketing-Landings, Docs-Shells, einfache Admin-Starter.
|
|
38
38
|
**Noch nicht:** alleiniger Primary-Stack für große Multipage-Shops + Enterprise-Admin ohne Custom-Arbeit.
|
|
39
39
|
|
|
40
|
-
> **Release:** **1.2.
|
|
40
|
+
> **Release:** **1.2.1** (Transparency Framework + Core + Design Intelligence Foundation + Trust/Ship). VelinStyle **zertifiziert keine Anwendung** — siehe [A11y-Matrix](https://velinstyle.info/docs/getting-started/accessibility.html).
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -64,7 +64,8 @@ Gegenüber **Bootstrap**: moderne Tokens/Layers, progressive WCs, CLI-Automation
|
|
|
64
64
|
| 🎨 | **CSS-Framework** | OKLCH-Themes, Utilities, Komponenten, Lite-Preset |
|
|
65
65
|
| 🧩 | **Web Components** | 40 kanonische Custom Elements; CSS allein reicht oft |
|
|
66
66
|
| ⚡ | **Runtime** | Search, Motion, Highlight, Attributes, Tree-Shaking |
|
|
67
|
-
| 🛠 | **CLI** | `create` · `serve` · `doctor` · `check` · `scan` · `review` · `skills` |
|
|
67
|
+
| 🛠 | **CLI** | `create` · `serve` · `doctor` · `check` · `scan` · `review` · `skills` · `transparency` |
|
|
68
|
+
| 🔎 | **Transparency** | Kennzeichnung + Nachweis (KI / Trust / Compliance / Metadaten) — Beta-Foundation |
|
|
68
69
|
| 🧠 | **Design Intelligence** | Plan → Constraints → Registry → Review (Beta) |
|
|
69
70
|
| 🤖 | **AI Skills** | 40 Skills, Packs, Bundles, Templates, Workflows (Beta) |
|
|
70
71
|
| 📦 | **Registry** | Skills + Page/Section als maschinenlesbare Verträge |
|
|
@@ -77,17 +78,12 @@ Gegenüber **Bootstrap**: moderne Tokens/Layers, progressive WCs, CLI-Automation
|
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
80
|
-
## Neu in 1.2
|
|
81
|
+
## Neu in 1.2.1
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
- **Transparency Framework (Beta)** — `@birdapi/velinstyle/transparency`, Bridge `velin-transparency`, Claim-Taxonomie, CLI `transparency doctor|validate|report|export|migrate`
|
|
84
|
+
- Baut auf der **1.2.0**-Foundation auf: Ship Surface, Design Intelligence, AI Skills, neue WC-Primitives
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
- **Design Intelligence (Beta)** — Prompt Engine, Review Engine, Knowledge-Graph-Seed, Constraints
|
|
86
|
-
- **AI Foundation (Beta)** — Skill Engine, Workflows, reicheres Agent-Metadata
|
|
87
|
-
- **Neue Primitives** — Calendar, File-Dropzone, editierbare Data-Table
|
|
88
|
-
- **Trust Gates** — strengere Scan/Review-Regeln
|
|
89
|
-
|
|
90
|
-
Details: [`RELEASE_NOTES_1.2.0.md`](RELEASE_NOTES_1.2.0.md) · Historie: [`CHANGELOG.md`](CHANGELOG.md)
|
|
86
|
+
Details: [`CHANGELOG.md`](CHANGELOG.md) · 1.2.0-Überblick: [`RELEASE_NOTES_1.2.0.md`](RELEASE_NOTES_1.2.0.md)
|
|
91
87
|
|
|
92
88
|
---
|
|
93
89
|
|
|
@@ -100,8 +96,14 @@ yarn add @birdapi/velinstyle
|
|
|
100
96
|
bun add @birdapi/velinstyle
|
|
101
97
|
```
|
|
102
98
|
|
|
103
|
-
**CDN** (Version pinnen)
|
|
104
|
-
|
|
99
|
+
**CDN** (Version pinnen):
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<link rel="stylesheet" href="https://unpkg.com/@birdapi/velinstyle@1.2.1/dist/velinstyle.min.css">
|
|
103
|
+
<script type="module" src="https://unpkg.com/@birdapi/velinstyle@1.2.1/dist/velinstyle-components.min.js"></script>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
> Pin **`@1.2.1`** (oder `@latest` nach Publish). Nach Clone: `npm install && npm run build`.
|
|
105
107
|
|
|
106
108
|
---
|
|
107
109
|
|
|
@@ -121,8 +123,9 @@ Minimal-HTML und Import-Pfade: [`GETTING_STARTED.md`](GETTING_STARTED.md) · Sys
|
|
|
121
123
|
| Befehl | Rolle |
|
|
122
124
|
|--------|------|
|
|
123
125
|
| `create` | Scaffolds (`landing` · `dashboard` · `docs` · `auth`) |
|
|
124
|
-
| `check` | doctor + blueprints + scan + review |
|
|
126
|
+
| `check` | doctor + blueprints + scan + review (+ Transparency-Scores) |
|
|
125
127
|
| `scan` / `review` | Statische bzw. Design-Intelligence-Gates |
|
|
128
|
+
| `transparency` | doctor · validate · report · export · migrate (Beta) |
|
|
126
129
|
| `skills` / `workflow` | AI-Registry & Graphen (Beta) |
|
|
127
130
|
| `wc api <tag>` | WC-API aus dem Source |
|
|
128
131
|
| `meta` | Agent-Bundle + `llms.txt` |
|
|
@@ -133,7 +136,7 @@ Minimal-HTML und Import-Pfade: [`GETTING_STARTED.md`](GETTING_STARTED.md) · Sys
|
|
|
133
136
|
|
|
134
137
|
**40 kanonische** Custom Elements (**42** Lazy-Loader inkl. Legacy-`*-wc`). Progressive Enhancement: HTML/CSS first, WC nur bei Verhalten.
|
|
135
138
|
|
|
136
|
-
AAA-orientierte Token-Defaults, Fokus-Management, Reduced Motion, Scanner-Contracts — siehe [A11y-Matrix](https://velinstyle.info/docs/
|
|
139
|
+
AAA-orientierte Token-Defaults, Fokus-Management, Reduced Motion, Scanner-Contracts — siehe [A11y-Matrix](https://velinstyle.info/docs/getting-started/accessibility.html).
|
|
137
140
|
|
|
138
141
|
---
|
|
139
142
|
|
|
@@ -142,8 +145,8 @@ AAA-orientierte Token-Defaults, Fokus-Management, Reduced Motion, Scanner-Contra
|
|
|
142
145
|
| Status | Surfaces |
|
|
143
146
|
|--------|----------|
|
|
144
147
|
| **Stable** | CSS · Runtime · WC · CLI-Kern · Blueprints |
|
|
145
|
-
| **Beta** | Review · Prompt · Knowledge Graph · AI Metadata · Constraints |
|
|
146
|
-
| **Foundation** | AI Skills · Workflow Graphs · Registries |
|
|
148
|
+
| **Beta** | Transparency Framework · Review · Prompt · Knowledge Graph · AI Metadata · Constraints |
|
|
149
|
+
| **Foundation** | AI Skills · Workflow Graphs · Registries · Transparency pillars |
|
|
147
150
|
| **Planned** | Studio · Utility Engine Generator |
|
|
148
151
|
|
|
149
152
|
---
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ One framework. One CLI. One design system. One AI-ready ecosystem.
|
|
|
19
19
|
[](https://github.com/SkyliteDesign/velinstyle/stargazers)
|
|
20
20
|
[](https://nodejs.org/)
|
|
21
21
|
[](https://velinstyle.info/docs/getting-started/introduction.html)
|
|
22
|
-
[](https://velinstyle.info/docs/
|
|
22
|
+
[](https://velinstyle.info/docs/getting-started/accessibility.html)
|
|
23
23
|
[](CONTRIBUTING.md)
|
|
24
24
|
|
|
25
25
|
```bash
|
|
@@ -32,12 +32,12 @@ npm i @birdapi/velinstyle
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
VelinStyle is a **production CSS + Web Components framework** with **WCAG 2.2 AAA-oriented defaults**, a real **CLI ship surface**, and the first **Design Intelligence / AI Foundation** systems (beta). No external UI framework in the core.
|
|
35
|
+
VelinStyle is a **production CSS + Web Components framework** with **WCAG 2.2 AAA-oriented defaults**, a real **CLI ship surface**, the **Transparency Framework** (labeling + provenance, beta), and the first **Design Intelligence / AI Foundation** systems (beta). No external UI framework in the core.
|
|
36
36
|
|
|
37
37
|
**Best fit today:** marketing landings, docs shells, simple admin starters.
|
|
38
38
|
**Not yet:** sole primary stack for large multipage shop + enterprise admin without custom work.
|
|
39
39
|
|
|
40
|
-
> **Release:** **1.2.
|
|
40
|
+
> **Release:** **1.2.1** (Transparency Framework + Core + Design Intelligence Foundation + Trust/Ship). Using VelinStyle does **not** certify your app — see the [a11y matrix](https://velinstyle.info/docs/getting-started/accessibility.html).
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -64,7 +64,8 @@ Compared to **Bootstrap**: modern tokens/layers, optional progressive WCs, CLI a
|
|
|
64
64
|
| 🎨 | **CSS Framework** | OKLCH themes, utilities, components, lite preset for marketing budgets |
|
|
65
65
|
| 🧩 | **Web Components** | 40 canonical custom elements; use CSS alone when you need no JS |
|
|
66
66
|
| ⚡ | **Runtime** | Search, motion, highlight, attributes, `bootFromDOM` tree-shaking |
|
|
67
|
-
| 🛠 | **CLI** | `create` · `serve` · `doctor` · `check` · `scan` · `review` · `skills` |
|
|
67
|
+
| 🛠 | **CLI** | `create` · `serve` · `doctor` · `check` · `scan` · `review` · `skills` · `transparency` |
|
|
68
|
+
| 🔎 | **Transparency** | Labeling + provenance (AI / trust / compliance / metadata) — beta foundation |
|
|
68
69
|
| 🧠 | **Design Intelligence** | Plan → constraints → page/section registry → review (beta) |
|
|
69
70
|
| 🤖 | **AI Skills** | 40 skills, packs, bundles, templates, workflow graphs (beta) |
|
|
70
71
|
| 📦 | **Registry** | Skills + page/section registries as machine-readable contracts |
|
|
@@ -77,17 +78,12 @@ Compared to **Bootstrap**: modern tokens/layers, optional progressive WCs, CLI a
|
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
80
|
-
## What's new in 1.2
|
|
81
|
+
## What's new in 1.2.1
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
- **Transparency Framework (beta)** — `@birdapi/velinstyle/transparency`, `velin-transparency` bridge, claim taxonomy, CLI `transparency doctor|validate|report|export|migrate`
|
|
84
|
+
- Builds on **1.2.0** foundation: ship surface, Design Intelligence, AI Skills, new WC primitives
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
- **Design Intelligence (beta)** — Prompt Engine (`plan`), Review Engine, knowledge graph seed, design constraints
|
|
86
|
-
- **AI Foundation (beta)** — skill engine, workflows, richer agent metadata
|
|
87
|
-
- **New primitives** — `<velin-calendar>`, `<velin-file-dropzone>`, editable `<velin-data-table>`
|
|
88
|
-
- **Trust gates** — stricter scan/review so junk pages cannot fake green scores
|
|
89
|
-
|
|
90
|
-
Details: [`RELEASE_NOTES_1.2.0.md`](RELEASE_NOTES_1.2.0.md) · full history: [`CHANGELOG.md`](CHANGELOG.md)
|
|
86
|
+
Details: [`CHANGELOG.md`](CHANGELOG.md) · 1.2.0 overview: [`RELEASE_NOTES_1.2.0.md`](RELEASE_NOTES_1.2.0.md)
|
|
91
87
|
|
|
92
88
|
---
|
|
93
89
|
|
|
@@ -103,11 +99,11 @@ bun add @birdapi/velinstyle
|
|
|
103
99
|
**CDN** (pin a version):
|
|
104
100
|
|
|
105
101
|
```html
|
|
106
|
-
<link rel="stylesheet" href="https://unpkg.com/@birdapi/velinstyle@1.2.
|
|
107
|
-
<script type="module" src="https://unpkg.com/@birdapi/velinstyle@1.2.
|
|
102
|
+
<link rel="stylesheet" href="https://unpkg.com/@birdapi/velinstyle@1.2.1/dist/velinstyle.min.css">
|
|
103
|
+
<script type="module" src="https://unpkg.com/@birdapi/velinstyle@1.2.1/dist/velinstyle-components.min.js"></script>
|
|
108
104
|
```
|
|
109
105
|
|
|
110
|
-
> Pin **`@1.2.
|
|
106
|
+
> Pin **`@1.2.1`** (or `@latest` after publish). Examples above match this package version.
|
|
111
107
|
|
|
112
108
|
| Export | Use |
|
|
113
109
|
|--------|-----|
|
|
@@ -127,8 +123,8 @@ After clone: `npm install && npm run build` — `dist/` is generated, not commit
|
|
|
127
123
|
<head>
|
|
128
124
|
<meta charset="UTF-8">
|
|
129
125
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
130
|
-
<link rel="stylesheet" href="https://unpkg.com/@birdapi/velinstyle@1.2.
|
|
131
|
-
<script type="module" src="https://unpkg.com/@birdapi/velinstyle@1.2.
|
|
126
|
+
<link rel="stylesheet" href="https://unpkg.com/@birdapi/velinstyle@1.2.1/dist/velinstyle.min.css">
|
|
127
|
+
<script type="module" src="https://unpkg.com/@birdapi/velinstyle@1.2.1/dist/velinstyle-components.min.js"></script>
|
|
132
128
|
</head>
|
|
133
129
|
<body class="velin-p-6">
|
|
134
130
|
<button type="button" class="velin-btn velin-btn--primary">Ship it</button>
|
|
@@ -157,9 +153,10 @@ More: [`GETTING_STARTED.md`](GETTING_STARTED.md)
|
|
|
157
153
|
| `build` | CSS build (`--preset lite` for marketing) |
|
|
158
154
|
| `serve` | Static preview |
|
|
159
155
|
| `doctor` | Install / path health |
|
|
160
|
-
| `check` | doctor + blueprints + scan + review |
|
|
156
|
+
| `check` | doctor + blueprints + scan + review (+ Transparency scores) |
|
|
161
157
|
| `scan` | A11y / security / CSS / PII |
|
|
162
158
|
| `review` | Design-intelligence gate (beta) |
|
|
159
|
+
| `transparency` | doctor · validate · report · export · migrate (beta) |
|
|
163
160
|
| `plan` | Prompt → plan JSON → render (beta) |
|
|
164
161
|
| `skills` / `workflow` | AI skill registry & graphs (beta) |
|
|
165
162
|
| `meta` | Agent bundle + `llms.txt` |
|
|
@@ -167,6 +164,7 @@ More: [`GETTING_STARTED.md`](GETTING_STARTED.md)
|
|
|
167
164
|
|
|
168
165
|
```bash
|
|
169
166
|
npx @birdapi/velinstyle check . --profile marketing
|
|
167
|
+
npx @birdapi/velinstyle transparency doctor . --policy examples/transparency.policy.json
|
|
170
168
|
npx @birdapi/velinstyle wc api velin-toast
|
|
171
169
|
```
|
|
172
170
|
|
|
@@ -204,7 +202,7 @@ Accessibility is a **default**, not a plugin.
|
|
|
204
202
|
- `prefers-reduced-motion` gating
|
|
205
203
|
- Component a11y contracts + scanner rules
|
|
206
204
|
|
|
207
|
-
Docs: [a11y matrix](https://velinstyle.info/docs/
|
|
205
|
+
Docs: [a11y matrix](https://velinstyle.info/docs/getting-started/accessibility.html) · AAA marketing language: see `VELINSTYLE_2030.md` (strategy ADRs are local-only)
|
|
208
206
|
|
|
209
207
|
---
|
|
210
208
|
|
|
@@ -222,7 +220,8 @@ Docs: [a11y matrix](https://velinstyle.info/docs/a11y.html) · AAA marketing lan
|
|
|
222
220
|
| CLI ship surface | [`docs/guides/cli-ship-surface.md`](docs/guides/cli-ship-surface.md) | create / check / wc |
|
|
223
221
|
| AI Skills | [`docs/guides/ai-skills.md`](docs/guides/ai-skills.md) | Skills / workflows |
|
|
224
222
|
| Product site | [velinstyle.info/docs](https://velinstyle.info/docs/getting-started/introduction.html) | Guides, demos, reference |
|
|
225
|
-
|
|
|
223
|
+
| Transparency | [Site guide](https://velinstyle.info/docs/guides/transparency.html) · `@birdapi/velinstyle/transparency` | Labeling + provenance |
|
|
224
|
+
| Upgrade | [`UPGRADING.md`](UPGRADING.md) | 1.2.0 → 1.2.1 · 1.1 → 1.2 |
|
|
226
225
|
| North star | [`VELINSTYLE_2030.md`](VELINSTYLE_2030.md) | Long-term vision |
|
|
227
226
|
|
|
228
227
|
---
|
|
@@ -233,7 +232,7 @@ Docs: [a11y matrix](https://velinstyle.info/docs/a11y.html) · AAA marketing lan
|
|
|
233
232
|
velinstyle/
|
|
234
233
|
├── src/ # CSS source (tokens, base, components, utilities)
|
|
235
234
|
├── components/ # Web Components (JS)
|
|
236
|
-
├── core/ # Runtime: search, motion, highlight, attributes, meta
|
|
235
|
+
├── core/ # Runtime: search, motion, highlight, attributes, meta, transparency
|
|
237
236
|
├── cli/ # velinstyle binary
|
|
238
237
|
├── packages/ # React wrappers, skill-engine, skills registry
|
|
239
238
|
├── schemas/ # Design Intelligence + skill contracts
|
|
@@ -259,8 +258,8 @@ Humans own product intent. The framework ships reliable CSS and components. Desi
|
|
|
259
258
|
| Status | Surfaces |
|
|
260
259
|
|--------|----------|
|
|
261
260
|
| **Stable** | CSS · Utilities · Runtime · Web Components · CLI core · Blueprints |
|
|
262
|
-
| **Beta** | Review Engine · Prompt Engine · Knowledge Graph · AI Metadata · Design Constraints |
|
|
263
|
-
| **Foundation** | AI Skills · Workflow Graphs · Registries |
|
|
261
|
+
| **Beta** | Transparency Framework · Review Engine · Prompt Engine · Knowledge Graph · AI Metadata · Design Constraints |
|
|
262
|
+
| **Foundation** | AI Skills · Workflow Graphs · Registries · Transparency pillars |
|
|
264
263
|
| **Planned** | Studio · Utility Engine Generator |
|
|
265
264
|
|
|
266
265
|
---
|
|
@@ -274,7 +273,7 @@ Humans own product intent. The framework ships reliable CSS and components. Desi
|
|
|
274
273
|
| A11y defaults | Partial | DIY | **AAA-capable tokens** |
|
|
275
274
|
| Dark mode | Manual | `dark:` everywhere | **Token swap** |
|
|
276
275
|
| Build required | No | Usually | **CDN optional** |
|
|
277
|
-
| Design / AI gates | — | — | **plan · review · skills** |
|
|
276
|
+
| Design / AI gates | — | — | **plan · review · skills · transparency** |
|
|
278
277
|
|
|
279
278
|
---
|
|
280
279
|
|
package/cli/cli-manifest.json
CHANGED
|
@@ -30,6 +30,8 @@ const ATTRIBUTE_DOCS = {
|
|
|
30
30
|
'velin-code': 'Code block with copy button and VelinHighlight syntax colors (use `language` or `velin-code="js"`).',
|
|
31
31
|
'velin-quote': 'Styled blockquote.',
|
|
32
32
|
'velin-highlight': 'Inline text mark (not syntax highlighting — use `velin-code` or `velinSyntax`).',
|
|
33
|
+
'velin-transparency': 'Velin Transparency Framework host — attaches disclosure + provenance mark (Renderer).',
|
|
34
|
+
'velin-disclosure': 'Alias for `velin-transparency`.',
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
/** Value | Meaning | Bridges to */
|
package/cli/index.js
CHANGED
|
@@ -45,6 +45,7 @@ const LAYER_FILES = {
|
|
|
45
45
|
'components/timeline.css', 'components/stepper.css', 'components/stat.css',
|
|
46
46
|
'components/drawer.css', 'components/input-group.css', 'components/form-validation.css', 'components/collapse.css',
|
|
47
47
|
'components/calendar-dropzone.css',
|
|
48
|
+
'components/transparency.css',
|
|
48
49
|
],
|
|
49
50
|
utilities: [
|
|
50
51
|
'utilities/color.css', 'utilities/spacing.css', 'utilities/display.css',
|
|
@@ -101,7 +102,8 @@ function help() {
|
|
|
101
102
|
velinstyle create <kind> [dir] Scaffold: landing|dashboard|docs|auth
|
|
102
103
|
velinstyle serve [dir] Static preview server (default port 4173)
|
|
103
104
|
velinstyle doctor Check dist, icons, config, Windows ESM paths
|
|
104
|
-
velinstyle
|
|
105
|
+
velinstyle transparency <sub> Transparency Framework: doctor|validate|report|export|migrate
|
|
106
|
+
velinstyle check [path] doctor + blueprint --strict + scan + review + transparency
|
|
105
107
|
velinstyle scaffold "<prompt>" Plan-first page HTML or recipe fragment
|
|
106
108
|
velinstyle plan "<prompt>" Emit page plan JSON (no HTML)
|
|
107
109
|
velinstyle review [file|html] Design / a11y / SEO / conversion review gate
|
|
@@ -146,10 +148,18 @@ function help() {
|
|
|
146
148
|
velinstyle scaffold list-intents Show recipe intent keywords
|
|
147
149
|
velinstyle scaffold "<prompt>" -o out.html [--json]
|
|
148
150
|
|
|
149
|
-
${C.bold('Plan / Review (1.2.
|
|
151
|
+
${C.bold('Plan / Review (1.2.x):')}
|
|
150
152
|
velinstyle plan "<prompt>" [--json] [-o plan.json]
|
|
151
153
|
velinstyle review <file.html> [--json] [--prompt "..."]
|
|
152
154
|
|
|
155
|
+
${C.bold('Transparency (1.2.1):')}
|
|
156
|
+
velinstyle transparency doctor [path|file] [--policy file] [--json]
|
|
157
|
+
velinstyle transparency validate [path|file] [--policy file] [--json]
|
|
158
|
+
velinstyle transparency report [path|file] [--out dir] [--policy file]
|
|
159
|
+
velinstyle transparency export [path|file] [--format json|json-ld|csv|html] [-o file]
|
|
160
|
+
velinstyle transparency migrate [path|file] [--apply] [--write] [--policy file]
|
|
161
|
+
Alias: transparency scan → doctor
|
|
162
|
+
|
|
153
163
|
${C.bold('Layout (0.8.0):')}
|
|
154
164
|
velinstyle layout audit [path] Report flex/grid/responsive issues
|
|
155
165
|
velinstyle layout suggest [path] Audit with fix suggestions
|
|
@@ -1123,6 +1133,20 @@ async function checkCmd() {
|
|
|
1123
1133
|
steps.push({ step: 'review', ok: true, skipped: true });
|
|
1124
1134
|
}
|
|
1125
1135
|
|
|
1136
|
+
if (!quiet) console.log(C.bold('\n── transparency ──'));
|
|
1137
|
+
try {
|
|
1138
|
+
const { transparencyCheckStep } = await import('./transparency.js');
|
|
1139
|
+
const tx = await transparencyCheckStep(htmlFile || target, { quiet, C });
|
|
1140
|
+
if (!tx.ok && !tx.skipped) failed += 1;
|
|
1141
|
+
if (!quiet && tx.scores) {
|
|
1142
|
+
console.log(`Transparency ${tx.scores.transparency}% · AI ${tx.scores.ai}% · Trust ${tx.scores.trust}% · Provenance ${tx.scores.provenance}%`);
|
|
1143
|
+
}
|
|
1144
|
+
steps.push({ step: 'transparency', ok: tx.ok || !!tx.skipped, scores: tx.scores, skipped: tx.skipped });
|
|
1145
|
+
} catch (err) {
|
|
1146
|
+
if (!quiet) console.log(C.yellow(`transparency skipped: ${err.message}`));
|
|
1147
|
+
steps.push({ step: 'transparency', ok: true, skipped: true, error: String(err.message || err) });
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1126
1150
|
const payload = {
|
|
1127
1151
|
ok: failed === 0,
|
|
1128
1152
|
failedSteps: failed,
|
|
@@ -1181,7 +1205,7 @@ async function checkCmd() {
|
|
|
1181
1205
|
function suggestCommand(unknown) {
|
|
1182
1206
|
const names = [
|
|
1183
1207
|
'init', 'build', 'themes', 'add', 'icons', 'blueprint', 'create', 'serve', 'doctor', 'check',
|
|
1184
|
-
'validate', 'tokens', 'scan', 'prefix', 'scaffold', 'plan', 'review', 'layout', 'perf',
|
|
1208
|
+
'validate', 'tokens', 'scan', 'prefix', 'scaffold', 'plan', 'review', 'transparency', 'layout', 'perf',
|
|
1185
1209
|
'docs', 'documentation', 'meta', 'search', 'skills', 'workflow', 'wc',
|
|
1186
1210
|
];
|
|
1187
1211
|
const q = String(unknown || '').toLowerCase();
|
|
@@ -1244,6 +1268,11 @@ switch (resolvedCommand) {
|
|
|
1244
1268
|
case 'scaffold': await scaffoldCmd(); break;
|
|
1245
1269
|
case 'plan': await planCmd(); break;
|
|
1246
1270
|
case 'review': await reviewCmd(); break;
|
|
1271
|
+
case 'transparency': {
|
|
1272
|
+
const { transparencyCmd } = await import('./transparency.js');
|
|
1273
|
+
await transparencyCmd(args.slice(1), { C, getArg, hasFlag });
|
|
1274
|
+
break;
|
|
1275
|
+
}
|
|
1247
1276
|
case 'layout': await layoutCmd(); break;
|
|
1248
1277
|
case 'perf': await perfCmd(); break;
|
|
1249
1278
|
case 'docs': await docsCmd(); break;
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI: velinstyle transparency doctor|validate|report|export|migrate|scan
|
|
3
|
+
*/
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, statSync } from 'fs';
|
|
5
|
+
import { join, resolve, extname, basename } from 'path';
|
|
6
|
+
import {
|
|
7
|
+
createTransparencyEngine,
|
|
8
|
+
normalizePolicy,
|
|
9
|
+
} from '../core/transparency/index.js';
|
|
10
|
+
|
|
11
|
+
function loadPolicy(policyPath) {
|
|
12
|
+
if (!policyPath) return normalizePolicy({});
|
|
13
|
+
const abs = resolve(policyPath);
|
|
14
|
+
if (!existsSync(abs)) throw new Error(`Policy not found: ${abs}`);
|
|
15
|
+
return normalizePolicy(JSON.parse(readFileSync(abs, 'utf-8')));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function collectHtmlFiles(target) {
|
|
19
|
+
const abs = resolve(target || '.');
|
|
20
|
+
if (!existsSync(abs)) throw new Error(`Path not found: ${abs}`);
|
|
21
|
+
const st = statSync(abs);
|
|
22
|
+
if (st.isFile()) return [abs];
|
|
23
|
+
const out = [];
|
|
24
|
+
const walk = (dir) => {
|
|
25
|
+
for (const name of readdirSync(dir)) {
|
|
26
|
+
if (name === 'node_modules' || name === '.git' || name === 'dist') continue;
|
|
27
|
+
const p = join(dir, name);
|
|
28
|
+
const s = statSync(p);
|
|
29
|
+
if (s.isDirectory()) walk(p);
|
|
30
|
+
else if (/\.html?$/i.test(name)) out.push(p);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
walk(abs);
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function printScores(scores, C) {
|
|
38
|
+
if (!scores) return;
|
|
39
|
+
console.log(C.bold('\nScores'));
|
|
40
|
+
for (const [k, v] of Object.entries(scores)) {
|
|
41
|
+
console.log(` ${k.padEnd(14)} ${v}%`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {string[]} args process.argv slice after "transparency"
|
|
47
|
+
* @param {{ C: object, getArg: Function, hasFlag: Function }} util
|
|
48
|
+
*/
|
|
49
|
+
export async function transparencyCmd(args, util) {
|
|
50
|
+
const { C, getArg, hasFlag } = util;
|
|
51
|
+
const sub = args[0] || 'doctor';
|
|
52
|
+
const rest = args.slice(1);
|
|
53
|
+
const target = rest.find((a) => !a.startsWith('-')) || '.';
|
|
54
|
+
const policyPath = getArg('--policy');
|
|
55
|
+
const policy = loadPolicy(policyPath);
|
|
56
|
+
const asJson = hasFlag('--json');
|
|
57
|
+
const engine = createTransparencyEngine({ policy });
|
|
58
|
+
|
|
59
|
+
if (sub === 'scan') {
|
|
60
|
+
return runDoctor(target, engine, { asJson, C });
|
|
61
|
+
}
|
|
62
|
+
if (sub === 'doctor') {
|
|
63
|
+
return runDoctor(target, engine, { asJson, C });
|
|
64
|
+
}
|
|
65
|
+
if (sub === 'validate') {
|
|
66
|
+
return runValidate(target, engine, { asJson, C });
|
|
67
|
+
}
|
|
68
|
+
if (sub === 'report') {
|
|
69
|
+
return runReport(target, engine, { C, getArg });
|
|
70
|
+
}
|
|
71
|
+
if (sub === 'export') {
|
|
72
|
+
return runExport(target, engine, { C, getArg });
|
|
73
|
+
}
|
|
74
|
+
if (sub === 'migrate') {
|
|
75
|
+
return runMigrate(target, engine, { C, hasFlag, getArg });
|
|
76
|
+
}
|
|
77
|
+
if (sub === 'suggest') {
|
|
78
|
+
return runMigrate(target, engine, { C, hasFlag, getArg, forceDry: true });
|
|
79
|
+
}
|
|
80
|
+
if (sub === 'apply') {
|
|
81
|
+
return runMigrate(target, engine, { C, hasFlag, getArg, forceApply: true });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
console.log(`Unknown transparency subcommand: ${sub}
|
|
85
|
+
Usage:
|
|
86
|
+
velinstyle transparency doctor|validate|report|export|migrate|scan [path]
|
|
87
|
+
`);
|
|
88
|
+
process.exitCode = 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async function runDoctor(target, engine, { asJson, C }) {
|
|
92
|
+
const files = collectHtmlFiles(target);
|
|
93
|
+
if (!files.length) {
|
|
94
|
+
console.log(C.yellow('No HTML files found.'));
|
|
95
|
+
process.exitCode = 1;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const reports = [];
|
|
99
|
+
let failed = 0;
|
|
100
|
+
for (const file of files) {
|
|
101
|
+
const html = readFileSync(file, 'utf-8');
|
|
102
|
+
const report = await engine.doctor(html, { file });
|
|
103
|
+
reports.push(report);
|
|
104
|
+
if (!report.ok) failed += 1;
|
|
105
|
+
if (!asJson) {
|
|
106
|
+
console.log(C.bold(`\n── ${basename(file)} ──`));
|
|
107
|
+
console.log(report.ok ? C.green('PASS') : C.red('FAIL'));
|
|
108
|
+
console.log(`disclosures=${report.summary.disclosures} errors=${report.summary.errors} warnings=${report.summary.warnings}`);
|
|
109
|
+
printScores(report.scores, C);
|
|
110
|
+
for (const f of report.findings.slice(0, 40)) {
|
|
111
|
+
const color = f.severity === 'error' ? C.red : f.severity === 'warning' ? C.yellow : C.dim;
|
|
112
|
+
console.log(color(` [${f.severity}] ${f.code}: ${f.message}`));
|
|
113
|
+
}
|
|
114
|
+
if (report.findings.length > 40) console.log(C.dim(` … ${report.findings.length - 40} more`));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (asJson) {
|
|
118
|
+
console.log(JSON.stringify(files.length === 1 ? reports[0] : { reports }, null, 2));
|
|
119
|
+
} else {
|
|
120
|
+
console.log(failed ? C.red(`\ntransparency doctor: ${failed} file(s) failed`) : C.green('\ntransparency doctor: ok'));
|
|
121
|
+
}
|
|
122
|
+
if (failed) process.exitCode = 1;
|
|
123
|
+
return reports;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async function runValidate(target, engine, { asJson, C }) {
|
|
127
|
+
const files = collectHtmlFiles(target);
|
|
128
|
+
const all = [];
|
|
129
|
+
let failed = 0;
|
|
130
|
+
for (const file of files) {
|
|
131
|
+
const html = readFileSync(file, 'utf-8');
|
|
132
|
+
const result = await engine.validate(html, { file });
|
|
133
|
+
all.push({ file, ...result });
|
|
134
|
+
if (!result.ok) failed += 1;
|
|
135
|
+
if (!asJson) {
|
|
136
|
+
console.log(`${basename(file)}: ${result.ok ? C.green('valid') : C.red('invalid')} (${result.findings.length} findings)`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (asJson) console.log(JSON.stringify(all, null, 2));
|
|
140
|
+
if (failed) process.exitCode = 1;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function runReport(target, engine, { C, getArg }) {
|
|
144
|
+
const outDir = resolve(getArg('--out') || 'transparency-report');
|
|
145
|
+
mkdirSync(outDir, { recursive: true });
|
|
146
|
+
const files = collectHtmlFiles(target);
|
|
147
|
+
const combined = { schema: 'velinstyle.transparency.report.bundle', version: 1, files: [] };
|
|
148
|
+
for (const file of files) {
|
|
149
|
+
const html = readFileSync(file, 'utf-8');
|
|
150
|
+
const artifacts = await engine.report(html, { file, title: `Transparency — ${basename(file)}` });
|
|
151
|
+
const base = basename(file, extname(file));
|
|
152
|
+
writeFileSync(join(outDir, `${base}.report.json`), JSON.stringify(artifacts.json, null, 2));
|
|
153
|
+
writeFileSync(join(outDir, `${base}.report.sarif`), JSON.stringify(artifacts.sarif, null, 2));
|
|
154
|
+
writeFileSync(join(outDir, `${base}.report.html`), artifacts.html);
|
|
155
|
+
combined.files.push({ file, scores: artifacts.json.scores, ok: artifacts.json.ok });
|
|
156
|
+
}
|
|
157
|
+
writeFileSync(join(outDir, 'index.json'), JSON.stringify(combined, null, 2));
|
|
158
|
+
console.log(C.green(`Wrote transparency reports to ${outDir}`));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
async function runExport(target, engine, { C, getArg }) {
|
|
162
|
+
const format = getArg('--format') || 'json';
|
|
163
|
+
const out = getArg('--output') || getArg('-o');
|
|
164
|
+
const files = collectHtmlFiles(target);
|
|
165
|
+
const fresh = createTransparencyEngine({ policy: engine.policy });
|
|
166
|
+
for (const file of files) {
|
|
167
|
+
const html = readFileSync(file, 'utf-8');
|
|
168
|
+
const { records } = await createTransparencyEngine({ policy: engine.policy }).ingest(html, { file });
|
|
169
|
+
for (const r of records) fresh.registry.register(r);
|
|
170
|
+
}
|
|
171
|
+
const body = fresh.export(format);
|
|
172
|
+
if (out) {
|
|
173
|
+
writeFileSync(resolve(out), body);
|
|
174
|
+
console.log(C.green(`Exported ${format} → ${out}`));
|
|
175
|
+
} else {
|
|
176
|
+
console.log(body);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
async function runMigrate(target, engine, { C, hasFlag, getArg, forceDry, forceApply }) {
|
|
181
|
+
const apply = forceApply || hasFlag('--apply') || hasFlag('--write');
|
|
182
|
+
const dryRun = forceDry || (!apply);
|
|
183
|
+
const files = collectHtmlFiles(target);
|
|
184
|
+
let total = 0;
|
|
185
|
+
for (const file of files) {
|
|
186
|
+
const html = readFileSync(file, 'utf-8');
|
|
187
|
+
const result = await engine.migrate(html, { file, apply: apply && !dryRun, dryRun });
|
|
188
|
+
total += result.suggestions.length;
|
|
189
|
+
console.log(C.bold(`\n── ${basename(file)} ──`));
|
|
190
|
+
console.log(`${result.suggestions.length} suggestion(s)${apply && !dryRun ? `, applied ${result.applied}` : ' (dry-run)'}`);
|
|
191
|
+
for (const s of result.suggestions.slice(0, 30)) {
|
|
192
|
+
console.log(C.dim(` • ${s.id || s.field || s.kind}: ${s.reason}`));
|
|
193
|
+
}
|
|
194
|
+
if (apply && !dryRun && result.applied) {
|
|
195
|
+
writeFileSync(file, result.html);
|
|
196
|
+
console.log(C.green(` wrote ${file}`));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (!total) console.log(C.green('\nNo migration suggestions.'));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Lightweight doctor for velinstyle check integration.
|
|
204
|
+
*/
|
|
205
|
+
export async function transparencyCheckStep(path, { policyPath, quiet, C } = {}) {
|
|
206
|
+
const policy = loadPolicy(policyPath);
|
|
207
|
+
const engine = createTransparencyEngine({ policy });
|
|
208
|
+
const files = collectHtmlFiles(path);
|
|
209
|
+
if (!files.length) return { ok: true, skipped: true, scores: null };
|
|
210
|
+
let failed = 0;
|
|
211
|
+
let lastScores = null;
|
|
212
|
+
for (const file of files.slice(0, 20)) {
|
|
213
|
+
const report = await engine.doctor(readFileSync(file, 'utf-8'), { file });
|
|
214
|
+
lastScores = report.scores;
|
|
215
|
+
if (!report.ok) failed += 1;
|
|
216
|
+
if (!quiet) {
|
|
217
|
+
console.log(` ${basename(file)}: transparency ${report.scores?.transparency ?? '—'}% (${report.summary.errors} errors)`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return { ok: failed === 0, failed, scores: lastScores };
|
|
221
|
+
}
|
|
@@ -226,6 +226,20 @@ function registerBuiltins() {
|
|
|
226
226
|
},
|
|
227
227
|
});
|
|
228
228
|
|
|
229
|
+
registerAttribute('velin-transparency', {
|
|
230
|
+
async enhance(el) {
|
|
231
|
+
const { attach } = await import('../transparency/attach.js');
|
|
232
|
+
attach(el);
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
registerAttribute('velin-disclosure', {
|
|
236
|
+
async enhance(el) {
|
|
237
|
+
const { attach } = await import('../transparency/attach.js');
|
|
238
|
+
if (!el.hasAttribute('velin-transparency')) el.setAttribute('velin-transparency', '');
|
|
239
|
+
attach(el);
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
|
|
229
243
|
for (const motion of ['velin-reveal', 'velin-fade', 'velin-slide', 'velin-scale', 'velin-parallax', 'velin-hover', 'velin-stagger', 'velin-scroll']) {
|
|
230
244
|
registerAttribute(motion, { enhance() {} });
|
|
231
245
|
}
|
package/core/meta/schema.js
CHANGED
|
@@ -48,4 +48,14 @@ export const AGENT_CONVENTIONS = [
|
|
|
48
48
|
'Honor skill status, confidence, compatibility, and onlyIf predicates when automating.',
|
|
49
49
|
'Do not put secrets, API keys, or raw emails in velin-meta or page meta.',
|
|
50
50
|
'Resolve doc links against docs root (/docs/), not the current page folder.',
|
|
51
|
+
'Prefer Velin Transparency Framework (velin-transparency + provenance) for AI/trust/compliance labeling; run `velinstyle transparency doctor`.',
|
|
51
52
|
];
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Optional page-level transparency block for Velin Meta.
|
|
56
|
+
* @typedef {Object} VelinPageTransparency
|
|
57
|
+
* @property {object} [policy]
|
|
58
|
+
* @property {object[]} [disclosures]
|
|
59
|
+
* @property {object[]} [items]
|
|
60
|
+
*/
|
|
61
|
+
|