yamlover 0.3.48 → 0.3.50
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/README.md +39 -19
- package/bin/ga4.js +90 -0
- package/bin/yamlover.js +56 -18
- package/dist/agent-docs/AGENTS.md +95 -60
- package/dist/agent-docs/CLAUDE.md +1 -1
- package/dist/builtin-taxonomy/$defs/.yo/meta.yo +29 -0
- package/dist/builtin-taxonomy/$defs/annotation +6 -6
- package/dist/builtin-taxonomy/$defs/board +5 -5
- package/dist/builtin-taxonomy/$defs/bullets +3 -3
- package/dist/builtin-taxonomy/$defs/chapter +9 -10
- package/dist/builtin-taxonomy/$defs/chunk +5 -4
- package/dist/builtin-taxonomy/$defs/config +6 -6
- package/dist/builtin-taxonomy/$defs/fragment +2 -2
- package/dist/builtin-taxonomy/$defs/numbered +3 -3
- package/dist/builtin-taxonomy/$defs/{tag → onto} +6 -6
- package/dist/builtin-taxonomy/$defs/table +14 -13
- package/dist/builtin-taxonomy/$defs/task +6 -6
- package/dist/builtin-taxonomy/$defs/workflow +4 -4
- package/dist/builtin-taxonomy/ontos/.yo/body.yo +46 -0
- package/dist/client/assets/{decoded-Dfxf1BRR.js → decoded-5u9KK4Nb.js} +1 -1
- package/dist/client/assets/djvu-CvRKxWcX.js +1 -0
- package/dist/client/assets/{docx-aCX_2O0_.js → docx-CFqmrRMY.js} +1 -1
- package/dist/client/assets/{heic-8pzTwsCx.js → heic-P0RPecFK.js} +1 -1
- package/dist/client/assets/{imagemap-Bp26n33x.js → imagemap-BCrt0kPn.js} +1 -1
- package/dist/client/assets/index-_gAtxDG4.css +1 -0
- package/dist/client/assets/index-l1SxxFJR.js +754 -0
- package/dist/client/assets/{map-Dtw0_sOf.js → map-ClMfiQr8.js} +1 -1
- package/dist/client/assets/openable-9ABNW3A9.js +4 -0
- package/dist/client/assets/{paged-BGVPKMC7.js → paged-UVifI3SC.js} +1 -1
- package/dist/client/assets/{pdf-eI1AsxuB.js → pdf-BGgu5LFZ.js} +2 -2
- package/dist/client/assets/{psd-BD_hUWIy.js → psd-D15IXPVu.js} +1 -1
- package/dist/client/assets/{spreadsheet-D_yjjR8a.js → spreadsheet-CeOcWWb2.js} +1 -1
- package/dist/client/assets/{tiff-BewNDYwu.js → tiff-pZPBtPPg.js} +1 -1
- package/dist/client/assets/xyflow-BnuhLJ6X.css +1 -0
- package/dist/client/assets/xyflow-uN1JIC1A.js +23 -0
- package/dist/client/index.html +6 -2
- package/dist/client/yo-favicon.svg +16 -0
- package/dist/server.js +3105 -1266
- package/package.json +11 -4
- package/dist/builtin-taxonomy/$defs/.yamlover/meta.yamlover +0 -34
- package/dist/builtin-taxonomy/tags/.yamlover/body.yamlover +0 -46
- package/dist/client/assets/djvu-BAFaxONw.js +0 -1
- package/dist/client/assets/index-BohJjyVY.css +0 -1
- package/dist/client/assets/index-DXrtwPKE.js +0 -754
- package/dist/client/assets/openable-Banncb36.js +0 -4
|
@@ -6,9 +6,10 @@ yamlover web UI (`npx yamlover .`) while you read and edit the files on disk. Th
|
|
|
6
6
|
tells you how to manipulate these files **correctly** so you don't corrupt the data or break the
|
|
7
7
|
human's live view.
|
|
8
8
|
|
|
9
|
-
> This file is self-contained. You do **not** need any other spec to follow it.
|
|
10
|
-
>
|
|
11
|
-
>
|
|
9
|
+
> This file is self-contained. You do **not** need any other spec to follow it. The full,
|
|
10
|
+
> authoritative spec is the yamlover documentation book (the `docs/` tree of the yamlover
|
|
11
|
+
> project itself — the language under `docs/language/`, the document model under
|
|
12
|
+
> `docs/documents/`); consult it for edge cases.
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
@@ -19,13 +20,13 @@ yamlover is a **distinct, YAML-like language** — close to YAML and mostly read
|
|
|
19
20
|
document that uses aliases/anchors does **not** round-trip identically. On top of a YAML-style
|
|
20
21
|
surface it adds a small **pointer layer** so that data forms a graph, not just a tree:
|
|
21
22
|
|
|
22
|
-
- **`*` pointers** — a value that *refers to* another node (a
|
|
23
|
+
- **`*` pointers** — a value that *refers to* another node (a ref edge, not a copy).
|
|
23
24
|
- **`&` path anchors** — declare that "this node also lives over there" (the push side of `*`).
|
|
24
25
|
- **`!!` tags** — type/schema markers, including inline schema references `!!<…>`.
|
|
25
26
|
|
|
26
27
|
There is a sibling brace surface called **json5p** (`.json5p` files) — the same pointer layer
|
|
27
|
-
expressed in JSON5 syntax. Most projects use `.
|
|
28
|
-
twin (pointers are written as quoted strings, e.g. `*": pets
|
|
28
|
+
expressed in JSON5 syntax. Most projects use `.yo`; treat `.json5p` as the JSON-flavored
|
|
29
|
+
twin (pointers are written as quoted strings, e.g. `*": pets: 1"`).
|
|
29
30
|
|
|
30
31
|
**Important:** because `*` and `&` mean something different than in stock YAML (a `*` is a path
|
|
31
32
|
pointer, **not** a YAML alias), these files require the yamlover parser. Do not "fix" them with
|
|
@@ -37,29 +38,30 @@ a generic YAML formatter — you will destroy the pointers and anchors.
|
|
|
37
38
|
|
|
38
39
|
Plain YAML forces a node to be **either** a sequence (all `- item`) **or** a mapping (all
|
|
39
40
|
`key: value`). yamlover unifies them: there is **one ordered container**. Every entry has an
|
|
40
|
-
integer **position** (
|
|
41
|
+
integer **position** (0, 1, …) and **may also** carry a string key. Keyless (positional)
|
|
41
42
|
and keyed entries coexist in one node — this is the default ("omni"):
|
|
42
43
|
|
|
43
44
|
```yamlover
|
|
44
45
|
playlist:
|
|
45
|
-
- Intro #
|
|
46
|
-
- Verse #
|
|
47
|
-
title: Greatest Hits #
|
|
48
|
-
- Chorus #
|
|
49
|
-
encore: *: pets
|
|
46
|
+
- Intro # position 0 keyless / positional
|
|
47
|
+
- Verse # position 1 keyless
|
|
48
|
+
title: Greatest Hits # position 2, key=title keyed — AND still positioned
|
|
49
|
+
- Chorus # position 3 keyless
|
|
50
|
+
encore: *: pets: 0 # position 4, key=encore a keyed pointer, still in order
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
A node can even carry a **scalar value AND fields at once**:
|
|
53
54
|
|
|
54
55
|
```yamlover
|
|
55
56
|
rating: 5 # the node's own scalar value …
|
|
56
|
-
- solid #
|
|
57
|
-
scale: 10 #
|
|
57
|
+
- solid # position 0 positional field
|
|
58
|
+
scale: 10 # position 2 keyed field
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
(You may see optional `!!mix`
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
(You may see an optional `!!mix` tag marking these shapes. It is a **no-op readability marker**
|
|
62
|
+
— mixing and scalar-plus-fields are the default. Don't add or remove it to change meaning; it
|
|
63
|
+
doesn't carry any. `!!yo` — whose deprecated aliases `!!var` / `!!omni` still parse — is a
|
|
64
|
+
DIFFERENT thing and is **semantic**: see §6.)
|
|
63
65
|
|
|
64
66
|
---
|
|
65
67
|
|
|
@@ -79,29 +81,48 @@ parses as a path: `*/pets` is a dangling reference to the literal key "/pets". A
|
|
|
79
81
|
current: object: path # bare — current scope (siblings)
|
|
80
82
|
: document: rooted: path # : — this document's root
|
|
81
83
|
:: project: rooted: path # :: — this project's root
|
|
82
|
-
::: yamlover.inthemoon.net: $defs:
|
|
84
|
+
::: yamlover.inthemoon.net: $defs: onto # ::: — the world (an external project)
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
- `*pets
|
|
86
|
-
- `*: pets
|
|
87
|
-
- `*::
|
|
88
|
-
- `*::: host.example: $defs:
|
|
87
|
+
- `*pets: 1` — bare: a **sibling** named `pets`, position 1.
|
|
88
|
+
- `*: pets: 0` — `:` document root.
|
|
89
|
+
- `*:: ontos: genre` — `::` this project's root.
|
|
90
|
+
- `*::: host.example: $defs: onto` — `:::` a world/external reference.
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
### The bare-token rule — what a portion means
|
|
93
|
+
|
|
94
|
+
Every portion is typed **by its own form**:
|
|
95
|
+
|
|
96
|
+
- **pure digits** = the integer key, i.e. a **position**: `*: pets: 1: name` = root → position 1
|
|
97
|
+
→ key `name`.
|
|
98
|
+
- **a bare `~`** = the **null key** (`~: value`; `: v` is the same entry). The *string* key
|
|
99
|
+
`"null"` is written `null:`.
|
|
100
|
+
- **anything else bare, and any quoted portion** = a **string key**: `: '1'` is the numeric
|
|
101
|
+
string key, `: '~'` the literal tilde.
|
|
102
|
+
|
|
103
|
+
A key whose bare form would read as something else MUST be quoted: empty, pure digits, `~`,
|
|
104
|
+
`-`+digits, or a key containing a space. In a document, a plain `1:` is a **parse error** —
|
|
105
|
+
author `'1':` for the numeric string key.
|
|
106
|
+
|
|
107
|
+
> **The retired bracket index.** The old `[n]` position form (`*pets[1]`) still *reads* — it is
|
|
108
|
+
> a permanent alias — but it is **written never**. Author the bare-integer segment. The one
|
|
109
|
+
> surviving bracket operator is `[.±k]` (a position relative to the pointer's own host). The
|
|
110
|
+
> former `[]` (append) and `[?]` (any position) brackets were REMOVED — both are now the `-`
|
|
111
|
+
> segment: a trailing `: -` on a bookmark appends (§5), and `-` in a query matches any
|
|
112
|
+
> position. A literal `-` key must be quoted (`'-'`).
|
|
92
113
|
|
|
93
114
|
---
|
|
94
115
|
|
|
95
116
|
## 4. Pointers `*` (the pull side)
|
|
96
117
|
|
|
97
|
-
A `*` value dereferences a path to another node and creates a **
|
|
118
|
+
A `*` value dereferences a path to another node and creates a **ref edge** (not a copy):
|
|
98
119
|
|
|
99
120
|
```yamlover
|
|
100
121
|
humans:
|
|
101
122
|
- name: Alice
|
|
102
|
-
manager: *: pets
|
|
103
|
-
feline: *pets
|
|
104
|
-
topDog: *: pets
|
|
123
|
+
manager: *: pets: 1 # Alice.manager IS the node at root → pets → position 1
|
|
124
|
+
feline: *pets: 1 # bare → a sibling
|
|
125
|
+
topDog: *: pets: 0 # : → document root
|
|
105
126
|
```
|
|
106
127
|
|
|
107
128
|
Pointers are **lazy** and **cycle-safe** — pointing two nodes at each other is fine. Editing the
|
|
@@ -118,7 +139,7 @@ target changes everything that points at it.
|
|
|
118
139
|
boss: &: chief # this node is ALSO reachable as the document-root key `chief`
|
|
119
140
|
name: Rex
|
|
120
141
|
team:
|
|
121
|
-
lead: *: chief # same node as `boss` — a
|
|
142
|
+
lead: *: chief # same node as `boss` — a ref edge, not a copy
|
|
122
143
|
```
|
|
123
144
|
|
|
124
145
|
Reverse relations are spelled as anchors. `&: parent: child` means "parent holds me as child":
|
|
@@ -129,17 +150,20 @@ adam:
|
|
|
129
150
|
&: eve: cain # "eve holds me as cain" — the reverse of eve's cain-edge
|
|
130
151
|
```
|
|
131
152
|
|
|
132
|
-
`&: container
|
|
153
|
+
`&: container: -` (a trailing `-` segment) means **positional membership**: "that container also
|
|
133
154
|
holds me", appended after the container's own entries:
|
|
134
155
|
|
|
135
156
|
```yamlover
|
|
136
157
|
fan:
|
|
137
158
|
name: Bob
|
|
138
|
-
&: favorites
|
|
159
|
+
&: favorites: - # Bob appends himself to `favorites`
|
|
139
160
|
```
|
|
140
161
|
|
|
141
|
-
Anchor paths must be **unambiguous** (no wildcards, no trailing
|
|
142
|
-
create real keys, so they must resolve to exactly one
|
|
162
|
+
Anchor paths must be **unambiguous** (no wildcards, no trailing position claim — neither a bare
|
|
163
|
+
integer nor a relative `[.±k]`) — they create real keys, so they must resolve to exactly one
|
|
164
|
+
place. The trailing `-` is an append, not a claim; a `-` anywhere else in an anchor path is
|
|
165
|
+
reserved (a parse error today). The old `&: container[]` bracket spelling was removed and no
|
|
166
|
+
longer parses.
|
|
143
167
|
|
|
144
168
|
> You may encounter the older `~key: *path` back-edge syntax in legacy files. It still parses but
|
|
145
169
|
> is deprecated; author new reverse edges as `&` anchors.
|
|
@@ -148,14 +172,19 @@ create real keys, so they must resolve to exactly one place.
|
|
|
148
172
|
|
|
149
173
|
## 6. Tags `!!` and `$defs` schemas
|
|
150
174
|
|
|
151
|
-
- `!!type` — a YAML-style tag.
|
|
152
|
-
|
|
175
|
+
- `!!type` — a YAML-style tag. `!!mix` is the one no-op marker (see §2). The rest are
|
|
176
|
+
**semantic** and must not be added or dropped casually:
|
|
177
|
+
- `!!set` marks a container whose membership is by identity (duplicates collapse);
|
|
178
|
+
- `!!yo` (deprecated aliases `!!var` / `!!omni`) marks a node as **plain yamlover, exempt
|
|
179
|
+
from the enclosing document's schema** — a *data island*. Inside a structured document (a
|
|
180
|
+
chapter, say) a `!!yo` node is never interpreted by that schema: it is data, drawn by the
|
|
181
|
+
generic renderer.
|
|
153
182
|
- **Inline schema reference** `!!<…>` binds a node to a reusable schema definition:
|
|
154
183
|
```yamlover
|
|
155
184
|
mychapter: !!<*:: yamlover: $defs: chapter>
|
|
156
185
|
```
|
|
157
186
|
Reusable schemas live at the project root under **`$defs`** (e.g. `$defs: chapter`,
|
|
158
|
-
`$defs:
|
|
187
|
+
`$defs: onto`, `$defs: annotation`, `$defs: fragment`). They are referenced project-scoped
|
|
159
188
|
(`*:: $defs: name`) or via the self-import (`*:: yamlover: $defs: name` — synonyms inside this
|
|
160
189
|
project). Schemas are **metadata** (typing/format/presentation), not data storage.
|
|
161
190
|
|
|
@@ -165,15 +194,15 @@ create real keys, so they must resolve to exactly one place.
|
|
|
165
194
|
|
|
166
195
|
A node can be materialized two ways:
|
|
167
196
|
|
|
168
|
-
1. **Single-file concrete** — a whole document in one `.
|
|
197
|
+
1. **Single-file concrete** — a whole document in one `.yo` (or `.json5p`) file.
|
|
169
198
|
2. **Directory concrete** — a directory **is** the node; its files/subdirs are its entries, and
|
|
170
|
-
two optional overlay files inside a hidden `.
|
|
171
|
-
- `.
|
|
199
|
+
two optional overlay files inside a hidden `.yo/` subdir add data and schema:
|
|
200
|
+
- `.yo/body.yo` — **instance** overlay: scalar values, ordering, pointers,
|
|
172
201
|
extra keyed/keyless entries layered onto the directory's contents.
|
|
173
|
-
- `.
|
|
202
|
+
- `.yo/meta.yo` — **schema** overlay: typing, format, validation.
|
|
174
203
|
|
|
175
204
|
So to add a pointer or a value "to a folder", you edit (or create) that folder's
|
|
176
|
-
`.
|
|
205
|
+
`.yo/body.yo`. Plain files inside the directory are its members; a `.yo/`
|
|
177
206
|
subdir does not appear as a member — it's the overlay.
|
|
178
207
|
|
|
179
208
|
A pure pointer-array body (`- *file1` …) is the ORDER overlay: it grants positions to the
|
|
@@ -184,7 +213,7 @@ pure module, an explicit `concrete:` always wins): a directory-concrete parent k
|
|
|
184
213
|
directory-concrete; a keyed container child becomes a nested real directory; an untagged
|
|
185
214
|
keyless (ordinal) container child becomes an order-numbered subdirectory (`item01`,
|
|
186
215
|
`item02`, …) referenced by a `- *: itemNN` pointer-array element; scalars and tagged containers
|
|
187
|
-
(tables, typographical lists) go inline into `body.
|
|
216
|
+
(tables, typographical lists) go inline into `body.yo`. Title-born subchapter members are
|
|
188
217
|
numbered too (`01-Введение`). The numbers are COSMETIC listing order — the body pointer-array is
|
|
189
218
|
the order's data, and an existing member is NEVER renamed: an insert between neighbors slots a
|
|
190
219
|
sub-number (`item01-1`, `01-1-Новая`). Content inside a file document speaks that file's
|
|
@@ -192,12 +221,12 @@ language (a `.json5p` interior never switches to yaml).
|
|
|
192
221
|
|
|
193
222
|
**Collapse / expand / promotion — the same node, two shapes.** The two concretes are
|
|
194
223
|
freely interconvertible without changing what the data means: a child stored as
|
|
195
|
-
`child.
|
|
196
|
-
`.
|
|
224
|
+
`child.yo` (collapsed) and the same child stored as `child/` with a
|
|
225
|
+
`.yo/body.yo` (expanded) are equivalent. Converting a single-file node **into**
|
|
197
226
|
a directory is called **directory promotion** (the UI's action; the engine keeps inbound
|
|
198
227
|
pointers valid across it, like `mv`). If you do it by hand, it is a two-step move: create the
|
|
199
|
-
`child/` directory, move the file's contents into `child/.
|
|
200
|
-
members as files), and delete the old `child.
|
|
228
|
+
`child/` directory, move the file's contents into `child/.yo/body.yo` (plus any
|
|
229
|
+
members as files), and delete the old `child.yo` — then let the engine reindex. Because
|
|
201
230
|
it is a move, treat it with the same care as any rename: pointers that addressed the old file
|
|
202
231
|
path must still resolve (prefer the mediated `mv`/promotion in the UI, which rewrites them —
|
|
203
232
|
see §10).
|
|
@@ -208,19 +237,22 @@ see §10).
|
|
|
208
237
|
|
|
209
238
|
The human marks up documents in the UI. These live **on the target node**, not in side files:
|
|
210
239
|
|
|
211
|
-
- **`
|
|
240
|
+
- **`yo: fragments:`** — a mapping of slug → selector (a text span, image/PDF rectangle, or
|
|
212
241
|
map box) identifying a region within the node.
|
|
213
242
|
- **`yamlover-annotations`** — a sequence; each element applies a tag to the node (or a
|
|
214
243
|
fragment). An element is either a bare **tag pointer** or an object with a `tag:` field plus
|
|
215
244
|
parameters:
|
|
216
245
|
```yamlover
|
|
217
246
|
yamlover-annotations:
|
|
218
|
-
- *::
|
|
219
|
-
- {description: A math block, tag: *::
|
|
247
|
+
- *:: ontos: genre: brevity # parameterless
|
|
248
|
+
- {description: 'A math block', tag: *:: ontos: topic: math} # parametrized
|
|
220
249
|
```
|
|
221
250
|
|
|
251
|
+
(A flow scalar carrying a SPACE must be quoted — an unquoted `A math block` inside `{…}` is a
|
|
252
|
+
parse error.)
|
|
253
|
+
|
|
222
254
|
Prefer letting the human create these through the UI. If you must touch them by hand, keep the
|
|
223
|
-
exact key names (`
|
|
255
|
+
exact key names (`yo: fragments:`, `yamlover-annotations`) and the tag-pointer form, and do
|
|
224
256
|
not renumber or reorder fragment slugs.
|
|
225
257
|
|
|
226
258
|
---
|
|
@@ -253,10 +285,10 @@ pushes the change to the human's browser over a live event stream — so your ed
|
|
|
253
285
|
UI within a moment, and theirs appear to you on disk. Work with that, not against it:
|
|
254
286
|
|
|
255
287
|
- **Make small, valid saves.** A half-written file will reindex as broken. Prefer complete edits.
|
|
256
|
-
- **NEVER touch `.
|
|
288
|
+
- **NEVER touch `.yo/index.db`** (nor its `-wal` / `-shm` companions). It is the server's
|
|
257
289
|
generated SQLite index — it regenerates itself from the source files. Editing or deleting it
|
|
258
|
-
does nothing useful and can confuse a running server. It is the *only* thing in `.
|
|
259
|
-
you must not edit; `body.
|
|
290
|
+
does nothing useful and can confuse a running server. It is the *only* thing in `.yo/`
|
|
291
|
+
you must not edit; `body.yo` / `meta.yo` overlays (§7) are normal editable data.
|
|
260
292
|
- **Renames and moves break inbound pointers.** Other files may point at a node by its path
|
|
261
293
|
(`*: some: node`). If you move or rename it with a plain `mv`, those pointers dangle. The
|
|
262
294
|
running server exposes a **mediated move** (`POST /api/mv`) that surgically rewrites inbound
|
|
@@ -264,10 +296,11 @@ UI within a moment, and theirs appear to you on disk. Work with that, not agains
|
|
|
264
296
|
project for pointers to the old path (`*` followed by the path) and update them too.
|
|
265
297
|
- **Don't reformat with a generic YAML/JSON tool.** It will mangle `*`, `&`, `!!<…>`, the
|
|
266
298
|
colon paths, and the mixed keyed/keyless ordering. Edit the text directly and preserve style.
|
|
267
|
-
- **Settings live in `.
|
|
299
|
+
- **Settings live in `.yo/settings.yo`** at the project root (e.g. where new tags and
|
|
268
300
|
annotations are written). Treat it as configuration; change it only when asked.
|
|
269
301
|
- **When unsure of a path, query it.** The server answers `GET /api/query?...` using the path
|
|
270
|
-
grammar above, and serves the tree at `GET /api/tree` / a node at
|
|
302
|
+
grammar above, and serves the tree at `GET /api/tree` / a node's yamlover at
|
|
303
|
+
`GET /api/content/a/b` (slash-spelled path; digits are positions, `~` the null key).
|
|
271
304
|
Use these to confirm a path resolves before you author a pointer to it.
|
|
272
305
|
|
|
273
306
|
---
|
|
@@ -276,15 +309,17 @@ UI within a moment, and theirs appear to you on disk. Work with that, not agains
|
|
|
276
309
|
|
|
277
310
|
```yamlover
|
|
278
311
|
# pointers (pull) — colon paths, the scope ladder
|
|
279
|
-
sibling: *pets
|
|
280
|
-
rooted: *: humans
|
|
281
|
-
|
|
282
|
-
|
|
312
|
+
sibling: *pets: 1 # current scope, by position (bare digits = the position)
|
|
313
|
+
rooted: *: humans: 0: name # document root → position 0 → key name
|
|
314
|
+
strkey: *: counts: '1' # QUOTED digits = the numeric STRING key
|
|
315
|
+
nullkey: *: doc: ~ # the null key
|
|
316
|
+
projscope: *:: ontos: genre # this project's root
|
|
317
|
+
world: *::: host.example: $defs: onto
|
|
283
318
|
|
|
284
319
|
# anchors (push) — "I also live there"; real keys; unambiguous only
|
|
285
320
|
here: &: chief # also at document-root key `chief`
|
|
286
321
|
rev: &: parent: child # parent holds me as `child`
|
|
287
|
-
mem: &: favorites
|
|
322
|
+
mem: &: favorites: - # appended member of `favorites`
|
|
288
323
|
|
|
289
324
|
# tags / schema
|
|
290
325
|
node: !!<*:: $defs: chapter> # bind a reusable schema
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
This is a **yamlover** project. The authoring rules, the pointer/anchor syntax, and the rules for
|
|
4
4
|
safely co-editing the tree while the yamlover web UI is running are in **`AGENTS.md`** — read it
|
|
5
|
-
before editing any `.
|
|
5
|
+
before editing any `.yo` / `.json5p` file.
|
|
6
6
|
|
|
7
7
|
@AGENTS.md
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# $defs/.yo/meta.yo — every definition file is a yamlover/meta document: the CONCRETE names
|
|
2
|
+
# the decoding (parse the text as a schema doc); the parsed type follows from it (docs/meta —
|
|
3
|
+
# the concrete/type/format split; the old spelling `type: string` + `format: yamlover/meta`
|
|
4
|
+
# stays readable but is not authored anymore).
|
|
5
|
+
members:
|
|
6
|
+
chapter:
|
|
7
|
+
concrete: yamlover/meta
|
|
8
|
+
chunk:
|
|
9
|
+
concrete: yamlover/meta
|
|
10
|
+
tag:
|
|
11
|
+
concrete: yamlover/meta
|
|
12
|
+
annotation:
|
|
13
|
+
concrete: yamlover/meta
|
|
14
|
+
fragment:
|
|
15
|
+
concrete: yamlover/meta
|
|
16
|
+
task:
|
|
17
|
+
concrete: yamlover/meta
|
|
18
|
+
workflow:
|
|
19
|
+
concrete: yamlover/meta
|
|
20
|
+
board:
|
|
21
|
+
concrete: yamlover/meta
|
|
22
|
+
table:
|
|
23
|
+
concrete: yamlover/meta
|
|
24
|
+
bullets:
|
|
25
|
+
concrete: yamlover/meta
|
|
26
|
+
numbered:
|
|
27
|
+
concrete: yamlover/meta
|
|
28
|
+
config:
|
|
29
|
+
concrete: yamlover/meta
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# $defs/annotation — ONE TAG APPLICATION on the host node (a whole document, or a fragment within
|
|
2
2
|
# it). It lives as an element of the host's `yamlover-annotations` array. Two forms:
|
|
3
|
-
# • parameterless — a bare tag pointer (`- *::
|
|
4
|
-
# • parametrized — an object carrying `tag: *::
|
|
3
|
+
# • parameterless — a bare tag pointer (`- *::ontos:…`): the host simply HAS this tag.
|
|
4
|
+
# • parametrized — an object carrying `tag: *::ontos:…` plus parameters (e.g. `description`).
|
|
5
5
|
# The applied tag drives the display color (its `color`, else a name-derived hue). The region, if
|
|
6
6
|
# any, is the host fragment's selector — an annotation carries no selector of its own. This
|
|
7
7
|
# replaces the old separate-file annotation (a `target` pointer + `selector` + reverse tag
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
# !!<*::yamlover/$defs/annotation> is optional, for the parametrized object form.
|
|
10
10
|
type: variant
|
|
11
11
|
format: x-yamlover-annotation
|
|
12
|
-
value: *:: yamlover: $defs:
|
|
13
|
-
|
|
14
|
-
tag: *:: yamlover: $defs:
|
|
12
|
+
value: *:: yamlover: $defs: onto # the parameterless case: the self-value IS a tag (by ref)
|
|
13
|
+
members:
|
|
14
|
+
tag: *:: yamlover: $defs: onto # the parametrized case: the applied tag, by pointer
|
|
15
15
|
description:
|
|
16
16
|
type: string
|
|
17
17
|
format: text/marklower
|
|
18
|
-
|
|
18
|
+
others: true # any other field is a free-form parameter
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# $defs/board — marks a DIRECTORY of tasks as an agile/kanban board. Attach it to the directory's
|
|
2
|
-
# `.
|
|
2
|
+
# `.yo/body.yo` overlay; the `workflow:` ref names which $defs/workflow supplies the
|
|
3
3
|
# lanes (its states, in order). The board renderer then groups the directory's task members into
|
|
4
4
|
# those lanes by each task's current state annotation, and a drag between lanes rewrites that
|
|
5
5
|
# annotation (re-tags the state). format `x-yamlover-board`. Attach with !!<*yamlover:$defs:board>.
|
|
6
6
|
# Spec: ../TICKETS.md §3.
|
|
7
7
|
type: object
|
|
8
8
|
format: x-yamlover-board
|
|
9
|
-
|
|
10
|
-
workflow: *:: yamlover: $defs:
|
|
9
|
+
members:
|
|
10
|
+
workflow: *:: yamlover: $defs: onto # ref → the workflow that SEEDS the default lanes
|
|
11
11
|
lanes: # optional saved lanes (the explorer board view's config):
|
|
12
12
|
type: array # a sequence of lanes, each a list of tag refs — one tag
|
|
13
|
-
|
|
13
|
+
others: # = a plain lane, several = per-tag SUBLANES stacked
|
|
14
14
|
type: array # vertically. Edited via the lane headers, persisted by
|
|
15
|
-
|
|
15
|
+
others: *:: yamlover: $defs: onto # POST /api/board.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# keyless entries are the items. An item is marklower prose (a chunk) or — when it is an
|
|
3
3
|
# UNTAGGED container — a nested bullets list: unlike table's two-level budget, the list
|
|
4
4
|
# schema applies at ANY depth, until an explicit !!<…> tag switches to something else.
|
|
5
|
-
# A titled list is a chapter holding a list — no keyed
|
|
5
|
+
# A titled list is a chapter holding a list — no keyed member clauses here on purpose.
|
|
6
6
|
# Attach with !!<*yamlover: $defs: bullets>.
|
|
7
|
-
# No explicit `format:` — `type: variant` derives x-yamlover-bullets. Spec:
|
|
7
|
+
# No explicit `format:` — `type: variant` derives x-yamlover-bullets. Spec: docs/documents/marklower.
|
|
8
8
|
type: variant
|
|
9
|
-
|
|
9
|
+
others:
|
|
10
10
|
anyOf:
|
|
11
11
|
- *:: yamlover: $defs: bullets # an untagged container item = a nested sublist, SAME kind
|
|
12
12
|
- *:: yamlover: $defs: chunk # a list item — marklower prose
|
|
@@ -5,27 +5,26 @@
|
|
|
5
5
|
#
|
|
6
6
|
# There is no `chunks` array and no `children` array — prose, media, diagrams, and
|
|
7
7
|
# subchapters are siblings in ONE ordered stream. Attach it to a yamlover node with the
|
|
8
|
-
# tag !!<*yamlover/$defs/chapter>. Spec:
|
|
8
|
+
# tag !!<*yamlover/$defs/chapter>. Spec: docs/documents/chapter, docs/meta.
|
|
9
9
|
#
|
|
10
10
|
# `type: variant` is the omni node: a scalar self-value (the title, given as `value:`) AND
|
|
11
|
-
# keyed fields (description) AND positional elements (the body) at once.
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
# of an omni node's facets; META.md §Vocabulary proposes a native `elements`/`additionalElements`.
|
|
11
|
+
# keyed fields (description) AND positional elements (the body) at once. ONE omni `members:`
|
|
12
|
+
# clause describes the members (here: the keyed `description`); the sibling `others:` covers
|
|
13
|
+
# every member no clause matched — the BODY, a union routed structurally (a container element
|
|
14
|
+
# is a chapter, a leaf is a chunk). A BARE SCALAR body element is therefore both "a chunk" and
|
|
15
|
+
# "a title-only subchapter" — the same thing, by design (docs/documents/chapter).
|
|
17
16
|
type: variant
|
|
18
17
|
value: # the self-value — the chapter's TITLE
|
|
19
18
|
type: string
|
|
20
19
|
format: text/marklower
|
|
21
|
-
|
|
20
|
+
members:
|
|
22
21
|
description: # optional subtitle / heading annotation — stays keyed
|
|
23
22
|
type: string
|
|
24
23
|
format: text/marklower
|
|
25
|
-
|
|
24
|
+
others: # the body — every unmatched member, read top to bottom
|
|
26
25
|
anyOf:
|
|
27
26
|
- *:: yamlover: $defs: chapter # a nested subchapter (a container) — the recursion
|
|
28
|
-
- *:: yamlover: $defs: table # a table — enters only by its EXPLICIT tag (
|
|
27
|
+
- *:: yamlover: $defs: table # a table — enters only by its EXPLICIT tag (docs/documents/marklower)
|
|
29
28
|
- *:: yamlover: $defs: bullets # a bullet list — enters only by its explicit tag
|
|
30
29
|
- *:: yamlover: $defs: numbered # a numbered list — enters only by its explicit tag
|
|
31
30
|
- *:: yamlover: $defs: chunk # a content block — a leaf
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# $defs/chunk — one renderable content block, a leaf of a chapter's positional body.
|
|
2
2
|
#
|
|
3
|
-
# A chunk is a typed value; its (type, format) selects the renderer
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
3
|
+
# A chunk is a typed value; its (type, format) selects the renderer — the format CONSTRAINS
|
|
4
|
+
# the value, and the concrete (declared in meta, docs/meta) says how its bytes decode. The
|
|
5
|
+
# default is markdown prose; a chunk overrides them to be a diagram, image, LaTeX, CSV, a
|
|
6
|
+
# file pointer, etc. `binary` covers image/pdf/… chunks (a `*` pointer to a file).
|
|
7
|
+
# Spec: docs/documents/chapter.
|
|
7
8
|
type: [string, binary]
|
|
8
9
|
format: text/marklower
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# $defs/config — the project configuration schema for `<root>/.
|
|
1
|
+
# $defs/config — the project configuration schema for `<root>/.yo/settings.yo`
|
|
2
2
|
# (settings.ts, IMPORTS.md). Settings are DEFAULTS, never constraints; reading is location-
|
|
3
3
|
# independent. The format `x-yamlover-config` lets the server render the (hidden but accessible)
|
|
4
4
|
# config file with the SETTINGS EDITOR — opened by the gear button, in the main pane. Locations are
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
# !!<*yamlover:$defs:config>.
|
|
7
7
|
type: object
|
|
8
8
|
format: x-yamlover-config
|
|
9
|
-
|
|
9
|
+
members:
|
|
10
10
|
uri: # this project's identity (IMPORTS.md §1) — an authority,
|
|
11
11
|
type: string # authored as `::: host`; identity, not transport
|
|
12
12
|
exports: # the paths exported to importers (IMPORTS.md §2):
|
|
13
13
|
type: array # a list of pointer/query texts
|
|
14
|
-
|
|
14
|
+
others:
|
|
15
15
|
type: string
|
|
16
|
-
annotations: *:: yamlover: $defs:
|
|
17
|
-
|
|
16
|
+
annotations: *:: yamlover: $defs: onto # where new annotations are created (`*:: annotations`)
|
|
17
|
+
ontos: *:: yamlover: $defs: onto # where new tags are created (`*:: tags`)
|
|
18
18
|
sidecars: # where derived sidecar blobs go: per-directory | project
|
|
19
19
|
type: string
|
|
20
20
|
width: # reading width (ch) for rendered prose (markdown/asciidoc/
|
|
21
21
|
type: integer # chapter); the browser settings layer overrides it per device
|
|
22
22
|
theme: # ui palette: dark | light; the browser settings layer
|
|
23
23
|
type: string # overrides it per device
|
|
24
|
-
annotation-tag: *:: yamlover: $defs:
|
|
24
|
+
annotation-tag: *:: yamlover: $defs: onto # the last-used annotation tag (the picker default)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# its own `yamlover-annotations`. Attach with the tag !!<*::yamlover/$defs/fragment>.
|
|
8
8
|
type: object
|
|
9
9
|
format: x-yamlover-fragment
|
|
10
|
-
|
|
10
|
+
members:
|
|
11
11
|
type:
|
|
12
12
|
type: string
|
|
13
13
|
description: The locator kind — text | rect | pdf | djvu | map
|
|
@@ -41,4 +41,4 @@ properties:
|
|
|
41
41
|
type: string
|
|
42
42
|
yamlover-annotations:
|
|
43
43
|
type: array
|
|
44
|
-
|
|
44
|
+
others: *:: yamlover: $defs: annotation
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# keyless entries are the items. An item is marklower prose (a chunk) or — when it is an
|
|
3
3
|
# UNTAGGED container — a nested numbered list: unlike table's two-level budget, the list
|
|
4
4
|
# schema applies at ANY depth, until an explicit !!<…> tag switches to something else.
|
|
5
|
-
# A titled list is a chapter holding a list — no keyed
|
|
5
|
+
# A titled list is a chapter holding a list — no keyed member clauses here on purpose.
|
|
6
6
|
# Attach with !!<*yamlover: $defs: numbered>.
|
|
7
|
-
# No explicit `format:` — `type: variant` derives x-yamlover-numbered. Spec:
|
|
7
|
+
# No explicit `format:` — `type: variant` derives x-yamlover-numbered. Spec: docs/documents/marklower.
|
|
8
8
|
type: variant
|
|
9
|
-
|
|
9
|
+
others:
|
|
10
10
|
anyOf:
|
|
11
11
|
- *:: yamlover: $defs: numbered # an untagged container item = a nested sublist, SAME kind
|
|
12
12
|
- *:: yamlover: $defs: chunk # a list item — marklower prose
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# $defs/
|
|
1
|
+
# $defs/onto — a node in an ontology. A tag's description is its BODY (the node's own scalar
|
|
2
2
|
# value — author `name: !!omni The description` when the tag also has fields, or a plain
|
|
3
3
|
# `name: The description` for a leaf); an optional explicit `color` ("#rrggbb" — a "pure color
|
|
4
4
|
# tag"; absent ⇒ the UI derives a stable hue from the name); every OTHER key is a sub-tag, so
|
|
5
|
-
# the taxonomy recurses to any depth (`
|
|
5
|
+
# the taxonomy recurses to any depth (`others:` → onto). The format `x-yamlover-onto`
|
|
6
6
|
# makes the server render each one as a tag (a badge wired to its super/sub-tags). Attach to the
|
|
7
|
-
# taxonomy root with the tag !!<*yamlover/$defs/
|
|
7
|
+
# taxonomy root with the tag !!<*yamlover/$defs/onto> — it propagates down.
|
|
8
8
|
type: variant
|
|
9
|
-
format: x-yamlover-
|
|
9
|
+
format: x-yamlover-onto
|
|
10
10
|
value:
|
|
11
11
|
type: string
|
|
12
12
|
format: text/marklower
|
|
13
|
-
|
|
13
|
+
members:
|
|
14
14
|
color:
|
|
15
15
|
type: string
|
|
16
16
|
description: An explicit display color ("#rrggbb"); absent ⇒ derived from the tag's name
|
|
17
|
-
|
|
17
|
+
others: *:: yamlover: $defs: onto
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
# $defs/table — a grid node: an OMNI node whose keyless entries are the ROWS (top to
|
|
2
2
|
# bottom), each row an array of CELLS (left to right). A row keyed `header` is the header
|
|
3
3
|
# row; optional keyed `title` is the caption. The column count is inferred from the first
|
|
4
|
-
# row. The table schema consumes exactly TWO nesting levels — rows, then cells
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# `width` is deliberately schema-untyped (an
|
|
10
|
-
# A cell that is a `*` pointer to its adjacent
|
|
11
|
-
#
|
|
4
|
+
# row. The table schema consumes exactly TWO nesting levels — rows, then cells (the outer
|
|
5
|
+
# `others:` sweep is a row, ITS `others:` a cell); a cell that is an untagged container
|
|
6
|
+
# switches BACK to a CHAPTER (prose, subchapters, tables — the same rules as a top chapter).
|
|
7
|
+
# A NESTED table — like a list — enters a cell only by its explicit !!<…> tag. A header cell
|
|
8
|
+
# may be an omni scalar carrying a keyed `width` sidecar — a proportional column weight
|
|
9
|
+
# (AsciiDoc `cols` style), rendered weight/sum %; `width` is deliberately schema-untyped (an
|
|
10
|
+
# omni cell must stay a LEAF for shape routing). A cell that is a `*` pointer to its adjacent
|
|
11
|
+
# previous cell (`*[.-1]` left, `*..[.-1][.]` up — relative indexes,
|
|
12
|
+
# docs/language/pointers/relative-indexes) declares a MERGED cell: colspan/rowspan. Attach with
|
|
12
13
|
# !!<*yamlover: $defs: table>.
|
|
13
|
-
# No explicit `format:` — `type: variant` derives x-yamlover-table. Spec:
|
|
14
|
+
# No explicit `format:` — `type: variant` derives x-yamlover-table. Spec: docs/documents/marklower.
|
|
14
15
|
type: variant
|
|
15
|
-
|
|
16
|
+
members:
|
|
16
17
|
title: # optional caption
|
|
17
18
|
type: string
|
|
18
19
|
format: text/marklower
|
|
19
20
|
header: # the header row — same shape as a body row (the schema
|
|
20
21
|
type: array # loader follows only $defs pointers, so the row
|
|
21
|
-
|
|
22
|
+
others: # schema is repeated literally rather than *: others)
|
|
22
23
|
anyOf:
|
|
23
24
|
- *:: yamlover: $defs: chunk
|
|
24
25
|
- *:: yamlover: $defs: chapter
|
|
25
26
|
- *:: yamlover: $defs: table
|
|
26
27
|
- *:: yamlover: $defs: bullets
|
|
27
28
|
- *:: yamlover: $defs: numbered
|
|
28
|
-
|
|
29
|
+
others: # a row
|
|
29
30
|
type: array
|
|
30
|
-
|
|
31
|
+
others: # a cell
|
|
31
32
|
anyOf:
|
|
32
33
|
- *:: yamlover: $defs: chunk # marklower prose (the default leaf)
|
|
33
34
|
- *:: yamlover: $defs: chapter # an UNTAGGED container cell IS a chapter (the first
|