uniweb 1.35.4 → 1.35.6
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.35.
|
|
3
|
+
"version": "1.35.6",
|
|
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/
|
|
44
|
+
"@uniweb/schemas": "~1.7.5",
|
|
45
45
|
"@uniweb/core": "~1.6.13",
|
|
46
|
-
"@uniweb/semantic-parser": "~1.13.
|
|
47
|
-
"@uniweb/
|
|
46
|
+
"@uniweb/semantic-parser": "~1.13.6",
|
|
47
|
+
"@uniweb/content-writer": "~1.3.3"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/content-reader": "~1.5.
|
|
51
|
-
"@uniweb/semantic-parser": "~1.13.
|
|
52
|
-
"@uniweb/build": "~1.24.
|
|
50
|
+
"@uniweb/content-reader": "~1.5.12",
|
|
51
|
+
"@uniweb/semantic-parser": "~1.13.6",
|
|
52
|
+
"@uniweb/build": "~1.24.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -71,7 +71,7 @@ When a rule in §2 feels like friction, that is the moment you are about to take
|
|
|
71
71
|
| Pick heading levels for size | Levels are **structure**: `#` title; exactly one step smaller = `subtitle`; two steps smaller, a `---`, or any heading after body text = an `item`. `###` right after `#` is an item; `##` is a subtitle line. A later heading as large as the first leaves no `title`: all of them become items. | silent |
|
|
72
72
|
| Order the file the way the page should look | Write semantically; the component arranges. | — |
|
|
73
73
|
| Put an icon or image above the title, as it will look | Anything above the first heading empties `title`: an icon or text puts the heading in `items[0]`, an image puts it in `headings`. Write it under the heading — it is still `icons[0]` or `images[0]`. | silent; `inspect` shows it |
|
|
74
|
-
| `<span
|
|
74
|
+
| `<span>`, `<div>`, `<sup>` in markdown | Shown as text. `[text]{accent}`, `[2]{sup}`, `**bold**`; a line break is `<br>` or a trailing `\`. | build names the file |
|
|
75
75
|
| Write `pages: [a, b]` or `sections: [a, b]` to set order | Those lists are **strict**: an unlisted page leaves every menu, an unlisted section leaves the page. `[a, b, ...]` means "these first". At the site root the first of `pages:` is `/`, whatever `index:` says. | silent |
|
|
76
76
|
| `primary: #3b82f6` | `'#3b82f6'` — an unquoted `#` starts a YAML comment. | build warns |
|
|
77
77
|
| Expect any frontmatter key to do something, any `type:` name to work | A key reaches `params` only, and does nothing unless the type reads it (its `meta.js` says which); a `title:` there never sets the section's title, which is its heading. Only types present in `sections/` work. | silent; build and push note a content field's name / red box |
|
|
@@ -51,7 +51,7 @@ const editor = useRichTextEditor({ value, onChange }) //
|
|
|
51
51
|
<RichTextContent editor={editor} /> // your toolbar: editor.chain().focus().toggleBold().run()
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Its document model is the stored vocabulary: it edits what TipTap's kit does, with a divider for the rule
|
|
54
|
+
Its document model is the stored vocabulary: it edits what TipTap's kit does, underline included, plus superscript and subscript (`toggleSuperscript()`, `toggleSubscript()`), with a divider for the rule, and keeps everything else a stored text holds. `richTextLength(doc)` counts a text as a field's `max_length` does (the characters a reader sees; a new line or paragraph is one), for a counter. Don't configure TipTap yourself for a rich-text field: what it makes beyond the vocabulary is left out when saved, which the mock prints.
|
|
55
55
|
|
|
56
56
|
## Translated fields
|
|
57
57
|
|
|
@@ -124,7 +124,7 @@ A site with a backend is a solution: public pages, a members' area for each role
|
|
|
124
124
|
## Selling
|
|
125
125
|
|
|
126
126
|
```jsx
|
|
127
|
-
import { useStore, offeringState, useEntitlements, useHolders } from '@uniweb/api'
|
|
127
|
+
import { useStore, offeringState, useCoupon, couponReason, useEntitlements, useHolders } from '@uniweb/api'
|
|
128
128
|
const { status, store, offerings, checkout, checking } = useStore({ entity: course.uuid }) // 'none': the site sells nothing
|
|
129
129
|
offeringState(offering, store) // 'owned' · 'take' (a free one-off) · 'not-ready' (payments not connected) · 'buy'
|
|
130
130
|
await checkout(offering) // sends the buyer to pay; a free one-off is held at once: { url: null, held: true }
|
|
@@ -135,6 +135,8 @@ await checkout(offering) // sends the buyer to pay; a free one-off is he
|
|
|
135
135
|
- A purchase lets the buyer read the record, and through it what its `sold_with` references point to: `useEntity({ schema: '@/lesson', uuid, via: course.uuid })`.
|
|
136
136
|
- `useEntitlements()` — what the viewer holds, for "My courses". `useHolders({ schema, uuid })` — who holds a record, for a roster: its owner's or an `admin`'s to read, `forbidden` for anyone else, so draw nothing.
|
|
137
137
|
- Why a checkout was refused: `error.extensions.reason` — `payments_not_ready`, `coupon_not_applicable` (with `cause`), `not_for_sale`.
|
|
138
|
+
- A coupon code: `const { check, coupon, applied, checking, clear } = useCoupon()`. `check(code)` previews it with the checkout's rules: `coupon.discount` (`{ type: 'percent'|'amount', value, currency?, duration }`), or `valid: false` with `coupon.reason`, one of `COUPON_CAUSE` from `@uniweb/api/wire`. `couponReason(coupon, offering)` adds `wrong_currency` (an amount off in another currency); a free offering ignores a code. Word each reason in your foundation, with a fallback for a new one. Then `checkout(offering, { coupon: applied })`. It checks again, and a refusal's `cause` is the same set.
|
|
139
|
+
- Paying in the page: `const { payment } = await checkout(offering, { coupon, inPage: true })`, then `<Overlay open onClose={payment.cancel}><div ref={payment.mount} /></Overlay>` and `await payment.done` (`'paid'`/`'cancelled'`; after `'paid'`, `refresh()` until `owned`). The provider's form shows the total and discount itself. Where the backend can't, `checkout` navigates to the payment page as usual.
|
|
138
140
|
|
|
139
141
|
**Prices for visitors who aren't signed in** come as records, so the first page a visit lands on already shows them, to people and to search engines. A section declares the store's catalog, a site query reads it, and the site's `blueprint.yml` opens it to visitors:
|
|
140
142
|
|
|
@@ -154,7 +154,7 @@ Sites adjust these or add named styles in `theme.yml` `inline:` — a name is a
|
|
|
154
154
|
|
|
155
155
|
### HTML is not content
|
|
156
156
|
|
|
157
|
-
A tag in markdown — `<strong>`, `<span class=…>`, `<div>` — shows as written, and the build names the file. Use `**bold**`, `[text]{accent}`, a link. The exception is `<br>`, a hard break anywhere. A newline inside a paragraph is a space; a deliberate line break is `<br>` or a `\` at the end of the line.
|
|
157
|
+
A tag in markdown — `<strong>`, `<span class=…>`, `<div>` — shows as written, and the build names the file. Use `**bold**`, `[text]{accent}`, `[x]{underline}`, `[2]{sup}`, `[2]{sub}`, a link. The exception is `<br>`, a hard break anywhere. A newline inside a paragraph is a space; a deliberate line break is `<br>` or a `\` at the end of the line.
|
|
158
158
|
|
|
159
159
|
### Fenced code
|
|
160
160
|
|
package/src/framework-index.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-19T17:58:06.777Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
|
-
"version": "1.7.
|
|
6
|
+
"version": "1.7.6"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.24.
|
|
9
|
+
"version": "1.24.4"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
|
-
"version": "1.5.
|
|
12
|
+
"version": "1.5.12"
|
|
13
13
|
},
|
|
14
14
|
"@uniweb/content-writer": {
|
|
15
|
-
"version": "1.3.
|
|
15
|
+
"version": "1.3.3"
|
|
16
16
|
},
|
|
17
17
|
"@uniweb/core": {
|
|
18
18
|
"version": "1.6.13"
|
|
@@ -30,25 +30,25 @@
|
|
|
30
30
|
"version": "1.1.3"
|
|
31
31
|
},
|
|
32
32
|
"@uniweb/press": {
|
|
33
|
-
"version": "1.2.
|
|
33
|
+
"version": "1.2.3"
|
|
34
34
|
},
|
|
35
35
|
"@uniweb/projections": {
|
|
36
36
|
"version": "1.2.17"
|
|
37
37
|
},
|
|
38
38
|
"@uniweb/runtime": {
|
|
39
|
-
"version": "1.6.
|
|
39
|
+
"version": "1.6.6"
|
|
40
40
|
},
|
|
41
41
|
"@uniweb/scene": {
|
|
42
42
|
"version": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"@uniweb/schemas": {
|
|
45
|
-
"version": "1.7.
|
|
45
|
+
"version": "1.7.5"
|
|
46
46
|
},
|
|
47
47
|
"@uniweb/scholar": {
|
|
48
48
|
"version": "1.1.3"
|
|
49
49
|
},
|
|
50
50
|
"@uniweb/semantic-parser": {
|
|
51
|
-
"version": "1.13.
|
|
51
|
+
"version": "1.13.6"
|
|
52
52
|
},
|
|
53
53
|
"@uniweb/snapshot": {
|
|
54
54
|
"version": "1.1.2"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"version": "1.2.15"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
|
-
"version": "1.3.
|
|
60
|
+
"version": "1.3.3"
|
|
61
61
|
},
|
|
62
62
|
"@uniweb/unipress": {
|
|
63
63
|
"version": "1.1.41"
|