@heroiclands/package-build 23.3.1 → 23.4.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.
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The punctuation an entry carries, a hyphen or apostrophe between letters
3
+ * excepted.
4
+ *
5
+ * @param {string} entry - The entry as written.
6
+ * @returns {string[]} Each distinct character, in order of appearance.
7
+ */
8
+ export function featurePunctuation(entry: string): string[];
9
+ /**
10
+ * Why an `extra_features` entry is not a short plain description of one
11
+ * physical mark.
12
+ *
13
+ * @param {string} entry - The entry as written.
14
+ * @param {Readonly<Record<string, readonly {value: string}[]>>} look - The
15
+ * being-look vocabulary.
16
+ * @returns {Array<{rule: string, message: string}>} One problem per rule the
17
+ * entry breaks; empty when it is a mark. `rule` is `hair-colour`,
18
+ * `eye-colour`, `skin-colour`, `complexion`, `punctuation`, or a rule of
19
+ * {@link NON_PHYSICAL_FEATURES}.
20
+ */
21
+ export function featureProblems(entry: string, look: Readonly<Record<string, readonly {
22
+ value: string;
23
+ }[]>>): Array<{
24
+ rule: string;
25
+ message: string;
26
+ }>;
27
+ /**
28
+ * The frontmatter lint's check of `data.appearance.extra_features`.
29
+ *
30
+ * @param {object} note - The note: `file`, `raw` and parsed `fm`.
31
+ * @param {Readonly<Record<string, readonly {value: string}[]>>} look - The
32
+ * being-look vocabulary.
33
+ * @returns {object[]} Error findings, each located at the entry at fault.
34
+ */
35
+ export function checkExtraFeatures(note: object, look: Readonly<Record<string, readonly {
36
+ value: string;
37
+ }[]>>): object[];
38
+ /**
39
+ * Hair and eye colour spellings the vocabulary does not take but an author
40
+ * writes, as regular-expression alternatives. Beside `hair` or `eyes` any of
41
+ * them, or any hair or eye colour word, states a colour.
42
+ */
43
+ export const COLOUR_VARIANTS: readonly string[];
44
+ /**
45
+ * Skin-condition phrasings that are not complexion words, as
46
+ * regular-expression alternatives. Any of them states a complexion.
47
+ */
48
+ export const CONDITION_PHRASES: readonly string[];
49
+ /**
50
+ * The terms that make an `extra_features` entry something other than a
51
+ * physical mark, by category, as case-insensitive whole-word patterns.
52
+ *
53
+ * `exemptMarks` lets an entry describing a tattoo, scar, brand or burn mark
54
+ * pass the category, so "a tattoo of a knight's helmet" stands while "wears a
55
+ * helmet" does not. The voice, impression, handedness, sterility and age
56
+ * categories admit no such exemption: "a beautiful tattoo of a crane" is
57
+ * refused.
58
+ *
59
+ * @type {ReadonlyArray<{rule: string, category: string, pattern: RegExp, exemptMarks: boolean}>}
60
+ */
61
+ export const NON_PHYSICAL_FEATURES: ReadonlyArray<{
62
+ rule: string;
63
+ category: string;
64
+ pattern: RegExp;
65
+ exemptMarks: boolean;
66
+ }>;
@@ -0,0 +1,29 @@
1
+ /** The authored source of one inherited field, retained outside the published record. */
2
+ export function cultureFieldSource(records: any, key: any, field: any): any;
3
+ /** Fields supplied by an ancestor rather than authored on this record. */
4
+ export function cultureInheritedFields(record: any): any;
5
+ /** Read the hierarchy findings retained beside a resolved index record. */
6
+ export function cultureRecordProblems(record: any): any;
7
+ /** Read hierarchy findings attached to one culture's resolved index record. */
8
+ export function cultureHierarchyProblems(records: any, key: any): any;
9
+ /**
10
+ * Check the declared culture-parent field in the normal frontmatter lint.
11
+ * @param {object} note - The note's frontmatter and source location.
12
+ * @param {{index?: object}} [options] - The corpus and its Address lookup.
13
+ * @returns {object[]} Located findings.
14
+ */
15
+ export function checkCultureParents(note: object, { index }?: {
16
+ index?: object;
17
+ }): object[];
18
+ /**
19
+ * Resolve each omitted culture field independently, searching parents in listed depth-first order.
20
+ * Same-depth disagreement withholds the inherited field and produces a finding.
21
+ * @param {object} index - The authored culture nodes and Address lookup.
22
+ * @returns {{values: Map<object, object>, findings: object[]}}
23
+ */
24
+ export function cultureInheritance(index: object): {
25
+ values: Map<object, object>;
26
+ findings: object[];
27
+ };
28
+ /** Emit or collect all findings from culture inheritance. */
29
+ export function reportCultureParents(findings: any, problems: any): void;
@@ -60,7 +60,8 @@ export function mapEntriesOf(value: unknown): Array<[string, unknown]>;
60
60
  *
61
61
  * @param {readonly object[]} fields - The type's `data:` declaration.
62
62
  * @returns {object[]} One spec per top-level key, a dotted group as a `map`
63
- * whose `fields` are its members, with `grouped: true`.
63
+ * whose `fields` are its members, with `grouped: true`, and each member
64
+ * marked `kindChecked`.
64
65
  */
65
66
  export function topLevelSpecs(fields: readonly object[]): object[];
66
67
  /**
@@ -1,5 +1,5 @@
1
1
  /** Preserve offsets while excluding literal examples from link scanning. */
2
- export function maskMarkdownCode(source: any, spans?: boolean): any;
2
+ export function maskMarkdownCode(source: any, spans?: boolean): string;
3
3
  /** GitHub heading slug, retaining separate spaces after punctuation removal. */
4
4
  export function docHeadingSlug(value: any): any;
5
5
  /** @param {string} source */
@@ -136,9 +136,9 @@ export function subTypes(type: string, vocabulary?: Readonly<Record<string, Type
136
136
  *
137
137
  * Each field is closed to its list: any other value, an empty one included, is
138
138
  * a finding at the value naming the words it takes. `appearance.complexion`
139
- * takes one word or a list of them, and each entry is checked on its own.
140
- * `appearance.extra_features` is not here: it is free text, a list of the marks
141
- * no word covers.
139
+ * is a list of words, each entry checked on its own. `appearance.extra_features`
140
+ * is not here: it is a list of the physical marks no word covers, held to the
141
+ * rules of `appearance-features.mjs`.
142
142
  *
143
143
  * @type {Readonly<Record<string, readonly LookWord[]>>}
144
144
  */