@kulupu-linku/sona 0.1.1 → 0.1.2

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.
@@ -0,0 +1,36 @@
1
+ // src/utils.ts
2
+ import { z } from "zod";
3
+ var Book = z.union([
4
+ z.literal("pu"),
5
+ z.literal("ku suli"),
6
+ z.literal("ku lili"),
7
+ z.literal("none")
8
+ ]);
9
+ var CoinedEra = z.union([z.literal("pre-pu"), z.literal("post-pu"), z.literal("post-ku")]);
10
+ var UsageCategory = z.union([
11
+ z.literal("core"),
12
+ z.literal("widespread"),
13
+ z.literal("common"),
14
+ z.literal("uncommon"),
15
+ z.literal("rare"),
16
+ z.literal("obscure")
17
+ ]);
18
+ var YearMonth = z.string().regex(/^20\d{2}-(0[1-9]|1[0-2])$/g);
19
+ var WritingSystem = z.enum([
20
+ "sitelen pona",
21
+ "sitelen sitelen",
22
+ "alphabet",
23
+ "syllabary",
24
+ "logography",
25
+ "tokiponido alphabet",
26
+ "tokiponido syllabary",
27
+ "tokiponido logography"
28
+ ]);
29
+
30
+ export {
31
+ Book,
32
+ CoinedEra,
33
+ UsageCategory,
34
+ YearMonth,
35
+ WritingSystem
36
+ };
@@ -0,0 +1,211 @@
1
+ import * as hono_client from 'hono/client';
2
+ import * as hono_hono_base from 'hono/hono-base';
3
+ import * as hono_types from 'hono/types';
4
+ import * as hono from 'hono';
5
+
6
+ declare const app: hono_hono_base.HonoBase<hono.Env, hono_types.MergeSchemaPath<hono.ToSchema<"get", "/", unknown, {}> & hono.ToSchema<"get", "/words", {
7
+ query: {
8
+ lang?: string | undefined;
9
+ };
10
+ }, never> & hono.ToSchema<"get", "/words/:word", {
11
+ query: {
12
+ lang?: string | undefined;
13
+ };
14
+ } & {
15
+ param: {
16
+ word: string;
17
+ };
18
+ }, {}> & hono.ToSchema<"get", "/luka_pona/fingerspelling", {
19
+ query: {
20
+ lang?: string | undefined;
21
+ };
22
+ }, never> & hono.ToSchema<"get", "/luka_pona/fingerspelling/:sign", {
23
+ query: {
24
+ lang?: string | undefined;
25
+ };
26
+ } & {
27
+ param: {
28
+ sign: string;
29
+ };
30
+ }, {}> & hono.ToSchema<"get", "/luka_pona/signs", {
31
+ query: {
32
+ lang?: string | undefined;
33
+ };
34
+ }, never> & hono.ToSchema<"get", "/luka_pona/signs/:sign", {
35
+ query: {
36
+ lang?: string | undefined;
37
+ };
38
+ } & {
39
+ param: {
40
+ sign: string;
41
+ };
42
+ }, {}> & hono.ToSchema<"get", "/fonts", unknown, never> & hono.ToSchema<"get", "/fonts/:font", {
43
+ param: {
44
+ font: string;
45
+ };
46
+ }, {}>, "/v1"> & hono.ToSchema<"get", "/", unknown, {}>, "/">;
47
+
48
+ type AppType = typeof app;
49
+
50
+ declare const client: {
51
+ index: hono_client.ClientRequest<{
52
+ $get: {
53
+ input: {};
54
+ output: {};
55
+ };
56
+ }>;
57
+ } & {
58
+ v1: hono_client.ClientRequest<{
59
+ $get: {
60
+ input: {};
61
+ output: {};
62
+ };
63
+ }>;
64
+ } & {
65
+ v1: {
66
+ words: hono_client.ClientRequest<{
67
+ $get: {
68
+ input: {
69
+ query: {
70
+ lang?: string | undefined;
71
+ };
72
+ };
73
+ output: never;
74
+ };
75
+ }>;
76
+ };
77
+ } & {
78
+ v1: {
79
+ words: {
80
+ ":word": hono_client.ClientRequest<{
81
+ $get: {
82
+ input: {
83
+ query: {
84
+ lang?: string | undefined;
85
+ };
86
+ } & {
87
+ param: {
88
+ word: string;
89
+ };
90
+ } & {
91
+ param: {
92
+ word: string;
93
+ };
94
+ };
95
+ output: {};
96
+ };
97
+ }>;
98
+ };
99
+ };
100
+ } & {
101
+ v1: {
102
+ luka_pona: {
103
+ fingerspelling: hono_client.ClientRequest<{
104
+ $get: {
105
+ input: {
106
+ query: {
107
+ lang?: string | undefined;
108
+ };
109
+ };
110
+ output: never;
111
+ };
112
+ }>;
113
+ };
114
+ };
115
+ } & {
116
+ v1: {
117
+ luka_pona: {
118
+ fingerspelling: {
119
+ ":sign": hono_client.ClientRequest<{
120
+ $get: {
121
+ input: {
122
+ query: {
123
+ lang?: string | undefined;
124
+ };
125
+ } & {
126
+ param: {
127
+ sign: string;
128
+ };
129
+ } & {
130
+ param: {
131
+ sign: string;
132
+ };
133
+ };
134
+ output: {};
135
+ };
136
+ }>;
137
+ };
138
+ };
139
+ };
140
+ } & {
141
+ v1: {
142
+ luka_pona: {
143
+ signs: hono_client.ClientRequest<{
144
+ $get: {
145
+ input: {
146
+ query: {
147
+ lang?: string | undefined;
148
+ };
149
+ };
150
+ output: never;
151
+ };
152
+ }>;
153
+ };
154
+ };
155
+ } & {
156
+ v1: {
157
+ luka_pona: {
158
+ signs: {
159
+ ":sign": hono_client.ClientRequest<{
160
+ $get: {
161
+ input: {
162
+ query: {
163
+ lang?: string | undefined;
164
+ };
165
+ } & {
166
+ param: {
167
+ sign: string;
168
+ };
169
+ } & {
170
+ param: {
171
+ sign: string;
172
+ };
173
+ };
174
+ output: {};
175
+ };
176
+ }>;
177
+ };
178
+ };
179
+ };
180
+ } & {
181
+ v1: {
182
+ fonts: hono_client.ClientRequest<{
183
+ $get: {
184
+ input: {};
185
+ output: never;
186
+ };
187
+ }>;
188
+ };
189
+ } & {
190
+ v1: {
191
+ fonts: {
192
+ ":font": hono_client.ClientRequest<{
193
+ $get: {
194
+ input: {
195
+ param: {
196
+ font: string;
197
+ };
198
+ } & {
199
+ param: {
200
+ font: string;
201
+ };
202
+ };
203
+ output: {};
204
+ };
205
+ }>;
206
+ };
207
+ };
208
+ };
209
+ type ApiType = AppType;
210
+
211
+ export { type ApiType, client };
package/dist/client.js ADDED
@@ -0,0 +1,6 @@
1
+ // src/client.ts
2
+ import { hc } from "hono/client";
3
+ var client = hc("https://api.linku.la/");
4
+ export {
5
+ client
6
+ };