@kulupu-linku/sona 0.1.6 → 0.1.7
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/dist/client.d.ts +27 -0
- package/dist/index.d.ts +32 -1
- package/dist/index.js +32 -6
- package/generated/commentary_translation.json +3 -0
- package/generated/definition_translation.json +3 -0
- package/generated/etymology_translation.json +3 -0
- package/generated/fingerspelling.json +3 -0
- package/generated/icon_translation.json +3 -1
- package/generated/languages.json +48 -0
- package/generated/parameters_translation.json +3 -0
- package/generated/sandbox.json +9 -2
- package/generated/signs.json +4 -2
- package/generated/sitelen_pona_translation.json +3 -0
- package/generated/word.json +6 -2
- package/generated/words.json +9 -2
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -337,6 +337,15 @@ declare const app: hono_hono_base.HonoBase<hono.Env, hono_types.MergeSchemaPath<
|
|
|
337
337
|
} | {
|
|
338
338
|
ok: false;
|
|
339
339
|
message: string;
|
|
340
|
+
}> & hono.ToSchema<"get", "/languages", unknown, {
|
|
341
|
+
[x: string]: {
|
|
342
|
+
name: {
|
|
343
|
+
en: string;
|
|
344
|
+
tok?: string | undefined;
|
|
345
|
+
endonym?: string | undefined;
|
|
346
|
+
};
|
|
347
|
+
locale: string;
|
|
348
|
+
};
|
|
340
349
|
}>, "/v1"> & hono.ToSchema<"get", "/", unknown, {}>, "/">;
|
|
341
350
|
|
|
342
351
|
type AppType = typeof app;
|
|
@@ -793,6 +802,24 @@ declare const client: {
|
|
|
793
802
|
}>;
|
|
794
803
|
};
|
|
795
804
|
};
|
|
805
|
+
} & {
|
|
806
|
+
v1: {
|
|
807
|
+
languages: hono_client.ClientRequest<{
|
|
808
|
+
$get: {
|
|
809
|
+
input: {};
|
|
810
|
+
output: {
|
|
811
|
+
[x: string]: {
|
|
812
|
+
name: {
|
|
813
|
+
en: string;
|
|
814
|
+
tok?: string | undefined;
|
|
815
|
+
endonym?: string | undefined;
|
|
816
|
+
};
|
|
817
|
+
locale: string;
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
}>;
|
|
822
|
+
};
|
|
796
823
|
};
|
|
797
824
|
type ApiType = AppType;
|
|
798
825
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1043,5 +1043,36 @@ declare const Fonts: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
1043
1043
|
last_updated?: `20${number}-01` | `20${number}-02` | `20${number}-03` | `20${number}-04` | `20${number}-05` | `20${number}-06` | `20${number}-07` | `20${number}-08` | `20${number}-09` | `20${number}-10` | `20${number}-11` | `20${number}-12` | undefined;
|
|
1044
1044
|
}>>;
|
|
1045
1045
|
type Fonts = z.infer<typeof Fonts>;
|
|
1046
|
+
declare const Languages: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1047
|
+
locale: z.ZodString;
|
|
1048
|
+
name: z.ZodObject<{
|
|
1049
|
+
en: z.ZodString;
|
|
1050
|
+
tok: z.ZodOptional<z.ZodString>;
|
|
1051
|
+
endonym: z.ZodOptional<z.ZodString>;
|
|
1052
|
+
}, "strip", z.ZodTypeAny, {
|
|
1053
|
+
en: string;
|
|
1054
|
+
tok?: string | undefined;
|
|
1055
|
+
endonym?: string | undefined;
|
|
1056
|
+
}, {
|
|
1057
|
+
en: string;
|
|
1058
|
+
tok?: string | undefined;
|
|
1059
|
+
endonym?: string | undefined;
|
|
1060
|
+
}>;
|
|
1061
|
+
}, "strip", z.ZodTypeAny, {
|
|
1062
|
+
name: {
|
|
1063
|
+
en: string;
|
|
1064
|
+
tok?: string | undefined;
|
|
1065
|
+
endonym?: string | undefined;
|
|
1066
|
+
};
|
|
1067
|
+
locale: string;
|
|
1068
|
+
}, {
|
|
1069
|
+
name: {
|
|
1070
|
+
en: string;
|
|
1071
|
+
tok?: string | undefined;
|
|
1072
|
+
endonym?: string | undefined;
|
|
1073
|
+
};
|
|
1074
|
+
locale: string;
|
|
1075
|
+
}>>;
|
|
1076
|
+
type Languages = z.infer<typeof Languages>;
|
|
1046
1077
|
|
|
1047
|
-
export { CommentaryTranslation, DefinitionTranslation, EtymologyTranslation, Fingerspelling, FingerspellingSign, Font, Fonts, IconTranslation, ParametersTranslation, Sandbox, Sign, Signs, SitelenPonaTranslation, Word, Words };
|
|
1078
|
+
export { CommentaryTranslation, DefinitionTranslation, EtymologyTranslation, Fingerspelling, FingerspellingSign, Font, Fonts, IconTranslation, Languages, ParametersTranslation, Sandbox, Sign, Signs, SitelenPonaTranslation, Word, Words };
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,12 @@ var Word = z.object({
|
|
|
17
17
|
),
|
|
18
18
|
coined_year: z.string().describe("The year when this word was coined (if known)"),
|
|
19
19
|
creator: z.array(z.string()).describe("The person who created this word (if known)"),
|
|
20
|
-
ku_data: z.record(
|
|
20
|
+
ku_data: z.record(
|
|
21
|
+
z.string().min(1).describe("A translation of the word into English proposed in ku"),
|
|
22
|
+
z.number().min(0).max(100).describe(
|
|
23
|
+
"The percentage of ku survey respondents who report this translation as accurate to their usage."
|
|
24
|
+
)
|
|
25
|
+
).optional().describe(
|
|
21
26
|
"The usage data of the word as described in ku (the official Toki Pona dictionary)"
|
|
22
27
|
),
|
|
23
28
|
see_also: z.array(z.string()).describe("A list of related words"),
|
|
@@ -65,13 +70,14 @@ var Word = z.object({
|
|
|
65
70
|
z.string().regex(/^20\d{2}-(0[1-9]|1[0-2])$/g),
|
|
66
71
|
z.number().min(0).max(100)
|
|
67
72
|
).describe(
|
|
68
|
-
"The percentage of people in the Toki Pona community who
|
|
73
|
+
"The percentage of people in the Toki Pona community who use this word, according to surveys performed by the Linku Project"
|
|
69
74
|
)
|
|
70
75
|
}).describe("General info on a Toki Pona word");
|
|
71
|
-
var CommentaryTranslation = z.record(z.string()).describe("Localized commentary regarding Toki Pona words");
|
|
72
|
-
var DefinitionTranslation = z.record(z.string().min(1)).describe("Localized definitions of Toki Pona words");
|
|
73
|
-
var SitelenPonaTranslation = z.record(z.string()).describe("Localized descriptions of the origins of the sitelen pona glyphs for Toki Pona words");
|
|
76
|
+
var CommentaryTranslation = z.record(z.string().min(1), z.string()).describe("Localized commentary regarding Toki Pona words");
|
|
77
|
+
var DefinitionTranslation = z.record(z.string().min(1), z.string().min(1)).describe("Localized definitions of Toki Pona words");
|
|
78
|
+
var SitelenPonaTranslation = z.record(z.string().min(1), z.string()).describe("Localized descriptions of the origins of the sitelen pona glyphs for Toki Pona words");
|
|
74
79
|
var EtymologyTranslation = z.record(
|
|
80
|
+
z.string().min(1),
|
|
75
81
|
z.array(
|
|
76
82
|
z.object({
|
|
77
83
|
definition: z.string().optional().describe("The localized definition of the root word in its origin language"),
|
|
@@ -127,6 +133,7 @@ var FingerspellingSign = z.object({
|
|
|
127
133
|
}).describe("Videos of the sign being performed, by format.")
|
|
128
134
|
}).describe("Unlocalized info on a fingerspelling sign.");
|
|
129
135
|
var ParametersTranslation = z.record(
|
|
136
|
+
z.string().min(1),
|
|
130
137
|
z.object({
|
|
131
138
|
handshape: z.string().optional().describe(
|
|
132
139
|
"The shape of the hand when signing, identified by its name in ASL. Should not be translated in any language other than Toki Pona"
|
|
@@ -136,7 +143,7 @@ var ParametersTranslation = z.record(
|
|
|
136
143
|
orientation: z.string().optional().describe("The orientation of the hand when signing.")
|
|
137
144
|
})
|
|
138
145
|
).describe("Partly localized descriptions of how a sign is signed.");
|
|
139
|
-
var IconTranslation = z.record(z.string().min(1)).describe("Localized descriptions of the thing a sign represents.");
|
|
146
|
+
var IconTranslation = z.record(z.string().min(1), z.string()).describe("Localized descriptions of the thing a sign represents.");
|
|
140
147
|
var Font = z.object({
|
|
141
148
|
creator: z.array(z.string()).describe("a list of this font's creators"),
|
|
142
149
|
features: z.array(z.string()).describe("a list of features this font supports"),
|
|
@@ -164,6 +171,7 @@ var Font = z.object({
|
|
|
164
171
|
})
|
|
165
172
|
}).describe("Info on a font for Toki Pona");
|
|
166
173
|
var Words = z.record(
|
|
174
|
+
z.string().min(1),
|
|
167
175
|
Word.extend({
|
|
168
176
|
translations: z.record(
|
|
169
177
|
z.object({
|
|
@@ -179,6 +187,7 @@ var Sandbox = Words.describe(
|
|
|
179
187
|
"A raw data object containing dictionary info about Toki Pona sandbox"
|
|
180
188
|
);
|
|
181
189
|
var Signs = z.record(
|
|
190
|
+
z.string().min(1),
|
|
182
191
|
Sign.extend({
|
|
183
192
|
translations: z.record(
|
|
184
193
|
z.object({
|
|
@@ -189,11 +198,27 @@ var Signs = z.record(
|
|
|
189
198
|
})
|
|
190
199
|
).describe("A raw data object containing information about Luka Pona signs");
|
|
191
200
|
var Fingerspelling = z.record(
|
|
201
|
+
z.string().min(1),
|
|
192
202
|
FingerspellingSign.extend({
|
|
193
203
|
translations: z.record(z.object({ parameters: ParametersTranslation.valueSchema }))
|
|
194
204
|
})
|
|
195
205
|
).describe("A raw data object containing information about Luka Pona fingerspelling signs");
|
|
196
206
|
var Fonts = z.record(Font).describe("A raw data object containing all the fonts data in sona");
|
|
207
|
+
var Languages = z.record(
|
|
208
|
+
z.string().min(2).describe("The language code used by Crowdin. Approximates 2 letter code -> 3 letter code."),
|
|
209
|
+
z.object({
|
|
210
|
+
locale: z.string().describe("The locale code corresponding to the language."),
|
|
211
|
+
name: z.object({
|
|
212
|
+
en: z.string().describe("The name of the language in English."),
|
|
213
|
+
// These are optional because we can add a language via Crowdin and Crowdin doesn't provide these.
|
|
214
|
+
// Downstream projects should prefer endonym over name_en if both are available.
|
|
215
|
+
tok: z.string().optional().describe("The name of the language in Toki Pona."),
|
|
216
|
+
endonym: z.string().optional().describe("The name of the language in that language.")
|
|
217
|
+
})
|
|
218
|
+
// TODO: completion percentage on a per-file basis?
|
|
219
|
+
// we also care about completion within usage categories, since the most important words are core+widespread+common
|
|
220
|
+
}).describe("The languages offered by sona Linku.")
|
|
221
|
+
);
|
|
197
222
|
export {
|
|
198
223
|
CommentaryTranslation,
|
|
199
224
|
DefinitionTranslation,
|
|
@@ -203,6 +228,7 @@ export {
|
|
|
203
228
|
Font,
|
|
204
229
|
Fonts,
|
|
205
230
|
IconTranslation,
|
|
231
|
+
Languages,
|
|
206
232
|
ParametersTranslation,
|
|
207
233
|
Sandbox,
|
|
208
234
|
Sign,
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
"additionalProperties": false,
|
|
117
117
|
"description": "Unlocalized info on a fingerspelling sign."
|
|
118
118
|
},
|
|
119
|
+
"propertyNames": {
|
|
120
|
+
"minLength": 1
|
|
121
|
+
},
|
|
119
122
|
"description": "A raw data object containing information about Luka Pona fingerspelling signs"
|
|
120
123
|
}
|
|
121
124
|
},
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/languages",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"languages": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"locale": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The locale code corresponding to the language."
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"en": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The name of the language in English."
|
|
19
|
+
},
|
|
20
|
+
"tok": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The name of the language in Toki Pona."
|
|
23
|
+
},
|
|
24
|
+
"endonym": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The name of the language in that language."
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": [
|
|
30
|
+
"en"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"locale",
|
|
37
|
+
"name"
|
|
38
|
+
],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"description": "The languages offered by sona Linku."
|
|
41
|
+
},
|
|
42
|
+
"propertyNames": {
|
|
43
|
+
"minLength": 2
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
48
|
+
}
|
package/generated/sandbox.json
CHANGED
|
@@ -57,7 +57,11 @@
|
|
|
57
57
|
"additionalProperties": {
|
|
58
58
|
"type": "number",
|
|
59
59
|
"minimum": 0,
|
|
60
|
-
"maximum": 100
|
|
60
|
+
"maximum": 100,
|
|
61
|
+
"description": "The percentage of ku survey respondents who report this translation as accurate to their usage."
|
|
62
|
+
},
|
|
63
|
+
"propertyNames": {
|
|
64
|
+
"minLength": 1
|
|
61
65
|
},
|
|
62
66
|
"description": "The usage data of the word as described in ku (the official Toki Pona dictionary)"
|
|
63
67
|
},
|
|
@@ -232,7 +236,7 @@
|
|
|
232
236
|
"propertyNames": {
|
|
233
237
|
"pattern": "^20\\d{2}-(0[1-9]|1[0-2])$"
|
|
234
238
|
},
|
|
235
|
-
"description": "The percentage of people in the Toki Pona community who
|
|
239
|
+
"description": "The percentage of people in the Toki Pona community who use this word, according to surveys performed by the Linku Project"
|
|
236
240
|
},
|
|
237
241
|
"translations": {
|
|
238
242
|
"type": "object",
|
|
@@ -300,6 +304,9 @@
|
|
|
300
304
|
"additionalProperties": false,
|
|
301
305
|
"description": "General info on a Toki Pona word"
|
|
302
306
|
},
|
|
307
|
+
"propertyNames": {
|
|
308
|
+
"minLength": 1
|
|
309
|
+
},
|
|
303
310
|
"description": "A raw data object containing dictionary info about Toki Pona sandbox"
|
|
304
311
|
}
|
|
305
312
|
},
|
package/generated/signs.json
CHANGED
|
@@ -113,8 +113,7 @@
|
|
|
113
113
|
"additionalProperties": false
|
|
114
114
|
},
|
|
115
115
|
"icons": {
|
|
116
|
-
"type": "string"
|
|
117
|
-
"minLength": 1
|
|
116
|
+
"type": "string"
|
|
118
117
|
}
|
|
119
118
|
},
|
|
120
119
|
"required": [
|
|
@@ -139,6 +138,9 @@
|
|
|
139
138
|
"additionalProperties": false,
|
|
140
139
|
"description": "Unlocalized info on a Luka Pona sign"
|
|
141
140
|
},
|
|
141
|
+
"propertyNames": {
|
|
142
|
+
"minLength": 1
|
|
143
|
+
},
|
|
142
144
|
"description": "A raw data object containing information about Luka Pona signs"
|
|
143
145
|
}
|
|
144
146
|
},
|
package/generated/word.json
CHANGED
|
@@ -55,7 +55,11 @@
|
|
|
55
55
|
"additionalProperties": {
|
|
56
56
|
"type": "number",
|
|
57
57
|
"minimum": 0,
|
|
58
|
-
"maximum": 100
|
|
58
|
+
"maximum": 100,
|
|
59
|
+
"description": "The percentage of ku survey respondents who report this translation as accurate to their usage."
|
|
60
|
+
},
|
|
61
|
+
"propertyNames": {
|
|
62
|
+
"minLength": 1
|
|
59
63
|
},
|
|
60
64
|
"description": "The usage data of the word as described in ku (the official Toki Pona dictionary)"
|
|
61
65
|
},
|
|
@@ -230,7 +234,7 @@
|
|
|
230
234
|
"propertyNames": {
|
|
231
235
|
"pattern": "^20\\d{2}-(0[1-9]|1[0-2])$"
|
|
232
236
|
},
|
|
233
|
-
"description": "The percentage of people in the Toki Pona community who
|
|
237
|
+
"description": "The percentage of people in the Toki Pona community who use this word, according to surveys performed by the Linku Project"
|
|
234
238
|
}
|
|
235
239
|
},
|
|
236
240
|
"required": [
|
package/generated/words.json
CHANGED
|
@@ -57,7 +57,11 @@
|
|
|
57
57
|
"additionalProperties": {
|
|
58
58
|
"type": "number",
|
|
59
59
|
"minimum": 0,
|
|
60
|
-
"maximum": 100
|
|
60
|
+
"maximum": 100,
|
|
61
|
+
"description": "The percentage of ku survey respondents who report this translation as accurate to their usage."
|
|
62
|
+
},
|
|
63
|
+
"propertyNames": {
|
|
64
|
+
"minLength": 1
|
|
61
65
|
},
|
|
62
66
|
"description": "The usage data of the word as described in ku (the official Toki Pona dictionary)"
|
|
63
67
|
},
|
|
@@ -232,7 +236,7 @@
|
|
|
232
236
|
"propertyNames": {
|
|
233
237
|
"pattern": "^20\\d{2}-(0[1-9]|1[0-2])$"
|
|
234
238
|
},
|
|
235
|
-
"description": "The percentage of people in the Toki Pona community who
|
|
239
|
+
"description": "The percentage of people in the Toki Pona community who use this word, according to surveys performed by the Linku Project"
|
|
236
240
|
},
|
|
237
241
|
"translations": {
|
|
238
242
|
"type": "object",
|
|
@@ -300,6 +304,9 @@
|
|
|
300
304
|
"additionalProperties": false,
|
|
301
305
|
"description": "General info on a Toki Pona word"
|
|
302
306
|
},
|
|
307
|
+
"propertyNames": {
|
|
308
|
+
"minLength": 1
|
|
309
|
+
},
|
|
303
310
|
"description": "A raw data object containing dictionary info about Toki Pona words"
|
|
304
311
|
}
|
|
305
312
|
},
|