openuispec 0.1.6 → 0.1.8
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/cli/init.ts +67 -0
- package/package.json +2 -1
package/cli/init.ts
CHANGED
|
@@ -170,6 +170,50 @@ OpenUISpec is a YAML-based format that describes your app's UI semantically —
|
|
|
170
170
|
- \`draft\` — actively being specced. Tracked by drift.
|
|
171
171
|
- \`ready\` — fully specified (default if omitted). Tracked by drift.
|
|
172
172
|
|
|
173
|
+
## Learning OpenUISpec — local files and online reference
|
|
174
|
+
|
|
175
|
+
All documentation is included in the installed package at \`node_modules/openuispec/\`:
|
|
176
|
+
1. **Full specification:** \`node_modules/openuispec/spec/openuispec-v0.1.md\`
|
|
177
|
+
2. **Example app:** \`node_modules/openuispec/examples/taskflow/\`
|
|
178
|
+
3. **JSON Schemas:** \`node_modules/openuispec/schema/\`
|
|
179
|
+
|
|
180
|
+
If the package is not in node_modules, fetch the full reference from:
|
|
181
|
+
- \`https://openuispec.rsteam.uz/llms-full.txt\` — complete spec + all JSON schemas in one file
|
|
182
|
+
- \`https://openuispec.rsteam.uz/llms.txt\` — concise summary with links
|
|
183
|
+
|
|
184
|
+
## JSON Schemas (validation & file structure)
|
|
185
|
+
|
|
186
|
+
**IMPORTANT:** Before creating or editing any spec file, read the corresponding JSON Schema to understand the valid structure. Schemas are located in the installed package:
|
|
187
|
+
|
|
188
|
+
\`\`\`
|
|
189
|
+
node_modules/openuispec/schema/
|
|
190
|
+
├── openuispec.schema.json ← root manifest (openuispec.yaml)
|
|
191
|
+
├── screen.schema.json ← screen files (screens/*.yaml)
|
|
192
|
+
├── flow.schema.json ← flow files (flows/*.yaml)
|
|
193
|
+
├── platform.schema.json ← platform overrides (platform/*.yaml)
|
|
194
|
+
├── locale.schema.json ← locale files (locales/*.json)
|
|
195
|
+
├── custom-contract.schema.json ← custom contracts (contracts/*.yaml)
|
|
196
|
+
├── tokens/
|
|
197
|
+
│ ├── color.schema.json ← tokens/color.yaml
|
|
198
|
+
│ ├── typography.schema.json ← tokens/typography.yaml
|
|
199
|
+
│ ├── spacing.schema.json ← tokens/spacing.yaml
|
|
200
|
+
│ ├── elevation.schema.json ← tokens/elevation.yaml
|
|
201
|
+
│ ├── motion.schema.json ← tokens/motion.yaml
|
|
202
|
+
│ ├── layout.schema.json ← tokens/layout.yaml
|
|
203
|
+
│ ├── themes.schema.json ← tokens/themes.yaml
|
|
204
|
+
│ └── icons.schema.json ← tokens/icons.yaml
|
|
205
|
+
└── defs/
|
|
206
|
+
├── common.schema.json ← shared types (icons, badges, etc.)
|
|
207
|
+
├── action.schema.json ← 13 action types (discriminated union)
|
|
208
|
+
├── data-binding.schema.json ← data sources, state, params
|
|
209
|
+
├── adaptive.schema.json ← adaptive override pattern
|
|
210
|
+
└── validation.schema.json ← validation rule definitions
|
|
211
|
+
\`\`\`
|
|
212
|
+
|
|
213
|
+
**Workflow:** read the schema → create the YAML file → run \`openuispec validate\` to verify.
|
|
214
|
+
|
|
215
|
+
**Example spec files:** \`node_modules/openuispec/examples/taskflow/\` — a complete app demonstrating all file types. Read these for real-world examples of screens, flows, tokens, and platform overrides.
|
|
216
|
+
|
|
173
217
|
## Spec format quick reference
|
|
174
218
|
|
|
175
219
|
- **7 contract families:** nav_container, surface, action_trigger, input_field, data_display, collection, feedback
|
|
@@ -255,6 +299,29 @@ This means the project has existing UI code but hasn't been specced yet. Your jo
|
|
|
255
299
|
2. Run \`openuispec drift --snapshot --target <target>\` for each affected platform.
|
|
256
300
|
3. Run \`openuispec drift\` to verify no untracked drift remains.
|
|
257
301
|
|
|
302
|
+
## Learning OpenUISpec — local files and online reference
|
|
303
|
+
All documentation is included in the installed package at \`node_modules/openuispec/\`:
|
|
304
|
+
1. **Full specification:** \`node_modules/openuispec/spec/openuispec-v0.1.md\` — the complete spec (read this to understand the format)
|
|
305
|
+
2. **Example app:** \`node_modules/openuispec/examples/taskflow/\` — a complete working app with all file types
|
|
306
|
+
3. **JSON Schemas:** \`node_modules/openuispec/schema/\` — validation schemas that define the exact structure of every file type
|
|
307
|
+
|
|
308
|
+
If the package is not in node_modules, fetch the full reference from:
|
|
309
|
+
- \`https://openuispec.rsteam.uz/llms-full.txt\` — complete spec + all JSON schemas in one file
|
|
310
|
+
- \`https://openuispec.rsteam.uz/llms.txt\` — concise summary with links
|
|
311
|
+
|
|
312
|
+
## JSON Schemas — read before creating spec files
|
|
313
|
+
Before creating or editing any spec file, read the corresponding JSON Schema to understand the valid structure:
|
|
314
|
+
- \`node_modules/openuispec/schema/openuispec.schema.json\` — root manifest
|
|
315
|
+
- \`node_modules/openuispec/schema/screen.schema.json\` — screens
|
|
316
|
+
- \`node_modules/openuispec/schema/flow.schema.json\` — flows
|
|
317
|
+
- \`node_modules/openuispec/schema/platform.schema.json\` — platform overrides
|
|
318
|
+
- \`node_modules/openuispec/schema/locale.schema.json\` — locales
|
|
319
|
+
- \`node_modules/openuispec/schema/custom-contract.schema.json\` — custom contracts
|
|
320
|
+
- \`node_modules/openuispec/schema/tokens/*.schema.json\` — token files (color, typography, spacing, elevation, motion, layout, themes, icons)
|
|
321
|
+
- \`node_modules/openuispec/schema/defs/*.schema.json\` — shared types (actions, data-binding, adaptive, validation, common)
|
|
322
|
+
|
|
323
|
+
Workflow: read the spec → read the schema → read an example → create the YAML → run \`openuispec validate\`.
|
|
324
|
+
|
|
258
325
|
## Spec format reference
|
|
259
326
|
- 7 contract families: nav_container, surface, action_trigger, input_field, data_display, collection, feedback
|
|
260
327
|
- Custom contracts: prefixed with \`x_\` (e.g., \`x_media_player\`)
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openuispec",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A semantic UI specification format for AI-native, platform-native app development",
|
|
7
|
+
"homepage": "https://openuispec.rsteam.uz",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "https://github.com/rsktash/openuispec.git"
|