uniweb 1.29.2 → 1.29.3
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": "1.29.
|
|
3
|
+
"version": "1.29.3",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
-
"@uniweb/
|
|
45
|
-
"@uniweb/
|
|
44
|
+
"@uniweb/core": "~1.6.8",
|
|
45
|
+
"@uniweb/semantic-parser": "~1.13.2",
|
|
46
46
|
"@uniweb/schemas": "~1.6.11",
|
|
47
|
-
"@uniweb/
|
|
47
|
+
"@uniweb/content-writer": "~1.3.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/
|
|
50
|
+
"@uniweb/semantic-parser": "~1.13.2",
|
|
51
51
|
"@uniweb/content-reader": "~1.5.9",
|
|
52
|
-
"@uniweb/
|
|
52
|
+
"@uniweb/build": "~1.18.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -126,7 +126,7 @@ When a rule in §2 feels like friction, that is the moment you are about to take
|
|
|
126
126
|
| `font-serif`, `font-sans` | Tailwind's stack, not the site's — unless the foundation declares it as a `font-*` var in `main.js`. Families are the site's (`theme.yml fonts:`). | silent |
|
|
127
127
|
| `@import url(fonts.googleapis…)` in CSS | `theme.yml fonts.import` / `faces`. | — |
|
|
128
128
|
| `@tailwind base;` | Tailwind v4: `@import "tailwindcss"` plus kit's token imports (theme guide). | silent — most utilities missing |
|
|
129
|
-
| Trust the foundation's own build to prove a class works | A site build and `uniweb dev` read
|
|
129
|
+
| Trust the foundation's own build to prove a class works | A site build and `uniweb dev` read what `styles.css` names: the whole foundation with `@import "tailwindcss" source("./")`, as the scaffold writes, else only the folders `@source` lists. | each names a folder a list missed, as does `doctor` |
|
|
130
130
|
| `prose` from `@tailwindcss/typography`, `prose-invert` | `@import "@uniweb/kit/prose-tokens.css"`; no invert — colors are already the theme's. | build warns; unstyled lists |
|
|
131
131
|
| `html { scroll-behavior: smooth }` | Never on `html`/`body`; the runtime owns scrolling. | route transitions misbehave |
|
|
132
132
|
| `filter: blur(80px)` for a glow | Radial gradient + `mask-image`. | Safari jank |
|
|
@@ -202,7 +202,7 @@ uniweb <command> --help # exact flags, no side effects
|
|
|
202
202
|
| Pages missing from the nav | a strict `pages:` list — add `...` |
|
|
203
203
|
| A color is empty | unquoted `#` in YAML |
|
|
204
204
|
| Literal `{name}` on the page | no Loom content handler |
|
|
205
|
-
| A class works in the foundation's build, not in the site's or `uniweb dev` |
|
|
205
|
+
| A class works in the foundation's build, not in the site's or `uniweb dev` | `styles.css` lists folders and not this one — `uniweb doctor` names it; `source("./")` on the Tailwind import reads them all |
|
|
206
206
|
| Sticky header scrolls away | `sticky` class instead of `sticky: true` in `meta.js` |
|
|
207
207
|
| Modal under the header | z-index instead of `<Overlay>` |
|
|
208
208
|
| Entrance animation never plays | JS-started; write it in CSS; `uniweb dev` doesn't prerender |
|
|
@@ -265,7 +265,7 @@ src/
|
|
|
265
265
|
├── components/ # ordinary React — any props, any library, no meta.js, invisible to authors
|
|
266
266
|
├── utils/
|
|
267
267
|
├── main.js # export default { name, description, defaultLayout, defaultSection, handlers, … } + export const vars
|
|
268
|
-
└── styles.css # @import "tailwindcss" + kit's theme-tokens.css + prose-tokens.css
|
|
268
|
+
└── styles.css # @import "tailwindcss" source("./") + kit's theme-tokens.css + prose-tokens.css
|
|
269
269
|
```
|
|
270
270
|
|
|
271
271
|
`uniweb add section Hero` scaffolds `sections/Hero/{index.jsx,meta.js}`. Import shared code as `#components/*`, `#utils/*`.
|
|
@@ -107,7 +107,7 @@ Header.as = 'div'
|
|
|
107
107
|
|
|
108
108
|
**Sticky is a setting.** `sticky: true` in the type's `meta.js` (an author turns it off with `sticky: false`); the runtime makes sticky the box that can stay in view. A body section sticks the same way and stays below the stuck header: the runtime publishes the header's reach as `--uw-sticky-top` (a type's `top` overrides: `sticky: { default: true, top: '4rem' }`). Section links land below the stuck header. Keep the bar in the flow: a bar made `absolute` or `fixed` leaves the runtime nothing to measure, and section links land under it.
|
|
109
109
|
|
|
110
|
-
**A header over the opening section is a setting too.** `underHeader: true` in a type's `meta.js` (a hero whose picture reaches the top of the window; an author turns it off with `underHeader: false`) has the runtime lay the header over that section when it opens a page: the header's box takes no room, the section starts at the top, and the header keeps its height, stuck if it sticks. The section pads its content by `var(--uw-header-height)`, which the
|
|
110
|
+
**A header over the opening section is a setting too.** `underHeader: true` in a type's `meta.js` (a hero whose picture reaches the top of the window; an author turns it off with `underHeader: false`) has the runtime lay the header over that section when it opens a page: the header's box takes no room, the section starts at the top, and the header keeps its height, stuck if it sticks. The section pads its content by `var(--uw-header-height)`, which the page's stylesheet gives it: what the browser measures, before that the header type's `height` (`height: 'var(--header-height)'` in its `meta.js`), and `0px` where the layout draws no header. The header reads `block.getNextBlockInfo()?.underHeader`, true only when it lies over that section, to paint itself see-through, and its box carries `data-uw-header="over"`. A header whose bar is ever see-through, there or frosted on scroll, says `background: 'self'` and paints its own bar (`bg-section` where solid): otherwise the theme paints its section's surface behind the bar. A child in `<ChildGrid>` sticks beside its column, and scrolls with the page at one column. A sticky section inside `overflow: hidden` can't stick — use `overflow: clip`. A layout that wraps an area in its own element makes it sticky when `page.isSticky('header')`. `uniweb dev` names a sticky element that cannot move in the console.
|
|
111
111
|
|
|
112
112
|
## meta.js in full
|
|
113
113
|
|
package/partials/guides/theme.md
CHANGED
|
@@ -100,19 +100,15 @@ The build adds preconnect hints, emits `@font-face` + preload, drops unreference
|
|
|
100
100
|
## styles.css
|
|
101
101
|
|
|
102
102
|
```css
|
|
103
|
-
@import "tailwindcss";
|
|
103
|
+
@import "tailwindcss" source("./");
|
|
104
104
|
@import "@uniweb/kit/theme-tokens.css";
|
|
105
105
|
@import "@uniweb/kit/prose-tokens.css";
|
|
106
|
-
@source "./sections/**/*.{js,jsx}";
|
|
107
|
-
@source "./components/**/*.{js,jsx}";
|
|
108
|
-
@source "./layouts/**/*.{js,jsx}";
|
|
109
|
-
@source "./utils/**/*.{js,jsx}";
|
|
110
106
|
@theme { --breakpoint-xs: 30rem; }
|
|
111
107
|
```
|
|
112
108
|
|
|
113
109
|
Two more imports are opt-in: `@uniweb/kit/math-tokens.css` lays out equations, and `@uniweb/kit/callout-tokens.css` draws concept blocks such as `md:warning`, which are otherwise plain prose.
|
|
114
110
|
|
|
115
|
-
**
|
|
111
|
+
**Tailwind reads the whole foundation.** `source("./")` on the import has it read every file under the foundation, in the foundation's own build and in a site's, so a class in any folder reaches both — one kept in a string for code elsewhere to write too, such as a map of colours to classes in `utils/`. A stylesheet that names folders instead (`@source "./sections/**/*.{js,jsx}"`, as older projects do) must name every folder that writes classes: the foundation's own build finds them all, but a site build and `uniweb dev` read only what those lines name, so a class in a folder left out is in one CSS and missing from the other. `uniweb dev`, a site build and `uniweb doctor` (`unread-folder`) name such a folder, and give the `source("./")` line that ends it. `theme-tokens.css` also tells Tailwind to read kit's source, so kit's own classes reach your CSS wherever your package manager put kit; a foundation that skips that import names kit itself, by where kit is (`./node_modules/@uniweb/kit/src/**` under pnpm, `../node_modules/@uniweb/kit/src/**` under npm).
|
|
116
112
|
|
|
117
113
|
Custom CSS is expected alongside Tailwind — shadow systems, border hierarchies, gradients, glass. Tokens are a floor; add vocabulary that references them so it adapts per context:
|
|
118
114
|
|
package/src/commands/doctor.js
CHANGED
|
@@ -948,7 +948,9 @@ export async function checkUnreadFolders({ foundationName, srcDir, issues }) {
|
|
|
948
948
|
const id = 'unread-folder'
|
|
949
949
|
issues.push({ id, type: 'warn', foundation: foundationName, message: `${foundationName} writes classes where styles.css names no @source` })
|
|
950
950
|
warn(`[${id}] ${foundationName} writes classes where styles.css names no @source, so a site build and \`uniweb dev\` miss any class only used there`)
|
|
951
|
-
log(`
|
|
951
|
+
log(` Have Tailwind read the whole foundation, and no folder can be left out — in styles.css:`)
|
|
952
|
+
log(` @import "tailwindcss" source("./");`)
|
|
953
|
+
log(` Or add:`)
|
|
952
954
|
for (const { line } of unread) log(` ${line}`)
|
|
953
955
|
}
|
|
954
956
|
|
package/src/framework-index.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-06T23:50:46.813Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.9"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.18.
|
|
9
|
+
"version": "1.18.2"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
12
|
"version": "1.5.9"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"version": "1.3.1"
|
|
16
16
|
},
|
|
17
17
|
"@uniweb/core": {
|
|
18
|
-
"version": "1.6.
|
|
18
|
+
"version": "1.6.8"
|
|
19
19
|
},
|
|
20
20
|
"@uniweb/frame-bridge": {
|
|
21
21
|
"version": "1.0.3"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"version": "1.2.13"
|
|
37
37
|
},
|
|
38
38
|
"@uniweb/runtime": {
|
|
39
|
-
"version": "1.5.
|
|
39
|
+
"version": "1.5.3"
|
|
40
40
|
},
|
|
41
41
|
"@uniweb/scene": {
|
|
42
42
|
"version": "1.0.1"
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"version": "1.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "1.2.
|
|
57
|
+
"version": "1.2.10"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
|
-
"version": "1.3.
|
|
60
|
+
"version": "1.3.2"
|
|
61
61
|
},
|
|
62
62
|
"@uniweb/unipress": {
|
|
63
63
|
"version": "1.1.35"
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* Tailwind reads this whole foundation, in its own build and in a site's, so no folder can be left out. */
|
|
2
|
+
@import "tailwindcss" source("./");
|
|
2
3
|
@import "@uniweb/kit/theme-tokens.css";
|
|
3
4
|
|
|
4
|
-
@source "./sections/**/*.{js,jsx}";
|
|
5
|
-
@source "./components/**/*.{js,jsx}";
|
|
6
|
-
@source "./layouts/**/*.{js,jsx}";
|
|
7
|
-
@source "./utils/**/*.{js,jsx}";
|