@heroiclands/package-build 24.1.1 → 25.1.0
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/CHANGELOG.md +36 -0
- package/README.md +1 -0
- package/bin/content-commands.mjs +30 -96
- package/bin/encoding-commands.mjs +146 -0
- package/bin/package-build.mjs +35 -24
- package/config.mjs +25 -0
- package/convert.mjs +182 -0
- package/docs/api.md +154 -11
- package/docs/authoring/links-and-markup.md +260 -473
- package/docs/commands.md +118 -119
- package/docs/configuration.md +31 -13
- package/docs/content-format.md +11 -4
- package/docs/diagnostics.md +43 -16
- package/docs/encoding-core.md +135 -0
- package/docs/guides/book.md +2 -2
- package/docs/guides/module-project.md +23 -1
- package/docs/guides/site.md +2 -2
- package/docs/guides/writing-in-invented-scripts.md +453 -569
- package/docs/reference/format-details.md +290 -380
- package/docs/reference/note-types.md +80 -62
- package/docs/source-preview.md +8 -0
- package/e2e.mjs +1 -1
- package/engine/base-compiler.mjs +27 -9
- package/engine/content-charset.mjs +21 -1
- package/engine/content-format.yaml +7 -2
- package/engine/content-index.mjs +6 -2
- package/engine/content-links.mjs +1 -0
- package/engine/content-scripts.mjs +658 -423
- package/engine/content-scroll.mjs +4 -4
- package/engine/content-spans.mjs +40 -9
- package/engine/content-verse.mjs +1 -1
- package/engine/converter-data.mjs +70 -0
- package/engine/dictionary-rows.mjs +2 -34
- package/engine/encoding-integrity.mjs +94 -0
- package/engine/encoding-language.mjs +506 -0
- package/engine/encoding-lexicon.mjs +699 -0
- package/engine/encoding-notes.mjs +186 -0
- package/engine/encoding-standard.mjs +42 -0
- package/engine/encoding-template.mjs +313 -0
- package/engine/encoding-terms.mjs +141 -0
- package/engine/encoding.mjs +946 -0
- package/engine/extension-attributes.mjs +2 -0
- package/engine/helpers.mjs +1 -1
- package/engine/index.mjs +10 -0
- package/engine/language-data.mjs +4 -1
- package/engine/language-terms.mjs +23 -12
- package/engine/{logographic.mjs → language-writings.mjs} +29 -38
- package/engine/markup-validation.mjs +1 -1
- package/engine/note-vocabulary.mjs +4 -158
- package/engine/pdf-render.mjs +31 -3
- package/engine/roman-characters.mjs +232 -0
- package/engine/roman-run.mjs +149 -0
- package/engine/roman-verse.mjs +95 -0
- package/engine/run-rows.mjs +29 -31
- package/engine/run-words.mjs +2 -2
- package/engine/script-emphasis-terms.mjs +3 -0
- package/engine/script-emphasis.mjs +3 -10
- package/engine/script-font-delivery.mjs +9 -12
- package/engine/script-fonts.mjs +2 -1
- package/engine/site-build.mjs +14 -5
- package/engine/site-preview.mjs +12 -2
- package/engine/sql-tables.mjs +36 -31
- package/engine/verse-metre.mjs +1 -1
- package/engine/word-forms.mjs +1 -1
- package/engine/word-inflections.mjs +48 -0
- package/engine/word-rows.mjs +1 -1
- package/engine/word-terms.mjs +16 -17
- package/package.json +11 -5
- package/types/config.d.mts +5 -0
- package/types/convert.d.mts +44 -0
- package/types/e2e.d.mts +1 -1
- package/types/engine/base-compiler.d.mts +4 -2
- package/types/engine/content-charset.d.mts +8 -0
- package/types/engine/content-index.d.mts +4 -1
- package/types/engine/content-scripts.d.mts +108 -42
- package/types/engine/converter-data.d.mts +11 -0
- package/types/engine/dictionary-rows.d.mts +1 -25
- package/types/engine/encoding-integrity.d.mts +14 -0
- package/types/engine/encoding-language.d.mts +36 -0
- package/types/engine/encoding-lexicon.d.mts +259 -0
- package/types/engine/encoding-notes.d.mts +39 -0
- package/types/engine/encoding-standard.d.mts +11 -0
- package/types/engine/encoding-template.d.mts +43 -0
- package/types/engine/encoding-terms.d.mts +105 -0
- package/types/engine/encoding.d.mts +155 -0
- package/types/engine/helpers.d.mts +1 -1
- package/types/engine/index.d.mts +5 -0
- package/types/engine/language-terms.d.mts +1 -1
- package/types/engine/{logographic.d.mts → language-writings.d.mts} +6 -6
- package/types/engine/markup-validation.d.mts +1 -1
- package/types/engine/pdf-render.d.mts +1 -1
- package/types/engine/roman-characters.d.mts +45 -0
- package/types/engine/roman-run.d.mts +101 -0
- package/types/engine/roman-verse.d.mts +23 -0
- package/types/engine/run-rows.d.mts +13 -20
- package/types/engine/script-emphasis-terms.d.mts +2 -0
- package/types/engine/script-emphasis.d.mts +1 -1
- package/types/engine/script-font-delivery.d.mts +2 -3
- package/types/engine/script-fonts.d.mts +5 -0
- package/types/engine/site-preview.d.mts +1 -1
- package/types/engine/word-inflections.d.mts +25 -0
- package/engine/map-lexicon.mjs +0 -1034
- package/engine/text-maps.mjs +0 -654
- package/engine/written-in.mjs +0 -204
- package/types/engine/map-lexicon.d.mts +0 -330
- package/types/engine/text-maps.d.mts +0 -189
- package/types/engine/written-in.d.mts +0 -76
package/docs/commands.md
CHANGED
|
@@ -2215,6 +2215,14 @@ dependencies; exact Item UUID validation remains part of compilation. Reads
|
|
|
2215
2215
|
the content tree named by `root`, defaulting to
|
|
2216
2216
|
`paths.content`; writes nothing.
|
|
2217
2217
|
|
|
2218
|
+
Every configured language note declares `data.roman`, its exact NFC Roman
|
|
2219
|
+
source characters. Lint checks language-tagged text before mapping, using the
|
|
2220
|
+
same inventory for a configured name and its BCP 47 tag. Visible linked labels
|
|
2221
|
+
are checked; destinations, attributes and verse structure are excluded. An
|
|
2222
|
+
explicit empty inventory declares no written characters. External tags without
|
|
2223
|
+
a language-note association retain their ordinary behavior. Standalone
|
|
2224
|
+
`package-build markdown` does not load these inventories.
|
|
2225
|
+
|
|
2218
2226
|
Name marking is advisory: lint checks explicit `.name` spans and authored link
|
|
2219
2227
|
labels against the [name-marking
|
|
2220
2228
|
conventions](authoring/links-and-markup.md#marking-names-in-prose). Plain prose
|
|
@@ -2575,14 +2583,11 @@ with visible text, nullable type/subtype and original source line/column.
|
|
|
2575
2583
|
Local and dependency SQL schemas expose them through `names`; they travel in
|
|
2576
2584
|
the metadata artifact.
|
|
2577
2585
|
|
|
2578
|
-
Metadata
|
|
2579
|
-
`lang=`, `font=` or `
|
|
2580
|
-
|
|
2581
|
-
runs
|
|
2582
|
-
|
|
2583
|
-
same. Local
|
|
2584
|
-
and dependency SQL schemas expose them through `runs`, and each mapping note's
|
|
2585
|
-
rows through `maps`.
|
|
2586
|
+
Metadata includes each own note's spans, divs and verse fences marked with
|
|
2587
|
+
`lang=`, `font=` or `enc=` under `runs`, with the language as written, its
|
|
2588
|
+
resolved tag, font, encoding document Address and original source line/column.
|
|
2589
|
+
Roman runs use the default encoding and receive no inferred script face.
|
|
2590
|
+
Local and dependency SQL schemas expose these records through `runs`.
|
|
2586
2591
|
|
|
2587
2592
|
The command prepares SQL tables, page lists, automatic sections and scalar
|
|
2588
2593
|
expressions before publishing their prose targets. Each source uses its own
|
|
@@ -3151,173 +3156,167 @@ $ package-build reachability assets/content
|
|
|
3151
3156
|
`package-build links [root]`, `package-build lint [root]`, [Diagnostics](diagnostics.md),
|
|
3152
3157
|
[Configuration](configuration.md).
|
|
3153
3158
|
|
|
3154
|
-
### `package-build
|
|
3159
|
+
### `package-build encode [text..]`
|
|
3155
3160
|
|
|
3156
3161
|
**NAME**
|
|
3157
3162
|
|
|
3158
|
-
|
|
3163
|
+
Encode roman text using an encoding document.
|
|
3159
3164
|
|
|
3160
3165
|
**SYNOPSIS**
|
|
3161
3166
|
|
|
3162
|
-
```
|
|
3163
|
-
package-build
|
|
3167
|
+
```text
|
|
3168
|
+
package-build encode --enc <document|default> [--in|-i <file>] [--out|-o <file>] [text..]
|
|
3164
3169
|
```
|
|
3165
3170
|
|
|
3166
3171
|
**DESCRIPTION**
|
|
3167
3172
|
|
|
3168
|
-
Reads
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
rows alone apply. See
|
|
3174
|
-
[a map reads the dictionary first](reference/format-details.md#a-map-reads-the-dictionary-first).
|
|
3175
|
-
Under a [logographic map](reference/format-details.md#a-logographic-map) every
|
|
3176
|
-
word is written from the language's lexicon, by its own writing or its parts',
|
|
3177
|
-
and the rows write only the text between words.
|
|
3178
|
-
The text is the words given, joined by single spaces; `-` or no text reads it
|
|
3179
|
-
from standard input, less one trailing newline. Writes nothing.
|
|
3173
|
+
Reads an encoding document from the consuming package's content index and
|
|
3174
|
+
writes its Unicode output. `--enc` is an Address whose default type is `doc`,
|
|
3175
|
+
or `default` to keep text unchanged. The note supplies its font, and glyph
|
|
3176
|
+
codes come from that face's `fonts.json`. These commands apply the bare
|
|
3177
|
+
encoding; they do not apply a language's lexical native spellings.
|
|
3180
3178
|
|
|
3181
|
-
|
|
3179
|
+
Give exactly one string argument, or `--in` with a UTF-8 file; `--in -` drains
|
|
3180
|
+
standard input. `--out` writes the exact result to a file. Standard output adds
|
|
3181
|
+
one newline only for string arguments; file and stream input add nothing.
|
|
3182
|
+
A refusal writes no result and preserves an existing output file.
|
|
3182
3183
|
|
|
3183
|
-
|
|
3184
|
-
| ---------- | ---------------- | ------- | -------------------------------------- |
|
|
3185
|
-
| `map` | string | — | The `data.map.name` of a mapping note. |
|
|
3186
|
-
| `text` | string, variadic | stdin | The passage; `-` reads it from stdin. |
|
|
3184
|
+
**OPTIONS**
|
|
3187
3185
|
|
|
3188
|
-
| Option
|
|
3189
|
-
|
|
|
3190
|
-
| `--
|
|
3191
|
-
| `--
|
|
3192
|
-
| `--
|
|
3186
|
+
| Option | Description |
|
|
3187
|
+
| ------------- | -------------------------------------------------- |
|
|
3188
|
+
| `--enc` | Required encoding document Address, or `default`. |
|
|
3189
|
+
| `--in`, `-i` | Read a UTF-8 file, or standard input with `-`. |
|
|
3190
|
+
| `--out`, `-o` | Write the exact result to a file. |
|
|
3191
|
+
| `[text..]` | One quoted input string, used only without `--in`. |
|
|
3193
3192
|
|
|
3194
3193
|
**EXIT STATUS**
|
|
3195
3194
|
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
passage has a native form the rows cannot capitalise, or, under a logographic
|
|
3201
|
-
map, a word has no writing or stands for entries written differently.
|
|
3202
|
-
Otherwise 0.
|
|
3195
|
+
0 on success; 1 for unreadable files or an encoding refusal; 2 for a usage
|
|
3196
|
+
error. Findings go to standard error as `file:line:column: error: message`.
|
|
3197
|
+
Line and column count Unicode code points, starting at one. String input is
|
|
3198
|
+
named `<text>` and standard input `<stdin>`.
|
|
3203
3199
|
|
|
3204
3200
|
**EXAMPLES**
|
|
3205
3201
|
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
U+F024F U+F0230 U+F023F U+F023C U+0020 U+F023A U+F023D U+F023C U+F0230 U+F0239
|
|
3212
|
-
$ package-build transliterate semaron --hex zaron
|
|
3213
|
-
U+F0255 U+F0230 U+F023F U+F023D U+F023C
|
|
3214
|
-
$ package-build transliterate semoran zaron
|
|
3215
|
-
assets/content: error: `semoran` is not a map: a map is named by the `data.map.name` of a mapping note; did you mean `semaron`?
|
|
3202
|
+
```sh
|
|
3203
|
+
package-build encode --enc vylsemaronenc "zaron"
|
|
3204
|
+
package-build encode --enc khelqalezuenc --in roman.txt --out native.txt
|
|
3205
|
+
package-build encode --enc khelzethuenc "⟦MAN⟧"
|
|
3206
|
+
printf 'zaron' | package-build encode --enc vylsemaronenc -i - -o native.txt
|
|
3216
3207
|
```
|
|
3217
3208
|
|
|
3218
|
-
|
|
3219
|
-
|
|
3209
|
+
**SEE ALSO**
|
|
3210
|
+
|
|
3211
|
+
`package-build decode`, `package-build lexicon`, [Writing in invented scripts](guides/writing-in-invented-scripts.md#the-commands).
|
|
3212
|
+
|
|
3213
|
+
### `package-build decode [text..]`
|
|
3214
|
+
|
|
3215
|
+
**NAME**
|
|
3216
|
+
|
|
3217
|
+
Decode Unicode through an encoding document.
|
|
3220
3218
|
|
|
3221
|
-
|
|
3222
|
-
and the affix `-unet`, the plural written by its own sign, and `zamlu` given no
|
|
3223
|
-
writing:
|
|
3219
|
+
**SYNOPSIS**
|
|
3224
3220
|
|
|
3221
|
+
```text
|
|
3222
|
+
package-build decode --enc <document|default> [--in|-i <file>] [--out|-o <file>] [text..]
|
|
3225
3223
|
```
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3224
|
+
|
|
3225
|
+
**DESCRIPTION**
|
|
3226
|
+
|
|
3227
|
+
Reads the encoding's longest output rows back as roman text. `--enc` is
|
|
3228
|
+
required and resolves exactly as for `encode`. Literal spans decode to the
|
|
3229
|
+
encoding's own codes, or `U+XXXX` for an unnamed Unicode scalar. The bare
|
|
3230
|
+
command reads no language vocabulary; the [browser conversion API](api.md#browser-conversion)
|
|
3231
|
+
adds lexical recovery.
|
|
3232
|
+
|
|
3233
|
+
**OPTIONS**
|
|
3234
|
+
|
|
3235
|
+
| Option | Description |
|
|
3236
|
+
| ------------- | -------------------------------------------------- |
|
|
3237
|
+
| `--enc` | Required encoding document Address, or `default`. |
|
|
3238
|
+
| `--in`, `-i` | Read a UTF-8 file, or standard input with `-`. |
|
|
3239
|
+
| `--out`, `-o` | Write the exact result to a file. |
|
|
3240
|
+
| `[text..]` | One quoted input string, used only without `--in`. |
|
|
3241
|
+
|
|
3242
|
+
**EXIT STATUS**
|
|
3243
|
+
|
|
3244
|
+
0 on success; 1 for unreadable files or a decoding refusal; 2 for a usage
|
|
3245
|
+
error. Diagnostics and output bytes follow the same rules as `encode`.
|
|
3246
|
+
|
|
3247
|
+
**EXAMPLES**
|
|
3248
|
+
|
|
3249
|
+
```sh
|
|
3250
|
+
package-build decode --enc vylsemaronenc --in native.txt --out roman.txt
|
|
3251
|
+
package-build decode --enc khelqalezuenc -i native.txt
|
|
3252
|
+
package-build decode --enc khelzethuenc --in signs.txt
|
|
3230
3253
|
```
|
|
3231
3254
|
|
|
3232
3255
|
**SEE ALSO**
|
|
3233
3256
|
|
|
3234
|
-
`package-build lexicon
|
|
3257
|
+
`package-build encode`, `package-build lexicon`, [Browser conversion](api.md#browser-conversion).
|
|
3235
3258
|
|
|
3236
3259
|
### `package-build lexicon <language>`
|
|
3237
3260
|
|
|
3238
3261
|
**NAME**
|
|
3239
3262
|
|
|
3240
|
-
List a language's words
|
|
3263
|
+
List a language's words and native writings under an encoding document.
|
|
3241
3264
|
|
|
3242
3265
|
**SYNOPSIS**
|
|
3243
3266
|
|
|
3244
3267
|
```
|
|
3245
|
-
package-build lexicon <language> [--
|
|
3268
|
+
package-build lexicon <language> [--enc <encoding>] [--font <slug>] [--derived] [--json]
|
|
3246
3269
|
```
|
|
3247
3270
|
|
|
3248
3271
|
**DESCRIPTION**
|
|
3249
3272
|
|
|
3250
|
-
Reads the content index and lists
|
|
3251
|
-
[`languages.<language>.note`](configuration.md#languages)
|
|
3252
|
-
|
|
3253
|
-
language
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
for that sense. Every word listed with a writing and not `ambiguous` is written
|
|
3267
|
-
so by the build and by `package-build transliterate`.
|
|
3268
|
-
|
|
3269
|
-
With `--derived`, the forms the language's own rules derive from those words
|
|
3270
|
-
follow them: each word's declared `variants`, then plurals, verb forms, replacing suffixes, agreeing forms and
|
|
3271
|
-
participles, exactly the regular forms
|
|
3272
|
-
[the mapped-run word check](authoring/links-and-markup.md#a-mapped-runs-words)
|
|
3273
|
-
accepts. Each is listed once, case folded as the check compares it, and spelled
|
|
3274
|
-
by the rows; a form that is itself a lexicon word is not repeated. Every line
|
|
3275
|
-
then has a sixth column: the lexicon word a derived form comes from, empty for
|
|
3276
|
-
the lexicon's own words. A derived line carries its word's `class` and `gloss`.
|
|
3273
|
+
Reads the content index and lists the words of the note named by
|
|
3274
|
+
[`languages.<language>.note`](configuration.md#languages), in authored order.
|
|
3275
|
+
`--enc` selects an encoding document; its language must agree with the
|
|
3276
|
+
requested language, and `--font`, when supplied, must equal its font.
|
|
3277
|
+
Native writings and composed parts take precedence over encoding mappings.
|
|
3278
|
+
|
|
3279
|
+
Tab-separated output contains `form`, native text, source, class and gloss.
|
|
3280
|
+
Source is `own`, `parts`, `rows`, `none` or `ambiguous`. A missing writing leaves
|
|
3281
|
+
native text empty; an ambiguous entry shows that entry's own writing so the
|
|
3282
|
+
reader can choose signs for its meaning. JSON output preserves these fields
|
|
3283
|
+
and adds `ambiguous: true` where appropriate.
|
|
3284
|
+
|
|
3285
|
+
With `--derived`, declared variants and regular forms follow the citations,
|
|
3286
|
+
each once. The final tab-separated column, or JSON `from`, names its source
|
|
3287
|
+
word. This lists the forms the language's authored grammar supplies; it does
|
|
3288
|
+
not infer grammatical roles from an unlabelled variant.
|
|
3277
3289
|
|
|
3278
3290
|
**OPTIONS**
|
|
3279
3291
|
|
|
3280
|
-
| Positional | Type | Default | Description
|
|
3281
|
-
| ---------- | ------ | ------- |
|
|
3282
|
-
| `language` | string | — | A
|
|
3292
|
+
| Positional | Type | Default | Description |
|
|
3293
|
+
| ---------- | ------ | ------- | ----------------------------------------------------- |
|
|
3294
|
+
| `language` | string | — | A configured language whose `note` names its lexicon. |
|
|
3283
3295
|
|
|
3284
|
-
| Option | Type | Default
|
|
3285
|
-
| ----------- | ------- |
|
|
3286
|
-
| `--
|
|
3287
|
-
| `--font` | string |
|
|
3288
|
-
| `--derived` | boolean | `false`
|
|
3289
|
-
| `--json` | boolean | `false`
|
|
3296
|
+
| Option | Type | Default | Description |
|
|
3297
|
+
| ----------- | ------- | ------------------------ | ---------------------------------------------------------- |
|
|
3298
|
+
| `--enc` | string | required | An encoding document Address. |
|
|
3299
|
+
| `--font` | string | encoding document's font | A face supported by the encoding. |
|
|
3300
|
+
| `--derived` | boolean | `false` | Include variants and derived forms with their source word. |
|
|
3301
|
+
| `--json` | boolean | `false` | Print JSON records instead of tab-separated lines. |
|
|
3290
3302
|
|
|
3291
3303
|
**EXIT STATUS**
|
|
3292
3304
|
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
`data.writtenIn`, the language states no `note`, or a capitalised
|
|
3296
|
-
word has a native form the rows cannot capitalise, each reported as a finding.
|
|
3297
|
-
Otherwise 0.
|
|
3305
|
+
0 on success; 1 for content-index findings, an unknown language, encoding or
|
|
3306
|
+
face, a missing language note or encoding selection, or an invalid conversion.
|
|
3298
3307
|
|
|
3299
3308
|
**EXAMPLES**
|
|
3300
3309
|
|
|
3301
3310
|
```
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
thizaron <native form> rows n a seal
|
|
3306
|
-
$ package-build lexicon vyl --map semaron --derived | grep -P '\talathos$'
|
|
3307
|
-
alatha <native form> rows pron he, that one alathos
|
|
3308
|
-
alathon <native form> rows pron he, that one alathos
|
|
3309
|
-
alathoi <native form> rows pron he, that one alathos
|
|
3310
|
-
alathai <native form> rows pron he, that one alathos
|
|
3311
|
-
$ package-build lexicon khel --map zethu | grep -P '\t(none|ambiguous)\t'
|
|
3312
|
-
nelgir <writing> ambiguous n a god
|
|
3313
|
-
Nelgir <writing> ambiguous stem god
|
|
3314
|
-
zamlu none n music
|
|
3311
|
+
package-build lexicon vyl --enc vylsemaronenc
|
|
3312
|
+
package-build lexicon vyl --enc vylsemaronenc --derived --json
|
|
3313
|
+
package-build lexicon khel --enc khelzethuenc
|
|
3315
3314
|
```
|
|
3316
3315
|
|
|
3317
3316
|
**SEE ALSO**
|
|
3318
3317
|
|
|
3319
|
-
`package-build
|
|
3320
|
-
[
|
|
3318
|
+
`package-build encode`, `package-build decode`,
|
|
3319
|
+
[native spellings and parts](reference/format-details.md#native-spellings-and-parts).
|
|
3321
3320
|
|
|
3322
3321
|
### `package-build core`
|
|
3323
3322
|
|
package/docs/configuration.md
CHANGED
|
@@ -734,7 +734,7 @@ any finding it reports is a refusal, joined into one message:
|
|
|
734
734
|
The languages a note may tag text with, by short name. A note writes the short
|
|
735
735
|
name, as in `[Daimela, helthos.]{lang=vyl}`; the build gives the text the
|
|
736
736
|
language's tag. See
|
|
737
|
-
[marking language, font and
|
|
737
|
+
[marking language, font and encoding](authoring/links-and-markup.md#marking-language-font-and-encoding).
|
|
738
738
|
|
|
739
739
|
```yaml
|
|
740
740
|
languages:
|
|
@@ -761,20 +761,18 @@ checked.
|
|
|
761
761
|
**`note`** names the language note whose `data.words` is the language's
|
|
762
762
|
lexicon, as an Address in this package: `skill-vylarilng`, or the bare
|
|
763
763
|
shortcode, whose type defaults to `skill`. A run marked with the language and a
|
|
764
|
-
`
|
|
764
|
+
`enc=` writes each word the lexicon states a native form for by that form, and
|
|
765
765
|
spells every other word by the map's rows; see
|
|
766
|
-
[
|
|
766
|
+
[an encoding reads the dictionary first](reference/format-details.md#an-encoding-reads-the-dictionary-first).
|
|
767
767
|
Language word-book validation applies to Roman and native runs alike,
|
|
768
|
-
independently of
|
|
768
|
+
independently of encoding selection: every word is a word of the lexicon, of a name the language note's
|
|
769
769
|
own register lists, or a regular form of a lexicon word, and any other word is an error; see
|
|
770
|
-
[a mapped run's words](authoring/links-and-markup.md#
|
|
771
|
-
|
|
772
|
-
`data.
|
|
773
|
-
|
|
774
|
-
and
|
|
775
|
-
|
|
776
|
-
[a language's script](authoring/links-and-markup.md#a-languages-script). The
|
|
777
|
-
script belongs to the language note, and the configuration never states it.
|
|
770
|
+
[a mapped run's words](authoring/links-and-markup.md#an-encoded-runs-words).
|
|
771
|
+
An encoding document names its configured language in `data.language` and
|
|
772
|
+
its installed face in `data.font`. `enc=` selects that document and infers
|
|
773
|
+
those values; explicit choices must agree. A run without an encoding uses
|
|
774
|
+
`enc=default` and keeps its Roman spelling. See
|
|
775
|
+
[marking language, font and encoding](authoring/links-and-markup.md#marking-language-font-and-encoding).
|
|
778
776
|
A language with no `note` tags its text and has no lexicon. Whether the note
|
|
779
777
|
resolves is checked by `package-build lint`, at the key:
|
|
780
778
|
|
|
@@ -1905,6 +1903,7 @@ packageBuild:
|
|
|
1905
1903
|
| [`packageBuild.baseStyles`](#packagebuildbasestyles) | boolean | no | `true` |
|
|
1906
1904
|
| [`packageBuild.manifest`](#packagebuildmanifest) | object, pass-through | no | `{}` |
|
|
1907
1905
|
| [`packageBuild.manifestFlags`](#packagebuildassettransform-and-packagebuildmanifestflags) | string (path to a module) | no | `null` |
|
|
1906
|
+
| [`packageBuild.converterData`](#packagebuildconverterdata) | string (stage-relative JSON path) | no | `null` |
|
|
1908
1907
|
| [`packageBuild.schema`](#packagebuildschema) | object (`{documentType: {from, registry}}`) | no | `[]` |
|
|
1909
1908
|
| [`packageBuild.clean`](#packagebuildclean) | object | no | `{extra: []}` |
|
|
1910
1909
|
| [`packageBuild.lang`](#packagebuildlang) | object | no | see below |
|
|
@@ -1916,7 +1915,7 @@ packageBuild:
|
|
|
1916
1915
|
| [`packageBuild.proseLint`](#packagebuildproselint) | object | no | `{age: 21, threshold: 5, minWords: 8, rules: readability}` |
|
|
1917
1916
|
| [`packageBuild.proseScore`](#packagebuildprosescore) | object | no | `{minWords: 80, bands: {}}` |
|
|
1918
1917
|
|
|
1919
|
-
> ``package-build config: `packageBuild.<key>` is not a recognised key (expected one of: stageDir, assets, assetTransform, shippingLicenses, baseStyles, manifest, manifestFlags, schema, clean, lang, deploy, release, bundle, container, e2e, proseLint, proseScore).``
|
|
1918
|
+
> ``package-build config: `packageBuild.<key>` is not a recognised key (expected one of: stageDir, assets, assetTransform, shippingLicenses, baseStyles, manifest, manifestFlags, converterData, schema, clean, lang, deploy, release, bundle, container, e2e, proseLint, proseScore).``
|
|
1920
1919
|
|
|
1921
1920
|
### `packageBuild.proseLint`
|
|
1922
1921
|
|
|
@@ -2338,3 +2337,22 @@ the source directory:
|
|
|
2338
2337
|
| `packageBuild.manifest.id`, `.version`, `.description`, `.url`, `.bugs`, `.manifest`, `.download`, `.compatibility`, `.relationships`, `.packs` | Forbidden — each is derived from `package.json` or the top level of `package-build.config.yaml`; see [`packageBuild.manifest`](#packagebuildmanifest). |
|
|
2339
2338
|
| `publish.site` (any value) | Refused — publication follows the authored content tree. |
|
|
2340
2339
|
| `packs`, `itemBuilders`, `docs`, `compatibility`, `relationships`, `systems`, `requiresSystem`, `stats`, `foundryPackage` | Forbidden in a `documentation` package — each describes a Foundry package this kind is not; see the key's own section for its located refusal message. |
|
|
2340
|
+
|
|
2341
|
+
### `packageBuild.converterData`
|
|
2342
|
+
|
|
2343
|
+
Optional path for a browser converter's JSON data, relative to
|
|
2344
|
+
`packageBuild.stageDir`. `package-build manifest` writes it during the module
|
|
2345
|
+
build from the same published encodings and language vocabulary that render
|
|
2346
|
+
native text. The path must stay within the stage, end in `.json`, and name an
|
|
2347
|
+
artifact other than `module.json`, `system.json` or `package.json`. Absolute
|
|
2348
|
+
paths and parent traversal are refused. Omission writes no converter file.
|
|
2349
|
+
|
|
2350
|
+
```yaml
|
|
2351
|
+
packageBuild:
|
|
2352
|
+
converterData: data/converter.json
|
|
2353
|
+
```
|
|
2354
|
+
|
|
2355
|
+
The result is `build/stage/data/converter.json` with the default stage. It
|
|
2356
|
+
ships with that stage in the release archive. See the
|
|
2357
|
+
[data format](reference/format-details.md#converter-data-format) and
|
|
2358
|
+
[browser API](api.md#browser-conversion).
|
package/docs/content-format.md
CHANGED
|
@@ -31,10 +31,17 @@ Leading `:` captions describe the next supported block; `:@` captions also numbe
|
|
|
31
31
|
|
|
32
32
|
A code fence with language `verse` keeps verse lines, stanza breaks and relative indentation. Leading periods set indent levels and are removed from the text; leading spaces do not count. Blank lines separate verse units and `***` separates stanzas. Its numbered caption uses the **Poem** label. Generic `:::` divs and `[inline spans]{.class}` accept attributes. See [verse](authoring/links-and-markup.md#verse), [fenced divs](authoring/links-and-markup.md#fenced-divs) and [inline spans](authoring/links-and-markup.md#inline-spans). `numstep=N` numbers every Nth line. `cols=N` sets a positive whole number of columns and defaults to one. With `cols` above one, each content line starts with an integer and one or more spaces; numbers lie in `1..cols` and are nondecreasing within each blank-separated logical row. Any column may be omitted and keeps an empty cell. A column may repeat without limit: its first reading is foreground and its later readings are grey, independently for every column and row. Number prefixes are not displayed; `numstep` counts logical rows. `***` separates stanzas. Inline language and native presentation are explicit on each authored run. See [verse in columns](authoring/links-and-markup.md#verse-in-columns).
|
|
33
33
|
|
|
34
|
-
A code fence with language `scroll` sets text in a script whose script note states `direction: vertical-rl` as columns, top to bottom, read from the right. The lines of a paragraph are joined, and each paragraph starts a fresh column. `rows=N` is the characters in a column and `cols=M` the columns in a panel, each a whole number above zero; `lang=`, `font=` and `
|
|
35
|
-
|
|
36
|
-
A span,
|
|
37
|
-
|
|
34
|
+
A code fence with language `scroll` sets text in a script whose script note states `direction: vertical-rl` as columns, top to bottom, read from the right. The lines of a paragraph are joined, and each paragraph starts a fresh column. `rows=N` is the characters in a column and `cols=M` the columns in a panel, each a whole number above zero; `lang=`, `font=` and `enc=` mark the text as on a verse fence, an explicit `enc=` selects an encoding document and its language and font. The site, the preview and Foundry set it with `writing-mode: vertical-rl` in a panel that scrolls sideways from the right; the book draws its panels as images from the face's outlines, each with its roman text as alt text. A scroll fence in a script written in lines is an error. See [scrolls](authoring/links-and-markup.md#scrolls).
|
|
35
|
+
|
|
36
|
+
A span, generic div, verse or scroll fence uses `enc=default` unless it selects
|
|
37
|
+
an encoding document. `enc=` is an Address whose default type is `doc`; the
|
|
38
|
+
document names its language and font, and explicit `lang=` or `font=` values
|
|
39
|
+
must agree. Each encoding tries authored native writings, complete parts and
|
|
40
|
+
then its mappings. Unknown characters, undefined glyph codes and conflicting
|
|
41
|
+
selections are located errors. `⟦…⟧` reads the selected font's glyph codes or
|
|
42
|
+
strict Unicode scalars. See [encodings](reference/format-details.md#encodings).
|
|
43
|
+
Language word-book validation applies to both Roman and native runs. Parallel
|
|
44
|
+
verse retains independent authored readings and their column numbers.
|
|
38
45
|
|
|
39
46
|
Mark a name without a note as `[Name]{.name data-type="being"}`; the optional
|
|
40
47
|
classification uses the declared note vocabulary. The [name-marking
|
package/docs/diagnostics.md
CHANGED
|
@@ -303,26 +303,25 @@ For example, `[a *word*]{lang=vyl}` locates the finding at the `*` that opens
|
|
|
303
303
|
the emphasis. A font does not make the markup valid; the language rule applies
|
|
304
304
|
to the span whether its text uses a script face or ordinary type.
|
|
305
305
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
presentation requires `.nativefont` and an explicit `lang=` on that same
|
|
310
|
-
span, div, verse fence or scroll fence. An inherited language does not satisfy
|
|
311
|
-
this requirement. Findings point to the authored class or override:
|
|
306
|
+
Use `[word]{.emph}` for emphasis in a non-English span. It inherits the
|
|
307
|
+
surrounding run's language, face and encoding. These findings point to the
|
|
308
|
+
opening `[` of the emphasis span:
|
|
312
309
|
|
|
313
310
|
```text
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
`.nativefont` has no default `font=` for `vyl`; state `font=` explicitly
|
|
311
|
+
a span in non-English language `vyl` holds no `.strong` emphasis
|
|
312
|
+
`vyl` marks emphasis with a word, not a mark; write the word
|
|
313
|
+
a span takes `.emph` or `.strong`, not both
|
|
318
314
|
```
|
|
319
315
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
316
|
+
## Native presentation is explicit
|
|
317
|
+
|
|
318
|
+
`enc=` resolves an encoding document and infers its language and font.
|
|
319
|
+
`enc=default` leaves Roman text unchanged. A conflicting explicit language or
|
|
320
|
+
font is a finding at that attribute. Encoding-note schema errors point to
|
|
321
|
+
frontmatter; missing, duplicate or malformed font glyph codes point to
|
|
322
|
+
`fonts.json`. Their original source positions survive preview, lint, site,
|
|
323
|
+
Foundry and book builds. Text diagnostics use code-point columns; run offsets
|
|
324
|
+
and captured index coordinates retain UTF-16 units.
|
|
326
325
|
|
|
327
326
|
## Summary counts and prose are not findings
|
|
328
327
|
|
|
@@ -510,3 +509,31 @@ and exits `1`, because it saw two `error`-severity diagnostics. The summary
|
|
|
510
509
|
line the emitting process printed to stdout, `3 finding(s) across 1
|
|
511
510
|
note(s).`, never reaches the parser at all — it was never on stderr, and the
|
|
512
511
|
regex would not have matched it if it had been.
|
|
512
|
+
|
|
513
|
+
## Standard Roman punctuation
|
|
514
|
+
|
|
515
|
+
Each configured language's `data.roman` adds its own characters to the shared
|
|
516
|
+
Roman standard. Listing standard punctuation or literal boundaries in that
|
|
517
|
+
field is an error at the field. Quote pairs balance and alternate; an English
|
|
518
|
+
double quotation mark, `<<`, `>>` or three periods receives an error at the
|
|
519
|
+
source mark. A terminal is optional, and authored capitalization is preserved.
|
|
520
|
+
|
|
521
|
+
A semicolon or colon needs a comma for a pause or a period between complete
|
|
522
|
+
sentences. An interruption or abandoning ellipsis within a run needs an
|
|
523
|
+
immediate terminal; at the end of the run it may stand alone. A closing
|
|
524
|
+
quotation is not an outer-sentence terminal.
|
|
525
|
+
|
|
526
|
+
A native character pasted directly into a configured language run receives a
|
|
527
|
+
finding naming its `⟦U+XXXX⟧` spelling. Use that notation, or the chosen
|
|
528
|
+
encoding's codage name, inside the literal markers. The encoder checks the
|
|
529
|
+
codes; the Roman validator leaves their contents immutable.
|
|
530
|
+
|
|
531
|
+
A verse fence uses its authored line endings for boundaries. A literal `/`
|
|
532
|
+
inside it is an error at that slash. Visual indentation does not add periods
|
|
533
|
+
to the encoded text. Source positions survive Markdown escapes and nested
|
|
534
|
+
`.emph` or `.name` spans.
|
|
535
|
+
|
|
536
|
+
Language-run diagnostic columns count Unicode code points, so a supplementary
|
|
537
|
+
character occupies one column. Source offsets and the SQL `runs.column` field
|
|
538
|
+
use UTF-16 units for source indexing. An encoding-file finding retains that
|
|
539
|
+
file's own location; a note's frontmatter offset is not added to it.
|