@heroiclands/package-build 23.6.1 → 23.7.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/CHANGELOG.md +26 -0
- package/docs/authoring/links-and-markup.md +239 -24
- package/docs/content-format.md +1 -1
- package/docs/reference/format-details.md +517 -73
- package/docs/reference/note-types.md +152 -39
- package/engine/content-format.yaml +10 -0
- package/engine/content-index.mjs +21 -14
- package/engine/dictionary-layout.mjs +7 -3
- package/engine/dictionary-rows.mjs +6 -13
- package/engine/index-records.mjs +1 -0
- package/engine/language-data.mjs +378 -0
- package/engine/language-rows.mjs +761 -0
- package/engine/language-terms.mjs +1203 -0
- package/engine/language-words.mjs +40 -6
- package/engine/note-addresses.mjs +38 -4
- package/engine/note-vocabulary.mjs +9 -2
- package/engine/sql-tables.mjs +34 -11
- package/engine/word-citations.mjs +206 -0
- package/engine/word-rows.mjs +58 -9
- package/engine/word-terms.mjs +71 -11
- package/package.json +1 -1
- package/types/engine/dictionary-layout.d.mts +5 -3
- package/types/engine/language-data.d.mts +22 -0
- package/types/engine/language-rows.d.mts +227 -0
- package/types/engine/language-terms.d.mts +265 -0
- package/types/engine/note-addresses.d.mts +8 -10
- package/types/engine/sql-tables.d.mts +2 -2
- package/types/engine/word-citations.d.mts +43 -0
- package/types/engine/word-rows.d.mts +16 -0
- package/types/engine/word-terms.d.mts +16 -0
package/engine/word-terms.mjs
CHANGED
|
@@ -88,6 +88,15 @@ export const WORD_FIELDS = Object.freeze([
|
|
|
88
88
|
shape: "the word as cited, bare",
|
|
89
89
|
describe: "The word as cited, with no backticks.",
|
|
90
90
|
}),
|
|
91
|
+
Object.freeze({
|
|
92
|
+
name: "variants",
|
|
93
|
+
kind: "list",
|
|
94
|
+
shape: "a list of forms",
|
|
95
|
+
entries: Object.freeze({ kind: "string", shape: "a form, bare" }),
|
|
96
|
+
describe:
|
|
97
|
+
"The word's other forms, such as a long form beside a short one; a marked use of " +
|
|
98
|
+
"one cites the word.",
|
|
99
|
+
}),
|
|
91
100
|
Object.freeze({
|
|
92
101
|
name: "name_sort",
|
|
93
102
|
kind: "string",
|
|
@@ -112,10 +121,12 @@ export const WORD_FIELDS = Object.freeze([
|
|
|
112
121
|
}),
|
|
113
122
|
Object.freeze({
|
|
114
123
|
name: "gloss",
|
|
115
|
-
kind: "string",
|
|
124
|
+
kind: "string-or-list",
|
|
116
125
|
required: true,
|
|
117
|
-
shape: "a string",
|
|
118
|
-
|
|
126
|
+
shape: "a string, or a list of senses",
|
|
127
|
+
entries: Object.freeze({ kind: "string", shape: "a sense" }),
|
|
128
|
+
describe:
|
|
129
|
+
"The meaning, in brief; a list states one sense per entry, which a dictionary numbers.",
|
|
119
130
|
}),
|
|
120
131
|
Object.freeze({
|
|
121
132
|
name: "source",
|
|
@@ -134,11 +145,11 @@ export const WORD_FIELDS = Object.freeze([
|
|
|
134
145
|
"write them; absent for a root word.",
|
|
135
146
|
}),
|
|
136
147
|
Object.freeze({
|
|
137
|
-
name: "
|
|
138
|
-
kind: "
|
|
139
|
-
shape: "a
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
name: "note",
|
|
149
|
+
kind: "string",
|
|
150
|
+
shape: "a string",
|
|
151
|
+
describe:
|
|
152
|
+
"What a source says of the word beyond its pieces, such as a cognate it is read with.",
|
|
142
153
|
}),
|
|
143
154
|
Object.freeze({
|
|
144
155
|
name: "pronunciation",
|
|
@@ -163,14 +174,41 @@ export const WORD_FIELDS = Object.freeze([
|
|
|
163
174
|
Object.freeze({
|
|
164
175
|
name: "frame",
|
|
165
176
|
kind: "string",
|
|
166
|
-
shape: "a
|
|
167
|
-
describe: "The frame a root is set in.",
|
|
177
|
+
shape: "a frame of the language's `sounds.frames`",
|
|
178
|
+
describe: "The frame a root is set in, named in the language's `sounds.frames`.",
|
|
168
179
|
}),
|
|
169
180
|
]);
|
|
170
181
|
|
|
171
182
|
/** The keys of {@link WORD_FIELDS}, in declared order. */
|
|
172
183
|
export const WORD_KEYS = Object.freeze(WORD_FIELDS.map((field) => field.name));
|
|
173
184
|
|
|
185
|
+
/**
|
|
186
|
+
* A word's senses: one for a string gloss, one per entry for a list, each
|
|
187
|
+
* trimmed, blanks dropped.
|
|
188
|
+
*
|
|
189
|
+
* @param {unknown} gloss - The word's `gloss`.
|
|
190
|
+
* @returns {string[]} The senses, in order.
|
|
191
|
+
*/
|
|
192
|
+
export function glossSenses(gloss) {
|
|
193
|
+
const list = Array.isArray(gloss) ? gloss : [gloss];
|
|
194
|
+
return list
|
|
195
|
+
.filter((sense) => typeof sense === "string")
|
|
196
|
+
.map((sense) => sense.trim())
|
|
197
|
+
.filter(Boolean);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* A word's gloss as one line of text: its senses joined by `; `, or `null`
|
|
202
|
+
* where it states none.
|
|
203
|
+
*
|
|
204
|
+
* @param {unknown} gloss - The word's `gloss`.
|
|
205
|
+
* @returns {string|null}
|
|
206
|
+
*/
|
|
207
|
+
export function glossText(gloss) {
|
|
208
|
+
const senses = glossSenses(gloss);
|
|
209
|
+
return senses.length ? senses.join("; ") : null;
|
|
210
|
+
}
|
|
211
|
+
|
|
174
212
|
/**
|
|
175
213
|
* The keys one entry of a language note's `data.fields` carries.
|
|
176
214
|
*
|
|
@@ -217,7 +255,29 @@ export const AFFIX_FIELDS = Object.freeze([
|
|
|
217
255
|
name: "attaches",
|
|
218
256
|
kind: "string",
|
|
219
257
|
shape: "a string",
|
|
220
|
-
describe: "How it attaches, such as `replaces a closing vowel`.",
|
|
258
|
+
describe: "How it attaches, in words, such as `replaces a closing vowel`.",
|
|
259
|
+
}),
|
|
260
|
+
Object.freeze({
|
|
261
|
+
name: "replaces",
|
|
262
|
+
kind: "string",
|
|
263
|
+
shape: "`vowel`, or the letters, such as `a`",
|
|
264
|
+
describe:
|
|
265
|
+
"What it takes the place of at the close of the stem: `vowel` for any closing " +
|
|
266
|
+
"vowel, or the letters it replaces; added to the whole stem where absent.",
|
|
267
|
+
}),
|
|
268
|
+
Object.freeze({
|
|
269
|
+
name: "lengthens",
|
|
270
|
+
kind: "boolean",
|
|
271
|
+
shape: "`true` or `false`",
|
|
272
|
+
describe:
|
|
273
|
+
"Whether the stem's last vowel lengthens before the affix; `false` where unstated. An " +
|
|
274
|
+
"affix that `replaces` the stem's close does not also lengthen it.",
|
|
275
|
+
}),
|
|
276
|
+
Object.freeze({
|
|
277
|
+
name: "front",
|
|
278
|
+
kind: "string",
|
|
279
|
+
shape: "the affix as written, such as `-ür`",
|
|
280
|
+
describe: "Its form after front vowels, where the language keeps vowel harmony.",
|
|
221
281
|
}),
|
|
222
282
|
Object.freeze({
|
|
223
283
|
name: "examples",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroiclands/package-build",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.7.0",
|
|
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",
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* @property {object} [addressContext] - Address resolution context.
|
|
7
7
|
* @property {(address: string) => string|undefined} [labelOf] - A note's
|
|
8
8
|
* `name.full`, by its Address.
|
|
9
|
-
* @property {boolean} [showKey=true] - Whether the key is printed
|
|
9
|
+
* @property {boolean|"only"} [showKey=true] - Whether the key is printed;
|
|
10
|
+
* `"only"` prints the key and nothing else.
|
|
10
11
|
* @property {string} [pageLanguage] - The language of the page the fence is
|
|
11
12
|
* on, which no entry is tagged with.
|
|
12
13
|
*/
|
|
@@ -63,9 +64,10 @@ export type LayoutOptions = {
|
|
|
63
64
|
*/
|
|
64
65
|
labelOf?: ((address: string) => string | undefined) | undefined;
|
|
65
66
|
/**
|
|
66
|
-
* - Whether the key is printed
|
|
67
|
+
* - Whether the key is printed;
|
|
68
|
+
* `"only"` prints the key and nothing else.
|
|
67
69
|
*/
|
|
68
|
-
showKey?: boolean | undefined;
|
|
70
|
+
showKey?: boolean | "only" | undefined;
|
|
69
71
|
/**
|
|
70
72
|
* - The language of the page the fence is
|
|
71
73
|
* on, which no entry is tagged with.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a tag a row names is one `data.tongues` declares.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} tag - The tag as the row writes it.
|
|
5
|
+
* @param {Set<string>} declared - The declared tags.
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export function tongueDeclared(tag: string, declared: Set<string>): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Check a `skill` note's language data against what it means.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} note - A `skill` note: `file`, `raw` and parsed `fm`.
|
|
13
|
+
* @param {object} [context]
|
|
14
|
+
* @param {object} [context.index] - The index, for whether an Address
|
|
15
|
+
* resolves. Without one, only what the note says of itself is checked.
|
|
16
|
+
* @param {readonly string[]} [context.types] - The note types a scope may name.
|
|
17
|
+
* @returns {object[]} The findings.
|
|
18
|
+
*/
|
|
19
|
+
export function checkLanguageData(note: object, { index, types }?: {
|
|
20
|
+
index?: object | undefined;
|
|
21
|
+
types?: readonly string[] | undefined;
|
|
22
|
+
}): object[];
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a note falls in a language's `data.scope`: one of its kinds catches
|
|
3
|
+
* the note, `types` (where stated) admits its type, and `skip` does not name
|
|
4
|
+
* it. A language that states no scope covers every note.
|
|
5
|
+
*
|
|
6
|
+
* @param {Record<string, any>} record - A note's index record.
|
|
7
|
+
* @param {string} address - The note's Address.
|
|
8
|
+
* @param {object|undefined} scope - The language's `data.scope`.
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export function inScope(record: Record<string, any>, address: string, scope: object | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The `register` rows of a set of index records.
|
|
14
|
+
*
|
|
15
|
+
* @param {Iterable<Record<string, any>>} records - Index records, every
|
|
16
|
+
* Address a string, already narrowed to the audience being published to.
|
|
17
|
+
* @param {Iterable<Record<string, any>>} [all] - Every record of the package;
|
|
18
|
+
* a note carrying a name is cited only where the audience sees it.
|
|
19
|
+
* @returns {object[]} One row per register entry, in record then entry order.
|
|
20
|
+
*/
|
|
21
|
+
export function registerRows(records: Iterable<Record<string, any>>, all?: Iterable<Record<string, any>>): object[];
|
|
22
|
+
/**
|
|
23
|
+
* The `retired` rows: one per `data.retired` entry, `instead` a list.
|
|
24
|
+
*
|
|
25
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
26
|
+
* @returns {object[]}
|
|
27
|
+
*/
|
|
28
|
+
export function retiredRows(records: Iterable<Record<string, any>>): object[];
|
|
29
|
+
/**
|
|
30
|
+
* The `tongues` rows: one per `data.tongues` entry.
|
|
31
|
+
*
|
|
32
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
33
|
+
* @returns {object[]}
|
|
34
|
+
*/
|
|
35
|
+
export function tongueRows(records: Iterable<Record<string, any>>): object[];
|
|
36
|
+
/**
|
|
37
|
+
* The `scope` rows: one per value of each kind of `data.scope`, in the order
|
|
38
|
+
* the kinds are declared.
|
|
39
|
+
*
|
|
40
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
41
|
+
* @returns {object[]}
|
|
42
|
+
*/
|
|
43
|
+
export function scopeRows(records: Iterable<Record<string, any>>): object[];
|
|
44
|
+
/**
|
|
45
|
+
* The `letters` rows: one per `data.sounds.letters` entry, `letters` and
|
|
46
|
+
* `tongue` lists.
|
|
47
|
+
*
|
|
48
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
49
|
+
* @returns {object[]}
|
|
50
|
+
*/
|
|
51
|
+
export function letterRows(records: Iterable<Record<string, any>>): object[];
|
|
52
|
+
/**
|
|
53
|
+
* The `edges` rows: one per `data.sounds.edges` entry, `sounds` a list.
|
|
54
|
+
*
|
|
55
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
56
|
+
* @returns {object[]}
|
|
57
|
+
*/
|
|
58
|
+
export function edgeRows(records: Iterable<Record<string, any>>): object[];
|
|
59
|
+
/**
|
|
60
|
+
* The `clusters` rows: one per language stating `data.sounds.clusters`.
|
|
61
|
+
*
|
|
62
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
63
|
+
* @returns {object[]}
|
|
64
|
+
*/
|
|
65
|
+
export function clusterRows(records: Iterable<Record<string, any>>): object[];
|
|
66
|
+
/**
|
|
67
|
+
* The `read_past` rows: one per `data.sounds.readPast` entry.
|
|
68
|
+
*
|
|
69
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
70
|
+
* @returns {object[]}
|
|
71
|
+
*/
|
|
72
|
+
export function readPastRows(records: Iterable<Record<string, any>>): object[];
|
|
73
|
+
/**
|
|
74
|
+
* The `sound_changes` rows: one per step of each `data.soundChanges` set, with
|
|
75
|
+
* the set's `position`, `name`, `from_language` and `to_language`, and the
|
|
76
|
+
* step's `step_position` within it.
|
|
77
|
+
*
|
|
78
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
79
|
+
* @returns {object[]}
|
|
80
|
+
*/
|
|
81
|
+
export function soundChangeRows(records: Iterable<Record<string, any>>): object[];
|
|
82
|
+
/**
|
|
83
|
+
* The `elements` rows: one per `data.elements` entry, `examples` a list.
|
|
84
|
+
*
|
|
85
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
86
|
+
* @returns {object[]}
|
|
87
|
+
*/
|
|
88
|
+
export function elementRows(records: Iterable<Record<string, any>>): object[];
|
|
89
|
+
/**
|
|
90
|
+
* The `roots` rows: one per `data.roots` entry.
|
|
91
|
+
*
|
|
92
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
93
|
+
* @returns {object[]}
|
|
94
|
+
*/
|
|
95
|
+
export function rootRows(records: Iterable<Record<string, any>>): object[];
|
|
96
|
+
/**
|
|
97
|
+
* The `cognates` rows: one per form of each `data.cognates` set, in the order
|
|
98
|
+
* the set writes them, with the set's `position`, `gloss` and `proto`.
|
|
99
|
+
*
|
|
100
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
101
|
+
* @returns {object[]}
|
|
102
|
+
*/
|
|
103
|
+
export function cognateRows(records: Iterable<Record<string, any>>): object[];
|
|
104
|
+
/**
|
|
105
|
+
* The `stress` rows: one per language stating `data.sounds.stress`.
|
|
106
|
+
*
|
|
107
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
108
|
+
* @returns {object[]}
|
|
109
|
+
*/
|
|
110
|
+
export function stressRows(records: Iterable<Record<string, any>>): object[];
|
|
111
|
+
/**
|
|
112
|
+
* The `finals` rows: one per `data.sounds.finals` entry.
|
|
113
|
+
*
|
|
114
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
115
|
+
* @returns {object[]}
|
|
116
|
+
*/
|
|
117
|
+
export function finalRows(records: Iterable<Record<string, any>>): object[];
|
|
118
|
+
/**
|
|
119
|
+
* The `syllables` rows: one per language stating `data.sounds.syllables`, a
|
|
120
|
+
* list rule always a list (`any` a list of one), the harmony's sets each a
|
|
121
|
+
* column of its own.
|
|
122
|
+
*
|
|
123
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
124
|
+
* @returns {object[]}
|
|
125
|
+
*/
|
|
126
|
+
export function syllableRows(records: Iterable<Record<string, any>>): object[];
|
|
127
|
+
/**
|
|
128
|
+
* The `joining` rows: one per `data.sounds.joining` entry.
|
|
129
|
+
*
|
|
130
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
131
|
+
* @returns {object[]}
|
|
132
|
+
*/
|
|
133
|
+
export function joiningRows(records: Iterable<Record<string, any>>): object[];
|
|
134
|
+
/**
|
|
135
|
+
* The `joins` rows: one per `data.sounds.joins` entry.
|
|
136
|
+
*
|
|
137
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
138
|
+
* @returns {object[]}
|
|
139
|
+
*/
|
|
140
|
+
export function joinRows(records: Iterable<Record<string, any>>): object[];
|
|
141
|
+
/**
|
|
142
|
+
* The `marks` rows: one per `data.sounds.marks` entry.
|
|
143
|
+
*
|
|
144
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
145
|
+
* @returns {object[]}
|
|
146
|
+
*/
|
|
147
|
+
export function markRows(records: Iterable<Record<string, any>>): object[];
|
|
148
|
+
/**
|
|
149
|
+
* The `skeleton` rows: one per `data.sounds.skeleton` entry, `second` a list.
|
|
150
|
+
*
|
|
151
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
152
|
+
* @returns {object[]}
|
|
153
|
+
*/
|
|
154
|
+
export function skeletonRows(records: Iterable<Record<string, any>>): object[];
|
|
155
|
+
/**
|
|
156
|
+
* The `frames` rows: one per `data.sounds.frames` entry, `examples` a list of
|
|
157
|
+
* `{ root, form }` in the order the frame states them.
|
|
158
|
+
*
|
|
159
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
160
|
+
* @returns {object[]}
|
|
161
|
+
*/
|
|
162
|
+
export function frameRows(records: Iterable<Record<string, any>>): object[];
|
|
163
|
+
/**
|
|
164
|
+
* The `calling_names` rows: one per `data.callingNames.closings` entry, each
|
|
165
|
+
* with the language's `min_syllables`.
|
|
166
|
+
*
|
|
167
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
168
|
+
* @returns {object[]}
|
|
169
|
+
*/
|
|
170
|
+
export function callingNameRows(records: Iterable<Record<string, any>>): object[];
|
|
171
|
+
/** Every column of the `register` relation, in order. */
|
|
172
|
+
export const REGISTER_COLUMNS: readonly string[];
|
|
173
|
+
/** Every column of the `retired` relation, in order. */
|
|
174
|
+
export const RETIRED_COLUMNS: readonly string[];
|
|
175
|
+
/** Every column of the `tongues` relation, in order. */
|
|
176
|
+
export const TONGUE_COLUMNS: readonly any[];
|
|
177
|
+
/** Every column of the `scope` relation, in order. */
|
|
178
|
+
export const SCOPE_COLUMNS: readonly string[];
|
|
179
|
+
/** Every column of the `letters` relation, in order. */
|
|
180
|
+
export const LETTER_COLUMNS: readonly string[];
|
|
181
|
+
/** Every column of the `edges` relation, in order. */
|
|
182
|
+
export const EDGE_COLUMNS: readonly string[];
|
|
183
|
+
/** Every column of the `clusters` relation, in order. */
|
|
184
|
+
export const CLUSTER_COLUMNS: readonly string[];
|
|
185
|
+
/** Every column of the `stress` relation, in order. */
|
|
186
|
+
export const STRESS_COLUMNS: readonly string[];
|
|
187
|
+
/** Every column of the `finals` relation, in order. */
|
|
188
|
+
export const FINAL_COLUMNS: readonly string[];
|
|
189
|
+
/** Every column of the `syllables` relation, in order: one row per language. */
|
|
190
|
+
export const SYLLABLE_COLUMNS: readonly string[];
|
|
191
|
+
/** Every column of the `joining` relation, in order. */
|
|
192
|
+
export const JOINING_COLUMNS: readonly string[];
|
|
193
|
+
/** Every column of the `joins` relation, in order. */
|
|
194
|
+
export const JOIN_COLUMNS: readonly string[];
|
|
195
|
+
/** Every column of the `marks` relation, in order. */
|
|
196
|
+
export const MARK_COLUMNS: readonly string[];
|
|
197
|
+
/** Every column of the `skeleton` relation, in order. */
|
|
198
|
+
export const SKELETON_COLUMNS: readonly string[];
|
|
199
|
+
/** Every column of the `frames` relation, in order. */
|
|
200
|
+
export const FRAME_COLUMNS: readonly string[];
|
|
201
|
+
/** Every column of the `read_past` relation, in order. */
|
|
202
|
+
export const READ_PAST_COLUMNS: readonly string[];
|
|
203
|
+
/** Every column of the `sound_changes` relation, in order: one row per step. */
|
|
204
|
+
export const SOUND_CHANGE_COLUMNS: readonly string[];
|
|
205
|
+
/** Every column of the `elements` relation, in order. */
|
|
206
|
+
export const ELEMENT_COLUMNS: readonly any[];
|
|
207
|
+
/** Every column of the `roots` relation, in order. */
|
|
208
|
+
export const ROOT_COLUMNS: readonly string[];
|
|
209
|
+
/** Every column of the `cognates` relation, in order. */
|
|
210
|
+
export const COGNATE_COLUMNS: readonly string[];
|
|
211
|
+
/** Every column of the `calling_names` relation, in order. */
|
|
212
|
+
export const CALLING_NAME_COLUMNS: readonly string[];
|
|
213
|
+
/**
|
|
214
|
+
* The type of each column that holds no text, by relation, so a relation
|
|
215
|
+
* with no row still has the type a fence's list or number function binds to.
|
|
216
|
+
*
|
|
217
|
+
* @type {Readonly<Record<string, Readonly<Record<string, string>>>>}
|
|
218
|
+
*/
|
|
219
|
+
export const LANGUAGE_COLUMN_TYPES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
220
|
+
/**
|
|
221
|
+
* Every relation of a language's register, sounds, history and names: its
|
|
222
|
+
* name, its rows from the records the audience sees and every record of the
|
|
223
|
+
* package, and its columns. {@link LANGUAGE_COLUMN_TYPES} types its columns.
|
|
224
|
+
*
|
|
225
|
+
* @type {ReadonlyArray<[string, (visible: object[], all: object[]) => object[], readonly string[]]>}
|
|
226
|
+
*/
|
|
227
|
+
export const LANGUAGE_RELATIONS: ReadonlyArray<[string, (visible: object[], all: object[]) => object[], readonly string[]]>;
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The keys a language note states beside its words: the register of the names
|
|
3
|
+
* the setting gives in the language's reach, the tags the register uses, the
|
|
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 and the cognates.
|
|
6
|
+
*
|
|
7
|
+
* A leaf module, importing nothing: the note vocabulary reads these
|
|
8
|
+
* declarations as it loads, and `language-data.mjs` checks what the values
|
|
9
|
+
* mean. Every closed list here — the edges, element positions, register
|
|
10
|
+
* kinds, stress rules, joins, marks, onsets, harmony sets and calling-name
|
|
11
|
+
* uses — holds the labels the setting's own tables use, one word for each.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
/** The `data` keys a language note states its sounds, names and history in. */
|
|
16
|
+
export const LANGUAGE_DATA_KEYS: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* The tongue tag every language accepts without declaring it: a name given in
|
|
19
|
+
* the language of the pages.
|
|
20
|
+
*/
|
|
21
|
+
export const RESERVED_TONGUE: "translation";
|
|
22
|
+
/**
|
|
23
|
+
* The placeholder a tongue tag closes on to declare a family of tags, one per
|
|
24
|
+
* tongue named after the colon: `exonym:<tongue>` declares `exonym:vylari`.
|
|
25
|
+
*/
|
|
26
|
+
export const TONGUE_PLACEHOLDER: "<tongue>";
|
|
27
|
+
/**
|
|
28
|
+
* The edges of a word a sound rule names: what may open it, close it, stand
|
|
29
|
+
* inside it, and what counts as a syllable.
|
|
30
|
+
*/
|
|
31
|
+
export const EDGE_KINDS: readonly string[];
|
|
32
|
+
/** What each edge kind holds, for the reference and for a finding. */
|
|
33
|
+
export const EDGE_MEANINGS: Readonly<{
|
|
34
|
+
openConsonant: "the single consonants that may open a word, where not every one may";
|
|
35
|
+
openCluster: "the clusters that may open a word";
|
|
36
|
+
closeConsonant: "the consonants that may close a word";
|
|
37
|
+
closeCluster: "the clusters that may close a word";
|
|
38
|
+
innerCluster: "the pairs that may stand together inside a word";
|
|
39
|
+
vowelPair: "the vowels that may stand together";
|
|
40
|
+
glide: "the glides that may follow a consonant";
|
|
41
|
+
syllabic: "the consonants that may carry a syllable";
|
|
42
|
+
}>;
|
|
43
|
+
/** The word a sound rule's `sounds` takes in place of a list: every sound. */
|
|
44
|
+
export const ANY_SOUND: "any";
|
|
45
|
+
/**
|
|
46
|
+
* Where in a name an element stands: `opening` opens a name or stands inside
|
|
47
|
+
* it, `closing` closes it, `either` does both, and `link` joins two parts and
|
|
48
|
+
* never begins or ends a name.
|
|
49
|
+
*/
|
|
50
|
+
export const ELEMENT_POSITIONS: readonly string[];
|
|
51
|
+
/** What a register name is, where a language sorts its names by kind. */
|
|
52
|
+
export const REGISTER_KINDS: readonly string[];
|
|
53
|
+
/** Where a language's stress falls. */
|
|
54
|
+
export const STRESS_RULES: readonly string[];
|
|
55
|
+
/** Which sounds meet where two parts of a word join. */
|
|
56
|
+
export const JOIN_MEETINGS: readonly string[];
|
|
57
|
+
/**
|
|
58
|
+
* What happens where they meet: `merge` writes one, `insert` sets the join's
|
|
59
|
+
* letters between, `drop` loses the first, `double` doubles the consonant.
|
|
60
|
+
*/
|
|
61
|
+
export const JOIN_RULES: readonly string[];
|
|
62
|
+
/** What a written mark says of its letter. */
|
|
63
|
+
export const MARK_KINDS: readonly string[];
|
|
64
|
+
/** How many of a mark a word may carry: `one` at most, or `any` number. */
|
|
65
|
+
export const MARK_LIMITS: readonly string[];
|
|
66
|
+
/** What a syllable may open on, where the rule is stated. */
|
|
67
|
+
export const ONSET_RULES: readonly string[];
|
|
68
|
+
/** Which harmony a neutral vowel counts as. */
|
|
69
|
+
export const HARMONY_SETS: readonly string[];
|
|
70
|
+
/** Whose name a calling-name closing usually makes. */
|
|
71
|
+
export const CALLING_USES: readonly string[];
|
|
72
|
+
/**
|
|
73
|
+
* The keys of one `data.tongues` entry.
|
|
74
|
+
*
|
|
75
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
76
|
+
*/
|
|
77
|
+
export const TONGUE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
78
|
+
/**
|
|
79
|
+
* The keys of one `data.register` entry.
|
|
80
|
+
*
|
|
81
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
82
|
+
*/
|
|
83
|
+
export const REGISTER_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
84
|
+
/**
|
|
85
|
+
* The keys of one `data.retired` entry.
|
|
86
|
+
*
|
|
87
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
88
|
+
*/
|
|
89
|
+
export const RETIRED_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
90
|
+
/**
|
|
91
|
+
* The keys of a language's `data.scope`: the notes its register covers. A note
|
|
92
|
+
* is in scope when any one of them catches it and `skip` does not name it.
|
|
93
|
+
*
|
|
94
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
95
|
+
*/
|
|
96
|
+
export const SCOPE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
97
|
+
/**
|
|
98
|
+
* The keys of one `data.sounds.letters` entry.
|
|
99
|
+
*
|
|
100
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
101
|
+
*/
|
|
102
|
+
export const LETTER_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
103
|
+
/**
|
|
104
|
+
* The keys of one `data.sounds.edges` entry.
|
|
105
|
+
*
|
|
106
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
107
|
+
*/
|
|
108
|
+
export const EDGE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
109
|
+
/**
|
|
110
|
+
* The keys of a language's `data.sounds.clusters`.
|
|
111
|
+
*
|
|
112
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
113
|
+
*/
|
|
114
|
+
export const CLUSTER_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
115
|
+
/**
|
|
116
|
+
* The keys of one `data.sounds.readPast` entry.
|
|
117
|
+
*
|
|
118
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
119
|
+
*/
|
|
120
|
+
export const READ_PAST_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
121
|
+
/**
|
|
122
|
+
* The keys of one `data.sounds.finals` entry: a syllable final, for a
|
|
123
|
+
* language whose syllables are parsed by them.
|
|
124
|
+
*
|
|
125
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
126
|
+
*/
|
|
127
|
+
export const FINAL_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
128
|
+
/**
|
|
129
|
+
* The keys of one `data.sounds.joining` entry: how two parts are written
|
|
130
|
+
* where the first closes and the second opens on the given sounds.
|
|
131
|
+
*
|
|
132
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
133
|
+
*/
|
|
134
|
+
export const JOINING_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
135
|
+
/**
|
|
136
|
+
* The keys of one `data.sounds.joins` entry: what happens where two parts of a
|
|
137
|
+
* word meet.
|
|
138
|
+
*
|
|
139
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
140
|
+
*/
|
|
141
|
+
export const JOIN_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
142
|
+
/**
|
|
143
|
+
* The keys of one `data.sounds.marks` entry: a mark the language writes on a
|
|
144
|
+
* letter.
|
|
145
|
+
*
|
|
146
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
147
|
+
*/
|
|
148
|
+
export const MARK_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
149
|
+
/**
|
|
150
|
+
* The keys of a language's `data.sounds.syllables.harmony`.
|
|
151
|
+
*
|
|
152
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
153
|
+
*/
|
|
154
|
+
export const HARMONY_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
155
|
+
/**
|
|
156
|
+
* The keys of a language's `data.sounds.syllables`: what a syllable may open
|
|
157
|
+
* and close on, and what a word may.
|
|
158
|
+
*
|
|
159
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
160
|
+
*/
|
|
161
|
+
export const SYLLABLE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
162
|
+
/**
|
|
163
|
+
* The keys of one `data.sounds.skeleton` entry: the vowel set between a
|
|
164
|
+
* root's second and third consonants.
|
|
165
|
+
*
|
|
166
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
167
|
+
*/
|
|
168
|
+
export const SKELETON_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
169
|
+
/**
|
|
170
|
+
* The keys of one `data.sounds.frames` entry: a pattern a root is set in.
|
|
171
|
+
*
|
|
172
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
173
|
+
*/
|
|
174
|
+
export const FRAME_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
175
|
+
/**
|
|
176
|
+
* The keys of a language's `data.sounds`.
|
|
177
|
+
*
|
|
178
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
179
|
+
*/
|
|
180
|
+
export const SOUND_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
181
|
+
/**
|
|
182
|
+
* The keys of one `data.soundChanges` entry.
|
|
183
|
+
*
|
|
184
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
185
|
+
*/
|
|
186
|
+
export const SOUND_CHANGE_STEP_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
187
|
+
/**
|
|
188
|
+
* The keys of one `data.soundChanges` set: an ordered run of steps, named, and
|
|
189
|
+
* where they lead from and to.
|
|
190
|
+
*
|
|
191
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
192
|
+
*/
|
|
193
|
+
export const SOUND_CHANGE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
194
|
+
/**
|
|
195
|
+
* The keys of one `data.elements` entry.
|
|
196
|
+
*
|
|
197
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
198
|
+
*/
|
|
199
|
+
export const ELEMENT_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
200
|
+
/**
|
|
201
|
+
* The keys of one `data.roots` entry.
|
|
202
|
+
*
|
|
203
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
204
|
+
*/
|
|
205
|
+
export const ROOT_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
206
|
+
/**
|
|
207
|
+
* The keys of one `data.cognates` entry.
|
|
208
|
+
*
|
|
209
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
210
|
+
*/
|
|
211
|
+
export const COGNATE_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
212
|
+
/**
|
|
213
|
+
* The keys of one `data.callingNames.closings` entry: an ending, or the first
|
|
214
|
+
* syllable doubled, that a calling name closes on.
|
|
215
|
+
*
|
|
216
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
217
|
+
*/
|
|
218
|
+
export const CALLING_CLOSING_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
219
|
+
/**
|
|
220
|
+
* The keys of a language's `data.callingNames`: the short name a long given
|
|
221
|
+
* name is called by.
|
|
222
|
+
*
|
|
223
|
+
* @type {readonly import("./data-keys.mjs").InnerKeySpec[]}
|
|
224
|
+
*/
|
|
225
|
+
export const CALLING_NAME_FIELDS: readonly import("./data-keys.mjs").InnerKeySpec[];
|
|
226
|
+
/**
|
|
227
|
+
* The `data` fields this module declares, in the order the vocabulary lists
|
|
228
|
+
* them. {@link module:engine/language-data.checkLanguageData} checks what the
|
|
229
|
+
* values mean.
|
|
230
|
+
*
|
|
231
|
+
* @type {readonly object[]}
|
|
232
|
+
*/
|
|
233
|
+
export const LANGUAGE_DATA_FIELDS: readonly object[];
|
|
234
|
+
/** The keys of {@link TONGUE_FIELDS}, in declared order. */
|
|
235
|
+
export const TONGUE_KEYS: readonly string[];
|
|
236
|
+
/** The keys of {@link REGISTER_FIELDS}, in declared order. */
|
|
237
|
+
export const REGISTER_KEYS: readonly string[];
|
|
238
|
+
/** The keys of {@link RETIRED_FIELDS}, in declared order. */
|
|
239
|
+
export const RETIRED_KEYS: readonly string[];
|
|
240
|
+
/** The keys of {@link LETTER_FIELDS}, in declared order. */
|
|
241
|
+
export const LETTER_KEYS: readonly string[];
|
|
242
|
+
/** The keys of {@link EDGE_FIELDS}, in declared order. */
|
|
243
|
+
export const EDGE_KEYS: readonly string[];
|
|
244
|
+
/** The keys of {@link READ_PAST_FIELDS}, in declared order. */
|
|
245
|
+
export const READ_PAST_KEYS: readonly string[];
|
|
246
|
+
/** The keys of {@link SOUND_CHANGE_STEP_FIELDS}, in declared order. */
|
|
247
|
+
export const SOUND_CHANGE_STEP_KEYS: readonly string[];
|
|
248
|
+
/** The keys of {@link FINAL_FIELDS}, in declared order. */
|
|
249
|
+
export const FINAL_KEYS: readonly string[];
|
|
250
|
+
/** The keys of {@link JOINING_FIELDS}, in declared order. */
|
|
251
|
+
export const JOINING_KEYS: readonly string[];
|
|
252
|
+
/** The keys of {@link JOIN_FIELDS}, in declared order. */
|
|
253
|
+
export const JOIN_KEYS: readonly string[];
|
|
254
|
+
/** The keys of {@link MARK_FIELDS}, in declared order. */
|
|
255
|
+
export const MARK_KEYS: readonly string[];
|
|
256
|
+
/** The keys of {@link SKELETON_FIELDS}, in declared order. */
|
|
257
|
+
export const SKELETON_KEYS: readonly string[];
|
|
258
|
+
/** The keys of {@link CALLING_CLOSING_FIELDS}, in declared order. */
|
|
259
|
+
export const CALLING_CLOSING_KEYS: readonly string[];
|
|
260
|
+
/** The keys of {@link ELEMENT_FIELDS}, in declared order. */
|
|
261
|
+
export const ELEMENT_KEYS: readonly string[];
|
|
262
|
+
/** The keys of {@link ROOT_FIELDS}, in declared order. */
|
|
263
|
+
export const ROOT_KEYS: readonly string[];
|
|
264
|
+
/** The keys of {@link SCOPE_FIELDS}, in declared order. */
|
|
265
|
+
export const SCOPE_KINDS: readonly string[];
|