@heroiclands/package-build 23.7.0 → 23.7.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 +13 -0
- package/docs/authoring/links-and-markup.md +215 -36
- package/docs/content-format.md +1 -1
- package/docs/reference/format-details.md +374 -211
- package/docs/reference/note-types.md +83 -27
- package/engine/content-format.yaml +3 -0
- package/engine/language-data.mjs +236 -1
- package/engine/language-rows.mjs +235 -3
- package/engine/language-terms.mjs +524 -9
- package/engine/language-words.mjs +75 -0
- package/engine/sql-tables.mjs +12 -2
- package/engine/word-rows.mjs +8 -3
- package/engine/word-terms.mjs +60 -2
- package/package.json +1 -1
- package/types/engine/language-rows.d.mts +89 -3
- package/types/engine/language-terms.d.mts +106 -4
- package/types/engine/word-rows.d.mts +2 -1
- package/types/engine/word-terms.d.mts +11 -0
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
* - no form stands twice in one language;
|
|
29
29
|
* - a word's `gloss` states at least one sense;
|
|
30
30
|
* - an affix that `replaces` the stem's close does not also `lengthen` it;
|
|
31
|
+
* - an affix states `given` only where its `kind` is `name`;
|
|
32
|
+
* - an affix states a `form` or `zero: true`, never both;
|
|
33
|
+
* - an element's `word` and the particle of `data.negation` are forms of the
|
|
34
|
+
* words of the language or an ancestor;
|
|
31
35
|
* - a word's `frame` names a frame of `data.sounds.frames`, its language's or
|
|
32
36
|
* an ancestor's;
|
|
33
37
|
* - every source language resolves, and names a language skill;
|
|
@@ -51,6 +55,7 @@ import { addressKeyOf, ownKey } from "./culture-reach.mjs";
|
|
|
51
55
|
import {
|
|
52
56
|
BORROWED_SOURCE_KIND,
|
|
53
57
|
LANGUAGE_SUBTYPE,
|
|
58
|
+
NAME_AFFIX_KIND,
|
|
54
59
|
WORD_DATA_KEYS,
|
|
55
60
|
glossSenses,
|
|
56
61
|
pronunciationProblem,
|
|
@@ -287,6 +292,76 @@ export function checkLanguageWords(note, { index } = {}) {
|
|
|
287
292
|
});
|
|
288
293
|
});
|
|
289
294
|
|
|
295
|
+
listOf(data.affixes).forEach((affix, i) => {
|
|
296
|
+
if (!isMap(affix)) return;
|
|
297
|
+
const form = typeof affix.form === "string" && affix.form.trim() !== "";
|
|
298
|
+
const zero = affix.zero === true;
|
|
299
|
+
if (form && zero)
|
|
300
|
+
findings.push(
|
|
301
|
+
finding(
|
|
302
|
+
["data", "affixes", i, "zero"],
|
|
303
|
+
"error",
|
|
304
|
+
`\`data.affixes[${i}]\` states a \`form\` and \`zero: true\`; a zero affix states no form`,
|
|
305
|
+
true,
|
|
306
|
+
),
|
|
307
|
+
);
|
|
308
|
+
else if (!form && !zero && affix.form == null)
|
|
309
|
+
findings.push(
|
|
310
|
+
finding(
|
|
311
|
+
["data", "affixes", i],
|
|
312
|
+
"error",
|
|
313
|
+
`\`data.affixes[${i}]\` states neither a \`form\` nor \`zero: true\``,
|
|
314
|
+
),
|
|
315
|
+
);
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
listOf(data.affixes).forEach((affix, i) => {
|
|
319
|
+
if (!isMap(affix) || affix.given == null || affix.kind === NAME_AFFIX_KIND) return;
|
|
320
|
+
findings.push(
|
|
321
|
+
finding(
|
|
322
|
+
["data", "affixes", i, "given"],
|
|
323
|
+
"error",
|
|
324
|
+
"`given` says who a given name belongs to, and " +
|
|
325
|
+
(typeof affix.kind === "string" ?
|
|
326
|
+
`\`data.affixes[${i}]\` is of kind \`${affix.kind}\``
|
|
327
|
+
: `\`data.affixes[${i}]\` is of no kind`) +
|
|
328
|
+
`; it is stated on an affix of kind \`${NAME_AFFIX_KIND}\` only`,
|
|
329
|
+
true,
|
|
330
|
+
),
|
|
331
|
+
);
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
// The forms an element's `word` and the negative particle may name.
|
|
335
|
+
const wordForms = new Set();
|
|
336
|
+
for (const one of [data, ...ancestors])
|
|
337
|
+
for (const word of listOf(one?.words))
|
|
338
|
+
if (isMap(word) && typeof word.form === "string") wordForms.add(word.form);
|
|
339
|
+
listOf(data.elements).forEach((element, i) => {
|
|
340
|
+
if (!isMap(element) || typeof element.word !== "string" || wordForms.has(element.word))
|
|
341
|
+
return;
|
|
342
|
+
findings.push(
|
|
343
|
+
finding(
|
|
344
|
+
["data", "elements", i, "word"],
|
|
345
|
+
"error",
|
|
346
|
+
`the word \`${element.word}\` of the element \`${element.form}\` is not a form of ` +
|
|
347
|
+
"this language's words or its ancestors'",
|
|
348
|
+
),
|
|
349
|
+
);
|
|
350
|
+
});
|
|
351
|
+
if (
|
|
352
|
+
isMap(data.negation) &&
|
|
353
|
+
typeof data.negation.particle === "string" &&
|
|
354
|
+
!wordForms.has(data.negation.particle)
|
|
355
|
+
)
|
|
356
|
+
findings.push(
|
|
357
|
+
finding(
|
|
358
|
+
["data", "negation", "particle"],
|
|
359
|
+
"error",
|
|
360
|
+
`the negative particle \`${data.negation.particle}\` is not a form of this ` +
|
|
361
|
+
"language's words or its ancestors'",
|
|
362
|
+
),
|
|
363
|
+
);
|
|
364
|
+
|
|
290
365
|
listOf(data.affixes).forEach((affix, i) => {
|
|
291
366
|
if (!isMap(affix) || affix.lengthens !== true || affix.replaces == null) return;
|
|
292
367
|
findings.push(
|
package/engine/sql-tables.mjs
CHANGED
|
@@ -654,7 +654,9 @@ async function createWordRelations(connection, stem, records, prefix, audience)
|
|
|
654
654
|
* @param {readonly string[]} columns - Its columns, for the empty case.
|
|
655
655
|
* @param {Readonly<Record<string, string>>} [types] - Each column's type, for
|
|
656
656
|
* the empty case; a column it leaves out is text. Without it, a whole-number
|
|
657
|
-
* column is a number and every other column text.
|
|
657
|
+
* column is a number and every other column text. A `DOUBLE` column is cast
|
|
658
|
+
* whatever the rows hold, because a fraction written whole reads as an
|
|
659
|
+
* integer.
|
|
658
660
|
* @returns {Promise<void>}
|
|
659
661
|
*/
|
|
660
662
|
async function createRowRelation(connection, file, rows, view, columns, types) {
|
|
@@ -670,7 +672,15 @@ async function createRowRelation(connection, file, rows, view, columns, types) {
|
|
|
670
672
|
return;
|
|
671
673
|
}
|
|
672
674
|
fs.writeFileSync(file, rows.map((row) => JSON.stringify(row)).join("\n"));
|
|
673
|
-
|
|
675
|
+
const fractions = Object.entries(types ?? {})
|
|
676
|
+
.filter(([, type]) => type === "DOUBLE")
|
|
677
|
+
.map(([column]) => `CAST("${column}" AS DOUBLE) AS "${column}"`);
|
|
678
|
+
const source = readJsonAuto(file);
|
|
679
|
+
await createTableFromFile(
|
|
680
|
+
connection,
|
|
681
|
+
view,
|
|
682
|
+
fractions.length ? `SELECT * REPLACE (${fractions.join(", ")}) FROM (${source})` : source,
|
|
683
|
+
);
|
|
674
684
|
}
|
|
675
685
|
|
|
676
686
|
/**
|
package/engine/word-rows.mjs
CHANGED
|
@@ -38,6 +38,7 @@ import { renderAddress } from "./address.mjs";
|
|
|
38
38
|
import { glossaryLanguage } from "./glossary-language.mjs";
|
|
39
39
|
import {
|
|
40
40
|
AFFIX_KEYS,
|
|
41
|
+
ZERO_AFFIX,
|
|
41
42
|
FIELD_KEYS,
|
|
42
43
|
GLOSSARY_ENTRY_KEYS,
|
|
43
44
|
LANGUAGE_SUBTYPE,
|
|
@@ -63,7 +64,7 @@ export const WORD_COLUMNS = Object.freeze([
|
|
|
63
64
|
export const GLOSSARY_COLUMNS = Object.freeze(["note", "position", ...GLOSSARY_ENTRY_KEYS]);
|
|
64
65
|
|
|
65
66
|
/** Every column of the `affixes` relation, in order. */
|
|
66
|
-
export const AFFIX_COLUMNS = Object.freeze([...WORD_IDENTITY_COLUMNS, ...AFFIX_KEYS]);
|
|
67
|
+
export const AFFIX_COLUMNS = Object.freeze([...WORD_IDENTITY_COLUMNS, ...AFFIX_KEYS, "written"]);
|
|
67
68
|
|
|
68
69
|
/** Every column of the `fields` relation, in order. */
|
|
69
70
|
export const FIELD_COLUMNS = Object.freeze([...WORD_IDENTITY_COLUMNS, ...FIELD_KEYS]);
|
|
@@ -299,14 +300,18 @@ function languageListRows(records, list, keys) {
|
|
|
299
300
|
|
|
300
301
|
/**
|
|
301
302
|
* The `affixes` rows of a set of index records: one per `data.affixes` entry
|
|
302
|
-
* of a language note, which is the row's `language
|
|
303
|
+
* of a language note, which is the row's `language`, with `written`, the form
|
|
304
|
+
* as a table prints it: `∅` for a zero affix, whose `form` is `NULL`.
|
|
303
305
|
*
|
|
304
306
|
* @param {Iterable<Record<string, any>>} records - Index records, every
|
|
305
307
|
* Address a string, already narrowed to the audience being published to.
|
|
306
308
|
* @returns {object[]} One row per affix, in record then entry order.
|
|
307
309
|
*/
|
|
308
310
|
export function affixRows(records) {
|
|
309
|
-
return languageListRows(records, "affixes", AFFIX_KEYS)
|
|
311
|
+
return languageListRows(records, "affixes", AFFIX_KEYS).map((row) => ({
|
|
312
|
+
...row,
|
|
313
|
+
written: row.zero === true ? ZERO_AFFIX : row.form,
|
|
314
|
+
}));
|
|
310
315
|
}
|
|
311
316
|
|
|
312
317
|
/**
|
package/engine/word-terms.mjs
CHANGED
|
@@ -44,6 +44,30 @@ export const WORD_SOURCE_KINDS = Object.freeze([
|
|
|
44
44
|
"island",
|
|
45
45
|
]);
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* What an affix makes: a case, a word derived from another, a verb's tense,
|
|
49
|
+
* aspect, mood or voice, a given name's ending, or a lineage name's ending.
|
|
50
|
+
*/
|
|
51
|
+
export const AFFIX_KINDS = Object.freeze([
|
|
52
|
+
"case",
|
|
53
|
+
"derivation",
|
|
54
|
+
"tense",
|
|
55
|
+
"aspect",
|
|
56
|
+
"mood",
|
|
57
|
+
"voice",
|
|
58
|
+
"name",
|
|
59
|
+
"lineage",
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
/** The affix kind whose ending says who the name is given to. */
|
|
63
|
+
export const NAME_AFFIX_KIND = "name";
|
|
64
|
+
|
|
65
|
+
/** How a zero affix is written where a table prints it. */
|
|
66
|
+
export const ZERO_AFFIX = "∅";
|
|
67
|
+
|
|
68
|
+
/** Who a given name's ending is given to. */
|
|
69
|
+
export const AFFIX_GIVEN = Object.freeze(["man", "woman", "either"]);
|
|
70
|
+
|
|
47
71
|
/** The source kind that requires `language`. */
|
|
48
72
|
export const BORROWED_SOURCE_KIND = "borrowed";
|
|
49
73
|
|
|
@@ -240,9 +264,36 @@ export const AFFIX_FIELDS = Object.freeze([
|
|
|
240
264
|
Object.freeze({
|
|
241
265
|
name: "form",
|
|
242
266
|
kind: "string",
|
|
243
|
-
required: true,
|
|
244
267
|
shape: "the affix as written, such as `-rith`",
|
|
245
|
-
describe: "The affix as a word's `built` names it.",
|
|
268
|
+
describe: "The affix as a word's `built` names it; absent on a zero affix.",
|
|
269
|
+
}),
|
|
270
|
+
Object.freeze({
|
|
271
|
+
name: "zero",
|
|
272
|
+
kind: "boolean",
|
|
273
|
+
shape: "`true`",
|
|
274
|
+
describe:
|
|
275
|
+
"The affix is written as nothing, such as a case with no ending; it states no " +
|
|
276
|
+
`\`form\`, prints as \`${ZERO_AFFIX}\`, and no \`built\` piece names it.`,
|
|
277
|
+
}),
|
|
278
|
+
Object.freeze({
|
|
279
|
+
name: "kind",
|
|
280
|
+
kind: "string",
|
|
281
|
+
allowed: AFFIX_KINDS,
|
|
282
|
+
shape: `one of ${AFFIX_KINDS.join(", ")}`,
|
|
283
|
+
describe: "What the affix makes.",
|
|
284
|
+
}),
|
|
285
|
+
Object.freeze({
|
|
286
|
+
name: "given",
|
|
287
|
+
kind: "string",
|
|
288
|
+
allowed: AFFIX_GIVEN,
|
|
289
|
+
shape: `one of ${AFFIX_GIVEN.join(", ")}`,
|
|
290
|
+
describe: `Who a given name closing on it belongs to; an affix of kind \`${NAME_AFFIX_KIND}\` only.`,
|
|
291
|
+
}),
|
|
292
|
+
Object.freeze({
|
|
293
|
+
name: "where",
|
|
294
|
+
kind: "string",
|
|
295
|
+
shape: "a string, such as `before a stop`",
|
|
296
|
+
describe: "Where this form stands, for an affix written two ways; everywhere where absent.",
|
|
246
297
|
}),
|
|
247
298
|
Object.freeze({
|
|
248
299
|
name: "gloss",
|
|
@@ -286,6 +337,13 @@ export const AFFIX_FIELDS = Object.freeze([
|
|
|
286
337
|
entries: Object.freeze({ kind: "string", shape: "a string" }),
|
|
287
338
|
describe: "The names the affix is read from.",
|
|
288
339
|
}),
|
|
340
|
+
Object.freeze({
|
|
341
|
+
name: "barredAfter",
|
|
342
|
+
kind: "list",
|
|
343
|
+
shape: "a list of sounds",
|
|
344
|
+
entries: Object.freeze({ kind: "string", shape: "a sound as written" }),
|
|
345
|
+
describe: "The sounds a stem may not close on to take the affix.",
|
|
346
|
+
}),
|
|
289
347
|
Object.freeze({
|
|
290
348
|
name: "tones",
|
|
291
349
|
kind: "string",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroiclands/package-build",
|
|
3
|
-
"version": "23.7.
|
|
3
|
+
"version": "23.7.1",
|
|
4
4
|
"description": "Shared toolchain for building and shipping a HeroicLands Foundry VTT package — content compilation, manifest, localization, staging, bundle, release and deployment.",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -63,6 +63,73 @@ export function edgeRows(records: Iterable<Record<string, any>>): object[];
|
|
|
63
63
|
* @returns {object[]}
|
|
64
64
|
*/
|
|
65
65
|
export function clusterRows(records: Iterable<Record<string, any>>): object[];
|
|
66
|
+
/**
|
|
67
|
+
* The `cluster_groups` rows: one per `data.sounds.clusters.groups` entry,
|
|
68
|
+
* `clusters` a list.
|
|
69
|
+
*
|
|
70
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
71
|
+
* @returns {object[]}
|
|
72
|
+
*/
|
|
73
|
+
export function clusterGroupRows(records: Iterable<Record<string, any>>): object[];
|
|
74
|
+
/**
|
|
75
|
+
* The `mutations` rows: one per `data.sounds.mutations` entry.
|
|
76
|
+
*
|
|
77
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
78
|
+
* @returns {object[]}
|
|
79
|
+
*/
|
|
80
|
+
export function mutationRows(records: Iterable<Record<string, any>>): object[];
|
|
81
|
+
/**
|
|
82
|
+
* The `older` rows: one per `data.older` entry.
|
|
83
|
+
*
|
|
84
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
85
|
+
* @returns {object[]}
|
|
86
|
+
*/
|
|
87
|
+
export function olderRows(records: Iterable<Record<string, any>>): object[];
|
|
88
|
+
/**
|
|
89
|
+
* The `negation` rows: one per language stating `data.negation`.
|
|
90
|
+
*
|
|
91
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
92
|
+
* @returns {object[]}
|
|
93
|
+
*/
|
|
94
|
+
export function negationRows(records: Iterable<Record<string, any>>): object[];
|
|
95
|
+
/**
|
|
96
|
+
* The `name_shapes` rows: one per `data.naming.shapes` entry, each range as
|
|
97
|
+
* its two bounds.
|
|
98
|
+
*
|
|
99
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
100
|
+
* @returns {object[]}
|
|
101
|
+
*/
|
|
102
|
+
export function nameShapeRows(records: Iterable<Record<string, any>>): object[];
|
|
103
|
+
/**
|
|
104
|
+
* The `name_edges` rows: one per `data.naming.edges` entry, `sounds` a list,
|
|
105
|
+
* `vowel` `false` and `of` `name` where unstated.
|
|
106
|
+
*
|
|
107
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
108
|
+
* @returns {object[]}
|
|
109
|
+
*/
|
|
110
|
+
export function nameEdgeRows(records: Iterable<Record<string, any>>): object[];
|
|
111
|
+
/**
|
|
112
|
+
* The `name_draws` rows: one per `data.naming.draws` entry.
|
|
113
|
+
*
|
|
114
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
115
|
+
* @returns {object[]}
|
|
116
|
+
*/
|
|
117
|
+
export function nameDrawRows(records: Iterable<Record<string, any>>): object[];
|
|
118
|
+
/**
|
|
119
|
+
* The `held_from` rows: one per `data.naming.heldFrom` entry.
|
|
120
|
+
*
|
|
121
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
122
|
+
* @returns {object[]}
|
|
123
|
+
*/
|
|
124
|
+
export function heldFromRows(records: Iterable<Record<string, any>>): object[];
|
|
125
|
+
/**
|
|
126
|
+
* The `near_names` rows: one per worked example of `data.naming.nearName`,
|
|
127
|
+
* each with the language's `min_syllables`.
|
|
128
|
+
*
|
|
129
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
130
|
+
* @returns {object[]}
|
|
131
|
+
*/
|
|
132
|
+
export function nearNameRows(records: Iterable<Record<string, any>>): object[];
|
|
66
133
|
/**
|
|
67
134
|
* The `read_past` rows: one per `data.sounds.readPast` entry.
|
|
68
135
|
*
|
|
@@ -72,8 +139,8 @@ export function clusterRows(records: Iterable<Record<string, any>>): object[];
|
|
|
72
139
|
export function readPastRows(records: Iterable<Record<string, any>>): object[];
|
|
73
140
|
/**
|
|
74
141
|
* The `sound_changes` rows: one per step of each `data.soundChanges` set, with
|
|
75
|
-
* the set's `position`, `name`, `from_language` and `
|
|
76
|
-
* step's `step_position` within it.
|
|
142
|
+
* the set's `position`, `name`, `from_language`, `to_language` and `takes`,
|
|
143
|
+
* and the step's `step_position` within it.
|
|
77
144
|
*
|
|
78
145
|
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
79
146
|
* @returns {object[]}
|
|
@@ -118,7 +185,8 @@ export function finalRows(records: Iterable<Record<string, any>>): object[];
|
|
|
118
185
|
/**
|
|
119
186
|
* The `syllables` rows: one per language stating `data.sounds.syllables`, a
|
|
120
187
|
* list rule always a list (`any` a list of one), the harmony's sets each a
|
|
121
|
-
* column of its own
|
|
188
|
+
* column of its own, its partners a list of `{ vowel, partner }` in the order
|
|
189
|
+
* stated.
|
|
122
190
|
*
|
|
123
191
|
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
124
192
|
* @returns {object[]}
|
|
@@ -182,6 +250,24 @@ export const LETTER_COLUMNS: readonly string[];
|
|
|
182
250
|
export const EDGE_COLUMNS: readonly string[];
|
|
183
251
|
/** Every column of the `clusters` relation, in order. */
|
|
184
252
|
export const CLUSTER_COLUMNS: readonly string[];
|
|
253
|
+
/** Every column of the `cluster_groups` relation, in order. */
|
|
254
|
+
export const CLUSTER_GROUP_COLUMNS: readonly string[];
|
|
255
|
+
/** Every column of the `mutations` relation, in order. */
|
|
256
|
+
export const MUTATION_COLUMNS: readonly string[];
|
|
257
|
+
/** Every column of the `older` relation, in order. */
|
|
258
|
+
export const OLDER_COLUMNS: readonly string[];
|
|
259
|
+
/** Every column of the `name_shapes` relation, in order. */
|
|
260
|
+
export const NAME_SHAPE_COLUMNS: readonly string[];
|
|
261
|
+
/** Every column of the `name_edges` relation, in order. */
|
|
262
|
+
export const NAME_EDGE_COLUMNS: readonly string[];
|
|
263
|
+
/** Every column of the `name_draws` relation, in order. */
|
|
264
|
+
export const NAME_DRAW_COLUMNS: readonly string[];
|
|
265
|
+
/** Every column of the `held_from` relation, in order. */
|
|
266
|
+
export const HELD_FROM_COLUMNS: readonly string[];
|
|
267
|
+
/** Every column of the `near_names` relation, in order. */
|
|
268
|
+
export const NEAR_NAME_COLUMNS: readonly string[];
|
|
269
|
+
/** Every column of the `negation` relation, in order: one row per language. */
|
|
270
|
+
export const NEGATION_COLUMNS: readonly string[];
|
|
185
271
|
/** Every column of the `stress` relation, in order. */
|
|
186
272
|
export const STRESS_COLUMNS: readonly string[];
|
|
187
273
|
/** Every column of the `finals` relation, in order. */
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
* The keys a language note states beside its words: the register of the names
|
|
3
3
|
* the setting gives in the language's reach, the tags the register uses, the
|
|
4
4
|
* forms it does not write, the notes the register covers, the letters and sound
|
|
5
|
-
* rules, the sound changes, the name elements, the roots
|
|
5
|
+
* rules, the sound changes, the name elements, the roots, the cognates, the
|
|
6
|
+
* forms older than the rules and the negative particle.
|
|
6
7
|
*
|
|
7
8
|
* A leaf module, importing nothing: the note vocabulary reads these
|
|
8
9
|
* declarations as it loads, and `language-data.mjs` checks what the values
|
|
9
10
|
* mean. Every closed list here — the edges, element positions, register
|
|
10
|
-
* kinds, stress rules, joins, marks, onsets, harmony sets and
|
|
11
|
-
* uses — holds the labels the setting's own tables use, one word
|
|
11
|
+
* kinds, stress rules, joins, marks, onsets, harmony sets, cluster uses and
|
|
12
|
+
* calling-name uses — holds the labels the setting's own tables use, one word
|
|
13
|
+
* for each.
|
|
12
14
|
*
|
|
13
15
|
* @module
|
|
14
16
|
*/
|
|
@@ -48,8 +50,30 @@ export const ANY_SOUND: "any";
|
|
|
48
50
|
* never begins or ends a name.
|
|
49
51
|
*/
|
|
50
52
|
export const ELEMENT_POSITIONS: readonly string[];
|
|
51
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* What a register name is, where a language sorts its names by kind, and the
|
|
55
|
+
* kind of name an element builds.
|
|
56
|
+
*/
|
|
52
57
|
export const REGISTER_KINDS: readonly string[];
|
|
58
|
+
/**
|
|
59
|
+
* The class of name a naming shape or edge holds for: every name, a given or a
|
|
60
|
+
* clan name, or a name by how it is built — `bound` a stem and an ending,
|
|
61
|
+
* `compound` elements alone.
|
|
62
|
+
*/
|
|
63
|
+
export const NAME_CLASSES: readonly string[];
|
|
64
|
+
/** The class of name a naming edge holds for where it states none. */
|
|
65
|
+
export const ANY_NAME: "name";
|
|
66
|
+
/**
|
|
67
|
+
* What a place name takes first from what it is held from: a name-stem, a
|
|
68
|
+
* god's name, a founder's given name, or one of the listed elements.
|
|
69
|
+
*/
|
|
70
|
+
export const HELD_TAKES: readonly string[];
|
|
71
|
+
/** The `takes` values that are a name a place name shapes. */
|
|
72
|
+
export const HELD_NAMES: readonly string[];
|
|
73
|
+
/** How a name is clipped where a place name takes it. */
|
|
74
|
+
export const HELD_CLIPS: readonly string[];
|
|
75
|
+
/** How often a group of clusters stands inside a word. */
|
|
76
|
+
export const CLUSTER_USES: readonly string[];
|
|
53
77
|
/** Where a language's stress falls. */
|
|
54
78
|
export const STRESS_RULES: readonly string[];
|
|
55
79
|
/** Which sounds meet where two parts of a word join. */
|
|
@@ -106,6 +130,13 @@ export const LETTER_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
|
106
130
|
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
107
131
|
*/
|
|
108
132
|
export const EDGE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
133
|
+
/**
|
|
134
|
+
* The keys of one `data.sounds.clusters.groups` entry: clusters of one kind,
|
|
135
|
+
* and how often they stand.
|
|
136
|
+
*
|
|
137
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
138
|
+
*/
|
|
139
|
+
export const CLUSTER_GROUP_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
109
140
|
/**
|
|
110
141
|
* The keys of a language's `data.sounds.clusters`.
|
|
111
142
|
*
|
|
@@ -172,6 +203,13 @@ export const SKELETON_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
|
172
203
|
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
173
204
|
*/
|
|
174
205
|
export const FRAME_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
206
|
+
/**
|
|
207
|
+
* The keys of one `data.sounds.mutations` entry: a sound and what it becomes
|
|
208
|
+
* where a named mutation holds.
|
|
209
|
+
*
|
|
210
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
211
|
+
*/
|
|
212
|
+
export const MUTATION_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
175
213
|
/**
|
|
176
214
|
* The keys of a language's `data.sounds`.
|
|
177
215
|
*
|
|
@@ -223,6 +261,64 @@ export const CALLING_CLOSING_FIELDS: readonly import("./data-keys.mjs").InnerKey
|
|
|
223
261
|
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
224
262
|
*/
|
|
225
263
|
export const CALLING_NAME_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
264
|
+
/**
|
|
265
|
+
* The keys of one `data.older` entry.
|
|
266
|
+
*
|
|
267
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
268
|
+
*/
|
|
269
|
+
export const OLDER_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
270
|
+
/**
|
|
271
|
+
* The keys of a language's `data.negation`.
|
|
272
|
+
*
|
|
273
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
274
|
+
*/
|
|
275
|
+
export const NEGATION_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
276
|
+
/**
|
|
277
|
+
* The keys of one `data.naming.shapes` entry: how long a class of name runs.
|
|
278
|
+
*
|
|
279
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
280
|
+
*/
|
|
281
|
+
export const NAME_SHAPE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
282
|
+
/**
|
|
283
|
+
* The keys of one `data.naming.edges` entry: the sounds a name may open or
|
|
284
|
+
* close on, where a name keeps edges ordinary words do not.
|
|
285
|
+
*
|
|
286
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
287
|
+
*/
|
|
288
|
+
export const NAME_EDGE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
289
|
+
/**
|
|
290
|
+
* The keys of one `data.naming.draws` entry: the element kinds a kind of name
|
|
291
|
+
* is built from.
|
|
292
|
+
*
|
|
293
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
294
|
+
*/
|
|
295
|
+
export const NAME_DRAW_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
296
|
+
/**
|
|
297
|
+
* The keys of one `data.naming.heldFrom` entry: what a place name takes first
|
|
298
|
+
* from what the place is held from.
|
|
299
|
+
*
|
|
300
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
301
|
+
*/
|
|
302
|
+
export const HELD_FROM_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
303
|
+
/**
|
|
304
|
+
* The keys of one `data.naming.nearName.examples` entry.
|
|
305
|
+
*
|
|
306
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
307
|
+
*/
|
|
308
|
+
export const NEAR_NAME_EXAMPLE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
309
|
+
/**
|
|
310
|
+
* The keys of a language's `data.naming.nearName`.
|
|
311
|
+
*
|
|
312
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
313
|
+
*/
|
|
314
|
+
export const NEAR_NAME_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
315
|
+
/**
|
|
316
|
+
* The keys of a language's `data.naming`: the parameters its names keep
|
|
317
|
+
* beyond the rules its words keep.
|
|
318
|
+
*
|
|
319
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
320
|
+
*/
|
|
321
|
+
export const NAMING_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
226
322
|
/**
|
|
227
323
|
* The `data` fields this module declares, in the order the vocabulary lists
|
|
228
324
|
* them. {@link module:engine/language-data.checkLanguageData} checks what the
|
|
@@ -261,5 +357,11 @@ export const CALLING_CLOSING_KEYS: readonly string[];
|
|
|
261
357
|
export const ELEMENT_KEYS: readonly string[];
|
|
262
358
|
/** The keys of {@link ROOT_FIELDS}, in declared order. */
|
|
263
359
|
export const ROOT_KEYS: readonly string[];
|
|
360
|
+
/** The keys of {@link MUTATION_FIELDS}, in declared order. */
|
|
361
|
+
export const MUTATION_KEYS: readonly string[];
|
|
362
|
+
/** The keys of {@link CLUSTER_GROUP_FIELDS}, in declared order. */
|
|
363
|
+
export const CLUSTER_GROUP_KEYS: readonly string[];
|
|
364
|
+
/** The keys of {@link OLDER_FIELDS}, in declared order. */
|
|
365
|
+
export const OLDER_KEYS: readonly string[];
|
|
264
366
|
/** The keys of {@link SCOPE_FIELDS}, in declared order. */
|
|
265
367
|
export const SCOPE_KINDS: readonly string[];
|
|
@@ -78,7 +78,8 @@ export function citationLookup(records: Iterable<Record<string, any>>): (languag
|
|
|
78
78
|
export function wordRows(records: Iterable<Record<string, any>>, all?: Iterable<Record<string, any>>): object[];
|
|
79
79
|
/**
|
|
80
80
|
* The `affixes` rows of a set of index records: one per `data.affixes` entry
|
|
81
|
-
* of a language note, which is the row's `language
|
|
81
|
+
* of a language note, which is the row's `language`, with `written`, the form
|
|
82
|
+
* as a table prints it: `∅` for a zero affix, whose `form` is `NULL`.
|
|
82
83
|
*
|
|
83
84
|
* @param {Iterable<Record<string, any>>} records - Index records, every
|
|
84
85
|
* Address a string, already narrowed to the audience being published to.
|
|
@@ -45,6 +45,17 @@ export const WORD_DATA_KEYS: readonly string[];
|
|
|
45
45
|
* one; `coined`, `substrate` and `island` name no form.
|
|
46
46
|
*/
|
|
47
47
|
export const WORD_SOURCE_KINDS: readonly string[];
|
|
48
|
+
/**
|
|
49
|
+
* What an affix makes: a case, a word derived from another, a verb's tense,
|
|
50
|
+
* aspect, mood or voice, a given name's ending, or a lineage name's ending.
|
|
51
|
+
*/
|
|
52
|
+
export const AFFIX_KINDS: readonly string[];
|
|
53
|
+
/** The affix kind whose ending says who the name is given to. */
|
|
54
|
+
export const NAME_AFFIX_KIND: "name";
|
|
55
|
+
/** How a zero affix is written where a table prints it. */
|
|
56
|
+
export const ZERO_AFFIX: "\u2205";
|
|
57
|
+
/** Who a given name's ending is given to. */
|
|
58
|
+
export const AFFIX_GIVEN: readonly string[];
|
|
48
59
|
/** The source kind that requires `language`. */
|
|
49
60
|
export const BORROWED_SOURCE_KIND: "borrowed";
|
|
50
61
|
/**
|