uniweb 0.12.42 → 0.12.43
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 +6 -6
- package/partials/agents.md +61 -0
- package/src/framework-index.json +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.43",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"js-yaml": "^4.1.0",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
|
-
"@uniweb/core": "0.7.
|
|
45
|
-
"@uniweb/
|
|
46
|
-
"@uniweb/
|
|
44
|
+
"@uniweb/core": "0.7.17",
|
|
45
|
+
"@uniweb/runtime": "0.8.23",
|
|
46
|
+
"@uniweb/kit": "0.9.21"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@uniweb/content-reader": "1.1.12",
|
|
50
|
-
"@uniweb/
|
|
51
|
-
"@uniweb/
|
|
50
|
+
"@uniweb/semantic-parser": "1.1.17",
|
|
51
|
+
"@uniweb/build": "0.14.25"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -1005,6 +1005,67 @@ contexts:
|
|
|
1005
1005
|
|
|
1006
1006
|
> **Contrast warning:** Bright brand colors (orange, yellow, light green) at shade 500 may not meet WCAG contrast (4.5:1) with white foreground text. Test buttons for readability — if contrast is insufficient, keep the default shade 600 mapping.
|
|
1007
1007
|
|
|
1008
|
+
### Fonts
|
|
1009
|
+
|
|
1010
|
+
Font families are a **site** setting, configured in `theme.yml` under `fonts:`. A foundation never installs a font package (no `@fontsource/*`) and never hardcodes a family in its code — if you reach for either, you're off the paved path. The framework provides three roles and wires each onto the standard elements for you:
|
|
1011
|
+
|
|
1012
|
+
| Role | Wired onto | Typical use |
|
|
1013
|
+
|---|---|---|
|
|
1014
|
+
| `body` | `body` (all text by default) | paragraphs, UI |
|
|
1015
|
+
| `heading` | `h1, h2, h3` | titles |
|
|
1016
|
+
| `mono` | `code, pre, kbd, samp` | code, technical text |
|
|
1017
|
+
|
|
1018
|
+
```yaml
|
|
1019
|
+
# site/theme.yml
|
|
1020
|
+
fonts:
|
|
1021
|
+
body: "Inter, system-ui, sans-serif"
|
|
1022
|
+
heading: "Poppins, system-ui, sans-serif"
|
|
1023
|
+
mono: "'Fira Code', monospace"
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
Because the site wires the families onto real elements, **components need no font-family classes** — render semantic markup (`<H1>`, `<P>`, `<code>` from the kit) and the roles apply. This is what lets one foundation re-font per site with zero code changes.
|
|
1027
|
+
|
|
1028
|
+
**Loading the files** — two site-side options, both config-only, neither adds a dependency:
|
|
1029
|
+
|
|
1030
|
+
```yaml
|
|
1031
|
+
# Hosted (Google Fonts or any provider). The build auto-adds preconnect
|
|
1032
|
+
# hints and drops families no role references.
|
|
1033
|
+
fonts:
|
|
1034
|
+
heading: "Poppins, sans-serif"
|
|
1035
|
+
import:
|
|
1036
|
+
- url: "https://fonts.googleapis.com/css2?family=Poppins:wght@600;700"
|
|
1037
|
+
|
|
1038
|
+
# Self-hosted (no CDN — privacy / offline). Put the files under
|
|
1039
|
+
# site/public/fonts/ and declare @font-face faces; the build emits the
|
|
1040
|
+
# @font-face rules + preload hints, and skips any face whose family no
|
|
1041
|
+
# role uses.
|
|
1042
|
+
fonts:
|
|
1043
|
+
heading: "Söhne, sans-serif"
|
|
1044
|
+
faces:
|
|
1045
|
+
- { family: "Söhne", src: /fonts/soehne-bold.woff2, weight: 700 }
|
|
1046
|
+
- { family: "Söhne", src: /fonts/soehne-regular.woff2, weight: 400 }
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
**In a component, weight is yours; family is the site's.** Weight / size / style utilities (`font-bold`, `font-black`, `italic`, `text-xl`) are ordinary design vocabulary — use them freely. A font-**family** utility is only safe when the family behind it is site-controlled — and by default `font-sans` / `font-serif` are *not* (they resolve to Tailwind's built-in stacks; only `font-mono` tracks the site's `mono` role, by name-collision). So a bare `font-serif` in a component silently hardcodes a typeface.
|
|
1050
|
+
|
|
1051
|
+
**A family beyond the three roles** — an editorial serif, a display face — is a **foundation var**, so the site keeps control. Name it after a Tailwind font slot (`font-serif`) and that utility resolves to it; or give it any name and reference the variable directly:
|
|
1052
|
+
|
|
1053
|
+
```js
|
|
1054
|
+
// foundation src/main.js
|
|
1055
|
+
export const vars = {
|
|
1056
|
+
'font-serif': {
|
|
1057
|
+
default: "Georgia, 'Times New Roman', serif",
|
|
1058
|
+
description: 'Editorial serif for pull-quotes, taglines, quotes',
|
|
1059
|
+
},
|
|
1060
|
+
}
|
|
1061
|
+
```
|
|
1062
|
+
```jsx
|
|
1063
|
+
<p className="font-serif">{content.tagline}</p> {/* now site-controlled */}
|
|
1064
|
+
// …or a custom-named var: <p style={{ fontFamily: 'var(--font-display)' }}>
|
|
1065
|
+
```
|
|
1066
|
+
|
|
1067
|
+
The site sets the family in `theme.yml` under `vars:` (`font-serif: "Fraunces, Georgia, serif"`) and loads it with `fonts.import` / `fonts.faces` — the file loads even though the family isn't one of the three role slots.
|
|
1068
|
+
|
|
1008
1069
|
### Foundation variables
|
|
1009
1070
|
|
|
1010
1071
|
Most customization is handled by component params. Both section components and layout components declare their own params in `meta.js` — layouts are full components with params, not just structural wrappers. A header height, for example, is typically a layout param, not a foundation var.
|
package/src/framework-index.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-07-
|
|
3
|
+
"generatedAt": "2026-07-17T21:03:16.675Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/build": {
|
|
6
|
-
"version": "0.14.
|
|
6
|
+
"version": "0.14.25",
|
|
7
7
|
"path": "framework/build",
|
|
8
8
|
"deps": [
|
|
9
9
|
"@uniweb/content-reader",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"deps": []
|
|
26
26
|
},
|
|
27
27
|
"@uniweb/core": {
|
|
28
|
-
"version": "0.7.
|
|
28
|
+
"version": "0.7.17",
|
|
29
29
|
"path": "framework/core",
|
|
30
30
|
"deps": [
|
|
31
31
|
"@uniweb/semantic-parser",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"deps": []
|
|
44
44
|
},
|
|
45
45
|
"@uniweb/kit": {
|
|
46
|
-
"version": "0.9.
|
|
46
|
+
"version": "0.9.21",
|
|
47
47
|
"path": "framework/kit",
|
|
48
48
|
"deps": [
|
|
49
49
|
"@uniweb/core",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"deps": []
|
|
62
62
|
},
|
|
63
63
|
"@uniweb/runtime": {
|
|
64
|
-
"version": "0.8.
|
|
64
|
+
"version": "0.8.23",
|
|
65
65
|
"path": "framework/runtime",
|
|
66
66
|
"deps": [
|
|
67
67
|
"@uniweb/core",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"deps": []
|
|
95
95
|
},
|
|
96
96
|
"@uniweb/theming": {
|
|
97
|
-
"version": "0.1.
|
|
97
|
+
"version": "0.1.6",
|
|
98
98
|
"path": "framework/theming",
|
|
99
99
|
"deps": []
|
|
100
100
|
},
|