view-contracts 0.3.0 → 0.3.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 CHANGED
@@ -116,7 +116,6 @@ The generated output is deterministic.
116
116
  - DSL preview runtime (`src/preview/`)
117
117
  - In-memory View IR compilation
118
118
  - Standalone app scaffold (`.vite/` per example project)
119
- - Static catalog generation
120
119
 
121
120
  ### Planned
122
121
 
@@ -144,7 +143,6 @@ flowchart TB
144
143
 
145
144
  openapi --> microContracts["micro-contracts generate"]
146
145
  microContracts --> contractsTs["generated/contracts.ts"]
147
- microContracts --> mockTs["generated/mock.ts"]
148
146
 
149
147
  openapi --> bindings["view-bindings.yaml"]
150
148
  viewTsx --> bindings
@@ -183,18 +181,18 @@ flowchart TB
183
181
  flowchart LR
184
182
  openapi["openapi.yaml"] --> microContracts["micro-contracts"]
185
183
  microContracts --> contractsTs["contracts.ts"]
186
- microContracts --> mockTs["mock.ts"]
187
184
 
188
185
  contractsTs --> viewTsx["*.view.tsx"]
189
- viewTsx --> preview["src/preview/"]
190
- mockTs --> preview
186
+ mockYaml["views/preview/*.mock.yaml"] --> previewPlugin["preview mock plugin"]
187
+ viewTsx --> preview["Vite preview"]
188
+ previewPlugin --> preview
191
189
 
192
190
  preview --> reactDev["Vite dev server<br/>design verification"]
193
191
  ```
194
192
 
195
- Designers and developers validate layouts **without running the full build**. The preview still consumes OpenAPI-derived ViewModel types and mock data.
193
+ Designers and developers validate layouts **without running the full build**. Preview loads sample ViewModels from `views/preview/*.mock.yaml` (not from `generated/`). Production apps load real data via `operationId` in view-bindings.
196
194
 
197
- See [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) and [docs/SPEC_COVERAGE.md](./docs/SPEC_COVERAGE.md) for implementation details.
195
+ See [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) (including [conditional display patterns](./docs/ARCHITECTURE.md#conditional-display-non-goals-and-patterns)) and [docs/SPEC_COVERAGE.md](./docs/SPEC_COVERAGE.md) for implementation details.
198
196
 
199
197
  ---
200
198
 
@@ -219,7 +217,6 @@ Other useful commands:
219
217
  npm run dev:preview # preview only
220
218
  npm run dev:app # standalone dev app only
221
219
  npm run check:both # build + preview dev + production bundle (4174)
222
- npm run build:catalog # static gallery HTML
223
220
  ```
224
221
 
225
222
  ---
@@ -241,6 +238,8 @@ examples/admin-dashboard/
241
238
 
242
239
  See [examples/admin-dashboard/README.md](./examples/admin-dashboard/README.md) for local verification steps.
243
240
 
241
+ Project-specific extension components (e.g. `Grid`, `Table`) are declared in `extensions.yaml` and documented in [docs/extensions.md](./docs/extensions.md). Vocabulary elements come from `spec/ui-dsl.schema.json`; extensions are React-only pass-through components.
242
+
244
243
  ---
245
244
 
246
245
  ## Project Layout
@@ -255,7 +254,6 @@ src/
255
254
  │ └── runtime/ # React primitives (@view-contracts/components SSoT)
256
255
  ├── preview/ # DSL preview helpers (@view-contracts/preview)
257
256
  ├── scaffold/ # .vite/ + package.json for example projects
258
- ├── catalog/ # static catalog builder
259
257
  └── commands/ # CLI handlers (build orchestrator)
260
258
 
261
259
  packages/
package/cli-contract.yaml CHANGED
@@ -3,7 +3,7 @@ cli_contracts: 0.1.0
3
3
 
4
4
  info:
5
5
  title: view-contracts CLI
6
- version: 0.3.0
6
+ version: 0.3.2
7
7
  description: >-
8
8
  Contract-first UI design toolchain. Compiles restricted view-contract TSX
9
9
  to language-neutral View IR and renders platform targets (React, SwiftUI, Compose).
@@ -162,40 +162,3 @@ command_sets:
162
162
  description: Lint passed.
163
163
  '1':
164
164
  description: Lint failed.
165
-
166
- catalog.build:
167
- summary: Build static catalog HTML for design review.
168
- description: >-
169
- Renders all registered views with mock ViewModels into a single HTML file
170
- for design review, screenshot baselines, and accessibility checks.
171
- usage:
172
- - view-contracts catalog build
173
- - view-contracts catalog build -c view-contracts.config.yaml
174
- - view-contracts catalog build -o dist/catalog.html
175
- options:
176
- - name: config
177
- aliases: [c]
178
- description: Path to view-contracts.config.yaml (discovered upward from cwd when omitted).
179
- value_name: path
180
- schema:
181
- type: string
182
- - name: output
183
- aliases: [o]
184
- description: Output HTML path (defaults to dist/catalog.html next to bindings).
185
- value_name: path
186
- schema:
187
- type: string
188
- file:
189
- mode: write
190
- media_type: text/html
191
- encoding: utf-8
192
- exits:
193
- '0':
194
- description: Catalog built.
195
- files:
196
- - path: dist/catalog.html
197
- required: false
198
- media_type: text/html
199
- encoding: utf-8
200
- '1':
201
- description: Build failed.