@heroiclands/package-build 24.0.3 → 24.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/docs/commands.md CHANGED
@@ -2494,7 +2494,10 @@ the metadata artifact.
2494
2494
 
2495
2495
  Metadata also includes each own note's spans, divs and verse fences marked with
2496
2496
  `lang=`, `font=` or `map=` under `runs`, with the language as written, the tag
2497
- it resolves to, the font, the map and the original source line/column. Local
2497
+ it resolves to, the font, the map and the original source line/column. Native
2498
+ runs carry `nativefont: true` in the metadata; language-only Roman runs omit
2499
+ the flag and do not receive script defaults. The `runs` SQL columns stay the
2500
+ same. Local
2498
2501
  and dependency SQL schemas expose them through `runs`, and each mapping note's
2499
2502
  rows through `maps`.
2500
2503
 
@@ -3081,7 +3084,7 @@ package-build transliterate <map> [--lang <language>] [--font <slug>] [--hex] [t
3081
3084
 
3082
3085
  Reads the content index, as `package-build lint` does, and prints the passage
3083
3086
  rewritten by the mapping note whose `data.map.name` is `<map>`, through the
3084
- same code the build sets a run marked `map=<map> lang=<language> font=<slug>`
3087
+ same code the build sets a run marked `lang=<language> .nativefont map=<map> font=<slug>`
3085
3088
  with. With `--lang`, each word the language's lexicon states a native form for
3086
3089
  is written by it and every other word is spelled by the rows; without it, the
3087
3090
  rows alone apply. See
@@ -764,12 +764,15 @@ shortcode, whose type defaults to `skill`. A run marked with the language and a
764
764
  `map=` 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
  [a map reads the dictionary first](reference/format-details.md#a-map-reads-the-dictionary-first).
767
- Every word of such a run is a word of the lexicon, of a name the language note's
767
+ Language word-book validation applies to Roman and native runs alike,
768
+ independently of `.nativefont` or mapping: every word is a word of the lexicon, of a name the language note's
768
769
  own register lists, or a regular form of a lexicon word, and any other word is an error; see
769
770
  [a mapped run's words](authoring/links-and-markup.md#a-mapped-runs-words).
770
771
  The language note may also name the script the language is written in, as
771
- `data.writtenIn: { map, font }`, and a run marked with the language alone is
772
- then mapped and set in it; see
772
+ `data.writtenIn: { map, font }`, and a run explicitly marked with both the language and `.nativefont` is
773
+ then mapped and set in it. Language-only runs retain authored Roman spelling
774
+ and the surrounding prose font. Native `map=` and `font=` override the
775
+ configured halves independently; missing halves require explicit overrides; see
773
776
  [a language's script](authoring/links-and-markup.md#a-languages-script). The
774
777
  script belongs to the language note, and the configuration never states it.
775
778
  A language with no `note` tags its text and has no lexicon. Whether the note
@@ -29,11 +29,12 @@ A nonempty note body creates one system-agnostic Foundry JournalEntry. Content b
29
29
 
30
30
  Leading `:` captions describe the next supported block; `:@` captions also number it. The optional type accepts `figure`, `table`, `verse`, `code`, `prose`, and `example`. Captions support identifiers, classes and named attributes; unsupported following blocks are errors. See [captions and numbered references](authoring/links-and-markup.md#captions-and-numbered-references).
31
31
 
32
- A code fence with language `verse` keeps verse lines, stanza breaks and relative indentation. 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. `col1=` and `col2=` set the poem in at most two columns, each a `:`-joined stack of `language[/mapping[/font]]` entries, the first in the normal tone and the rest in grey; with columns, each blank-line group of `[text]{lang=…}` spans is one verse line, every entry sets the span in its language, and a `***` line breaks the stanza. See [verse in columns](authoring/links-and-markup.md#verse-in-columns).
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 `map=` mark the text as on a verse fence, and a fence naming no `font=` takes the face of a map drawn in one. 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).
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 `map=` mark the text as on a verse fence, and `.nativefont` requires an explicit language and a font supplied by a language default or an override; mapping is optional when no default supplies it. 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
35
 
36
- A span, a generic div, a verse fence or a scroll fence marks its text's language with `lang=`, the font it is set in with `font=` and a mapping with `map=`, each optional, and the runs inside a div or a fence inherit its keys. `lang=` is a name the package declares in `languages` or a BCP 47 tag, and gives the language tag; where the language note states `data.writtenIn`, the script the language is written in as a `map` and a `font` the map lists, a run marked with the language alone takes that map and face, and a run's own `map=` or `font=` overrides its half of the default. `font=` is a face of the installed `@heroiclands/fonts`, named by its class without `hl-`, or `mono`, `serif` or `sans`. `map=` names a mapping note: a `doc` note whose `data.map` lists the fonts it is drawn in and rows that rewrite the text before it is set, a font's own rows first. With `lang=` naming a language whose configured `note` names its language note, a word whose entry states a `native` form for the map is written by it, and the rows spell every other word. A map stating `logographic: true` spells no word by its rows: each word is written by its own `native` entry or its parts' writings, and a word with neither, or whose form stands for entries written differently, is a located error. Every word of such a run is a lexicon form, a word of a name the language note's own register lists under a tongue other than `translation`, or a form a plural row, the verb pattern or an affix stating `replaces` derives from a lexicon form, and any other word is an error at the word. A character a face does not draw, after the map, is an error at the character it came from. A verse fence that states `scan=` (the `name` of a `data.metres` entry of a `doc` note) with a `lang=` whose language note states `data.sounds.stress` is counted line by line by the beat convention, and a line that cannot have the metre's beats is a warning at the line; see [metres](reference/format-details.md#metres). Text with a font, a map or a declared language is plain, except that text set in a face takes `*…*` and `**…**`: they render by the convention its language note's `data.emphasis` states, else the one the script note listing its face states in `data.script` (`rubric` or `overline`), else plainly, and a language whose `data.emphasis` is `words` makes them an error. Every marked construct is a row of the `runs` relation, every mapping row of the `maps` relation, and every native form of the `natives` relation. See [marking language, font and mapping](authoring/links-and-markup.md#marking-language-font-and-mapping).
36
+ A span, a generic div, a verse fence or a scroll fence identifies its language with `lang=` and keeps its authored spelling and the surrounding prose font. Explicit `.nativefont` on that same construct, with its own explicit `lang=`, requests the language's configured `data.writtenIn` map and font; `map=` and `font=` override their halves independently. A missing font default requires `font=` rather than inference; mapping is optional when the language supplies none. Native font or map keys require `.nativefont`; Roman `font=mono`, `serif` and `sans` remain available independently. Unmarked text follows its passage, while a marked language-only child stays Roman, even in the same language as a native parent. Standalone wikilinks make the same choice: `[[address|Name]]{lang=vyl}` stays Roman and `[[address|Name]]{lang=vyl .nativefont}` uses native presentation without changing its destination or presentation cues. `font=` is a face of the installed `@heroiclands/fonts`, named by its class without `hl-`, or `mono`, `serif` or `sans`. `map=` names a mapping note: a `doc` note whose `data.map` lists the fonts it is drawn in and rows that rewrite the text before it is set, a font's own rows first. With `lang=` naming a language whose configured `note` names its language note, a word whose entry states a `native` form for the map is written by it, and the rows spell every other word. A map stating `logographic: true` spells no word by its rows: each word is written by its own `native` entry or its parts' writings, and a word with neither, or whose form stands for entries written differently, is a located error. Language word-book validation applies to Roman and native runs alike,
37
+ independently of `.nativefont` or mapping: every word is a lexicon form, a word of a name the language note's own register lists under a tongue other than `translation`, or a form a plural row, the verb pattern or an affix stating `replaces` derives from a lexicon form, and any other word is an error at the word. A character a face does not draw, after the map, is an error at the character it came from. A verse fence that states `scan=` (the `name` of a `data.metres` entry of a `doc` note) with a `lang=` whose language note states `data.sounds.stress` is counted line by line by the beat convention, and a line that cannot have the metre's beats is a warning at the line; see [metres](authoring/links-and-markup.md#metre). Text with a font, a map or a declared language is plain, except that text set in a face takes `*…*` and `**…**`: they render by the convention its language note's `data.emphasis` states, else the one the script note listing its face states in `data.script` (`rubric` or `overline`), else plainly. Actual bold or italic markup inside a span whose effective language is not English is an error, whether that language is declared or inherited and whether or not the text uses a font; English text remains eligible. Every marked construct is a row of the `runs` relation, every mapping row of the `maps` relation, and every native form of the `natives` relation. See [marking language, font and mapping](authoring/links-and-markup.md#marking-language-font-and-mapping).
37
38
 
38
39
  Mark a name without a note as `[Name]{.name data-type="being"}`; the optional
39
40
  classification uses the declared note vocabulary. The [name-marking
@@ -256,45 +256,73 @@ resolves it. The rules are under
256
256
 
257
257
  ## A worked case: a verse in columns
258
258
 
259
- A [verse in columns](authoring/links-and-markup.md#verse-in-columns) is
260
- checked line by line, and every finding sits on the text that makes it wrong.
261
- Each is an error, from `package-build lint` and from every build that sets the
262
- page.
263
-
264
- A verse line that leaves out a language its columns name is located at the
265
- group's first line, and names the column that asks for it. A language given
266
- twice is located at the second span, and one no column sets at its span:
259
+ A [verse in columns](authoring/links-and-markup.md#verse-in-columns) has a
260
+ positive whole-number `cols` value. Invalid counts are located at their
261
+ value. With multiple columns, every content line needs a numeric prefix and
262
+ one or more spaces. Missing prefixes point to the line's first content
263
+ character; out-of-range or decreasing numbers point to the authored number.
264
+
265
+ This row has a decreasing column number on its third content line:
266
+
267
+ ````markdown
268
+ ```verse {cols=3 lang=en}
269
+ 1 The first reading.
270
+ 3 A later column.
271
+ 2 Out of order within this row.
272
+ ```
273
+ ````
274
+
275
+ The finding points to `2`. A blank line before it would start another row,
276
+ where the column order begins again. A number above three or below one is
277
+ out of bounds. Skipping a column is valid and leaves an empty cell; repeating
278
+ a number is valid and adds another reading to that column. The first reading
279
+ in every column is foreground and its later readings are grey.
280
+
281
+ Language and native-font findings retain their authored locations inside a
282
+ reading, including the column prefix and indentation before it. An unknown
283
+ mapping or face points to that run's attribute; an unknown word or a character
284
+ the face cannot draw points to the original word or character. A language-only
285
+ Roman repeat is checked in its own language, independently of a native run.
286
+ The build reports invalid input rather than publishing an inferred layout.
287
+
288
+ ## Emphasis in non-English spans
289
+
290
+ Bold or italic Markdown inside a span whose effective language tag is not
291
+ English is an error at the opening emphasis marker. This applies to declared
292
+ and BCP 47 languages, including spans that inherit a language from an enclosing
293
+ span, div or fence. English tags (`en` and tags beginning `en-`) remain
294
+ eligible. Escaped or unmatched delimiters are literal text. The diagnostic
295
+ names the language supplied by the span or inherited from its enclosing
296
+ construct:
267
297
 
268
298
  ```text
269
- assets/content/Lore/Walking_of_the_Line.md:14:1: error: this verse line has no `en` line, which `col2=` sets
270
- assets/content/Lore/Walking_of_the_Line.md:18:1: error: this verse line gives `en` twice; give each language once
271
- assets/content/Lore/Walking_of_the_Line.md:22:1: error: no column sets `khel`; a verse line gives the languages `col1=` and `col2=` name
299
+ a span in non-English language `vyl` holds no bold or italic markup
272
300
  ```
273
301
 
274
- A finding about the columns themselves is located in the opening line, at the
275
- key or at the entry. A third column is located at its key; a malformed entry
276
- at the entry; an unknown mapping or font at that part of its entry, with the
277
- nearest name the package knows:
302
+ For example, `[a *word*]{lang=vyl}` locates the finding at the `*` that opens
303
+ the emphasis. A font does not make the markup valid; the language rule applies
304
+ to the span whether its text uses a script face or ordinary type.
278
305
 
279
- ```text
280
- assets/content/Lore/Walking_of_the_Line.md:9:85: error: `col3=` is not a column: a verse has at most two, `col1=` and `col2=`
281
- assets/content/Lore/Walking_of_the_Line.md:9:81: error: `vyl/a/b/c` in `col2=` is not an entry: an entry is `language[/mapping[/font]]`
282
- assets/content/Lore/Walking_of_the_Line.md:9:45: error: `vyl-semron` is not a map: `map=` names the `data.map.name` of a mapping note; did you mean `vyl-semaron`?
283
- ```
306
+ ## Native presentation is explicit
284
307
 
285
- The text an entry sets is checked as a span with that entry's keys, and its
286
- findings sit on the character of the verse line they come from. A character
287
- the face does not draw, after the mapping, is located at the character as the
288
- note wrote it:
308
+ A language-only run keeps its authored spelling and prose font. Native
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:
289
312
 
290
313
  ```text
291
- assets/content/Lore/Walking_of_the_Line.md:19:8: error: `7` (U+0037) is not drawn by the font `semaron-kuriale`, and the map `vyl-semaron` has no row for it
314
+ `.nativefont` requires an explicit `lang=` on the same construct
315
+ native `font=semaron-kuriale` requires `.nativefont` and an explicit `lang=` on the same construct
316
+ `map=semaron` requires `.nativefont` and an explicit `lang=` on the same construct
317
+ `.nativefont` has no default `font=` for `vyl`; state `font=` explicitly
292
318
  ```
293
319
 
294
- A key that names nothing is the one finding: a line set through an unknown
295
- mapping or font is not then checked against a face or a lexicon it cannot
296
- reach. A verse in columns with any finding is set as its lines are written,
297
- and the build fails on the error.
320
+ A missing font needs an explicit `font=` or a language font default. Mapping is
321
+ optional when the language supplies none; configured maps still apply to
322
+ native runs unless explicitly overridden. `font=serif`, `sans` and `mono`
323
+ remain independent Roman choices. Each authored reading makes its own presentation choice in parallel verse,
324
+ for example `1 [Zaron]{lang=vyl .nativefont}` and
325
+ `3 [Zaron]{lang=vyl}` inside a `cols=3` poem. The Roman repeat stays Roman.
298
326
 
299
327
  ## Summary counts and prose are not findings
300
328
 
@@ -505,7 +505,7 @@ the font registry.
505
505
 
506
506
  ### Fonts for marked text
507
507
 
508
- Text marked with `font=` and one of the faces of `@heroiclands/fonts` is set in
508
+ Native text marked with `lang=` and `.nativefont` in one of the faces of `@heroiclands/fonts` is set in
509
509
  that face once the package installs the fonts package in `devDependencies`.
510
510
  The build then adds the fonts package's `fonts/` directory, which holds the
511
511
  TrueType files, to the compiler's font search path after the shipped faces and
@@ -691,10 +691,10 @@ package-build: Cannot stage assets — these paths do not exist:
691
691
 
692
692
  ### Fonts for marked text
693
693
 
694
- A module shows text marked with `font=` and one of the faces of
694
+ A module shows native text marked with `lang=` and `.nativefont` in one of the faces of
695
695
  `@heroiclands/fonts` in that face once the package installs the fonts package
696
696
  in `devDependencies`. Nothing is configured: the build reads which faces the
697
- notes use from their `font=` keys.
697
+ notes use from explicit `font=` overrides or opted-in language defaults.
698
698
 
699
699
  `package-build assets` then stages the font stylesheet, the WOFF2 files and the
700
700
  licence under `fonts/heroiclands/` in the package; the staged stylesheet lists
@@ -270,12 +270,12 @@ part of the site.
270
270
 
271
271
  ## Show marked text in its font
272
272
 
273
- A site shows text marked with `font=` and one of the faces of
273
+ A site shows native text marked with `lang=` and `.nativefont` in one of the faces of
274
274
  `@heroiclands/fonts` in that face once the package installs the fonts package
275
275
  in `devDependencies`, as the
276
276
  [authoring guide](../authoring/links-and-markup.md#marking-language-font-and-mapping)
277
277
  describes. Nothing else is configured: the build reads which faces the notes use
278
- from their `font=` keys.
278
+ from explicit `font=` overrides or opted-in language defaults.
279
279
 
280
280
  `package-build site build` copies the font stylesheet, the WOFF2 files and the
281
281
  licence to a path that names the fonts package's version,