uniweb 0.8.36 → 0.8.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.8.36",
3
+ "version": "0.8.38",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,13 +42,13 @@
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
44
  "@uniweb/core": "0.5.20",
45
- "@uniweb/kit": "0.7.23",
46
- "@uniweb/runtime": "0.6.31"
45
+ "@uniweb/runtime": "0.6.33",
46
+ "@uniweb/kit": "0.7.23"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@uniweb/content-reader": "1.1.4",
50
- "@uniweb/semantic-parser": "1.1.9",
51
- "@uniweb/build": "0.8.35"
50
+ "@uniweb/build": "0.8.37",
51
+ "@uniweb/semantic-parser": "1.1.9"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "@uniweb/build": {
@@ -1197,6 +1197,18 @@ foundation/src/
1197
1197
 
1198
1198
  **Discovery:** PascalCase files/folders at root of `sections/` are auto-discovered. Nested levels require `meta.js`. Lowercase directories are organizational only. `hidden: true` excludes a component entirely. Everything outside `sections/` is ordinary React.
1199
1199
 
1200
+ **`#components` alias:** Foundations include a `#components/*` subpath import in `package.json` that maps to `src/components/`. Use it in section types instead of brittle relative paths:
1201
+
1202
+ ```jsx
1203
+ // ✅ Clean — use the alias
1204
+ import LessonHeader from '#components/LessonHeader'
1205
+
1206
+ // ❌ Fragile — breaks if you reorganize sections/
1207
+ import LessonHeader from '../../components/LessonHeader'
1208
+ ```
1209
+
1210
+ Within `src/components/` itself, use normal relative imports (`./AIFeedbackCard`) since files are siblings.
1211
+
1200
1212
  ### Website and Page APIs
1201
1213
 
1202
1214
  ```jsx
@@ -10,6 +10,9 @@
10
10
  "./dist": "./dist/foundation.js",
11
11
  "./dist/styles": "./dist/assets/style.css"
12
12
  },
13
+ "imports": {
14
+ "#components/*": "./src/components/*"
15
+ },
13
16
  "files": ["dist", "src"],
14
17
  "scripts": {
15
18
  "dev": "vite",
File without changes