uniweb 1.27.2 → 1.27.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.27.
|
|
3
|
+
"version": "1.27.3",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
-
"@uniweb/core": "~1.6.4",
|
|
45
|
-
"@uniweb/semantic-parser": "~1.13.2",
|
|
46
44
|
"@uniweb/content-writer": "~1.3.1",
|
|
47
|
-
"@uniweb/
|
|
45
|
+
"@uniweb/core": "~1.6.4",
|
|
46
|
+
"@uniweb/schemas": "~1.6.10",
|
|
47
|
+
"@uniweb/semantic-parser": "~1.13.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/build": "~1.16.
|
|
50
|
+
"@uniweb/build": "~1.16.1",
|
|
51
51
|
"@uniweb/content-reader": "~1.5.9",
|
|
52
52
|
"@uniweb/semantic-parser": "~1.13.2"
|
|
53
53
|
},
|
package/partials/agents.md
CHANGED
|
@@ -292,7 +292,7 @@ import { H1, P, Prose, Visual, Icon, Link, ChildBlocks, Overlay, PlainText } fro
|
|
|
292
292
|
export default {
|
|
293
293
|
title: 'Feature Grid', description: 'Grid of feature cards with icons',
|
|
294
294
|
family: 'features', // the standard kind it is (`uniweb families`); a name like `Hero` resolves on its own
|
|
295
|
-
// hidden: true · inset: true · area:
|
|
295
|
+
// hidden: true · inset: true · area: 'header' · section: true · children: true · background: 'self' · sticky: true
|
|
296
296
|
content: { title: 'Heading', paragraphs: 'Intro [0-1]', media: 'Photo [1]',
|
|
297
297
|
items: { label: 'Cards [3-6]', content: { icon: 'Icon [1]', title: 'Name', paragraphs: 'Text' } } },
|
|
298
298
|
params: { columns: { type: 'number', default: 3 },
|
|
@@ -226,7 +226,7 @@ Colors, tokens, light and dark, fonts and `styles.css` are in `uniweb guide them
|
|
|
226
226
|
|
|
227
227
|
**A data block whose value is a schema** — an author-designed form at `content.data.form` — is the inverse of every other component: declare the key, receive the fields, draw what you're given. You may declare a schema of the *envelope* (`title`, `description`, `fields`) for validation, never of the form's own fields.
|
|
228
228
|
|
|
229
|
-
**Insets** are full section types: `{ content, params, block }`, alt text → `content.title`, attributes → `params`. `inset: true` in `meta.js`; add `section: true` for a component placed both ways. A component meant for a layout area (a
|
|
229
|
+
**Insets** are full section types: `{ content, params, block }`, alt text → `content.title`, attributes → `params`. `inset: true` in `meta.js`; add `section: true` for a component placed both ways. A component meant for a layout area names it, `area: 'header'` (a list for several, `true` for any, names as the layouts' `areas:` call them), and an editor offers it there, never among a page's sections; `section: true` again for both. The hosting section declares a `media` slot and renders `<Visual>`, so one type works whether the author supplies an image, a video or an interactive component. Don't use `hidden: true` on insets — that means "never export".
|
|
230
230
|
|
|
231
231
|
**Block insets** get their whole body parsed (`title`, `paragraphs`, `items`, `sequence`); render with `<Prose content={content} block={block} />` or read fields. Prefer a child section when the author needs their own type and independent editing; a block inset when the wrapper is presentational and inline.
|
|
232
232
|
|
package/src/commands/doctor.js
CHANGED
|
@@ -753,30 +753,43 @@ export function checkDefaultSection({ foundationName, folderName, foundationDir,
|
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
/**
|
|
756
|
-
* The section types an editor would leave out of a page's sections
|
|
757
|
-
* whose family is `header` or `footer`, declared or by their name —
|
|
756
|
+
* The section types an editor would offer only for their area, and leave out of a page's sections,
|
|
757
|
+
* if they named it — those whose family is `header` or `footer`, declared or by their name — with
|
|
758
|
+
* the `area:` each could say: suggested, never applied.
|
|
758
759
|
*
|
|
759
|
-
* `area
|
|
760
|
-
*
|
|
760
|
+
* `area` is a placement, beside `inset` (`describePlacement`, `@uniweb/schemas/component`): a type
|
|
761
|
+
* meant for the layout areas it names (`area: 'header'`), or for any (`area: true`), offered where an
|
|
762
|
+
* author fills one and left out of a page's sections. The suggestion names the area the family is
|
|
763
|
+
* named for, the header's or the footer's, unless every layout of the foundation declares its `areas`
|
|
764
|
+
* and none is called that; then it is `true`.
|
|
761
765
|
* ⭐ A family is a claim about a type's shape, not about where it goes, so it never places a type on its
|
|
762
766
|
* own: it is only why doctor asks [Diego, 2026-11-05: "maybe a family that makes it predictable that they
|
|
763
767
|
* are layout only components. or some mix of that"]. Only `header` and `footer`: a `toc` or a `pathways`
|
|
764
768
|
* type is as often a page's own section. A type that says `area` or `section` either way has decided.
|
|
765
769
|
*
|
|
766
|
-
* @returns {string
|
|
770
|
+
* @returns {Array<{ type: string, area: string|true }>} the types suggested, each with its `area:`;
|
|
771
|
+
* [] with no built schema
|
|
767
772
|
*/
|
|
768
773
|
export function checkAreaTypes({ foundationName, folderName, foundationDir, issues }) {
|
|
769
774
|
const schema = loadSchemaJson(foundationDir)
|
|
770
775
|
if (!schema) return []
|
|
776
|
+
const layouts = Object.values(schema._layouts || {})
|
|
777
|
+
const declared = layouts.length > 0 && layouts.every((layout) => Array.isArray(layout?.areas))
|
|
778
|
+
? new Set(layouts.flatMap((layout) => layout.areas))
|
|
779
|
+
: null
|
|
771
780
|
const suggested = Object.entries(schema)
|
|
772
781
|
.filter(([key, entry]) => !key.startsWith('_') && key !== 'dataSchemas' && entry && typeof entry === 'object')
|
|
773
782
|
.filter(([, entry]) => entry.area === undefined && entry.section === undefined && entry.inset !== true)
|
|
774
|
-
.
|
|
775
|
-
.
|
|
783
|
+
.map(([name, entry]) => ({ type: name, family: resolveFamily({ name, family: entry.family }).id }))
|
|
784
|
+
.filter(({ family }) => family === 'header' || family === 'footer')
|
|
785
|
+
.map(({ type, family }) => ({ type, area: !declared || declared.has(family) ? family : true }))
|
|
776
786
|
if (suggested.length === 0) return []
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
787
|
+
const spell = ({ area }) => (area === true ? 'area: true' : `area: '${area}'`)
|
|
788
|
+
const say = (paint) =>
|
|
789
|
+
suggested.map((s, i) => `${s.type}${i === 0 ? ' could say' : ''} ${paint(spell(s))}`).join(', ')
|
|
790
|
+
issues.push({ id: 'section-area-suggested', type: 'info', foundation: foundationName, message: say((s) => s), details: suggested })
|
|
791
|
+
info(`${folderName}: ${say((s) => `${colors.blue}${s}${colors.reset}`)} in meta.js`)
|
|
792
|
+
log(` ${colors.dim}A type meant only for a layout area (a header, a footer, a side panel) names it, and an editor offers it there, not among a page's sections; area: true is any area. With section: true beside it, it is offered for both; section: true alone says it is a page's.${colors.reset}`)
|
|
780
793
|
return suggested
|
|
781
794
|
}
|
|
782
795
|
|
package/src/framework-index.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-05T20:23:08.274Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.9"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.16.
|
|
9
|
+
"version": "1.16.1"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
12
|
"version": "1.5.9"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"version": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"@uniweb/schemas": {
|
|
45
|
-
"version": "1.6.
|
|
45
|
+
"version": "1.6.10"
|
|
46
46
|
},
|
|
47
47
|
"@uniweb/scholar": {
|
|
48
48
|
"version": "1.1.0"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"version": "1.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "1.2.
|
|
57
|
+
"version": "1.2.8"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
60
|
"version": "1.2.1"
|