glost 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +253 -114
  2. package/dist/index.d.ts +29 -8
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +38 -24
  5. package/dist/index.js.map +1 -1
  6. package/dist/presets.d.ts +7 -0
  7. package/dist/presets.d.ts.map +1 -0
  8. package/dist/presets.js +7 -0
  9. package/dist/presets.js.map +1 -0
  10. package/dist/processor.d.ts +8 -0
  11. package/dist/processor.d.ts.map +1 -0
  12. package/dist/processor.js +7 -0
  13. package/dist/processor.js.map +1 -0
  14. package/dist/registry.d.ts +8 -0
  15. package/dist/registry.d.ts.map +1 -0
  16. package/dist/registry.js +7 -0
  17. package/dist/registry.js.map +1 -0
  18. package/package.json +27 -40
  19. package/src/index.ts +126 -69
  20. package/src/presets.ts +18 -0
  21. package/src/processor.ts +24 -0
  22. package/src/registry.ts +23 -0
  23. package/tsconfig.json +6 -3
  24. package/CHANGELOG.md +0 -296
  25. package/dist/cli/migrate.d.ts +0 -8
  26. package/dist/cli/migrate.d.ts.map +0 -1
  27. package/dist/cli/migrate.js +0 -229
  28. package/dist/cli/migrate.js.map +0 -1
  29. package/dist/errors.d.ts +0 -168
  30. package/dist/errors.d.ts.map +0 -1
  31. package/dist/errors.js +0 -300
  32. package/dist/errors.js.map +0 -1
  33. package/dist/example.d.ts +0 -10
  34. package/dist/example.d.ts.map +0 -1
  35. package/dist/example.js +0 -138
  36. package/dist/example.js.map +0 -1
  37. package/dist/guards.d.ts +0 -103
  38. package/dist/guards.d.ts.map +0 -1
  39. package/dist/guards.js +0 -264
  40. package/dist/guards.js.map +0 -1
  41. package/dist/nodes.d.ts +0 -163
  42. package/dist/nodes.d.ts.map +0 -1
  43. package/dist/nodes.js +0 -185
  44. package/dist/nodes.js.map +0 -1
  45. package/dist/types.d.ts +0 -395
  46. package/dist/types.d.ts.map +0 -1
  47. package/dist/types.js +0 -6
  48. package/dist/types.js.map +0 -1
  49. package/dist/utils.d.ts +0 -203
  50. package/dist/utils.d.ts.map +0 -1
  51. package/dist/utils.js +0 -497
  52. package/dist/utils.js.map +0 -1
  53. package/dist/validators.d.ts +0 -1876
  54. package/dist/validators.d.ts.map +0 -1
  55. package/dist/validators.js +0 -302
  56. package/dist/validators.js.map +0 -1
  57. package/src/__tests__/README.md +0 -20
  58. package/src/__tests__/example.test.ts +0 -43
  59. package/src/__tests__/example.ts +0 -186
  60. package/src/__tests__/mock-data.ts +0 -624
  61. package/src/cli/migrate.ts +0 -294
  62. package/src/errors.ts +0 -394
  63. package/src/guards.ts +0 -341
  64. package/src/nodes.ts +0 -326
  65. package/src/types.ts +0 -581
  66. package/src/utils.ts +0 -652
  67. package/src/validators.ts +0 -336
@@ -1,1876 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Linguistic level schema
4
- */
5
- export declare const LinguisticLevelSchema: z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>;
6
- /**
7
- * Pronunciation context schema
8
- */
9
- export declare const PronunciationContextSchema: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
10
- /**
11
- * Transcription system schema
12
- */
13
- export declare const TranscriptionSystemSchema: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
14
- /**
15
- * Language code schema
16
- */
17
- export declare const LanguageCodeSchema: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
18
- /**
19
- * Script system schema
20
- */
21
- export declare const ScriptSystemSchema: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
22
- /**
23
- * Pronunciation variant schema
24
- */
25
- export declare const PronunciationVariantSchema: z.ZodObject<{
26
- text: z.ZodString;
27
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
28
- notes: z.ZodOptional<z.ZodString>;
29
- }, "strip", z.ZodTypeAny, {
30
- text: string;
31
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
32
- notes?: string | undefined;
33
- }, {
34
- text: string;
35
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
36
- notes?: string | undefined;
37
- }>;
38
- /**
39
- * Transcription info schema
40
- */
41
- export declare const TranscriptionInfoSchema: z.ZodObject<{
42
- text: z.ZodString;
43
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
44
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
- text: z.ZodString;
46
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
47
- notes: z.ZodOptional<z.ZodString>;
48
- }, "strip", z.ZodTypeAny, {
49
- text: string;
50
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
51
- notes?: string | undefined;
52
- }, {
53
- text: string;
54
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
55
- notes?: string | undefined;
56
- }>, "many">>;
57
- tone: z.ZodOptional<z.ZodNumber>;
58
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
- phonetic: z.ZodOptional<z.ZodString>;
60
- }, "strip", z.ZodTypeAny, {
61
- text: string;
62
- system: string;
63
- tone?: number | undefined;
64
- variants?: {
65
- text: string;
66
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
67
- notes?: string | undefined;
68
- }[] | undefined;
69
- syllables?: string[] | undefined;
70
- phonetic?: string | undefined;
71
- }, {
72
- text: string;
73
- system: string;
74
- tone?: number | undefined;
75
- variants?: {
76
- text: string;
77
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
78
- notes?: string | undefined;
79
- }[] | undefined;
80
- syllables?: string[] | undefined;
81
- phonetic?: string | undefined;
82
- }>;
83
- /**
84
- * Transliteration data schema
85
- */
86
- export declare const TransliterationDataSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
87
- text: z.ZodString;
88
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
89
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
- text: z.ZodString;
91
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
92
- notes: z.ZodOptional<z.ZodString>;
93
- }, "strip", z.ZodTypeAny, {
94
- text: string;
95
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
96
- notes?: string | undefined;
97
- }, {
98
- text: string;
99
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
100
- notes?: string | undefined;
101
- }>, "many">>;
102
- tone: z.ZodOptional<z.ZodNumber>;
103
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
104
- phonetic: z.ZodOptional<z.ZodString>;
105
- }, "strip", z.ZodTypeAny, {
106
- text: string;
107
- system: string;
108
- tone?: number | undefined;
109
- variants?: {
110
- text: string;
111
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
112
- notes?: string | undefined;
113
- }[] | undefined;
114
- syllables?: string[] | undefined;
115
- phonetic?: string | undefined;
116
- }, {
117
- text: string;
118
- system: string;
119
- tone?: number | undefined;
120
- variants?: {
121
- text: string;
122
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
123
- notes?: string | undefined;
124
- }[] | undefined;
125
- syllables?: string[] | undefined;
126
- phonetic?: string | undefined;
127
- }>>;
128
- /**
129
- * Linguistic metadata schema
130
- */
131
- export declare const LinguisticMetadataSchema: z.ZodObject<{
132
- /** @deprecated Use extras.translations instead */
133
- meaning: z.ZodOptional<z.ZodString>;
134
- partOfSpeech: z.ZodString;
135
- usage: z.ZodOptional<z.ZodString>;
136
- etymology: z.ZodOptional<z.ZodString>;
137
- examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
- frequency: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
139
- formality: z.ZodOptional<z.ZodEnum<["formal", "neutral", "informal"]>>;
140
- register: z.ZodOptional<z.ZodString>;
141
- }, "strip", z.ZodTypeAny, {
142
- partOfSpeech: string;
143
- frequency?: "high" | "medium" | "low" | undefined;
144
- examples?: string[] | undefined;
145
- meaning?: string | undefined;
146
- usage?: string | undefined;
147
- etymology?: string | undefined;
148
- formality?: "formal" | "informal" | "neutral" | undefined;
149
- register?: string | undefined;
150
- }, {
151
- partOfSpeech: string;
152
- frequency?: "high" | "medium" | "low" | undefined;
153
- examples?: string[] | undefined;
154
- meaning?: string | undefined;
155
- usage?: string | undefined;
156
- etymology?: string | undefined;
157
- formality?: "formal" | "informal" | "neutral" | undefined;
158
- register?: string | undefined;
159
- }>;
160
- /**
161
- * Base GLOST node schema
162
- */
163
- export declare const GLOSTNodeBaseSchema: z.ZodObject<{
164
- type: z.ZodString;
165
- lang: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>>;
166
- script: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>>;
167
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
168
- position: z.ZodOptional<z.ZodAny>;
169
- }, "strip", z.ZodTypeAny, {
170
- type: string;
171
- position?: any;
172
- lang?: string | undefined;
173
- script?: string | undefined;
174
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
175
- }, {
176
- type: string;
177
- position?: any;
178
- lang?: string | undefined;
179
- script?: string | undefined;
180
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
181
- }>;
182
- /**
183
- * GLOST word node schema
184
- */
185
- export declare const GLOSTWordNodeSchema: z.ZodObject<{
186
- lang: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>>;
187
- script: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>>;
188
- position: z.ZodOptional<z.ZodAny>;
189
- } & {
190
- type: z.ZodLiteral<"GLOSTWordNode">;
191
- value: z.ZodString;
192
- transcription: z.ZodRecord<z.ZodString, z.ZodObject<{
193
- text: z.ZodString;
194
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
195
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
196
- text: z.ZodString;
197
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
198
- notes: z.ZodOptional<z.ZodString>;
199
- }, "strip", z.ZodTypeAny, {
200
- text: string;
201
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
202
- notes?: string | undefined;
203
- }, {
204
- text: string;
205
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
206
- notes?: string | undefined;
207
- }>, "many">>;
208
- tone: z.ZodOptional<z.ZodNumber>;
209
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
210
- phonetic: z.ZodOptional<z.ZodString>;
211
- }, "strip", z.ZodTypeAny, {
212
- text: string;
213
- system: string;
214
- tone?: number | undefined;
215
- variants?: {
216
- text: string;
217
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
218
- notes?: string | undefined;
219
- }[] | undefined;
220
- syllables?: string[] | undefined;
221
- phonetic?: string | undefined;
222
- }, {
223
- text: string;
224
- system: string;
225
- tone?: number | undefined;
226
- variants?: {
227
- text: string;
228
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
229
- notes?: string | undefined;
230
- }[] | undefined;
231
- syllables?: string[] | undefined;
232
- phonetic?: string | undefined;
233
- }>>;
234
- metadata: z.ZodObject<{
235
- /** @deprecated Use extras.translations instead */
236
- meaning: z.ZodOptional<z.ZodString>;
237
- partOfSpeech: z.ZodString;
238
- usage: z.ZodOptional<z.ZodString>;
239
- etymology: z.ZodOptional<z.ZodString>;
240
- examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
241
- frequency: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
242
- formality: z.ZodOptional<z.ZodEnum<["formal", "neutral", "informal"]>>;
243
- register: z.ZodOptional<z.ZodString>;
244
- }, "strip", z.ZodTypeAny, {
245
- partOfSpeech: string;
246
- frequency?: "high" | "medium" | "low" | undefined;
247
- examples?: string[] | undefined;
248
- meaning?: string | undefined;
249
- usage?: string | undefined;
250
- etymology?: string | undefined;
251
- formality?: "formal" | "informal" | "neutral" | undefined;
252
- register?: string | undefined;
253
- }, {
254
- partOfSpeech: string;
255
- frequency?: "high" | "medium" | "low" | undefined;
256
- examples?: string[] | undefined;
257
- meaning?: string | undefined;
258
- usage?: string | undefined;
259
- etymology?: string | undefined;
260
- formality?: "formal" | "informal" | "neutral" | undefined;
261
- register?: string | undefined;
262
- }>;
263
- level: z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>;
264
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
265
- }, "strip", z.ZodTypeAny, {
266
- metadata: {
267
- partOfSpeech: string;
268
- frequency?: "high" | "medium" | "low" | undefined;
269
- examples?: string[] | undefined;
270
- meaning?: string | undefined;
271
- usage?: string | undefined;
272
- etymology?: string | undefined;
273
- formality?: "formal" | "informal" | "neutral" | undefined;
274
- register?: string | undefined;
275
- };
276
- children: any[];
277
- type: "GLOSTWordNode";
278
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
279
- transcription: Record<string, {
280
- text: string;
281
- system: string;
282
- tone?: number | undefined;
283
- variants?: {
284
- text: string;
285
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
286
- notes?: string | undefined;
287
- }[] | undefined;
288
- syllables?: string[] | undefined;
289
- phonetic?: string | undefined;
290
- }>;
291
- value: string;
292
- position?: any;
293
- lang?: string | undefined;
294
- script?: string | undefined;
295
- }, {
296
- metadata: {
297
- partOfSpeech: string;
298
- frequency?: "high" | "medium" | "low" | undefined;
299
- examples?: string[] | undefined;
300
- meaning?: string | undefined;
301
- usage?: string | undefined;
302
- etymology?: string | undefined;
303
- formality?: "formal" | "informal" | "neutral" | undefined;
304
- register?: string | undefined;
305
- };
306
- type: "GLOSTWordNode";
307
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
308
- transcription: Record<string, {
309
- text: string;
310
- system: string;
311
- tone?: number | undefined;
312
- variants?: {
313
- text: string;
314
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
315
- notes?: string | undefined;
316
- }[] | undefined;
317
- syllables?: string[] | undefined;
318
- phonetic?: string | undefined;
319
- }>;
320
- value: string;
321
- children?: any[] | undefined;
322
- position?: any;
323
- lang?: string | undefined;
324
- script?: string | undefined;
325
- }>;
326
- /**
327
- * GLOST sentence node schema
328
- */
329
- export declare const GLOSTSentenceNodeSchema: z.ZodObject<{
330
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
331
- position: z.ZodOptional<z.ZodAny>;
332
- } & {
333
- type: z.ZodLiteral<"GLOSTSentenceNode">;
334
- originalText: z.ZodString;
335
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
336
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
337
- transcription: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
338
- text: z.ZodString;
339
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
340
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
341
- text: z.ZodString;
342
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
343
- notes: z.ZodOptional<z.ZodString>;
344
- }, "strip", z.ZodTypeAny, {
345
- text: string;
346
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
347
- notes?: string | undefined;
348
- }, {
349
- text: string;
350
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
351
- notes?: string | undefined;
352
- }>, "many">>;
353
- tone: z.ZodOptional<z.ZodNumber>;
354
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
355
- phonetic: z.ZodOptional<z.ZodString>;
356
- }, "strip", z.ZodTypeAny, {
357
- text: string;
358
- system: string;
359
- tone?: number | undefined;
360
- variants?: {
361
- text: string;
362
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
363
- notes?: string | undefined;
364
- }[] | undefined;
365
- syllables?: string[] | undefined;
366
- phonetic?: string | undefined;
367
- }, {
368
- text: string;
369
- system: string;
370
- tone?: number | undefined;
371
- variants?: {
372
- text: string;
373
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
374
- notes?: string | undefined;
375
- }[] | undefined;
376
- syllables?: string[] | undefined;
377
- phonetic?: string | undefined;
378
- }>>>;
379
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
380
- }, "strip", z.ZodTypeAny, {
381
- children: any[];
382
- type: "GLOSTSentenceNode";
383
- lang: string;
384
- script: string;
385
- originalText: string;
386
- position?: any;
387
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
388
- transcription?: Record<string, {
389
- text: string;
390
- system: string;
391
- tone?: number | undefined;
392
- variants?: {
393
- text: string;
394
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
395
- notes?: string | undefined;
396
- }[] | undefined;
397
- syllables?: string[] | undefined;
398
- phonetic?: string | undefined;
399
- }> | undefined;
400
- }, {
401
- type: "GLOSTSentenceNode";
402
- lang: string;
403
- script: string;
404
- originalText: string;
405
- children?: any[] | undefined;
406
- position?: any;
407
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
408
- transcription?: Record<string, {
409
- text: string;
410
- system: string;
411
- tone?: number | undefined;
412
- variants?: {
413
- text: string;
414
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
415
- notes?: string | undefined;
416
- }[] | undefined;
417
- syllables?: string[] | undefined;
418
- phonetic?: string | undefined;
419
- }> | undefined;
420
- }>;
421
- /**
422
- * GLOST paragraph node schema
423
- */
424
- export declare const GLOSTParagraphNodeSchema: z.ZodObject<{
425
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
426
- position: z.ZodOptional<z.ZodAny>;
427
- } & {
428
- type: z.ZodLiteral<"GLOSTParagraphNode">;
429
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
430
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
431
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
432
- }, "strip", z.ZodTypeAny, {
433
- children: any[];
434
- type: "GLOSTParagraphNode";
435
- lang: string;
436
- script: string;
437
- position?: any;
438
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
439
- }, {
440
- type: "GLOSTParagraphNode";
441
- lang: string;
442
- script: string;
443
- children?: any[] | undefined;
444
- position?: any;
445
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
446
- }>;
447
- /**
448
- * GLOST root node schema
449
- */
450
- export declare const GLOSTRootNodeSchema: z.ZodObject<{
451
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
452
- position: z.ZodOptional<z.ZodAny>;
453
- } & {
454
- type: z.ZodLiteral<"GLOSTRootNode">;
455
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
456
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
457
- metadata: z.ZodOptional<z.ZodObject<{
458
- title: z.ZodOptional<z.ZodString>;
459
- author: z.ZodOptional<z.ZodString>;
460
- date: z.ZodOptional<z.ZodString>;
461
- description: z.ZodOptional<z.ZodString>;
462
- }, "strip", z.ZodTypeAny, {
463
- date?: string | undefined;
464
- title?: string | undefined;
465
- author?: string | undefined;
466
- description?: string | undefined;
467
- }, {
468
- date?: string | undefined;
469
- title?: string | undefined;
470
- author?: string | undefined;
471
- description?: string | undefined;
472
- }>>;
473
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
474
- }, "strip", z.ZodTypeAny, {
475
- children: any[];
476
- type: "GLOSTRootNode";
477
- lang: string;
478
- script: string;
479
- metadata?: {
480
- date?: string | undefined;
481
- title?: string | undefined;
482
- author?: string | undefined;
483
- description?: string | undefined;
484
- } | undefined;
485
- position?: any;
486
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
487
- }, {
488
- type: "GLOSTRootNode";
489
- lang: string;
490
- script: string;
491
- metadata?: {
492
- date?: string | undefined;
493
- title?: string | undefined;
494
- author?: string | undefined;
495
- description?: string | undefined;
496
- } | undefined;
497
- children?: any[] | undefined;
498
- position?: any;
499
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
500
- }>;
501
- /**
502
- * Union schema for all GLOST node types
503
- */
504
- export declare const GLOSTNodeSchema: z.ZodUnion<[z.ZodObject<{
505
- lang: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>>;
506
- script: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>>;
507
- position: z.ZodOptional<z.ZodAny>;
508
- } & {
509
- type: z.ZodLiteral<"GLOSTWordNode">;
510
- value: z.ZodString;
511
- transcription: z.ZodRecord<z.ZodString, z.ZodObject<{
512
- text: z.ZodString;
513
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
514
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
515
- text: z.ZodString;
516
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
517
- notes: z.ZodOptional<z.ZodString>;
518
- }, "strip", z.ZodTypeAny, {
519
- text: string;
520
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
521
- notes?: string | undefined;
522
- }, {
523
- text: string;
524
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
525
- notes?: string | undefined;
526
- }>, "many">>;
527
- tone: z.ZodOptional<z.ZodNumber>;
528
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
529
- phonetic: z.ZodOptional<z.ZodString>;
530
- }, "strip", z.ZodTypeAny, {
531
- text: string;
532
- system: string;
533
- tone?: number | undefined;
534
- variants?: {
535
- text: string;
536
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
537
- notes?: string | undefined;
538
- }[] | undefined;
539
- syllables?: string[] | undefined;
540
- phonetic?: string | undefined;
541
- }, {
542
- text: string;
543
- system: string;
544
- tone?: number | undefined;
545
- variants?: {
546
- text: string;
547
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
548
- notes?: string | undefined;
549
- }[] | undefined;
550
- syllables?: string[] | undefined;
551
- phonetic?: string | undefined;
552
- }>>;
553
- metadata: z.ZodObject<{
554
- /** @deprecated Use extras.translations instead */
555
- meaning: z.ZodOptional<z.ZodString>;
556
- partOfSpeech: z.ZodString;
557
- usage: z.ZodOptional<z.ZodString>;
558
- etymology: z.ZodOptional<z.ZodString>;
559
- examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
560
- frequency: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
561
- formality: z.ZodOptional<z.ZodEnum<["formal", "neutral", "informal"]>>;
562
- register: z.ZodOptional<z.ZodString>;
563
- }, "strip", z.ZodTypeAny, {
564
- partOfSpeech: string;
565
- frequency?: "high" | "medium" | "low" | undefined;
566
- examples?: string[] | undefined;
567
- meaning?: string | undefined;
568
- usage?: string | undefined;
569
- etymology?: string | undefined;
570
- formality?: "formal" | "informal" | "neutral" | undefined;
571
- register?: string | undefined;
572
- }, {
573
- partOfSpeech: string;
574
- frequency?: "high" | "medium" | "low" | undefined;
575
- examples?: string[] | undefined;
576
- meaning?: string | undefined;
577
- usage?: string | undefined;
578
- etymology?: string | undefined;
579
- formality?: "formal" | "informal" | "neutral" | undefined;
580
- register?: string | undefined;
581
- }>;
582
- level: z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>;
583
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
584
- }, "strip", z.ZodTypeAny, {
585
- metadata: {
586
- partOfSpeech: string;
587
- frequency?: "high" | "medium" | "low" | undefined;
588
- examples?: string[] | undefined;
589
- meaning?: string | undefined;
590
- usage?: string | undefined;
591
- etymology?: string | undefined;
592
- formality?: "formal" | "informal" | "neutral" | undefined;
593
- register?: string | undefined;
594
- };
595
- children: any[];
596
- type: "GLOSTWordNode";
597
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
598
- transcription: Record<string, {
599
- text: string;
600
- system: string;
601
- tone?: number | undefined;
602
- variants?: {
603
- text: string;
604
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
605
- notes?: string | undefined;
606
- }[] | undefined;
607
- syllables?: string[] | undefined;
608
- phonetic?: string | undefined;
609
- }>;
610
- value: string;
611
- position?: any;
612
- lang?: string | undefined;
613
- script?: string | undefined;
614
- }, {
615
- metadata: {
616
- partOfSpeech: string;
617
- frequency?: "high" | "medium" | "low" | undefined;
618
- examples?: string[] | undefined;
619
- meaning?: string | undefined;
620
- usage?: string | undefined;
621
- etymology?: string | undefined;
622
- formality?: "formal" | "informal" | "neutral" | undefined;
623
- register?: string | undefined;
624
- };
625
- type: "GLOSTWordNode";
626
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
627
- transcription: Record<string, {
628
- text: string;
629
- system: string;
630
- tone?: number | undefined;
631
- variants?: {
632
- text: string;
633
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
634
- notes?: string | undefined;
635
- }[] | undefined;
636
- syllables?: string[] | undefined;
637
- phonetic?: string | undefined;
638
- }>;
639
- value: string;
640
- children?: any[] | undefined;
641
- position?: any;
642
- lang?: string | undefined;
643
- script?: string | undefined;
644
- }>, z.ZodObject<{
645
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
646
- position: z.ZodOptional<z.ZodAny>;
647
- } & {
648
- type: z.ZodLiteral<"GLOSTSentenceNode">;
649
- originalText: z.ZodString;
650
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
651
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
652
- transcription: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
653
- text: z.ZodString;
654
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
655
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
656
- text: z.ZodString;
657
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
658
- notes: z.ZodOptional<z.ZodString>;
659
- }, "strip", z.ZodTypeAny, {
660
- text: string;
661
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
662
- notes?: string | undefined;
663
- }, {
664
- text: string;
665
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
666
- notes?: string | undefined;
667
- }>, "many">>;
668
- tone: z.ZodOptional<z.ZodNumber>;
669
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
670
- phonetic: z.ZodOptional<z.ZodString>;
671
- }, "strip", z.ZodTypeAny, {
672
- text: string;
673
- system: string;
674
- tone?: number | undefined;
675
- variants?: {
676
- text: string;
677
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
678
- notes?: string | undefined;
679
- }[] | undefined;
680
- syllables?: string[] | undefined;
681
- phonetic?: string | undefined;
682
- }, {
683
- text: string;
684
- system: string;
685
- tone?: number | undefined;
686
- variants?: {
687
- text: string;
688
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
689
- notes?: string | undefined;
690
- }[] | undefined;
691
- syllables?: string[] | undefined;
692
- phonetic?: string | undefined;
693
- }>>>;
694
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
695
- }, "strip", z.ZodTypeAny, {
696
- children: any[];
697
- type: "GLOSTSentenceNode";
698
- lang: string;
699
- script: string;
700
- originalText: string;
701
- position?: any;
702
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
703
- transcription?: Record<string, {
704
- text: string;
705
- system: string;
706
- tone?: number | undefined;
707
- variants?: {
708
- text: string;
709
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
710
- notes?: string | undefined;
711
- }[] | undefined;
712
- syllables?: string[] | undefined;
713
- phonetic?: string | undefined;
714
- }> | undefined;
715
- }, {
716
- type: "GLOSTSentenceNode";
717
- lang: string;
718
- script: string;
719
- originalText: string;
720
- children?: any[] | undefined;
721
- position?: any;
722
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
723
- transcription?: Record<string, {
724
- text: string;
725
- system: string;
726
- tone?: number | undefined;
727
- variants?: {
728
- text: string;
729
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
730
- notes?: string | undefined;
731
- }[] | undefined;
732
- syllables?: string[] | undefined;
733
- phonetic?: string | undefined;
734
- }> | undefined;
735
- }>, z.ZodObject<{
736
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
737
- position: z.ZodOptional<z.ZodAny>;
738
- } & {
739
- type: z.ZodLiteral<"GLOSTParagraphNode">;
740
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
741
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
742
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
743
- }, "strip", z.ZodTypeAny, {
744
- children: any[];
745
- type: "GLOSTParagraphNode";
746
- lang: string;
747
- script: string;
748
- position?: any;
749
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
750
- }, {
751
- type: "GLOSTParagraphNode";
752
- lang: string;
753
- script: string;
754
- children?: any[] | undefined;
755
- position?: any;
756
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
757
- }>, z.ZodObject<{
758
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
759
- position: z.ZodOptional<z.ZodAny>;
760
- } & {
761
- type: z.ZodLiteral<"GLOSTRootNode">;
762
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
763
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
764
- metadata: z.ZodOptional<z.ZodObject<{
765
- title: z.ZodOptional<z.ZodString>;
766
- author: z.ZodOptional<z.ZodString>;
767
- date: z.ZodOptional<z.ZodString>;
768
- description: z.ZodOptional<z.ZodString>;
769
- }, "strip", z.ZodTypeAny, {
770
- date?: string | undefined;
771
- title?: string | undefined;
772
- author?: string | undefined;
773
- description?: string | undefined;
774
- }, {
775
- date?: string | undefined;
776
- title?: string | undefined;
777
- author?: string | undefined;
778
- description?: string | undefined;
779
- }>>;
780
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
781
- }, "strip", z.ZodTypeAny, {
782
- children: any[];
783
- type: "GLOSTRootNode";
784
- lang: string;
785
- script: string;
786
- metadata?: {
787
- date?: string | undefined;
788
- title?: string | undefined;
789
- author?: string | undefined;
790
- description?: string | undefined;
791
- } | undefined;
792
- position?: any;
793
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
794
- }, {
795
- type: "GLOSTRootNode";
796
- lang: string;
797
- script: string;
798
- metadata?: {
799
- date?: string | undefined;
800
- title?: string | undefined;
801
- author?: string | undefined;
802
- description?: string | undefined;
803
- } | undefined;
804
- children?: any[] | undefined;
805
- position?: any;
806
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
807
- }>]>;
808
- /**
809
- * Validate an GLOST word node
810
- */
811
- export declare function validateGLOSTWordNode(data: unknown): data is z.infer<typeof GLOSTWordNodeSchema>;
812
- /**
813
- * Validate an GLOST sentence node
814
- */
815
- export declare function validateGLOSTSentenceNode(data: unknown): data is z.infer<typeof GLOSTSentenceNodeSchema>;
816
- /**
817
- * Validate an GLOST paragraph node
818
- */
819
- export declare function validateGLOSTParagraphNode(data: unknown): data is z.infer<typeof GLOSTParagraphNodeSchema>;
820
- /**
821
- * Validate an GLOST root node
822
- */
823
- export declare function validateGLOSTRootNode(data: unknown): data is z.infer<typeof GLOSTRootNodeSchema>;
824
- /**
825
- * Validate any GLOST node
826
- */
827
- export declare function validateGLOSTNode(data: unknown): data is z.infer<typeof GLOSTNodeSchema>;
828
- /**
829
- * Parse and validate GLOST data with error details
830
- */
831
- export declare function parseGLOSTNode(data: unknown): z.SafeParseReturnType<{
832
- metadata: {
833
- partOfSpeech: string;
834
- frequency?: "high" | "medium" | "low" | undefined;
835
- examples?: string[] | undefined;
836
- meaning?: string | undefined;
837
- usage?: string | undefined;
838
- etymology?: string | undefined;
839
- formality?: "formal" | "informal" | "neutral" | undefined;
840
- register?: string | undefined;
841
- };
842
- type: "GLOSTWordNode";
843
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
844
- transcription: Record<string, {
845
- text: string;
846
- system: string;
847
- tone?: number | undefined;
848
- variants?: {
849
- text: string;
850
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
851
- notes?: string | undefined;
852
- }[] | undefined;
853
- syllables?: string[] | undefined;
854
- phonetic?: string | undefined;
855
- }>;
856
- value: string;
857
- children?: any[] | undefined;
858
- position?: any;
859
- lang?: string | undefined;
860
- script?: string | undefined;
861
- } | {
862
- type: "GLOSTSentenceNode";
863
- lang: string;
864
- script: string;
865
- originalText: string;
866
- children?: any[] | undefined;
867
- position?: any;
868
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
869
- transcription?: Record<string, {
870
- text: string;
871
- system: string;
872
- tone?: number | undefined;
873
- variants?: {
874
- text: string;
875
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
876
- notes?: string | undefined;
877
- }[] | undefined;
878
- syllables?: string[] | undefined;
879
- phonetic?: string | undefined;
880
- }> | undefined;
881
- } | {
882
- type: "GLOSTParagraphNode";
883
- lang: string;
884
- script: string;
885
- children?: any[] | undefined;
886
- position?: any;
887
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
888
- } | {
889
- type: "GLOSTRootNode";
890
- lang: string;
891
- script: string;
892
- metadata?: {
893
- date?: string | undefined;
894
- title?: string | undefined;
895
- author?: string | undefined;
896
- description?: string | undefined;
897
- } | undefined;
898
- children?: any[] | undefined;
899
- position?: any;
900
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
901
- }, {
902
- metadata: {
903
- partOfSpeech: string;
904
- frequency?: "high" | "medium" | "low" | undefined;
905
- examples?: string[] | undefined;
906
- meaning?: string | undefined;
907
- usage?: string | undefined;
908
- etymology?: string | undefined;
909
- formality?: "formal" | "informal" | "neutral" | undefined;
910
- register?: string | undefined;
911
- };
912
- children: any[];
913
- type: "GLOSTWordNode";
914
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
915
- transcription: Record<string, {
916
- text: string;
917
- system: string;
918
- tone?: number | undefined;
919
- variants?: {
920
- text: string;
921
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
922
- notes?: string | undefined;
923
- }[] | undefined;
924
- syllables?: string[] | undefined;
925
- phonetic?: string | undefined;
926
- }>;
927
- value: string;
928
- position?: any;
929
- lang?: string | undefined;
930
- script?: string | undefined;
931
- } | {
932
- children: any[];
933
- type: "GLOSTSentenceNode";
934
- lang: string;
935
- script: string;
936
- originalText: string;
937
- position?: any;
938
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
939
- transcription?: Record<string, {
940
- text: string;
941
- system: string;
942
- tone?: number | undefined;
943
- variants?: {
944
- text: string;
945
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
946
- notes?: string | undefined;
947
- }[] | undefined;
948
- syllables?: string[] | undefined;
949
- phonetic?: string | undefined;
950
- }> | undefined;
951
- } | {
952
- children: any[];
953
- type: "GLOSTParagraphNode";
954
- lang: string;
955
- script: string;
956
- position?: any;
957
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
958
- } | {
959
- children: any[];
960
- type: "GLOSTRootNode";
961
- lang: string;
962
- script: string;
963
- metadata?: {
964
- date?: string | undefined;
965
- title?: string | undefined;
966
- author?: string | undefined;
967
- description?: string | undefined;
968
- } | undefined;
969
- position?: any;
970
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
971
- }>;
972
- /**
973
- * Parse and validate GLOST word node with error details
974
- */
975
- export declare function parseGLOSTWordNode(data: unknown): z.SafeParseReturnType<{
976
- metadata: {
977
- partOfSpeech: string;
978
- frequency?: "high" | "medium" | "low" | undefined;
979
- examples?: string[] | undefined;
980
- meaning?: string | undefined;
981
- usage?: string | undefined;
982
- etymology?: string | undefined;
983
- formality?: "formal" | "informal" | "neutral" | undefined;
984
- register?: string | undefined;
985
- };
986
- type: "GLOSTWordNode";
987
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
988
- transcription: Record<string, {
989
- text: string;
990
- system: string;
991
- tone?: number | undefined;
992
- variants?: {
993
- text: string;
994
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
995
- notes?: string | undefined;
996
- }[] | undefined;
997
- syllables?: string[] | undefined;
998
- phonetic?: string | undefined;
999
- }>;
1000
- value: string;
1001
- children?: any[] | undefined;
1002
- position?: any;
1003
- lang?: string | undefined;
1004
- script?: string | undefined;
1005
- }, {
1006
- metadata: {
1007
- partOfSpeech: string;
1008
- frequency?: "high" | "medium" | "low" | undefined;
1009
- examples?: string[] | undefined;
1010
- meaning?: string | undefined;
1011
- usage?: string | undefined;
1012
- etymology?: string | undefined;
1013
- formality?: "formal" | "informal" | "neutral" | undefined;
1014
- register?: string | undefined;
1015
- };
1016
- children: any[];
1017
- type: "GLOSTWordNode";
1018
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
1019
- transcription: Record<string, {
1020
- text: string;
1021
- system: string;
1022
- tone?: number | undefined;
1023
- variants?: {
1024
- text: string;
1025
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1026
- notes?: string | undefined;
1027
- }[] | undefined;
1028
- syllables?: string[] | undefined;
1029
- phonetic?: string | undefined;
1030
- }>;
1031
- value: string;
1032
- position?: any;
1033
- lang?: string | undefined;
1034
- script?: string | undefined;
1035
- }>;
1036
- /**
1037
- * Parse and validate GLOST sentence node with error details
1038
- */
1039
- export declare function parseGLOSTSentenceNode(data: unknown): z.SafeParseReturnType<{
1040
- type: "GLOSTSentenceNode";
1041
- lang: string;
1042
- script: string;
1043
- originalText: string;
1044
- children?: any[] | undefined;
1045
- position?: any;
1046
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1047
- transcription?: Record<string, {
1048
- text: string;
1049
- system: string;
1050
- tone?: number | undefined;
1051
- variants?: {
1052
- text: string;
1053
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1054
- notes?: string | undefined;
1055
- }[] | undefined;
1056
- syllables?: string[] | undefined;
1057
- phonetic?: string | undefined;
1058
- }> | undefined;
1059
- }, {
1060
- children: any[];
1061
- type: "GLOSTSentenceNode";
1062
- lang: string;
1063
- script: string;
1064
- originalText: string;
1065
- position?: any;
1066
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1067
- transcription?: Record<string, {
1068
- text: string;
1069
- system: string;
1070
- tone?: number | undefined;
1071
- variants?: {
1072
- text: string;
1073
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1074
- notes?: string | undefined;
1075
- }[] | undefined;
1076
- syllables?: string[] | undefined;
1077
- phonetic?: string | undefined;
1078
- }> | undefined;
1079
- }>;
1080
- /**
1081
- * Parse and validate GLOST paragraph node with error details
1082
- */
1083
- export declare function parseGLOSTParagraphNode(data: unknown): z.SafeParseReturnType<{
1084
- type: "GLOSTParagraphNode";
1085
- lang: string;
1086
- script: string;
1087
- children?: any[] | undefined;
1088
- position?: any;
1089
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1090
- }, {
1091
- children: any[];
1092
- type: "GLOSTParagraphNode";
1093
- lang: string;
1094
- script: string;
1095
- position?: any;
1096
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1097
- }>;
1098
- /**
1099
- * Parse and validate GLOST root node with error details
1100
- */
1101
- export declare function parseGLOSTRootNode(data: unknown): z.SafeParseReturnType<{
1102
- type: "GLOSTRootNode";
1103
- lang: string;
1104
- script: string;
1105
- metadata?: {
1106
- date?: string | undefined;
1107
- title?: string | undefined;
1108
- author?: string | undefined;
1109
- description?: string | undefined;
1110
- } | undefined;
1111
- children?: any[] | undefined;
1112
- position?: any;
1113
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1114
- }, {
1115
- children: any[];
1116
- type: "GLOSTRootNode";
1117
- lang: string;
1118
- script: string;
1119
- metadata?: {
1120
- date?: string | undefined;
1121
- title?: string | undefined;
1122
- author?: string | undefined;
1123
- description?: string | undefined;
1124
- } | undefined;
1125
- position?: any;
1126
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1127
- }>;
1128
- /**
1129
- * Validate an entire GLOST tree/document
1130
- */
1131
- export declare function validateGLOSTTree(data: unknown): string[];
1132
- export declare const schemas: {
1133
- LinguisticLevel: z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>;
1134
- PronunciationContext: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1135
- TranscriptionSystem: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1136
- LanguageCode: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1137
- ScriptSystem: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1138
- PronunciationVariant: z.ZodObject<{
1139
- text: z.ZodString;
1140
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1141
- notes: z.ZodOptional<z.ZodString>;
1142
- }, "strip", z.ZodTypeAny, {
1143
- text: string;
1144
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1145
- notes?: string | undefined;
1146
- }, {
1147
- text: string;
1148
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1149
- notes?: string | undefined;
1150
- }>;
1151
- TranscriptionInfo: z.ZodObject<{
1152
- text: z.ZodString;
1153
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1154
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1155
- text: z.ZodString;
1156
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1157
- notes: z.ZodOptional<z.ZodString>;
1158
- }, "strip", z.ZodTypeAny, {
1159
- text: string;
1160
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1161
- notes?: string | undefined;
1162
- }, {
1163
- text: string;
1164
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1165
- notes?: string | undefined;
1166
- }>, "many">>;
1167
- tone: z.ZodOptional<z.ZodNumber>;
1168
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1169
- phonetic: z.ZodOptional<z.ZodString>;
1170
- }, "strip", z.ZodTypeAny, {
1171
- text: string;
1172
- system: string;
1173
- tone?: number | undefined;
1174
- variants?: {
1175
- text: string;
1176
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1177
- notes?: string | undefined;
1178
- }[] | undefined;
1179
- syllables?: string[] | undefined;
1180
- phonetic?: string | undefined;
1181
- }, {
1182
- text: string;
1183
- system: string;
1184
- tone?: number | undefined;
1185
- variants?: {
1186
- text: string;
1187
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1188
- notes?: string | undefined;
1189
- }[] | undefined;
1190
- syllables?: string[] | undefined;
1191
- phonetic?: string | undefined;
1192
- }>;
1193
- TransliterationData: z.ZodRecord<z.ZodString, z.ZodObject<{
1194
- text: z.ZodString;
1195
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1196
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1197
- text: z.ZodString;
1198
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1199
- notes: z.ZodOptional<z.ZodString>;
1200
- }, "strip", z.ZodTypeAny, {
1201
- text: string;
1202
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1203
- notes?: string | undefined;
1204
- }, {
1205
- text: string;
1206
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1207
- notes?: string | undefined;
1208
- }>, "many">>;
1209
- tone: z.ZodOptional<z.ZodNumber>;
1210
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1211
- phonetic: z.ZodOptional<z.ZodString>;
1212
- }, "strip", z.ZodTypeAny, {
1213
- text: string;
1214
- system: string;
1215
- tone?: number | undefined;
1216
- variants?: {
1217
- text: string;
1218
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1219
- notes?: string | undefined;
1220
- }[] | undefined;
1221
- syllables?: string[] | undefined;
1222
- phonetic?: string | undefined;
1223
- }, {
1224
- text: string;
1225
- system: string;
1226
- tone?: number | undefined;
1227
- variants?: {
1228
- text: string;
1229
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1230
- notes?: string | undefined;
1231
- }[] | undefined;
1232
- syllables?: string[] | undefined;
1233
- phonetic?: string | undefined;
1234
- }>>;
1235
- LinguisticMetadata: z.ZodObject<{
1236
- /** @deprecated Use extras.translations instead */
1237
- meaning: z.ZodOptional<z.ZodString>;
1238
- partOfSpeech: z.ZodString;
1239
- usage: z.ZodOptional<z.ZodString>;
1240
- etymology: z.ZodOptional<z.ZodString>;
1241
- examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1242
- frequency: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
1243
- formality: z.ZodOptional<z.ZodEnum<["formal", "neutral", "informal"]>>;
1244
- register: z.ZodOptional<z.ZodString>;
1245
- }, "strip", z.ZodTypeAny, {
1246
- partOfSpeech: string;
1247
- frequency?: "high" | "medium" | "low" | undefined;
1248
- examples?: string[] | undefined;
1249
- meaning?: string | undefined;
1250
- usage?: string | undefined;
1251
- etymology?: string | undefined;
1252
- formality?: "formal" | "informal" | "neutral" | undefined;
1253
- register?: string | undefined;
1254
- }, {
1255
- partOfSpeech: string;
1256
- frequency?: "high" | "medium" | "low" | undefined;
1257
- examples?: string[] | undefined;
1258
- meaning?: string | undefined;
1259
- usage?: string | undefined;
1260
- etymology?: string | undefined;
1261
- formality?: "formal" | "informal" | "neutral" | undefined;
1262
- register?: string | undefined;
1263
- }>;
1264
- GLOSTNode: z.ZodUnion<[z.ZodObject<{
1265
- lang: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>>;
1266
- script: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>>;
1267
- position: z.ZodOptional<z.ZodAny>;
1268
- } & {
1269
- type: z.ZodLiteral<"GLOSTWordNode">;
1270
- value: z.ZodString;
1271
- transcription: z.ZodRecord<z.ZodString, z.ZodObject<{
1272
- text: z.ZodString;
1273
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1274
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1275
- text: z.ZodString;
1276
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1277
- notes: z.ZodOptional<z.ZodString>;
1278
- }, "strip", z.ZodTypeAny, {
1279
- text: string;
1280
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1281
- notes?: string | undefined;
1282
- }, {
1283
- text: string;
1284
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1285
- notes?: string | undefined;
1286
- }>, "many">>;
1287
- tone: z.ZodOptional<z.ZodNumber>;
1288
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1289
- phonetic: z.ZodOptional<z.ZodString>;
1290
- }, "strip", z.ZodTypeAny, {
1291
- text: string;
1292
- system: string;
1293
- tone?: number | undefined;
1294
- variants?: {
1295
- text: string;
1296
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1297
- notes?: string | undefined;
1298
- }[] | undefined;
1299
- syllables?: string[] | undefined;
1300
- phonetic?: string | undefined;
1301
- }, {
1302
- text: string;
1303
- system: string;
1304
- tone?: number | undefined;
1305
- variants?: {
1306
- text: string;
1307
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1308
- notes?: string | undefined;
1309
- }[] | undefined;
1310
- syllables?: string[] | undefined;
1311
- phonetic?: string | undefined;
1312
- }>>;
1313
- metadata: z.ZodObject<{
1314
- /** @deprecated Use extras.translations instead */
1315
- meaning: z.ZodOptional<z.ZodString>;
1316
- partOfSpeech: z.ZodString;
1317
- usage: z.ZodOptional<z.ZodString>;
1318
- etymology: z.ZodOptional<z.ZodString>;
1319
- examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1320
- frequency: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
1321
- formality: z.ZodOptional<z.ZodEnum<["formal", "neutral", "informal"]>>;
1322
- register: z.ZodOptional<z.ZodString>;
1323
- }, "strip", z.ZodTypeAny, {
1324
- partOfSpeech: string;
1325
- frequency?: "high" | "medium" | "low" | undefined;
1326
- examples?: string[] | undefined;
1327
- meaning?: string | undefined;
1328
- usage?: string | undefined;
1329
- etymology?: string | undefined;
1330
- formality?: "formal" | "informal" | "neutral" | undefined;
1331
- register?: string | undefined;
1332
- }, {
1333
- partOfSpeech: string;
1334
- frequency?: "high" | "medium" | "low" | undefined;
1335
- examples?: string[] | undefined;
1336
- meaning?: string | undefined;
1337
- usage?: string | undefined;
1338
- etymology?: string | undefined;
1339
- formality?: "formal" | "informal" | "neutral" | undefined;
1340
- register?: string | undefined;
1341
- }>;
1342
- level: z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>;
1343
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1344
- }, "strip", z.ZodTypeAny, {
1345
- metadata: {
1346
- partOfSpeech: string;
1347
- frequency?: "high" | "medium" | "low" | undefined;
1348
- examples?: string[] | undefined;
1349
- meaning?: string | undefined;
1350
- usage?: string | undefined;
1351
- etymology?: string | undefined;
1352
- formality?: "formal" | "informal" | "neutral" | undefined;
1353
- register?: string | undefined;
1354
- };
1355
- children: any[];
1356
- type: "GLOSTWordNode";
1357
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
1358
- transcription: Record<string, {
1359
- text: string;
1360
- system: string;
1361
- tone?: number | undefined;
1362
- variants?: {
1363
- text: string;
1364
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1365
- notes?: string | undefined;
1366
- }[] | undefined;
1367
- syllables?: string[] | undefined;
1368
- phonetic?: string | undefined;
1369
- }>;
1370
- value: string;
1371
- position?: any;
1372
- lang?: string | undefined;
1373
- script?: string | undefined;
1374
- }, {
1375
- metadata: {
1376
- partOfSpeech: string;
1377
- frequency?: "high" | "medium" | "low" | undefined;
1378
- examples?: string[] | undefined;
1379
- meaning?: string | undefined;
1380
- usage?: string | undefined;
1381
- etymology?: string | undefined;
1382
- formality?: "formal" | "informal" | "neutral" | undefined;
1383
- register?: string | undefined;
1384
- };
1385
- type: "GLOSTWordNode";
1386
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
1387
- transcription: Record<string, {
1388
- text: string;
1389
- system: string;
1390
- tone?: number | undefined;
1391
- variants?: {
1392
- text: string;
1393
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1394
- notes?: string | undefined;
1395
- }[] | undefined;
1396
- syllables?: string[] | undefined;
1397
- phonetic?: string | undefined;
1398
- }>;
1399
- value: string;
1400
- children?: any[] | undefined;
1401
- position?: any;
1402
- lang?: string | undefined;
1403
- script?: string | undefined;
1404
- }>, z.ZodObject<{
1405
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
1406
- position: z.ZodOptional<z.ZodAny>;
1407
- } & {
1408
- type: z.ZodLiteral<"GLOSTSentenceNode">;
1409
- originalText: z.ZodString;
1410
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1411
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1412
- transcription: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1413
- text: z.ZodString;
1414
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1415
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1416
- text: z.ZodString;
1417
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1418
- notes: z.ZodOptional<z.ZodString>;
1419
- }, "strip", z.ZodTypeAny, {
1420
- text: string;
1421
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1422
- notes?: string | undefined;
1423
- }, {
1424
- text: string;
1425
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1426
- notes?: string | undefined;
1427
- }>, "many">>;
1428
- tone: z.ZodOptional<z.ZodNumber>;
1429
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1430
- phonetic: z.ZodOptional<z.ZodString>;
1431
- }, "strip", z.ZodTypeAny, {
1432
- text: string;
1433
- system: string;
1434
- tone?: number | undefined;
1435
- variants?: {
1436
- text: string;
1437
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1438
- notes?: string | undefined;
1439
- }[] | undefined;
1440
- syllables?: string[] | undefined;
1441
- phonetic?: string | undefined;
1442
- }, {
1443
- text: string;
1444
- system: string;
1445
- tone?: number | undefined;
1446
- variants?: {
1447
- text: string;
1448
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1449
- notes?: string | undefined;
1450
- }[] | undefined;
1451
- syllables?: string[] | undefined;
1452
- phonetic?: string | undefined;
1453
- }>>>;
1454
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1455
- }, "strip", z.ZodTypeAny, {
1456
- children: any[];
1457
- type: "GLOSTSentenceNode";
1458
- lang: string;
1459
- script: string;
1460
- originalText: string;
1461
- position?: any;
1462
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1463
- transcription?: Record<string, {
1464
- text: string;
1465
- system: string;
1466
- tone?: number | undefined;
1467
- variants?: {
1468
- text: string;
1469
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1470
- notes?: string | undefined;
1471
- }[] | undefined;
1472
- syllables?: string[] | undefined;
1473
- phonetic?: string | undefined;
1474
- }> | undefined;
1475
- }, {
1476
- type: "GLOSTSentenceNode";
1477
- lang: string;
1478
- script: string;
1479
- originalText: string;
1480
- children?: any[] | undefined;
1481
- position?: any;
1482
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1483
- transcription?: Record<string, {
1484
- text: string;
1485
- system: string;
1486
- tone?: number | undefined;
1487
- variants?: {
1488
- text: string;
1489
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1490
- notes?: string | undefined;
1491
- }[] | undefined;
1492
- syllables?: string[] | undefined;
1493
- phonetic?: string | undefined;
1494
- }> | undefined;
1495
- }>, z.ZodObject<{
1496
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
1497
- position: z.ZodOptional<z.ZodAny>;
1498
- } & {
1499
- type: z.ZodLiteral<"GLOSTParagraphNode">;
1500
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1501
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1502
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1503
- }, "strip", z.ZodTypeAny, {
1504
- children: any[];
1505
- type: "GLOSTParagraphNode";
1506
- lang: string;
1507
- script: string;
1508
- position?: any;
1509
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1510
- }, {
1511
- type: "GLOSTParagraphNode";
1512
- lang: string;
1513
- script: string;
1514
- children?: any[] | undefined;
1515
- position?: any;
1516
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1517
- }>, z.ZodObject<{
1518
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
1519
- position: z.ZodOptional<z.ZodAny>;
1520
- } & {
1521
- type: z.ZodLiteral<"GLOSTRootNode">;
1522
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1523
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1524
- metadata: z.ZodOptional<z.ZodObject<{
1525
- title: z.ZodOptional<z.ZodString>;
1526
- author: z.ZodOptional<z.ZodString>;
1527
- date: z.ZodOptional<z.ZodString>;
1528
- description: z.ZodOptional<z.ZodString>;
1529
- }, "strip", z.ZodTypeAny, {
1530
- date?: string | undefined;
1531
- title?: string | undefined;
1532
- author?: string | undefined;
1533
- description?: string | undefined;
1534
- }, {
1535
- date?: string | undefined;
1536
- title?: string | undefined;
1537
- author?: string | undefined;
1538
- description?: string | undefined;
1539
- }>>;
1540
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1541
- }, "strip", z.ZodTypeAny, {
1542
- children: any[];
1543
- type: "GLOSTRootNode";
1544
- lang: string;
1545
- script: string;
1546
- metadata?: {
1547
- date?: string | undefined;
1548
- title?: string | undefined;
1549
- author?: string | undefined;
1550
- description?: string | undefined;
1551
- } | undefined;
1552
- position?: any;
1553
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1554
- }, {
1555
- type: "GLOSTRootNode";
1556
- lang: string;
1557
- script: string;
1558
- metadata?: {
1559
- date?: string | undefined;
1560
- title?: string | undefined;
1561
- author?: string | undefined;
1562
- description?: string | undefined;
1563
- } | undefined;
1564
- children?: any[] | undefined;
1565
- position?: any;
1566
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1567
- }>]>;
1568
- GLOSTWordNode: z.ZodObject<{
1569
- lang: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>>;
1570
- script: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>>;
1571
- position: z.ZodOptional<z.ZodAny>;
1572
- } & {
1573
- type: z.ZodLiteral<"GLOSTWordNode">;
1574
- value: z.ZodString;
1575
- transcription: z.ZodRecord<z.ZodString, z.ZodObject<{
1576
- text: z.ZodString;
1577
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1578
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1579
- text: z.ZodString;
1580
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1581
- notes: z.ZodOptional<z.ZodString>;
1582
- }, "strip", z.ZodTypeAny, {
1583
- text: string;
1584
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1585
- notes?: string | undefined;
1586
- }, {
1587
- text: string;
1588
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1589
- notes?: string | undefined;
1590
- }>, "many">>;
1591
- tone: z.ZodOptional<z.ZodNumber>;
1592
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1593
- phonetic: z.ZodOptional<z.ZodString>;
1594
- }, "strip", z.ZodTypeAny, {
1595
- text: string;
1596
- system: string;
1597
- tone?: number | undefined;
1598
- variants?: {
1599
- text: string;
1600
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1601
- notes?: string | undefined;
1602
- }[] | undefined;
1603
- syllables?: string[] | undefined;
1604
- phonetic?: string | undefined;
1605
- }, {
1606
- text: string;
1607
- system: string;
1608
- tone?: number | undefined;
1609
- variants?: {
1610
- text: string;
1611
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1612
- notes?: string | undefined;
1613
- }[] | undefined;
1614
- syllables?: string[] | undefined;
1615
- phonetic?: string | undefined;
1616
- }>>;
1617
- metadata: z.ZodObject<{
1618
- /** @deprecated Use extras.translations instead */
1619
- meaning: z.ZodOptional<z.ZodString>;
1620
- partOfSpeech: z.ZodString;
1621
- usage: z.ZodOptional<z.ZodString>;
1622
- etymology: z.ZodOptional<z.ZodString>;
1623
- examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1624
- frequency: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
1625
- formality: z.ZodOptional<z.ZodEnum<["formal", "neutral", "informal"]>>;
1626
- register: z.ZodOptional<z.ZodString>;
1627
- }, "strip", z.ZodTypeAny, {
1628
- partOfSpeech: string;
1629
- frequency?: "high" | "medium" | "low" | undefined;
1630
- examples?: string[] | undefined;
1631
- meaning?: string | undefined;
1632
- usage?: string | undefined;
1633
- etymology?: string | undefined;
1634
- formality?: "formal" | "informal" | "neutral" | undefined;
1635
- register?: string | undefined;
1636
- }, {
1637
- partOfSpeech: string;
1638
- frequency?: "high" | "medium" | "low" | undefined;
1639
- examples?: string[] | undefined;
1640
- meaning?: string | undefined;
1641
- usage?: string | undefined;
1642
- etymology?: string | undefined;
1643
- formality?: "formal" | "informal" | "neutral" | undefined;
1644
- register?: string | undefined;
1645
- }>;
1646
- level: z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>;
1647
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1648
- }, "strip", z.ZodTypeAny, {
1649
- metadata: {
1650
- partOfSpeech: string;
1651
- frequency?: "high" | "medium" | "low" | undefined;
1652
- examples?: string[] | undefined;
1653
- meaning?: string | undefined;
1654
- usage?: string | undefined;
1655
- etymology?: string | undefined;
1656
- formality?: "formal" | "informal" | "neutral" | undefined;
1657
- register?: string | undefined;
1658
- };
1659
- children: any[];
1660
- type: "GLOSTWordNode";
1661
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
1662
- transcription: Record<string, {
1663
- text: string;
1664
- system: string;
1665
- tone?: number | undefined;
1666
- variants?: {
1667
- text: string;
1668
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1669
- notes?: string | undefined;
1670
- }[] | undefined;
1671
- syllables?: string[] | undefined;
1672
- phonetic?: string | undefined;
1673
- }>;
1674
- value: string;
1675
- position?: any;
1676
- lang?: string | undefined;
1677
- script?: string | undefined;
1678
- }, {
1679
- metadata: {
1680
- partOfSpeech: string;
1681
- frequency?: "high" | "medium" | "low" | undefined;
1682
- examples?: string[] | undefined;
1683
- meaning?: string | undefined;
1684
- usage?: string | undefined;
1685
- etymology?: string | undefined;
1686
- formality?: "formal" | "informal" | "neutral" | undefined;
1687
- register?: string | undefined;
1688
- };
1689
- type: "GLOSTWordNode";
1690
- level: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph";
1691
- transcription: Record<string, {
1692
- text: string;
1693
- system: string;
1694
- tone?: number | undefined;
1695
- variants?: {
1696
- text: string;
1697
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1698
- notes?: string | undefined;
1699
- }[] | undefined;
1700
- syllables?: string[] | undefined;
1701
- phonetic?: string | undefined;
1702
- }>;
1703
- value: string;
1704
- children?: any[] | undefined;
1705
- position?: any;
1706
- lang?: string | undefined;
1707
- script?: string | undefined;
1708
- }>;
1709
- GLOSTSentenceNode: z.ZodObject<{
1710
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
1711
- position: z.ZodOptional<z.ZodAny>;
1712
- } & {
1713
- type: z.ZodLiteral<"GLOSTSentenceNode">;
1714
- originalText: z.ZodString;
1715
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1716
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1717
- transcription: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1718
- text: z.ZodString;
1719
- system: z.ZodUnion<[z.ZodLiteral<"rtgs">, z.ZodLiteral<"aua">, z.ZodLiteral<"paiboon">, z.ZodLiteral<"romaji">, z.ZodLiteral<"furigana">, z.ZodLiteral<"ipa">, z.ZodLiteral<"pinyin">, z.ZodLiteral<"hangul">, z.ZodString]>;
1720
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1721
- text: z.ZodString;
1722
- context: z.ZodEnum<["formal", "informal", "historical", "regional", "dialectal"]>;
1723
- notes: z.ZodOptional<z.ZodString>;
1724
- }, "strip", z.ZodTypeAny, {
1725
- text: string;
1726
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1727
- notes?: string | undefined;
1728
- }, {
1729
- text: string;
1730
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1731
- notes?: string | undefined;
1732
- }>, "many">>;
1733
- tone: z.ZodOptional<z.ZodNumber>;
1734
- syllables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1735
- phonetic: z.ZodOptional<z.ZodString>;
1736
- }, "strip", z.ZodTypeAny, {
1737
- text: string;
1738
- system: string;
1739
- tone?: number | undefined;
1740
- variants?: {
1741
- text: string;
1742
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1743
- notes?: string | undefined;
1744
- }[] | undefined;
1745
- syllables?: string[] | undefined;
1746
- phonetic?: string | undefined;
1747
- }, {
1748
- text: string;
1749
- system: string;
1750
- tone?: number | undefined;
1751
- variants?: {
1752
- text: string;
1753
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1754
- notes?: string | undefined;
1755
- }[] | undefined;
1756
- syllables?: string[] | undefined;
1757
- phonetic?: string | undefined;
1758
- }>>>;
1759
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1760
- }, "strip", z.ZodTypeAny, {
1761
- children: any[];
1762
- type: "GLOSTSentenceNode";
1763
- lang: string;
1764
- script: string;
1765
- originalText: string;
1766
- position?: any;
1767
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1768
- transcription?: Record<string, {
1769
- text: string;
1770
- system: string;
1771
- tone?: number | undefined;
1772
- variants?: {
1773
- text: string;
1774
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1775
- notes?: string | undefined;
1776
- }[] | undefined;
1777
- syllables?: string[] | undefined;
1778
- phonetic?: string | undefined;
1779
- }> | undefined;
1780
- }, {
1781
- type: "GLOSTSentenceNode";
1782
- lang: string;
1783
- script: string;
1784
- originalText: string;
1785
- children?: any[] | undefined;
1786
- position?: any;
1787
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1788
- transcription?: Record<string, {
1789
- text: string;
1790
- system: string;
1791
- tone?: number | undefined;
1792
- variants?: {
1793
- text: string;
1794
- context: "formal" | "informal" | "historical" | "regional" | "dialectal";
1795
- notes?: string | undefined;
1796
- }[] | undefined;
1797
- syllables?: string[] | undefined;
1798
- phonetic?: string | undefined;
1799
- }> | undefined;
1800
- }>;
1801
- GLOSTParagraphNode: z.ZodObject<{
1802
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
1803
- position: z.ZodOptional<z.ZodAny>;
1804
- } & {
1805
- type: z.ZodLiteral<"GLOSTParagraphNode">;
1806
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1807
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1808
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1809
- }, "strip", z.ZodTypeAny, {
1810
- children: any[];
1811
- type: "GLOSTParagraphNode";
1812
- lang: string;
1813
- script: string;
1814
- position?: any;
1815
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1816
- }, {
1817
- type: "GLOSTParagraphNode";
1818
- lang: string;
1819
- script: string;
1820
- children?: any[] | undefined;
1821
- position?: any;
1822
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1823
- }>;
1824
- GLOSTRootNode: z.ZodObject<{
1825
- level: z.ZodOptional<z.ZodEnum<["character", "syllable", "word", "phrase", "sentence", "paragraph"]>>;
1826
- position: z.ZodOptional<z.ZodAny>;
1827
- } & {
1828
- type: z.ZodLiteral<"GLOSTRootNode">;
1829
- lang: z.ZodUnion<[z.ZodLiteral<"th">, z.ZodLiteral<"ja">, z.ZodLiteral<"zh">, z.ZodLiteral<"ko">, z.ZodLiteral<"en">, z.ZodString]>;
1830
- script: z.ZodUnion<[z.ZodLiteral<"thai">, z.ZodLiteral<"hiragana">, z.ZodLiteral<"katakana">, z.ZodLiteral<"kanji">, z.ZodLiteral<"hanzi">, z.ZodLiteral<"hangul">, z.ZodLiteral<"latin">, z.ZodLiteral<"mixed">, z.ZodString]>;
1831
- metadata: z.ZodOptional<z.ZodObject<{
1832
- title: z.ZodOptional<z.ZodString>;
1833
- author: z.ZodOptional<z.ZodString>;
1834
- date: z.ZodOptional<z.ZodString>;
1835
- description: z.ZodOptional<z.ZodString>;
1836
- }, "strip", z.ZodTypeAny, {
1837
- date?: string | undefined;
1838
- title?: string | undefined;
1839
- author?: string | undefined;
1840
- description?: string | undefined;
1841
- }, {
1842
- date?: string | undefined;
1843
- title?: string | undefined;
1844
- author?: string | undefined;
1845
- description?: string | undefined;
1846
- }>>;
1847
- children: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
1848
- }, "strip", z.ZodTypeAny, {
1849
- children: any[];
1850
- type: "GLOSTRootNode";
1851
- lang: string;
1852
- script: string;
1853
- metadata?: {
1854
- date?: string | undefined;
1855
- title?: string | undefined;
1856
- author?: string | undefined;
1857
- description?: string | undefined;
1858
- } | undefined;
1859
- position?: any;
1860
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1861
- }, {
1862
- type: "GLOSTRootNode";
1863
- lang: string;
1864
- script: string;
1865
- metadata?: {
1866
- date?: string | undefined;
1867
- title?: string | undefined;
1868
- author?: string | undefined;
1869
- description?: string | undefined;
1870
- } | undefined;
1871
- children?: any[] | undefined;
1872
- position?: any;
1873
- level?: "character" | "syllable" | "word" | "phrase" | "sentence" | "paragraph" | undefined;
1874
- }>;
1875
- };
1876
- //# sourceMappingURL=validators.d.ts.map