uniweb 0.2.48 → 0.2.50

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
@@ -83,18 +83,16 @@ Frontmatter specifies the component type and configuration. The body contains th
83
83
 
84
84
  ### Beyond Markdown
85
85
 
86
- For content that doesn't fit markdown patterns—products, team members, events—use JSON blocks with schema tags:
86
+ For content that doesn't fit markdown patterns—products, team members, events—use tagged code blocks:
87
87
 
88
88
  ````markdown
89
- ```json #team-member
90
- {
91
- "name": "Sarah Chen",
92
- "role": "Lead Architect"
93
- }
89
+ ```yaml:team-member
90
+ name: Sarah Chen
91
+ role: Lead Architect
94
92
  ```
95
93
  ````
96
94
 
97
- Components receive validated, localized data. Natural content stays in markdown; structured data goes in JSON blocks.
95
+ Components receive validated, localized data. Natural content stays in markdown; structured data goes in tagged blocks (YAML or JSON).
98
96
 
99
97
  ### Components as React
100
98
 
@@ -134,7 +132,7 @@ After creating your project:
134
132
 
135
133
  3. **Learn the configuration** — Run `uniweb docs site` or `uniweb docs page` for quick reference on configuration options.
136
134
 
137
- 4. **Create a component** — Add a folder in `foundation/src/components/`, create `index.jsx` and `meta.js`, then rebuild. See the [meta.js guide](https://github.com/uniweb/cli/blob/main/docs/meta/README.md) for the full schema.
135
+ 4. **Create a component** — Add a folder in `foundation/src/components/`, create `index.jsx` and `meta.js`, then rebuild. See the [Component Metadata Guide](https://github.com/uniweb/cli/blob/main/docs/component-metadata.md) for the full schema.
138
136
 
139
137
  The `meta.js` file defines what content and parameters a component accepts. The runtime uses this metadata to apply defaults and guarantee content structure—no defensive null checks needed in your component code.
140
138
 
@@ -167,7 +165,13 @@ export function Hero({ content, params }) {
167
165
  }
168
166
  ```
169
167
 
170
- The parser extracts semantic elements from markdown—`title` from the first heading, `paragraphs` from body text, `links` from `[text](url)`, and so on. The `items` array contains child groups created when headings appear after content (useful for features, pricing tiers, team members, etc.). See [Content Structure](./docs/content-structure.md) for details.
168
+ The parser extracts semantic elements from markdown—`title` from the first heading, `paragraphs` from body text, `links` from `[text](url)`, and so on. The `items` array contains child groups created when headings appear after content (useful for features, pricing tiers, team members, etc.).
169
+
170
+ **Learn more:**
171
+ - [Content Structure](./docs/content-structure.md) — How content is parsed and structured
172
+ - [Component Metadata](./docs/component-metadata.md) — Full meta.js schema reference
173
+ - [Data Fetching](./docs/data-fetching.md) — Load external data from files or APIs
174
+ - [Dynamic Routes](./docs/dynamic-routes.md) — Generate pages from data (blogs, catalogs)
171
175
 
172
176
  Change the JSX, save, and the dev server hot-reloads your changes.
173
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.2.48",
3
+ "version": "0.2.50",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,9 +37,9 @@
37
37
  "js-yaml": "^4.1.0",
38
38
  "prompts": "^2.4.2",
39
39
  "tar": "^7.0.0",
40
- "@uniweb/runtime": "0.2.15",
41
- "@uniweb/build": "0.1.27",
42
- "@uniweb/kit": "0.1.7",
43
- "@uniweb/core": "0.1.12"
40
+ "@uniweb/build": "0.1.28",
41
+ "@uniweb/core": "0.1.13",
42
+ "@uniweb/runtime": "0.2.16",
43
+ "@uniweb/kit": "0.1.7"
44
44
  }
45
45
  }
@@ -97,7 +97,7 @@ ${colors.bright}Example:${colors.reset}
97
97
  build:
98
98
  prerender: true${colors.reset}
99
99
 
100
- ${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/docs/meta/site.schema.json${colors.reset}
100
+ ${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json${colors.reset}
101
101
  `
102
102
 
103
103
  const PAGE_REFERENCE = `
@@ -151,7 +151,7 @@ ${colors.bright}Example:${colors.reset}
151
151
  seo:
152
152
  image: /about-og.png${colors.reset}
153
153
 
154
- ${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/docs/meta/page.schema.json${colors.reset}
154
+ ${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json${colors.reset}
155
155
  `
156
156
 
157
157
  const META_REFERENCE = `
@@ -223,7 +223,7 @@ ${colors.bright}Runtime Benefits:${colors.reset}
223
223
  - Param defaults are applied automatically
224
224
  - Components receive clean { content, params } props
225
225
 
226
- ${colors.dim}Full guide: https://github.com/uniweb/cli/blob/main/docs/meta/README.md${colors.reset}
226
+ ${colors.dim}Full guide: https://github.com/uniweb/cli/blob/main/docs/component-metadata.md${colors.reset}
227
227
  `
228
228
 
229
229
  // =============================================================================
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "yaml.schemas": {
3
- "https://raw.githubusercontent.com/uniweb/cli/main/docs/meta/site.schema.json": "**/site.yml",
4
- "https://raw.githubusercontent.com/uniweb/cli/main/docs/meta/page.schema.json": "**/page.yml"
3
+ "https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json": "**/site.yml",
4
+ "https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json": "**/page.yml"
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "yaml.schemas": {
3
- "https://raw.githubusercontent.com/uniweb/cli/main/docs/meta/site.schema.json": "site/site.yml",
4
- "https://raw.githubusercontent.com/uniweb/cli/main/docs/meta/page.schema.json": "**/page.yml"
3
+ "https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json": "site/site.yml",
4
+ "https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json": "**/page.yml"
5
5
  }
6
6
  }