@kulupu-linku/sona 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-1jX6YIBj.d.ts → index-7uKIarVW.d.mts} +6 -8
- package/dist/{client-BSyS8F5a.d.ts → lib/v1/client.d.mts} +55 -57
- package/dist/{client-BitJ28pJ.js → lib/v1/client.mjs} +1 -3
- package/dist/lib/v1/{client.test.d.ts → client.test.d.mts} +2 -3
- package/dist/lib/v1/client.test.mjs +2 -0
- package/dist/lib/v1/{index.d.ts → index.d.mts} +1 -1
- package/dist/{v1-DkHVwPCI.js → lib/v1/index.mjs} +2 -4
- package/dist/lib/v1/{types.d.ts → types.d.mts} +1 -1
- package/dist/lib/v1/types.mjs +1 -0
- package/dist/lib/v1/{utils.d.ts → utils.d.mts} +1 -1
- package/dist/{utils-QiKwNnnL.js → lib/v1/utils.mjs} +1 -3
- package/dist/{client-CUMo53JZ.d.ts → lib/v2/client.d.mts} +55 -57
- package/dist/{client-DNWH1gFt.js → lib/v2/client.mjs} +1 -3
- package/dist/lib/v2/{client.test.d.ts → client.test.d.mts} +2 -3
- package/dist/lib/v2/client.test.mjs +2 -0
- package/dist/lib/v2/{index.d.ts → index.d.mts} +1 -1
- package/dist/{v2-CDtbJFxV.js → lib/v2/index.mjs} +3 -5
- package/dist/lib/v2/{types.d.ts → types.d.mts} +1 -1
- package/dist/lib/v2/types.mjs +1 -0
- package/dist/lib/v2/{utils.d.ts → utils.d.mts} +1 -1
- package/dist/{utils-Z1o5sWsW.js → lib/v2/utils.mjs} +1 -3
- package/dist/server/index.d.mts +2 -0
- package/dist/server/{index.js → index.mjs} +4 -12
- package/dist/server/{utils.d.ts → utils.d.mts} +5 -5
- package/dist/{utils-DkAaVBMs.js → server/utils.mjs} +2 -4
- package/dist/server/v1/{index.d.ts → index.d.mts} +4 -4
- package/dist/server/v1/index.mjs +2 -0
- package/dist/server/v2/{index.d.ts → index.d.mts} +4 -4
- package/dist/server/v2/index.mjs +2 -0
- package/dist/server/{versioning.d.ts → versioning.d.mts} +6 -6
- package/dist/server/versioning.mjs +2 -0
- package/dist/{v1-obRCoWWK.js → v1-Da4_o5R1.mjs} +9 -15
- package/generated/v1/commentary_translation.json +1 -1
- package/generated/v1/definition_translation.json +1 -1
- package/generated/v1/etymology_translation.json +2 -4
- package/generated/v1/fingerspelling.json +5 -20
- package/generated/v1/fingerspelling_sign.json +4 -16
- package/generated/v1/font.json +1 -1
- package/generated/v1/fonts.json +1 -1
- package/generated/v1/icon_translation.json +1 -1
- package/generated/v1/languages.json +4 -14
- package/generated/v1/parameters_translation.json +1 -1
- package/generated/v1/sign.json +3 -8
- package/generated/v1/signs.json +4 -12
- package/generated/v1/sitelen_pona_translation.json +1 -1
- package/generated/v1/word.json +6 -29
- package/generated/v2/fingerspelling.json +124 -64
- package/generated/v2/fingerspellings.json +178 -115
- package/generated/v2/font.json +109 -64
- package/generated/v2/fonts.json +160 -112
- package/generated/v2/glyph.json +72 -46
- package/generated/v2/glyphs.json +171 -142
- package/generated/v2/language.json +34 -16
- package/generated/v2/languages.json +75 -56
- package/generated/v2/sign.json +149 -77
- package/generated/v2/signs.json +212 -137
- package/generated/v2/word.json +298 -155
- package/generated/v2/words.json +416 -270
- package/package.json +44 -32
- package/dist/.assetsignore +0 -0
- package/dist/lib/v1/client.d.ts +0 -3
- package/dist/lib/v1/client.js +0 -3
- package/dist/lib/v1/client.test.js +0 -3
- package/dist/lib/v1/index.js +0 -4
- package/dist/lib/v1/types.js +0 -1
- package/dist/lib/v1/utils.js +0 -3
- package/dist/lib/v2/client.d.ts +0 -3
- package/dist/lib/v2/client.js +0 -3
- package/dist/lib/v2/client.test.js +0 -3
- package/dist/lib/v2/index.js +0 -4
- package/dist/lib/v2/types.js +0 -1
- package/dist/lib/v2/utils.js +0 -3
- package/dist/server/index.d.ts +0 -2
- package/dist/server/utils.js +0 -3
- package/dist/server/v1/index.js +0 -8
- package/dist/server/v2/index.js +0 -8
- package/dist/server/versioning.js +0 -8
- /package/dist/{index-DObG_APy.d.ts → index-N8h8E1s6.d.mts} +0 -0
- /package/dist/{index-DsVEVr6r.d.ts → index-nmyNJa57.d.mts} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as AppType } from "
|
|
2
|
-
import * as
|
|
3
|
-
import * as hono_utils_http_status0 from "hono/utils/http-status";
|
|
1
|
+
import { t as AppType } from "../../index-7uKIarVW.mjs";
|
|
2
|
+
import * as _$hono_client0 from "hono/client";
|
|
3
|
+
import * as _$hono_utils_http_status0 from "hono/utils/http-status";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/v2/client.d.ts
|
|
6
6
|
declare const client: (args?: {
|
|
7
7
|
baseUrl?: string;
|
|
8
8
|
fetch?: (typeof globalThis)["fetch"];
|
|
9
9
|
}) => {
|
|
10
|
-
index:
|
|
10
|
+
index: _$hono_client0.ClientRequest<string, "/", {
|
|
11
11
|
$get: {
|
|
12
12
|
input: {};
|
|
13
13
|
output: undefined;
|
|
@@ -16,19 +16,26 @@ declare const client: (args?: {
|
|
|
16
16
|
};
|
|
17
17
|
}>;
|
|
18
18
|
} & {
|
|
19
|
-
|
|
20
|
-
} & {
|
|
21
|
-
jasima: hono_client34.ClientRequest<{
|
|
19
|
+
jasima: _$hono_client0.ClientRequest<string, "/jasima", {
|
|
22
20
|
$get: {
|
|
23
21
|
input: {};
|
|
24
22
|
output: {};
|
|
25
23
|
outputFormat: "json";
|
|
26
|
-
status: hono_utils_http_status0.ContentfulStatusCode;
|
|
24
|
+
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
25
|
+
};
|
|
26
|
+
}>;
|
|
27
|
+
} & {
|
|
28
|
+
v1: _$hono_client0.ClientRequest<string, "/v1", {
|
|
29
|
+
$get: {
|
|
30
|
+
input: {};
|
|
31
|
+
output: undefined;
|
|
32
|
+
outputFormat: "redirect";
|
|
33
|
+
status: 302;
|
|
27
34
|
};
|
|
28
35
|
}>;
|
|
29
36
|
} & {
|
|
30
37
|
v1: {
|
|
31
|
-
words:
|
|
38
|
+
words: _$hono_client0.ClientRequest<string, "/v1/words", {
|
|
32
39
|
$get: {
|
|
33
40
|
input: {
|
|
34
41
|
query: {
|
|
@@ -101,7 +108,7 @@ declare const client: (args?: {
|
|
|
101
108
|
} & {
|
|
102
109
|
v1: {
|
|
103
110
|
luka_pona: {
|
|
104
|
-
signs:
|
|
111
|
+
signs: _$hono_client0.ClientRequest<string, "/v1/luka_pona/signs", {
|
|
105
112
|
$get: {
|
|
106
113
|
input: {
|
|
107
114
|
query: {
|
|
@@ -146,19 +153,10 @@ declare const client: (args?: {
|
|
|
146
153
|
}>;
|
|
147
154
|
};
|
|
148
155
|
};
|
|
149
|
-
} & {
|
|
150
|
-
v1: hono_client34.ClientRequest<{
|
|
151
|
-
$get: {
|
|
152
|
-
input: {};
|
|
153
|
-
output: undefined;
|
|
154
|
-
outputFormat: "redirect";
|
|
155
|
-
status: 302;
|
|
156
|
-
};
|
|
157
|
-
}>;
|
|
158
156
|
} & {
|
|
159
157
|
v1: {
|
|
160
158
|
words: {
|
|
161
|
-
":word":
|
|
159
|
+
":word": _$hono_client0.ClientRequest<string, "/v1/words/:word", {
|
|
162
160
|
$get: {
|
|
163
161
|
input: {
|
|
164
162
|
query: {
|
|
@@ -252,7 +250,7 @@ declare const client: (args?: {
|
|
|
252
250
|
};
|
|
253
251
|
} & {
|
|
254
252
|
v1: {
|
|
255
|
-
sandbox:
|
|
253
|
+
sandbox: _$hono_client0.ClientRequest<string, "/v1/sandbox", {
|
|
256
254
|
$get: {
|
|
257
255
|
input: {
|
|
258
256
|
query: {
|
|
@@ -325,7 +323,7 @@ declare const client: (args?: {
|
|
|
325
323
|
} & {
|
|
326
324
|
v1: {
|
|
327
325
|
sandbox: {
|
|
328
|
-
":word":
|
|
326
|
+
":word": _$hono_client0.ClientRequest<string, "/v1/sandbox/:word", {
|
|
329
327
|
$get: {
|
|
330
328
|
input: {
|
|
331
329
|
query: {
|
|
@@ -419,7 +417,7 @@ declare const client: (args?: {
|
|
|
419
417
|
};
|
|
420
418
|
} & {
|
|
421
419
|
v1: {
|
|
422
|
-
luka_pona:
|
|
420
|
+
luka_pona: _$hono_client0.ClientRequest<string, "/v1/luka_pona", {
|
|
423
421
|
$get: {
|
|
424
422
|
input: {};
|
|
425
423
|
output: undefined;
|
|
@@ -431,7 +429,7 @@ declare const client: (args?: {
|
|
|
431
429
|
} & {
|
|
432
430
|
v1: {
|
|
433
431
|
luka_pona: {
|
|
434
|
-
fingerspelling:
|
|
432
|
+
fingerspelling: _$hono_client0.ClientRequest<string, "/v1/luka_pona/fingerspelling", {
|
|
435
433
|
$get: {
|
|
436
434
|
input: {
|
|
437
435
|
query: {
|
|
@@ -476,7 +474,7 @@ declare const client: (args?: {
|
|
|
476
474
|
v1: {
|
|
477
475
|
luka_pona: {
|
|
478
476
|
fingerspelling: {
|
|
479
|
-
":sign":
|
|
477
|
+
":sign": _$hono_client0.ClientRequest<string, "/v1/luka_pona/fingerspelling/:sign", {
|
|
480
478
|
$get: {
|
|
481
479
|
input: {
|
|
482
480
|
query: {
|
|
@@ -543,7 +541,7 @@ declare const client: (args?: {
|
|
|
543
541
|
v1: {
|
|
544
542
|
luka_pona: {
|
|
545
543
|
signs: {
|
|
546
|
-
":sign":
|
|
544
|
+
":sign": _$hono_client0.ClientRequest<string, "/v1/luka_pona/signs/:sign", {
|
|
547
545
|
$get: {
|
|
548
546
|
input: {
|
|
549
547
|
query: {
|
|
@@ -612,7 +610,7 @@ declare const client: (args?: {
|
|
|
612
610
|
};
|
|
613
611
|
} & {
|
|
614
612
|
v1: {
|
|
615
|
-
fonts:
|
|
613
|
+
fonts: _$hono_client0.ClientRequest<string, "/v1/fonts", {
|
|
616
614
|
$get: {
|
|
617
615
|
input: {};
|
|
618
616
|
output: {
|
|
@@ -644,7 +642,7 @@ declare const client: (args?: {
|
|
|
644
642
|
} & {
|
|
645
643
|
v1: {
|
|
646
644
|
fonts: {
|
|
647
|
-
":font":
|
|
645
|
+
":font": _$hono_client0.ClientRequest<string, "/v1/fonts/:font", {
|
|
648
646
|
$get: {
|
|
649
647
|
input: {
|
|
650
648
|
param: {
|
|
@@ -693,7 +691,7 @@ declare const client: (args?: {
|
|
|
693
691
|
};
|
|
694
692
|
} & {
|
|
695
693
|
v1: {
|
|
696
|
-
languages:
|
|
694
|
+
languages: _$hono_client0.ClientRequest<string, "/v1/languages", {
|
|
697
695
|
$get: {
|
|
698
696
|
input: {};
|
|
699
697
|
output: {
|
|
@@ -716,7 +714,7 @@ declare const client: (args?: {
|
|
|
716
714
|
} & {
|
|
717
715
|
v1: {
|
|
718
716
|
languages: {
|
|
719
|
-
":language":
|
|
717
|
+
":language": _$hono_client0.ClientRequest<string, "/v1/languages/:language", {
|
|
720
718
|
$get: {
|
|
721
719
|
input: {
|
|
722
720
|
param: {
|
|
@@ -754,9 +752,18 @@ declare const client: (args?: {
|
|
|
754
752
|
}>;
|
|
755
753
|
};
|
|
756
754
|
};
|
|
755
|
+
} & {
|
|
756
|
+
v2: _$hono_client0.ClientRequest<string, "/v2", {
|
|
757
|
+
$get: {
|
|
758
|
+
input: {};
|
|
759
|
+
output: undefined;
|
|
760
|
+
outputFormat: "redirect";
|
|
761
|
+
status: 302;
|
|
762
|
+
};
|
|
763
|
+
}>;
|
|
757
764
|
} & {
|
|
758
765
|
v2: {
|
|
759
|
-
words:
|
|
766
|
+
words: _$hono_client0.ClientRequest<string, "/v2/words", {
|
|
760
767
|
$get: {
|
|
761
768
|
input: {};
|
|
762
769
|
output: {
|
|
@@ -820,7 +827,7 @@ declare const client: (args?: {
|
|
|
820
827
|
} & {
|
|
821
828
|
v2: {
|
|
822
829
|
sandbox: {
|
|
823
|
-
words:
|
|
830
|
+
words: _$hono_client0.ClientRequest<string, "/v2/sandbox/words", {
|
|
824
831
|
$get: {
|
|
825
832
|
input: {};
|
|
826
833
|
output: {
|
|
@@ -882,19 +889,10 @@ declare const client: (args?: {
|
|
|
882
889
|
}>;
|
|
883
890
|
};
|
|
884
891
|
};
|
|
885
|
-
} & {
|
|
886
|
-
v2: hono_client34.ClientRequest<{
|
|
887
|
-
$get: {
|
|
888
|
-
input: {};
|
|
889
|
-
output: undefined;
|
|
890
|
-
outputFormat: "redirect";
|
|
891
|
-
status: 302;
|
|
892
|
-
};
|
|
893
|
-
}>;
|
|
894
892
|
} & {
|
|
895
893
|
v2: {
|
|
896
894
|
words: {
|
|
897
|
-
":word":
|
|
895
|
+
":word": _$hono_client0.ClientRequest<string, "/v2/words/:word", {
|
|
898
896
|
$get: {
|
|
899
897
|
input: {
|
|
900
898
|
param: {
|
|
@@ -975,7 +973,7 @@ declare const client: (args?: {
|
|
|
975
973
|
};
|
|
976
974
|
} & {
|
|
977
975
|
v2: {
|
|
978
|
-
glyphs:
|
|
976
|
+
glyphs: _$hono_client0.ClientRequest<string, "/v2/glyphs", {
|
|
979
977
|
$get: {
|
|
980
978
|
input: {};
|
|
981
979
|
output: {
|
|
@@ -1014,7 +1012,7 @@ declare const client: (args?: {
|
|
|
1014
1012
|
} & {
|
|
1015
1013
|
v2: {
|
|
1016
1014
|
glyphs: {
|
|
1017
|
-
":glyph":
|
|
1015
|
+
":glyph": _$hono_client0.ClientRequest<string, "/v2/glyphs/:glyph", {
|
|
1018
1016
|
$get: {
|
|
1019
1017
|
input: {
|
|
1020
1018
|
param: {
|
|
@@ -1070,7 +1068,7 @@ declare const client: (args?: {
|
|
|
1070
1068
|
};
|
|
1071
1069
|
} & {
|
|
1072
1070
|
v2: {
|
|
1073
|
-
sandbox:
|
|
1071
|
+
sandbox: _$hono_client0.ClientRequest<string, "/v2/sandbox", {
|
|
1074
1072
|
$get: {
|
|
1075
1073
|
input: {};
|
|
1076
1074
|
output: undefined;
|
|
@@ -1083,7 +1081,7 @@ declare const client: (args?: {
|
|
|
1083
1081
|
v2: {
|
|
1084
1082
|
sandbox: {
|
|
1085
1083
|
words: {
|
|
1086
|
-
":word":
|
|
1084
|
+
":word": _$hono_client0.ClientRequest<string, "/v2/sandbox/words/:word", {
|
|
1087
1085
|
$get: {
|
|
1088
1086
|
input: {
|
|
1089
1087
|
param: {
|
|
@@ -1166,7 +1164,7 @@ declare const client: (args?: {
|
|
|
1166
1164
|
} & {
|
|
1167
1165
|
v2: {
|
|
1168
1166
|
sandbox: {
|
|
1169
|
-
glyphs:
|
|
1167
|
+
glyphs: _$hono_client0.ClientRequest<string, "/v2/sandbox/glyphs", {
|
|
1170
1168
|
$get: {
|
|
1171
1169
|
input: {};
|
|
1172
1170
|
output: {
|
|
@@ -1207,7 +1205,7 @@ declare const client: (args?: {
|
|
|
1207
1205
|
v2: {
|
|
1208
1206
|
sandbox: {
|
|
1209
1207
|
glyphs: {
|
|
1210
|
-
":glyph":
|
|
1208
|
+
":glyph": _$hono_client0.ClientRequest<string, "/v2/sandbox/glyphs/:glyph", {
|
|
1211
1209
|
$get: {
|
|
1212
1210
|
input: {
|
|
1213
1211
|
param: {
|
|
@@ -1265,7 +1263,7 @@ declare const client: (args?: {
|
|
|
1265
1263
|
} & {
|
|
1266
1264
|
v2: {
|
|
1267
1265
|
luka_pona: {
|
|
1268
|
-
signs:
|
|
1266
|
+
signs: _$hono_client0.ClientRequest<string, "/v2/luka_pona/signs", {
|
|
1269
1267
|
$get: {
|
|
1270
1268
|
input: {};
|
|
1271
1269
|
output: {
|
|
@@ -1309,7 +1307,7 @@ declare const client: (args?: {
|
|
|
1309
1307
|
v2: {
|
|
1310
1308
|
luka_pona: {
|
|
1311
1309
|
signs: {
|
|
1312
|
-
":sign":
|
|
1310
|
+
":sign": _$hono_client0.ClientRequest<string, "/v2/luka_pona/signs/:sign", {
|
|
1313
1311
|
$get: {
|
|
1314
1312
|
input: {
|
|
1315
1313
|
param: {
|
|
@@ -1370,7 +1368,7 @@ declare const client: (args?: {
|
|
|
1370
1368
|
} & {
|
|
1371
1369
|
v2: {
|
|
1372
1370
|
luka_pona: {
|
|
1373
|
-
fingerspellings:
|
|
1371
|
+
fingerspellings: _$hono_client0.ClientRequest<string, "/v2/luka_pona/fingerspellings", {
|
|
1374
1372
|
$get: {
|
|
1375
1373
|
input: {};
|
|
1376
1374
|
output: {
|
|
@@ -1409,7 +1407,7 @@ declare const client: (args?: {
|
|
|
1409
1407
|
v2: {
|
|
1410
1408
|
luka_pona: {
|
|
1411
1409
|
fingerspellings: {
|
|
1412
|
-
":fingerspelling":
|
|
1410
|
+
":fingerspelling": _$hono_client0.ClientRequest<string, "/v2/luka_pona/fingerspellings/:fingerspelling", {
|
|
1413
1411
|
$get: {
|
|
1414
1412
|
input: {
|
|
1415
1413
|
param: {
|
|
@@ -1464,7 +1462,7 @@ declare const client: (args?: {
|
|
|
1464
1462
|
};
|
|
1465
1463
|
} & {
|
|
1466
1464
|
v2: {
|
|
1467
|
-
fonts:
|
|
1465
|
+
fonts: _$hono_client0.ClientRequest<string, "/v2/fonts", {
|
|
1468
1466
|
$get: {
|
|
1469
1467
|
input: {};
|
|
1470
1468
|
output: {
|
|
@@ -1496,7 +1494,7 @@ declare const client: (args?: {
|
|
|
1496
1494
|
} & {
|
|
1497
1495
|
v2: {
|
|
1498
1496
|
fonts: {
|
|
1499
|
-
":font":
|
|
1497
|
+
":font": _$hono_client0.ClientRequest<string, "/v2/fonts/:font", {
|
|
1500
1498
|
$get: {
|
|
1501
1499
|
input: {
|
|
1502
1500
|
param: {
|
|
@@ -1545,7 +1543,7 @@ declare const client: (args?: {
|
|
|
1545
1543
|
};
|
|
1546
1544
|
} & {
|
|
1547
1545
|
v2: {
|
|
1548
|
-
languages:
|
|
1546
|
+
languages: _$hono_client0.ClientRequest<string, "/v2/languages", {
|
|
1549
1547
|
$get: {
|
|
1550
1548
|
input: {};
|
|
1551
1549
|
output: {
|
|
@@ -1568,7 +1566,7 @@ declare const client: (args?: {
|
|
|
1568
1566
|
} & {
|
|
1569
1567
|
v2: {
|
|
1570
1568
|
languages: {
|
|
1571
|
-
":language":
|
|
1569
|
+
":language": _$hono_client0.ClientRequest<string, "/v2/languages/:language", {
|
|
1572
1570
|
$get: {
|
|
1573
1571
|
input: {
|
|
1574
1572
|
param: {
|
|
@@ -1609,4 +1607,4 @@ declare const client: (args?: {
|
|
|
1609
1607
|
};
|
|
1610
1608
|
type ApiType = AppType;
|
|
1611
1609
|
//#endregion
|
|
1612
|
-
export {
|
|
1610
|
+
export { ApiType, client };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { hc } from "hono/client";
|
|
2
|
-
|
|
3
2
|
//#region src/lib/v2/client.ts
|
|
4
3
|
const client = (args) => {
|
|
5
4
|
const { baseUrl = "https://api.linku.la", fetch = globalThis.fetch } = args ?? {};
|
|
6
5
|
return hc(baseUrl, { fetch });
|
|
7
6
|
};
|
|
8
|
-
|
|
9
7
|
//#endregion
|
|
10
|
-
export { client
|
|
8
|
+
export { client };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { n as
|
|
3
|
-
import { a as Glyph, c as Languages, d as Word, f as Words, i as Fonts, l as Sign, n as Fingerspellings, o as Glyphs, r as Font, s as Language, t as Fingerspelling, u as Signs } from "../../index-DObG_APy.js";
|
|
1
|
+
import { client } from "./client.mjs";
|
|
2
|
+
import { a as Glyph, c as Languages, d as Word, f as Words, i as Fonts, l as Sign, n as Fingerspellings, o as Glyphs, r as Font, s as Language, t as Fingerspelling, u as Signs } from "../../index-N8h8E1s6.mjs";
|
|
4
3
|
import { ClientResponse } from "hono/client";
|
|
5
4
|
import { Equal, Expect } from "hono/utils/types";
|
|
6
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as WordRepresentations, S as WordPuVerbatim, T as WordUsage, _ as SignEtymology, a as Glyph, b as WordAudio, c as Languages, d as Word, f as Words, g as LocalizedWordEtymology, h as LocalizedWordDefinition, i as Fonts, l as Sign, m as LocalizedWordCommentary, n as Fingerspellings, o as Glyphs, p as FontLinks, r as Font, s as Language, t as Fingerspelling, u as Signs, v as SignVideo, w as WordTranslations, x as WordKuData, y as SignWriting } from "../../index-
|
|
1
|
+
import { C as WordRepresentations, S as WordPuVerbatim, T as WordUsage, _ as SignEtymology, a as Glyph, b as WordAudio, c as Languages, d as Word, f as Words, g as LocalizedWordEtymology, h as LocalizedWordDefinition, i as Fonts, l as Sign, m as LocalizedWordCommentary, n as Fingerspellings, o as Glyphs, p as FontLinks, r as Font, s as Language, t as Fingerspelling, u as Signs, v as SignVideo, w as WordTranslations, x as WordKuData, y as SignWriting } from "../../index-N8h8E1s6.mjs";
|
|
2
2
|
export { Fingerspelling, Fingerspellings, Font, FontLinks, Fonts, Glyph, Glyphs, Language, Languages, LocalizedWordCommentary, LocalizedWordDefinition, LocalizedWordEtymology, Sign, SignEtymology, SignVideo, SignWriting, Signs, Word, WordAudio, WordKuData, WordPuVerbatim, WordRepresentations, WordTranslations, WordUsage, Words };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Book, Date, Era, OptionalDate, Score, UsageCategory, WritingSystem } from "./utils.mjs";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
|
-
|
|
4
3
|
//#region src/lib/v2/index.ts
|
|
5
4
|
const CAN_HAVE_KU_DATA = [
|
|
6
5
|
"pu",
|
|
@@ -108,7 +107,7 @@ const Word = z.object({
|
|
|
108
107
|
etymology: Etymology.describe("Localized etymology of this word."),
|
|
109
108
|
definition: Definition.describe("Localized definition of this word.")
|
|
110
109
|
})
|
|
111
|
-
}).describe("General info on a Toki Pona word").refine(({
|
|
110
|
+
}).describe("General info on a Toki Pona word").refine(({ primary_glyph_id, glyph_ids, usage_category }) => usage_category !== "sandbox" ? primary_glyph_id && primary_glyph_id.length >= 3 && glyph_ids.length >= 1 : true).refine(({ id, book, pu_verbatim }) => book === "pu" && !NO_PU_VERBATIM.includes(id) ? pu_verbatim !== void 0 : true).refine(({ id, book, ku_data }) => CAN_HAVE_KU_DATA.includes(book) && !NO_KU_DATA.includes(id) ? ku_data !== void 0 : true);
|
|
112
111
|
const Glyph = z.object({
|
|
113
112
|
id: Id.describe("A unique identifier for the glyph. Named after its primary word and numbered in order of coining or attestation."),
|
|
114
113
|
word: z.string().min(1).describe("The toki pona word which is written with this glyph."),
|
|
@@ -189,6 +188,5 @@ const Words = z.record(Id, Word).describe("A raw data object containing dictiona
|
|
|
189
188
|
const Glyphs = z.record(Id, Glyph).describe("A raw data object containing metadata about Sitelen Pona glyphs");
|
|
190
189
|
const Signs = z.record(Id, Sign).describe("A raw data object containing information about Luka Pona signs");
|
|
191
190
|
const Fingerspellings = z.record(Id, Fingerspelling).describe("A raw data object containing information about Luka Pona fingerspelling signs");
|
|
192
|
-
|
|
193
191
|
//#endregion
|
|
194
|
-
export {
|
|
192
|
+
export { Fingerspelling, Fingerspellings, Font, Fonts, Glyph, Glyphs, Language, Languages, Sign, Signs, Word, Words };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as WordRepresentations, S as WordPuVerbatim, T as WordUsage, _ as SignEtymology, b as WordAudio, g as LocalizedWordEtymology, h as LocalizedWordDefinition, m as LocalizedWordCommentary, p as FontLinks, v as SignVideo, w as WordTranslations, x as WordKuData, y as SignWriting } from "../../index-
|
|
1
|
+
import { C as WordRepresentations, S as WordPuVerbatim, T as WordUsage, _ as SignEtymology, b as WordAudio, g as LocalizedWordEtymology, h as LocalizedWordDefinition, m as LocalizedWordCommentary, p as FontLinks, v as SignVideo, w as WordTranslations, x as WordKuData, y as SignWriting } from "../../index-N8h8E1s6.mjs";
|
|
2
2
|
export { FontLinks, LocalizedWordCommentary, LocalizedWordDefinition, LocalizedWordEtymology, SignEtymology, SignVideo, SignWriting, WordAudio, WordKuData, WordPuVerbatim, WordRepresentations, WordTranslations, WordUsage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as WordRepresentations, S as WordPuVerbatim, T as WordUsage, _ as SignEtymology, b as WordAudio, g as LocalizedWordEtymology, h as LocalizedWordDefinition, m as LocalizedWordCommentary, p as FontLinks, v as SignVideo, w as WordTranslations, x as WordKuData, y as SignWriting } from "../../index-
|
|
1
|
+
import { C as WordRepresentations, S as WordPuVerbatim, T as WordUsage, _ as SignEtymology, b as WordAudio, g as LocalizedWordEtymology, h as LocalizedWordDefinition, m as LocalizedWordCommentary, p as FontLinks, v as SignVideo, w as WordTranslations, x as WordKuData, y as SignWriting } from "../../index-N8h8E1s6.mjs";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/v2/utils.d.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
|
|
3
2
|
//#region src/lib/v2/utils.ts
|
|
4
3
|
const Date = z.string().regex(/^(?<year>20\d{2})(?:-(?<month>0[1-9]|1[0-2])(?:-(?<day>0[1-9]|[12]\d|3[01]))?)?$/);
|
|
5
4
|
const OptionalDate = z.string().regex(/^(?:|(?<year>20\d{2})(?:-(?<month>0[1-9]|1[0-2])(?:-(?<day>0[1-9]|[12]\d|3[01]))?)?|(?<startYear>20\d{2})-(?<endYear>20\d{2}))$/);
|
|
@@ -35,6 +34,5 @@ const WritingSystem = z.enum([
|
|
|
35
34
|
function getTranslatedData(data, key, language) {
|
|
36
35
|
return (data.translations[language] ?? data.translations["en"])[key];
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
//#endregion
|
|
40
|
-
export {
|
|
38
|
+
export { Book, Date, Era, OptionalDate, Score, UsageCategory, WritingSystem, getTranslatedData };
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../v1-DkHVwPCI.js";
|
|
3
|
-
import "../utils-DkAaVBMs.js";
|
|
4
|
-
import "../utils-Z1o5sWsW.js";
|
|
5
|
-
import "../v2-CDtbJFxV.js";
|
|
6
|
-
import { l as v2_default, r as v1_default } from "../v1-obRCoWWK.js";
|
|
1
|
+
import { s as app$2, t as app$1 } from "../v1-Da4_o5R1.mjs";
|
|
7
2
|
import { Hono } from "hono";
|
|
8
3
|
import { cache } from "hono/cache";
|
|
9
4
|
import { cors } from "hono/cors";
|
|
@@ -12,7 +7,6 @@ import { logger } from "hono/logger";
|
|
|
12
7
|
import { prettyJSON } from "hono/pretty-json";
|
|
13
8
|
import { secureHeaders } from "hono/secure-headers";
|
|
14
9
|
import { trimTrailingSlash } from "hono/trailing-slash";
|
|
15
|
-
|
|
16
10
|
//#region src/server/index.ts
|
|
17
11
|
const twentyFourHours = 1440 * 60;
|
|
18
12
|
const app = new Hono({ strict: false }).use("*", secureHeaders()).use("*", prettyJSON()).use("*", trimTrailingSlash()).use("*", logger()).use("*", cors({
|
|
@@ -32,12 +26,10 @@ const app = new Hono({ strict: false }).use("*", secureHeaders()).use("*", prett
|
|
|
32
26
|
message: err.message
|
|
33
27
|
}, status);
|
|
34
28
|
}).get("/", (c) => {
|
|
35
|
-
return c.redirect("/
|
|
29
|
+
return c.redirect("/v2");
|
|
36
30
|
}).get("/jasima", async (c) => {
|
|
37
31
|
const data = await fetch("https://raw.githubusercontent.com/lipu-linku/jasima/main/data.json").then((r) => r.json());
|
|
38
32
|
return c.json(data);
|
|
39
|
-
}).route("/v1",
|
|
40
|
-
var server_default = app;
|
|
41
|
-
|
|
33
|
+
}).route("/v1", app$1).route("/v2", app$2);
|
|
42
34
|
//#endregion
|
|
43
|
-
export {
|
|
35
|
+
export { app as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as Languages
|
|
2
|
-
import { c as Languages } from "../index-
|
|
3
|
-
import * as
|
|
1
|
+
import { u as Languages } from "../index-nmyNJa57.mjs";
|
|
2
|
+
import { c as Languages$1 } from "../index-N8h8E1s6.mjs";
|
|
3
|
+
import * as _$hono from "hono";
|
|
4
4
|
|
|
5
5
|
//#region src/server/utils.d.ts
|
|
6
6
|
declare const entries: <const T extends object>(o: T) => { [K in keyof T]: [K, T[K]] }[keyof T][];
|
|
@@ -8,8 +8,8 @@ declare const keys: <const K extends PropertyKey>(o: Record<K, any>) => K[];
|
|
|
8
8
|
declare const filterObject: <const T extends object>(o: T, predicate: (o: [keyof T, T[keyof T]]) => boolean) => {
|
|
9
9
|
[k: string]: T[keyof T];
|
|
10
10
|
};
|
|
11
|
-
declare const langIdCoalesce: (lang: string, langs: Languages
|
|
12
|
-
declare const langValidator:
|
|
11
|
+
declare const langIdCoalesce: (lang: string, langs: Languages | Languages$1) => string | undefined;
|
|
12
|
+
declare const langValidator: _$hono.MiddlewareHandler<_$hono.Env, string, {
|
|
13
13
|
in: {
|
|
14
14
|
query: {
|
|
15
15
|
lang?: string | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
import { zValidator } from "@hono/zod-validator";
|
|
3
|
-
|
|
4
3
|
//#region src/server/utils.ts
|
|
5
4
|
const entries = (o) => {
|
|
6
5
|
return Object.entries(o);
|
|
@@ -15,7 +14,7 @@ const langIdCoalesce = (lang, langs) => {
|
|
|
15
14
|
if (lang in langs) return lang;
|
|
16
15
|
for (const [id, metadata] of Object.entries(langs)) {
|
|
17
16
|
if (lang === metadata.locale) return id;
|
|
18
|
-
for (const [
|
|
17
|
+
for (const [_, name] of Object.entries(metadata.name)) if (lang.toLowerCase() === name?.toLowerCase()) return id;
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
20
|
const langValidator = zValidator("query", z.object({ lang: z.string().regex(/^([^,]+,)*[^,]+/).optional() }));
|
|
@@ -28,6 +27,5 @@ function mergeToKey(target, tkey, ...sources) {
|
|
|
28
27
|
for (const key in source) target[key][tkey] = source[key];
|
|
29
28
|
return target;
|
|
30
29
|
}
|
|
31
|
-
|
|
32
30
|
//#endregion
|
|
33
|
-
export {
|
|
31
|
+
export { entries, filterObject, joinPath, keys, langIdCoalesce, langValidator, mergeToKey };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MiddlewareHandler } from "hono";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as _$hono_types0 from "hono/types";
|
|
4
|
+
import * as _$hono_hono_base0 from "hono/hono-base";
|
|
5
5
|
|
|
6
6
|
//#region src/server/v1/index.d.ts
|
|
7
7
|
declare const config: {
|
|
@@ -215,7 +215,7 @@ declare const config: {
|
|
|
215
215
|
};
|
|
216
216
|
};
|
|
217
217
|
declare const languagesFilter: (nested: boolean) => MiddlewareHandler;
|
|
218
|
-
declare const app:
|
|
218
|
+
declare const app: _$hono_hono_base0.HonoBase<_$hono_types0.BlankEnv, {
|
|
219
219
|
"/": {
|
|
220
220
|
$get: {
|
|
221
221
|
input: {};
|
|
@@ -897,6 +897,6 @@ declare const app: hono_hono_base3.HonoBase<hono_types4.BlankEnv, {
|
|
|
897
897
|
status: 400;
|
|
898
898
|
};
|
|
899
899
|
};
|
|
900
|
-
}, "/">;
|
|
900
|
+
}, "/", "/languages/:language">;
|
|
901
901
|
//#endregion
|
|
902
902
|
export { config, app as default, languagesFilter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _$hono_types0 from "hono/types";
|
|
3
|
+
import * as _$hono_hono_base0 from "hono/hono-base";
|
|
4
4
|
|
|
5
5
|
//#region src/server/v2/index.d.ts
|
|
6
6
|
declare const config: {
|
|
@@ -321,7 +321,7 @@ declare const config: {
|
|
|
321
321
|
};
|
|
322
322
|
};
|
|
323
323
|
declare const fetchData: <K extends keyof typeof config>(key: K, langcode?: string) => Promise<z.output<(typeof config)[K]["schema"]>>;
|
|
324
|
-
declare const app:
|
|
324
|
+
declare const app: _$hono_hono_base0.HonoBase<_$hono_types0.BlankEnv, {
|
|
325
325
|
"/": {
|
|
326
326
|
$get: {
|
|
327
327
|
input: {};
|
|
@@ -1107,6 +1107,6 @@ declare const app: hono_hono_base2.HonoBase<hono_types3.BlankEnv, {
|
|
|
1107
1107
|
status: 400;
|
|
1108
1108
|
};
|
|
1109
1109
|
};
|
|
1110
|
-
}, "/">;
|
|
1110
|
+
}, "/", "/languages/:language">;
|
|
1111
1111
|
//#endregion
|
|
1112
1112
|
export { config, app as default, fetchData };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
import * as hono_types0 from "hono/types";
|
|
3
|
-
import * as hono_hono_base0 from "hono/hono-base";
|
|
2
|
+
import * as _$hono_types0 from "hono/types";
|
|
3
|
+
import * as _$hono_hono_base0 from "hono/hono-base";
|
|
4
4
|
|
|
5
5
|
//#region src/server/versioning.d.ts
|
|
6
6
|
type ApiVersion = "v1" | "v2";
|
|
@@ -543,7 +543,7 @@ declare const versions: {
|
|
|
543
543
|
};
|
|
544
544
|
type FilesToVariables<Version extends ApiVersion, Endpoints extends (typeof versions)[Version] = (typeof versions)[Version]> = { [K in keyof Endpoints]: z.output<Endpoints[K]["schema"]> };
|
|
545
545
|
declare const apps: {
|
|
546
|
-
readonly v1: hono_hono_base0.HonoBase<hono_types0.BlankEnv, {
|
|
546
|
+
readonly v1: _$hono_hono_base0.HonoBase<_$hono_types0.BlankEnv, {
|
|
547
547
|
"/": {
|
|
548
548
|
$get: {
|
|
549
549
|
input: {};
|
|
@@ -1225,8 +1225,8 @@ declare const apps: {
|
|
|
1225
1225
|
status: 400;
|
|
1226
1226
|
};
|
|
1227
1227
|
};
|
|
1228
|
-
}, "/">;
|
|
1229
|
-
readonly v2: hono_hono_base0.HonoBase<hono_types0.BlankEnv, {
|
|
1228
|
+
}, "/", "/languages/:language">;
|
|
1229
|
+
readonly v2: _$hono_hono_base0.HonoBase<_$hono_types0.BlankEnv, {
|
|
1230
1230
|
"/": {
|
|
1231
1231
|
$get: {
|
|
1232
1232
|
input: {};
|
|
@@ -2012,7 +2012,7 @@ declare const apps: {
|
|
|
2012
2012
|
status: 400;
|
|
2013
2013
|
};
|
|
2014
2014
|
};
|
|
2015
|
-
}, "/">;
|
|
2015
|
+
}, "/", "/languages/:language">;
|
|
2016
2016
|
};
|
|
2017
2017
|
declare const fetchFile: <Endpoint extends EndpointConfig>(version: ApiVersion, config: Endpoint, langcode?: string) => Promise<z.ZodSafeParseResult<z.output<Endpoint["schema"]>>>;
|
|
2018
2018
|
//#endregion
|