openuispec 0.1.12 → 0.1.13

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/index.ts CHANGED
@@ -45,7 +45,7 @@ Usage:
45
45
 
46
46
  Validate groups: manifest, tokens, screens, flows, platform, locales, custom_contracts
47
47
 
48
- Docs: node_modules/openuispec/spec/openuispec-v0.1.md
48
+ Docs: https://openuispec.rsteam.uz
49
49
  `);
50
50
  break;
51
51
 
package/cli/init.ts CHANGED
@@ -170,16 +170,19 @@ 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
173
+ ## Learning OpenUISpec — where to find the docs
174
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/\`
175
+ All documentation is included in the installed \`openuispec\` package. Search for it in this order:
176
+ 1. **Local:** \`node_modules/openuispec/\` (if installed as a project dependency)
177
+ 2. **Global:** run \`npm root -g\` to find the global prefix, then look in \`<prefix>/openuispec/\`
178
+ 3. **Online fallback:** if the package is not installed at all, fetch from:
179
+ - \`https://openuispec.rsteam.uz/llms-full.txt\` — complete spec + all JSON schemas in one file
180
+ - \`https://openuispec.rsteam.uz/llms.txt\` — concise summary with links
179
181
 
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
182
+ Inside the package:
183
+ - **Full specification:** \`spec/openuispec-v0.1.md\`
184
+ - **Example app:** \`examples/taskflow/\`
185
+ - **JSON Schemas:** \`schema/\`
183
186
 
184
187
  ## Token file structure — root wrapper key required
185
188
 
@@ -219,9 +222,9 @@ Root keys: \`color\`, \`typography\`, \`spacing\`, \`elevation\`, \`motion\`, \`
219
222
  | \`tokens/themes.yaml\` | \`tokens/themes.schema.json\` | \`themes\` |
220
223
  | \`tokens/icons.yaml\` | \`tokens/icons.schema.json\` | \`icons\` |
221
224
 
222
- All schemas are in \`node_modules/openuispec/schema/\`. Shared type definitions (actions, data-binding, adaptive, validation, common) are in \`schema/defs/\`.
225
+ All schemas are in \`schema/\` inside the installed package. Shared type definitions (actions, data-binding, adaptive, validation, common) are in \`schema/defs/\`.
223
226
 
224
- **Workflow:** read the schema → read an example from \`node_modules/openuispec/examples/taskflow/\` → create the YAML → run \`openuispec validate\`.
227
+ **Workflow:** read the schema → read an example from \`examples/taskflow/\` → create the YAML → run \`openuispec validate\`.
225
228
 
226
229
  ## Spec format quick reference
227
230
 
@@ -247,12 +250,12 @@ This project generates native code for: **${targetList}**
247
250
 
248
251
  ## Learn more
249
252
 
250
- All docs and examples are local in \`node_modules/openuispec/\` read from disk, not from GitHub.
253
+ All docs and examples are in the installed \`openuispec\` package — check \`node_modules/openuispec/\` or run \`npm root -g\` for the global install path.
251
254
 
252
- - Full spec: \`node_modules/openuispec/spec/openuispec-v0.1.md\`
253
- - Example app: \`node_modules/openuispec/examples/taskflow/\`
254
- - JSON Schemas: \`node_modules/openuispec/schema/\`
255
- - Repository: \`node_modules/openuispec/\` (all files included)
255
+ - Full spec: \`spec/openuispec-v0.1.md\`
256
+ - Example app: \`examples/taskflow/\`
257
+ - JSON Schemas: \`schema/\`
258
+ - Online reference: \`https://openuispec.rsteam.uz/llms-full.txt\`
256
259
  `;
257
260
  }
258
261
 
@@ -311,15 +314,18 @@ This means the project has existing UI code but hasn't been specced yet. Your jo
311
314
  2. Run \`openuispec drift --snapshot --target <target>\` for each affected platform.
312
315
  3. Run \`openuispec drift\` to verify no untracked drift remains.
313
316
 
314
- ## Learning OpenUISpec — local files and online reference
315
- All documentation is included in the installed package at \`node_modules/openuispec/\`:
316
- 1. **Full specification:** \`node_modules/openuispec/spec/openuispec-v0.1.md\` — the complete spec (read this to understand the format)
317
- 2. **Example app:** \`node_modules/openuispec/examples/taskflow/\` a complete working app with all file types
318
- 3. **JSON Schemas:** \`node_modules/openuispec/schema/\` validation schemas that define the exact structure of every file type
317
+ ## Learning OpenUISpec — where to find the docs
318
+ All documentation is in the installed \`openuispec\` package. Search in this order:
319
+ 1. **Local:** \`node_modules/openuispec/\` (project dependency)
320
+ 2. **Global:** run \`npm root -g\` to get the global prefix, then look in \`<prefix>/openuispec/\`
321
+ 3. **Online fallback:** if not installed, fetch from:
322
+ - \`https://openuispec.rsteam.uz/llms-full.txt\` — complete spec + all JSON schemas
323
+ - \`https://openuispec.rsteam.uz/llms.txt\` — concise summary with links
319
324
 
320
- If the package is not in node_modules, fetch the full reference from:
321
- - \`https://openuispec.rsteam.uz/llms-full.txt\` — complete spec + all JSON schemas in one file
322
- - \`https://openuispec.rsteam.uz/llms.txt\`concise summary with links
325
+ Inside the package:
326
+ 1. **Full specification:** \`spec/openuispec-v0.1.md\` — the complete spec (read this to understand the format)
327
+ 2. **Example app:** \`examples/taskflow/\`a complete working app with all file types
328
+ 3. **JSON Schemas:** \`schema/\` — validation schemas that define the exact structure of every file type
323
329
 
324
330
  ## Token file structure — root wrapper key required
325
331
  Every token file must have a single root key matching the token type. Do NOT put properties at the top level.
@@ -335,7 +341,7 @@ Every token file must have a single root key matching the token type. Do NOT put
335
341
  ## File formats and schemas — read before creating spec files
336
342
  Before creating or editing any spec file, read the corresponding JSON Schema. Do not guess the file format.
337
343
 
338
- | File | Schema (in \`node_modules/openuispec/schema/\`) | Root key |
344
+ | File | Schema (in \`schema/\` inside the installed package) | Root key |
339
345
  |------|--------|----------|
340
346
  | \`openuispec.yaml\` | \`openuispec.schema.json\` | \`spec_version\` |
341
347
  | \`screens/*.yaml\` | \`screen.schema.json\` | \`<screen_id>\` |
@@ -354,7 +360,7 @@ Before creating or editing any spec file, read the corresponding JSON Schema. Do
354
360
 
355
361
  Shared type definitions (actions, data-binding, adaptive, validation, common) are in \`schema/defs/\`.
356
362
 
357
- Workflow: read the schema → read an example from \`node_modules/openuispec/examples/taskflow/\` → create the YAML → run \`openuispec validate\`.
363
+ Workflow: read the schema → read an example from \`examples/taskflow/\` → create the YAML → run \`openuispec validate\`.
358
364
 
359
365
  ## Spec format reference
360
366
  - 7 contract families: nav_container, surface, action_trigger, input_field, data_display, collection, feedback
@@ -499,7 +505,7 @@ Commands:
499
505
 
500
506
  AI rules have been added to CLAUDE.md and AGENTS.md.
501
507
 
502
- Docs: node_modules/openuispec/spec/openuispec-v0.1.md
508
+ Docs: https://openuispec.rsteam.uz
503
509
  `);
504
510
  } catch (err) {
505
511
  rl.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openuispec",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A semantic UI specification format for AI-native, platform-native app development",
@@ -97,10 +97,8 @@ function validateFile(
97
97
  }
98
98
 
99
99
  // Convert schema URL to a local path for display
100
- const schemaLocalPath = schemaId.replace(
101
- BASE,
102
- "node_modules/openuispec/schema/",
103
- );
100
+ const schemaRelPath = schemaId.replace(BASE, "");
101
+ const schemaLocalPath = resolve(SCHEMA_DIR, schemaRelPath);
104
102
 
105
103
  const errors: ErrorObject[] = validate.errors ?? [];
106
104
  console.log(` FAIL ${name} (${errors.length} error(s))`);