@heroiclands/package-build 25.3.0 → 25.5.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +1 -1
  3. package/assets/styles/content-base.css +32 -0
  4. package/docs/api.md +30 -6
  5. package/docs/authoring/links-and-markup.md +143 -53
  6. package/docs/commands.md +8 -2
  7. package/docs/content-format.md +14 -6
  8. package/docs/diagnostics.md +12 -11
  9. package/docs/encoding-core.md +18 -4
  10. package/docs/guides/writing-in-invented-scripts.md +83 -37
  11. package/docs/reference/format-details.md +10 -11
  12. package/docs/reference/note-types.md +15 -15
  13. package/docs/reference/theme-pages.md +26 -18
  14. package/engine/anchors.mjs +14 -0
  15. package/engine/code-fences.mjs +15 -6
  16. package/engine/content-blocks.mjs +4 -2
  17. package/engine/content-figures.mjs +19 -5
  18. package/engine/content-footnotes.mjs +69 -1
  19. package/engine/content-index.mjs +1 -1
  20. package/engine/content-render.mjs +59 -43
  21. package/engine/content-scripts.mjs +301 -58
  22. package/engine/content-scroll.mjs +8 -3
  23. package/engine/content-spans.mjs +107 -6
  24. package/engine/content-verse.mjs +338 -198
  25. package/engine/encoding-standard.mjs +1 -0
  26. package/engine/encoding-template.mjs +5 -2
  27. package/engine/encoding.mjs +19 -14
  28. package/engine/first-use.mjs +43 -12
  29. package/engine/heading-attributes.mjs +2 -1
  30. package/engine/journals.mjs +8 -1
  31. package/engine/markdown-blocks.mjs +3 -2
  32. package/engine/markdownlint-run.mjs +190 -5
  33. package/engine/markup-validation.mjs +17 -0
  34. package/engine/name-markup.mjs +1 -0
  35. package/engine/note-vocabulary.mjs +2 -2
  36. package/engine/pdf-render.mjs +34 -23
  37. package/engine/prose-lint.mjs +14 -2
  38. package/engine/roman-characters.mjs +32 -10
  39. package/engine/roman-run.mjs +3 -0
  40. package/engine/roman-verse.mjs +1 -0
  41. package/engine/run-rows.mjs +1 -1
  42. package/engine/sql-tables.mjs +1 -1
  43. package/engine/verse-format.mjs +89 -0
  44. package/engine/verse-metre.mjs +18 -9
  45. package/engine/verse-regions.mjs +190 -0
  46. package/engine/wikilink-pattern.mjs +31 -0
  47. package/engine/wikilink-syntax.mjs +2 -16
  48. package/package.json +1 -1
  49. package/site-theme/static/css/style.css +24 -0
  50. package/types/engine/code-fences.d.mts +1 -3
  51. package/types/engine/content-footnotes.d.mts +23 -0
  52. package/types/engine/content-scripts.d.mts +4 -3
  53. package/types/engine/content-scroll.d.mts +1 -1
  54. package/types/engine/content-spans.d.mts +3 -1
  55. package/types/engine/content-verse.d.mts +75 -75
  56. package/types/engine/name-markup.d.mts +5 -0
  57. package/types/engine/roman-run.d.mts +3 -1
  58. package/types/engine/verse-format.d.mts +10 -0
  59. package/types/engine/verse-metre.d.mts +4 -4
  60. package/types/engine/verse-regions.d.mts +82 -0
  61. package/types/engine/wikilink-pattern.d.mts +17 -0
  62. package/types/engine/wikilink-syntax.d.mts +1 -41
@@ -206,47 +206,7 @@ export function secretDestination(destination: object, anchor?: string): boolean
206
206
  * @returns {string} Inline spoiler or visible reference.
207
207
  */
208
208
  export function presentWikilink(reference: string, parsed: object, destination: object): string;
209
- /**
210
- * What a `[[…]]` **is**, before anything decides where it points.
211
- *
212
- * One authored link is written three ways — a Foundry `@UUID` content link for
213
- * the packs, a URL for the web, a cross-reference for the book — and those
214
- * forms are the *only* thing that legitimately differs. The syntax is the
215
- * author's, and it is the same syntax whichever build is reading it.
216
- *
217
- * So the parse lives here, once, and two readers take it: the link checker
218
- * (`content-links.mjs`) and the resolver (`wikilinks.mjs`). Each receives the
219
- * parts and decides only what it is for: which document the address names.
220
- *
221
- * The one rule about a link's *shape* also lives here — **a link carries a
222
- * label** ({@link unlabelledLinkMessage}) — because every build states it
223
- * through one message and the author reads the same words whichever ran
224
- * first.
225
- *
226
- * For the same reason, so does the **vocabulary of link findings**
227
- * ({@link LINK_FINDING_REASONS}) and the message each one reports through
228
- * ({@link linkFindingMessage}). Every build reads one authored link; an author
229
- * meets whichever ran first, and a consumer switching on a `reason` should not
230
- * be switching on which build produced it.
231
- *
232
- * @module
233
- */
234
- /**
235
- * A wikilink, as authored.
236
- *
237
- * **Newlines are excluded deliberately.** A link is written on one line; an
238
- * unclosed `[[` is a typo, and the alternative is letting it swallow arbitrary
239
- * prose in search of a closer. Erring towards "not a link" leaves the author's
240
- * text as written, which is the safe direction for a rewriter.
241
- *
242
- * **A leading `!` makes it an embed, not a link**, and the lookbehind is what
243
- * keeps every reader from seeing one as the other. Stated here rather than in
244
- * each reader for the reason the rest of this module exists: the checker, the
245
- * resolver and the embed reader all match on this pattern, and a copy of the
246
- * exclusion in each is a place for it to be forgotten. An embed's
247
- * own grammar is {@link module:engine/content-embeds}.
248
- */
249
- export const WIKILINK: RegExp;
209
+ export { WIKILINK } from "./wikilink-pattern.mjs";
250
210
  /**
251
211
  * Every way a link can fail, named once for every reader of a link.
252
212
  *