@heroiclands/package-build 25.1.3 → 25.2.1
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/assets/styles/content-base.css +0 -9
- package/bin/content-commands.mjs +22 -16
- package/bin/package-build.mjs +24 -25
- package/content-config.mjs +7 -34
- package/docs/api.md +38 -21
- package/docs/authoring/first-note.md +3 -3
- package/docs/authoring/frontmatter.md +30 -2
- package/docs/authoring/links-and-markup.md +92 -31
- package/docs/commands.md +103 -59
- package/docs/configuration.md +10 -45
- package/docs/content-format.md +8 -6
- package/docs/diagnostics.md +75 -0
- package/docs/guides/book.md +3 -3
- package/docs/guides/module-project.md +1 -1
- package/docs/guides/reference-pages.md +7 -3
- package/docs/project-setup.md +3 -0
- package/docs/reference/format-details.md +299 -185
- package/docs/reference/note-types.md +16 -17
- package/docs/source-preview.md +2 -1
- package/engine/changelog-group.mjs +84 -173
- package/engine/changelog-labels.mjs +73 -0
- package/engine/changelog-lint.mjs +168 -44
- package/engine/content-expand.mjs +58 -38
- package/engine/content-format.yaml +0 -2
- package/engine/content-index.mjs +49 -23
- package/engine/content-links.mjs +4 -0
- package/engine/content-lint.mjs +2 -3
- package/engine/content-render.mjs +6 -2
- package/engine/culture-parents.mjs +1 -1
- package/engine/culture-reach.mjs +10 -1
- package/engine/diagnostics.mjs +3 -2
- package/engine/dictionary-rows.mjs +3 -1
- package/engine/first-use.mjs +301 -87
- package/engine/frontmatter-lint.mjs +40 -14
- package/engine/glossary-entries.mjs +5 -5
- package/engine/glossary-language.mjs +21 -44
- package/engine/homepage.mjs +0 -4
- package/engine/index-records.mjs +3 -1
- package/engine/infobox.mjs +6 -3
- package/engine/journals.mjs +14 -14
- package/engine/language-names.mjs +3 -2
- package/engine/language-rows.mjs +6 -7
- package/engine/lexical-sections.mjs +3 -1
- package/engine/literature-notes.mjs +4 -76
- package/engine/metadata-index.mjs +15 -8
- package/engine/name-forms.mjs +99 -0
- package/engine/name-refs.mjs +143 -0
- package/engine/name-rows.mjs +11 -1
- package/engine/names.mjs +27 -22
- package/engine/note-addresses.mjs +0 -3
- package/engine/note-frontmatter.mjs +3 -5
- package/engine/note-language.mjs +348 -0
- package/engine/note-vocabulary.mjs +13 -11
- package/engine/pdf-index.mjs +3 -2
- package/engine/pdf-render.mjs +2 -4
- package/engine/preview-source.mjs +15 -8
- package/engine/settlement-tables.mjs +4 -3
- package/engine/site-build.mjs +2 -7
- package/engine/site-search.mjs +3 -5
- package/engine/site-theme.mjs +1 -1
- package/engine/sql-tables.mjs +29 -14
- package/engine/wikilink-syntax.mjs +2 -0
- package/engine/word-citations.mjs +3 -3
- package/engine/word-rows.mjs +3 -1
- package/engine/word-terms.mjs +2 -2
- package/package.json +1 -1
- package/site-theme/static/css/style.css +0 -4
- package/types/engine/changelog-group.d.mts +6 -10
- package/types/engine/changelog-labels.d.mts +10 -0
- package/types/engine/changelog-lint.d.mts +11 -6
- package/types/engine/content-index.d.mts +16 -16
- package/types/engine/diagnostics.d.mts +1 -1
- package/types/engine/first-use.d.mts +97 -1
- package/types/engine/frontmatter-lint.d.mts +9 -2
- package/types/engine/glossary-language.d.mts +13 -6
- package/types/engine/homepage.d.mts +0 -3
- package/types/engine/journals.d.mts +3 -3
- package/types/engine/literature-notes.d.mts +2 -27
- package/types/engine/name-forms.d.mts +61 -0
- package/types/engine/name-refs.d.mts +51 -0
- package/types/engine/name-rows.d.mts +4 -0
- package/types/engine/names.d.mts +12 -92
- package/types/engine/note-frontmatter.d.mts +1 -4
- package/types/engine/note-language.d.mts +47 -0
- package/types/engine/settlement-tables.d.mts +1 -1
- package/types/engine/site-build.d.mts +2 -6
package/docs/diagnostics.md
CHANGED
|
@@ -254,6 +254,49 @@ problems, listing every conflict at once. Stating `data.culture` on the note
|
|
|
254
254
|
resolves it. The rules are under
|
|
255
255
|
[Culture in the index](reference/format-details.md#culture-in-the-index).
|
|
256
256
|
|
|
257
|
+
## A worked case: names and a note's language
|
|
258
|
+
|
|
259
|
+
A note's `name` lists its other names under language codes. A key that is
|
|
260
|
+
neither `full`, `sort`, a character's `given` or `clan`, nor a code
|
|
261
|
+
`languages:` declares or `en` is an error at the key, `aliases` among them:
|
|
262
|
+
|
|
263
|
+
```text
|
|
264
|
+
assets/content/Beings/Ada.md:3:21: error: `name.aliases` is not valid for this note: a name lists its forms under a language code `languages:` declares, or `en`
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
A list that is not a list of nonempty strings is an error at its key, and a form
|
|
268
|
+
under `en` that repeats `full`, ignoring case, is an error at the form:
|
|
269
|
+
|
|
270
|
+
```text
|
|
271
|
+
assets/content/Beings/Ada.md:3:30: error: `name.en` repeats `name.full` (ada vale); `full` is already an English form, so leave it out
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The other three come from deriving each note's language into the content index,
|
|
275
|
+
and each is located at the value that causes it. A `data.lang` naming no
|
|
276
|
+
declared code:
|
|
277
|
+
|
|
278
|
+
```text
|
|
279
|
+
assets/content/Lore/Tale.md:4:14: error: data.lang vyal names no language: state a code `languages:` declares, or en (en, kiic, tenl, vyl)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
A `data.culture` whose culture states no `data.lang` and inherits none from its
|
|
283
|
+
parent cultures:
|
|
284
|
+
|
|
285
|
+
```text
|
|
286
|
+
assets/content/Beings/Ada.md:5:17: error: data.culture lore-folk resolves to no language: state data.lang on the culture or on a parent culture
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Every `data.parents` entry on a cycle, one finding for each note of the cycle,
|
|
290
|
+
at the entry naming the next; a note naming itself is a cycle of one:
|
|
291
|
+
|
|
292
|
+
```text
|
|
293
|
+
assets/content/Places/West.md:4:19: error: data.parents.0 names place-east, which closes a parents cycle; a note is never its own ancestor
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Like a culture conflict, each fails the index and every command that reads it
|
|
297
|
+
without collecting problems. The rules are under
|
|
298
|
+
[a note's language](reference/format-details.md#a-notes-language).
|
|
299
|
+
|
|
257
300
|
## A worked case: a verse in columns
|
|
258
301
|
|
|
259
302
|
A [verse in columns](authoring/links-and-markup.md#verse-in-columns) has a
|
|
@@ -313,6 +356,38 @@ a span in non-English language `vyl` holds no `.strong` emphasis
|
|
|
313
356
|
a span takes `.emph` or `.strong`, not both
|
|
314
357
|
```
|
|
315
358
|
|
|
359
|
+
## A name's ref
|
|
360
|
+
|
|
361
|
+
A `ref` on a `.name` span names the note the span stands for. Each finding is an
|
|
362
|
+
`error` located at the attribute part it concerns:
|
|
363
|
+
|
|
364
|
+
```text
|
|
365
|
+
ref "being-tomr" names no note in this package or its declared dependencies
|
|
366
|
+
data-type is for a name with no note; the ref states the type
|
|
367
|
+
ref= belongs on a .name span; a wikilink never takes ref
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
The first points at the `ref` value, the second at `data-type`, the third at
|
|
371
|
+
`ref`. A value beginning `#` is a page-local key and resolves to no note; it is
|
|
372
|
+
a finding only when it is malformed, and then at its value:
|
|
373
|
+
|
|
374
|
+
```text
|
|
375
|
+
ref "#" must be a note address or a page-local key such as #jane
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
A wikilink written with `{ref=…}` is an error at the wikilink, stating that its
|
|
379
|
+
address is its ref.
|
|
380
|
+
|
|
381
|
+
## A name's first use
|
|
382
|
+
|
|
383
|
+
A name-marking finding is a `warning`: it reports and never fails lint. A
|
|
384
|
+
`.name` span with no `ref` whose label is an indexed note's full name or listed
|
|
385
|
+
form is reported at the span, naming the note to link or tie it to:
|
|
386
|
+
|
|
387
|
+
```text
|
|
388
|
+
assets/content/Lore/Ferry.md:12:1: warning: first-use/unlinked-name: “Arden” names “Arden Vale”; use a link to “test-note-place-arden”, or tie it with ref=
|
|
389
|
+
```
|
|
390
|
+
|
|
316
391
|
## Native presentation is explicit
|
|
317
392
|
|
|
318
393
|
`enc=` resolves an encoding document and infers its language and font.
|
package/docs/guides/book.md
CHANGED
|
@@ -410,7 +410,7 @@ notes the book prints.
|
|
|
410
410
|
| ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------- |
|
|
411
411
|
| A note's name | `name.sort`, else `name.full` | the page of the note's entry in **bold**, then the pages of every authored mention |
|
|
412
412
|
| A name without its head | `name.full` | the same pages as the note's entry, filed as `Targud, Kingdom of` |
|
|
413
|
-
|
|
|
413
|
+
| A listed name form | `name.<code>` | _see_ the note's name |
|
|
414
414
|
| An event's in-world name | `data.events[].names` | _see_ the name of the note that holds the event |
|
|
415
415
|
|
|
416
416
|
A name that opens with a generic word a reader would not look under, such as
|
|
@@ -538,8 +538,8 @@ keeping the source available for inspection.
|
|
|
538
538
|
A reference to a GM-only note or secret heading prints normally. GM-only notes
|
|
539
539
|
remain omitted, and references to them print as text without a link. `.show`
|
|
540
540
|
does not add an omitted destination to the book. Inline `[text]{.secret}` spans
|
|
541
|
-
print as ordinary text, preserving emphasis, links, anchors and
|
|
542
|
-
|
|
541
|
+
print as ordinary text, preserving emphasis, links, anchors and a name's
|
|
542
|
+
first-use bold; the book ignores their `.secret` class.
|
|
543
543
|
|
|
544
544
|
Secret sections and `:::secret` fences keep their visible contents in pale
|
|
545
545
|
lavender boxes (`#f2eefb`) with a purple left border and title (`#5c4b8a`). The
|
|
@@ -800,7 +800,7 @@ each other. One JSON object per note, carrying the note's canonical address, its
|
|
|
800
800
|
name, its description and the Foundry UUID it compiles to:
|
|
801
801
|
|
|
802
802
|
```text
|
|
803
|
-
{"address":{"canonical":"bestiary-none-lore-marshdrake","slug":"lore-marshdrake"},"
|
|
803
|
+
{"address":{"canonical":"bestiary-none-lore-marshdrake","slug":"lore-marshdrake"},"anchors":[],"description":"A wingless drake of the reed flats, hunted for its hide and feared for its patience.","documentation":null,"file":{"folder":"Bestiary","name":"Marsh_Drake","path":"Bestiary/Marsh_Drake.md"},"formsAscii":{},"foundry":{"none":{"uuid":"Compendium.acme-bestiary.journals.JournalEntry.72d497c6a8e57f57"}},"id":"72d497c6a8e57f57","lang":"en","name":{"full":"Marsh Drake"},"nameAscii":"Marsh Drake","package":"bestiary","shortcode":"marshdrake","subType":"bestiary","type":"lore"}
|
|
804
804
|
```
|
|
805
805
|
|
|
806
806
|
A downstream package that declares a dependency on this one fetches this file
|
|
@@ -128,9 +128,13 @@ jq -r 'select(.type == "affiliation") | .name.full' \
|
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
Each note record carries its authored frontmatter together with derived
|
|
131
|
-
`package`, `file`, `address`, `anchors`, and document destinations.
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
`package`, `file`, `address`, `anchors`, and document destinations. Its `name`
|
|
132
|
+
is the map the note authors, the full name with every other form listed under
|
|
133
|
+
its language's code. It also has ASCII-folded `nameAscii` and `formsAscii`, the
|
|
134
|
+
listed forms by language, for searching names typed without diacritics, and
|
|
135
|
+
`lang`, the language the note is in, derived as
|
|
136
|
+
[a note's language](../reference/format-details.md#a-notes-language) describes.
|
|
137
|
+
A language note that `languages:` names carries its code as `languageCode`. Asset files under `assets/icons`, `assets/images`, and
|
|
134
138
|
`assets/audio` have records in the same index, identified by an `asset` block.
|
|
135
139
|
The index is disposable build output; regenerate it from the authored tree
|
|
136
140
|
when the content changes.
|
package/docs/project-setup.md
CHANGED
|
@@ -473,6 +473,9 @@ need setting, and each is a decision rather than a preference.
|
|
|
473
473
|
- **`changelog: "@changesets/changelog-git"`** attributes each entry to its
|
|
474
474
|
commit. The GitHub changelog generator wants a token and produces entries
|
|
475
475
|
naming pull requests, which is history the changelog does not need.
|
|
476
|
+
- **`changelog: ["@heroiclands/package-build/changelog", {labels: [...]}]`** is the form
|
|
477
|
+
that also declares the labels changesets group under; see
|
|
478
|
+
[`changelog check`](commands.md#package-build-changelog-check).
|
|
476
479
|
- **`privatePackages: {version: true, tag: false}`** is what makes changesets
|
|
477
480
|
work at all here. Every package in the constellation is `private`, because it
|
|
478
481
|
ships as a Foundry release rather than to npm; without `version: true`
|