@heroiclands/package-build 23.6.0 → 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 +42 -0
- package/docs/authoring/links-and-markup.md +266 -20
- package/docs/content-format.md +1 -1
- package/docs/reference/format-details.md +526 -70
- package/docs/reference/note-types.md +152 -38
- package/engine/content-format.yaml +10 -0
- package/engine/content-index.mjs +21 -14
- package/engine/dictionary-layout.mjs +9 -3
- package/engine/dictionary-rows.mjs +15 -25
- 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 +57 -9
- package/engine/note-addresses.mjs +38 -4
- package/engine/note-vocabulary.mjs +9 -2
- package/engine/pack-config.mjs +6 -1
- package/engine/sql-tables.mjs +71 -7
- package/engine/word-citations.mjs +206 -0
- package/engine/word-classes.mjs +1 -1
- package/engine/word-rows.mjs +193 -34
- package/engine/word-terms.mjs +83 -11
- package/package.json +1 -1
- package/types/engine/dictionary-layout.d.mts +7 -0
- 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 -1
- package/types/engine/word-citations.d.mts +43 -0
- package/types/engine/word-rows.d.mts +78 -7
- package/types/engine/word-terms.d.mts +20 -0
|
@@ -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[];
|
|
@@ -63,6 +63,14 @@ export const STRUCTURED_ADDRESSES: readonly ({
|
|
|
63
63
|
type: string;
|
|
64
64
|
accepts: string[];
|
|
65
65
|
lenient: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
lenient: boolean;
|
|
68
|
+
system?: string | string[] | undefined;
|
|
69
|
+
accepts?: string | string[] | undefined;
|
|
70
|
+
type?: string | string[] | undefined;
|
|
71
|
+
noteType: string;
|
|
72
|
+
path: (string | string[] | undefined)[];
|
|
73
|
+
shape: string;
|
|
66
74
|
} | {
|
|
67
75
|
path: string[];
|
|
68
76
|
shape: string;
|
|
@@ -70,7 +78,6 @@ export const STRUCTURED_ADDRESSES: readonly ({
|
|
|
70
78
|
accepts: string[];
|
|
71
79
|
system: string;
|
|
72
80
|
noteType?: undefined;
|
|
73
|
-
lenient?: undefined;
|
|
74
81
|
} | {
|
|
75
82
|
noteType: string;
|
|
76
83
|
path: string[];
|
|
@@ -78,14 +85,5 @@ export const STRUCTURED_ADDRESSES: readonly ({
|
|
|
78
85
|
type: string;
|
|
79
86
|
accepts: string[];
|
|
80
87
|
system?: undefined;
|
|
81
|
-
lenient?: undefined;
|
|
82
|
-
} | {
|
|
83
|
-
noteType: string;
|
|
84
|
-
path: string[];
|
|
85
|
-
shape: string;
|
|
86
|
-
lenient: boolean;
|
|
87
|
-
type?: undefined;
|
|
88
|
-
accepts?: undefined;
|
|
89
|
-
system?: undefined;
|
|
90
88
|
})[];
|
|
91
89
|
export { AddressEntries, encodeAddresses, cloneAddressState, publishAddresses, readPublishedAddresses, flattenPublishedAddresses } from "./address-values.mjs";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @param {string} markdown - The note body, frontmatter already stripped.
|
|
9
9
|
* @returns {Array<{line: number, close: number, indent: string, query: string,
|
|
10
|
-
* allowEmpty: boolean, sectionLevel: number, layout: string, block: string}>} One entry per
|
|
10
|
+
* allowEmpty: boolean, sectionLevel: number, showKey: boolean|"only", layout: string, block: string}>} One entry per
|
|
11
11
|
* fence, in document order.
|
|
12
12
|
*/
|
|
13
13
|
export function findSqlBlocks(markdown: string): Array<{
|
|
@@ -17,6 +17,7 @@ export function findSqlBlocks(markdown: string): Array<{
|
|
|
17
17
|
query: string;
|
|
18
18
|
allowEmpty: boolean;
|
|
19
19
|
sectionLevel: number;
|
|
20
|
+
showKey: boolean | "only";
|
|
20
21
|
layout: string;
|
|
21
22
|
block: string;
|
|
22
23
|
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A form as uses are matched against it: diacritics taken off, case folded.
|
|
3
|
+
*
|
|
4
|
+
* @param {unknown} text - A form or a use.
|
|
5
|
+
* @returns {string} The folded form.
|
|
6
|
+
*/
|
|
7
|
+
export function foldForm(text: unknown): string;
|
|
8
|
+
/**
|
|
9
|
+
* The marked uses in a note's body: the text of every italic span that holds
|
|
10
|
+
* text alone, in document order.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} body - The note's Markdown body.
|
|
13
|
+
* @returns {string[]} Each span's text.
|
|
14
|
+
*/
|
|
15
|
+
export function markedUses(body: string): string[];
|
|
16
|
+
/**
|
|
17
|
+
* Each language note's cited words: for every word some note's marked use
|
|
18
|
+
* spells, the Addresses of the notes citing it.
|
|
19
|
+
*
|
|
20
|
+
* @param {Iterable<Record<string, any>>} records - Index records.
|
|
21
|
+
* @param {Iterable<{record: Record<string, any>, body: string}>} notes - The
|
|
22
|
+
* notes whose bodies are read, each with its record.
|
|
23
|
+
* @returns {Map<string, Map<string, string[]>>} By language Address, by the
|
|
24
|
+
* word's form, the citing notes in code-point order.
|
|
25
|
+
*/
|
|
26
|
+
export function wordCitations(records: Iterable<Record<string, any>>, notes: Iterable<{
|
|
27
|
+
record: Record<string, any>;
|
|
28
|
+
body: string;
|
|
29
|
+
}>): Map<string, Map<string, string[]>>;
|
|
30
|
+
/**
|
|
31
|
+
* Set each language record's `citations` from {@link wordCitations}: one entry
|
|
32
|
+
* per cited word, in the order the words stand, `{ form, notes }`. A language
|
|
33
|
+
* with no cited word carries no `citations`.
|
|
34
|
+
*
|
|
35
|
+
* @param {Record<string, any>[]} records - Index records, written in place.
|
|
36
|
+
* @param {Iterable<{record: Record<string, any>, body: string}>} notes - The
|
|
37
|
+
* notes whose bodies are read.
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
export function attachCitations(records: Record<string, any>[], notes: Iterable<{
|
|
41
|
+
record: Record<string, any>;
|
|
42
|
+
body: string;
|
|
43
|
+
}>): void;
|