@tktb-tess/my-zod-schema 0.2.3 → 0.3.1

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/bundle.js CHANGED
@@ -1,28 +1,28 @@
1
- import t from "zod";
2
- const e = t.object({
1
+ import * as t from "zod";
2
+ const r = t.object({
3
3
  id: t.int().nonnegative(),
4
4
  form: t.string()
5
- }), i = t.object({
5
+ }), m = t.object({
6
6
  title: t.string(),
7
7
  forms: t.string().array(),
8
8
  rawForms: t.string().optional()
9
- }), s = t.object({
9
+ }), g = t.object({
10
10
  title: t.string(),
11
11
  text: t.string()
12
- }), c = t.object({
12
+ }), p = t.object({
13
13
  title: t.string(),
14
14
  form: t.string()
15
- }), l = t.object({
15
+ }), d = t.object({
16
16
  title: t.string(),
17
- entry: e
18
- }), m = {
19
- entry: e,
20
- translations: i.array(),
17
+ entry: r
18
+ }), b = {
19
+ entry: r,
20
+ translations: m.array(),
21
21
  tags: t.string().array(),
22
- contents: s.array(),
23
- variations: c.array(),
24
- relations: l.array()
25
- }, g = t.object(m), p = t.looseObject(m), d = t.object({
22
+ contents: g.array(),
23
+ variations: p.array(),
24
+ relations: d.array()
25
+ }, y = t.object(b), S = t.looseObject(b), h = t.object({
26
26
  id: t.int().nonnegative(),
27
27
  sentence: t.string(),
28
28
  translation: t.string(),
@@ -35,66 +35,66 @@ const e = t.object({
35
35
  catalog: t.string(),
36
36
  number: t.int().nonnegative()
37
37
  }).optional()
38
- }), b = t.object({
38
+ }), j = t.object({
39
39
  explanation: t.string().optional(),
40
40
  punctuations: t.string().array(),
41
41
  ignoredPattern: t.string().optional(),
42
42
  pronunciationTitle: t.string(),
43
43
  enableMarkdown: t.boolean()
44
- }), y = t.object({
44
+ }), u = t.object({
45
45
  version: t.literal(1).optional(),
46
- words: g.array()
47
- }), n = t.looseObject({
46
+ words: y.array()
47
+ }), o = t.looseObject({
48
48
  version: t.literal(2),
49
- words: p.array()
50
- }), x = t.discriminatedUnion("version", [
51
- y,
52
- n
53
- ]), O = n.extend({
54
- examples: d.array(),
55
- zpdicOnline: b,
49
+ words: S.array()
50
+ }), N = t.discriminatedUnion("version", [
51
+ u,
52
+ o
53
+ ]), $ = o.extend({
54
+ examples: h.array(),
55
+ zpdicOnline: j,
56
56
  snoj: t.string().optional(),
57
57
  zatlin: t.string().optional()
58
- }), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ }), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
59
59
  __proto__: null,
60
- contentSchema: s,
61
- entrySchema: e,
62
- otmjsonSchema: x,
63
- relationSchema: l,
64
- translationSchema: i,
65
- v1Schema: y,
66
- v2Schema: n,
67
- variationSchema: c,
68
- wordv1Schema: g,
69
- wordv2Schema: p,
70
- zpdicConfigSchema: b,
71
- zpdicExampleSchema: d,
72
- zpdicOtmSchema: O
73
- }, Symbol.toStringTag, { value: "Module" })), w = t.object({
60
+ contentSchema: g,
61
+ entrySchema: r,
62
+ otmjsonSchema: N,
63
+ relationSchema: d,
64
+ translationSchema: m,
65
+ v1Schema: u,
66
+ v2Schema: o,
67
+ variationSchema: p,
68
+ wordv1Schema: y,
69
+ wordv2Schema: S,
70
+ zpdicConfigSchema: j,
71
+ zpdicExampleSchema: h,
72
+ zpdicOtmSchema: $
73
+ }, Symbol.toStringTag, { value: "Module" })), v = t.object({
74
74
  titles: t.string().array(),
75
75
  names: t.string().array(),
76
76
  nameString: t.string(),
77
77
  ignoredPattern: t.string(),
78
78
  hidden: t.boolean()
79
- }), a = t.string(), z = t.object({
79
+ }), e = t.string(), f = t.object({
80
80
  title: t.string(),
81
81
  text: t.string(),
82
82
  hidden: t.boolean()
83
- }), _ = t.object({
83
+ }), x = t.object({
84
84
  titles: t.string().array(),
85
85
  form: t.string(),
86
86
  terms: t.string().array(),
87
87
  termString: t.string(),
88
88
  ignoredPattern: t.string()
89
- }), P = t.object({
89
+ }), O = t.object({
90
90
  title: t.string(),
91
91
  name: t.string(),
92
92
  pronunciation: t.string()
93
- }), T = t.object({
93
+ }), w = t.object({
94
94
  titles: t.string().array(),
95
95
  number: t.int().nonnegative(),
96
96
  name: t.string()
97
- }), S = t.string(), j = t.object({
97
+ }), i = t.string(), z = t.object({
98
98
  sentence: t.string(),
99
99
  supplement: t.string(),
100
100
  translation: t.string(),
@@ -103,86 +103,101 @@ const e = t.object({
103
103
  number: t.number()
104
104
  }).array(),
105
105
  offer: t.object({
106
- catalog: S,
106
+ catalog: i,
107
107
  number: t.number()
108
108
  }).nullable()
109
- }), r = j.extend({
110
- id: a,
109
+ }), a = z.extend({
110
+ id: e,
111
111
  number: t.int().nonnegative()
112
- }), h = t.object({
112
+ }), _ = t.object({
113
113
  name: t.string(),
114
114
  pronunciation: t.string(),
115
- equivalents: w.array(),
115
+ equivalents: v.array(),
116
116
  tags: t.string().array(),
117
- phrases: _.array(),
118
- informations: z.array(),
119
- variations: P.array(),
120
- relations: T.array()
121
- }), u = h.extend({
122
- id: a,
117
+ phrases: x.array(),
118
+ informations: f.array(),
119
+ variations: O.array(),
120
+ relations: w.array()
121
+ }), s = _.extend({
122
+ id: e,
123
123
  number: t.int().nonnegative()
124
- }), v = u.extend({
125
- examples: r.array()
126
- }), E = t.object({
127
- word: u
128
- }), R = t.object({
129
- word: v
130
- }), I = t.object({
131
- words: v.array(),
124
+ }), c = s.extend({
125
+ examples: a.array()
126
+ }), A = t.object({
127
+ word: s
128
+ }), C = t.object({
129
+ word: c
130
+ }), M = t.object({
131
+ words: c.array(),
132
132
  total: t.int().nonnegative()
133
- }), N = t.object({
134
- example: r
135
- }), $ = t.object({
136
- examples: r.array(),
133
+ }), D = t.object({
134
+ example: a
135
+ }), U = t.object({
136
+ examples: a.array(),
137
137
  total: t.int().nonnegative()
138
- }), f = t.object({
139
- id: a,
140
- catalog: S,
138
+ }), l = t.object({
139
+ id: e,
140
+ catalog: i,
141
141
  number: t.int().nonnegative(),
142
142
  translation: t.string(),
143
143
  supplement: t.string(),
144
144
  author: t.string()
145
- }), A = t.object({
146
- exampleOffer: f
147
- }), C = t.object({
148
- exampleOffers: f.array(),
145
+ }), L = t.object({
146
+ exampleOffer: l
147
+ }), J = t.object({
148
+ exampleOffers: l.array(),
149
149
  total: t.int().nonnegative()
150
- }), G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
150
+ }), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151
151
  __proto__: null,
152
- editableExampleSchema: j,
153
- editableWordSchema: h,
154
- exOfferResponseSchema: A,
155
- exResponseSchema: N,
156
- mExOfferResponseSchema: C,
157
- mExResponseSchema: $,
158
- mwweResponseSchema: I,
159
- wordResponseSchema: E,
160
- wweResponseSchema: R
161
- }, Symbol.toStringTag, { value: "Module" })), M = t.object({
152
+ catalogSchema: i,
153
+ editableExampleSchema: z,
154
+ editableWordSchema: _,
155
+ equivalentSchema: v,
156
+ exOfferResponseSchema: L,
157
+ exResponseSchema: D,
158
+ exampleOfferSchema: l,
159
+ exampleSchema: a,
160
+ informationSchema: f,
161
+ mExOfferResponseSchema: J,
162
+ mExResponseSchema: U,
163
+ mwweResponseSchema: M,
164
+ objectIDSchema: e,
165
+ phraseSchema: x,
166
+ relationSchema: w,
167
+ variationSchema: O,
168
+ wordResponseSchema: A,
169
+ wordSchema: s,
170
+ wordWithExamplesSchema: c,
171
+ wweResponseSchema: C
172
+ }, Symbol.toStringTag, { value: "Module" })), P = t.object({
162
173
  lastUpdate: t.iso.datetime(),
163
174
  numberOf: t.int().nonnegative()
164
- }), D = t.tuple([t.int().nonnegative(), t.int()]).readonly().array(), o = t.object({
175
+ }), T = t.tuple([t.int().nonnegative(), t.int()]).readonly().array(), n = t.object({
165
176
  id: t.string(),
166
177
  name: t.string().array(),
167
178
  colorName: t.tuple([t.string(), t.string()]),
168
179
  namedBy: t.string().optional()
169
- }), U = t.discriminatedUnion("commaType", [
170
- o.extend({
180
+ }), E = t.discriminatedUnion("commaType", [
181
+ n.extend({
171
182
  commaType: t.literal("rational"),
172
- monzo: D
183
+ monzo: T
173
184
  }),
174
- o.extend({
185
+ n.extend({
175
186
  commaType: t.literal("irrational"),
176
187
  ratio: t.string(),
177
188
  cents: t.number().nonnegative()
178
189
  })
179
- ]), L = t.object({
180
- metadata: M,
181
- commas: U.array()
182
- }), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
190
+ ]), W = t.object({
191
+ metadata: P,
192
+ commas: E.array()
193
+ }), G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
183
194
  __proto__: null,
184
- commaDataSchema: L
185
- }, Symbol.toStringTag, { value: "Module" })), J = t.union([
195
+ commaDataSchema: W,
196
+ contentBaseSchema: n,
197
+ contentSchema: E,
198
+ metadataSchema: P,
199
+ monzoSchema: T
200
+ }, Symbol.toStringTag, { value: "Module" })), k = t.union([
186
201
  t.literal("INT"),
187
202
  t.literal("ART"),
188
203
  t.literal("EXP"),
@@ -208,7 +223,7 @@ const e = t.object({
208
223
  t.literal("PRI"),
209
224
  t.literal("PUB"),
210
225
  t.literal("FIX")
211
- ]), W = t.object({
226
+ ]), R = t.object({
212
227
  datasize: t.tuple([t.int().nonnegative(), t.int().nonnegative()]),
213
228
  title: t.string(),
214
229
  author: t.string().array(),
@@ -222,7 +237,7 @@ const e = t.object({
222
237
  advanced: t.int().nonnegative(),
223
238
  label: t.string().array(),
224
239
  type: t.string().array()
225
- }), k = t.object({
240
+ }), I = t.object({
226
241
  id: t.string(),
227
242
  messier: t.unknown().optional(),
228
243
  name: t.string().array(),
@@ -242,7 +257,7 @@ const e = t.object({
242
257
  name: t.string(),
243
258
  content: t.string().optional()
244
259
  }).array().optional(),
245
- moyune: J.array().optional(),
260
+ moyune: k.array().optional(),
246
261
  clav3: t.object({
247
262
  dialect: t.string().regex(/^(?:[a-z]{2}|~)$/),
248
263
  language: t.string().regex(/^[a-z]{2}$/),
@@ -253,15 +268,17 @@ const e = t.object({
253
268
  example: t.string().array().optional(),
254
269
  script: t.string().array().optional()
255
270
  }), B = t.object({
256
- metadata: W,
257
- contents: k.array()
258
- }), K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
271
+ metadata: R,
272
+ contents: I.array()
273
+ }), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
259
274
  __proto__: null,
275
+ contentSchema: I,
276
+ metadataSchema: R,
260
277
  schema: B
261
278
  }, Symbol.toStringTag, { value: "Module" }));
262
279
  export {
263
- H as Comma,
264
- K as CotecJSON,
265
- F as OTMJSON,
266
- G as ZpDIC
280
+ G as Comma,
281
+ H as CotecJSON,
282
+ q as OTMJSON,
283
+ F as ZpDIC
267
284
  };
@@ -1,12 +1,18 @@
1
- import { default as z } from 'zod';
2
- declare const metadataSchema: z.ZodObject<{
1
+ import * as z from 'zod';
2
+ export declare const metadataSchema: z.ZodObject<{
3
3
  lastUpdate: z.ZodISODateTime;
4
4
  numberOf: z.ZodInt;
5
5
  }, z.core.$strip>;
6
6
  export type Metadata = z.infer<typeof metadataSchema>;
7
- declare const monzoSchema: z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodInt, z.ZodInt], null>>>;
7
+ export declare const monzoSchema: z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodInt, z.ZodInt], null>>>;
8
8
  export type Monzo = z.infer<typeof monzoSchema>;
9
- declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
9
+ export declare const contentBaseSchema: z.ZodObject<{
10
+ id: z.ZodString;
11
+ name: z.ZodArray<z.ZodString>;
12
+ colorName: z.ZodTuple<[z.ZodString, z.ZodString], null>;
13
+ namedBy: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
10
16
  id: z.ZodString;
11
17
  name: z.ZodArray<z.ZodString>;
12
18
  colorName: z.ZodTuple<[z.ZodString, z.ZodString], null>;
@@ -46,4 +52,3 @@ export declare const commaDataSchema: z.ZodObject<{
46
52
  }, z.core.$strip>], "commaType">>;
47
53
  }, z.core.$strip>;
48
54
  export type CommaData = z.infer<typeof commaDataSchema>;
49
- export {};
@@ -1,7 +1,7 @@
1
- import { default as z } from 'zod';
1
+ import * as z from 'zod';
2
2
  declare const moyuneClassSchema: z.ZodUnion<readonly [z.ZodLiteral<"INT">, z.ZodLiteral<"ART">, z.ZodLiteral<"EXP">, z.ZodLiteral<"PHI">, z.ZodLiteral<"HYP">, z.ZodLiteral<"NAT">, z.ZodLiteral<"REA">, z.ZodLiteral<"IMG">, z.ZodLiteral<"CIN">, z.ZodLiteral<"CDE">, z.ZodLiteral<"GEN">, z.ZodLiteral<"SPE">, z.ZodLiteral<"SON">, z.ZodLiteral<"LIT">, z.ZodLiteral<"KIN">, z.ZodLiteral<"SER">, z.ZodLiteral<"JOK">, z.ZodLiteral<"PAV">, z.ZodLiteral<"AAV">, z.ZodLiteral<"PWL">, z.ZodLiteral<"AWL">, z.ZodLiteral<"TOL">, z.ZodLiteral<"PRI">, z.ZodLiteral<"PUB">, z.ZodLiteral<"FIX">]>;
3
3
  export type MoyuneClass = z.infer<typeof moyuneClassSchema>;
4
- declare const metadataSchema: z.ZodObject<{
4
+ export declare const metadataSchema: z.ZodObject<{
5
5
  datasize: z.ZodTuple<[z.ZodInt, z.ZodInt], null>;
6
6
  title: z.ZodString;
7
7
  author: z.ZodArray<z.ZodString>;
@@ -17,7 +17,7 @@ declare const metadataSchema: z.ZodObject<{
17
17
  type: z.ZodArray<z.ZodString>;
18
18
  }, z.core.$strip>;
19
19
  export type Metadata = z.infer<typeof metadataSchema>;
20
- declare const contentSchema: z.ZodObject<{
20
+ export declare const contentSchema: z.ZodObject<{
21
21
  id: z.ZodString;
22
22
  messier: z.ZodOptional<z.ZodUnknown>;
23
23
  name: z.ZodArray<z.ZodString>;
package/dist/otmjson.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { default as z } from 'zod';
1
+ import * as z from 'zod';
2
2
  export declare const entrySchema: z.ZodObject<{
3
3
  id: z.ZodInt;
4
4
  form: z.ZodString;
package/dist/zpdic.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- import { default as z } from 'zod';
2
- declare const equivalentSchema: z.ZodObject<{
1
+ import * as z from 'zod';
2
+ export declare const equivalentSchema: z.ZodObject<{
3
3
  titles: z.ZodArray<z.ZodString>;
4
4
  names: z.ZodArray<z.ZodString>;
5
5
  nameString: z.ZodString;
6
6
  ignoredPattern: z.ZodString;
7
7
  hidden: z.ZodBoolean;
8
8
  }, z.core.$strip>;
9
- declare const objectIDSchema: z.ZodString;
9
+ export declare const objectIDSchema: z.ZodString;
10
10
  export type ObjectID = z.infer<typeof objectIDSchema>;
11
11
  export type Equivalent = z.infer<typeof equivalentSchema>;
12
- declare const informationSchema: z.ZodObject<{
12
+ export declare const informationSchema: z.ZodObject<{
13
13
  title: z.ZodString;
14
14
  text: z.ZodString;
15
15
  hidden: z.ZodBoolean;
16
16
  }, z.core.$strip>;
17
17
  export type Information = z.infer<typeof informationSchema>;
18
- declare const phraseSchema: z.ZodObject<{
18
+ export declare const phraseSchema: z.ZodObject<{
19
19
  titles: z.ZodArray<z.ZodString>;
20
20
  form: z.ZodString;
21
21
  terms: z.ZodArray<z.ZodString>;
@@ -23,19 +23,19 @@ declare const phraseSchema: z.ZodObject<{
23
23
  ignoredPattern: z.ZodString;
24
24
  }, z.core.$strip>;
25
25
  export type Phrase = z.infer<typeof phraseSchema>;
26
- declare const variationSchema: z.ZodObject<{
26
+ export declare const variationSchema: z.ZodObject<{
27
27
  title: z.ZodString;
28
28
  name: z.ZodString;
29
29
  pronunciation: z.ZodString;
30
30
  }, z.core.$strip>;
31
31
  export type Variation = z.infer<typeof variationSchema>;
32
- declare const relationSchema: z.ZodObject<{
32
+ export declare const relationSchema: z.ZodObject<{
33
33
  titles: z.ZodArray<z.ZodString>;
34
34
  number: z.ZodInt;
35
35
  name: z.ZodString;
36
36
  }, z.core.$strip>;
37
37
  export type Relation = z.infer<typeof relationSchema>;
38
- declare const catalogSchema: z.ZodString;
38
+ export declare const catalogSchema: z.ZodString;
39
39
  export type Catalog = z.infer<typeof catalogSchema>;
40
40
  export declare const editableExampleSchema: z.ZodObject<{
41
41
  sentence: z.ZodString;
@@ -51,7 +51,7 @@ export declare const editableExampleSchema: z.ZodObject<{
51
51
  }, z.core.$strip>>;
52
52
  }, z.core.$strip>;
53
53
  export type EditableExample = z.infer<typeof editableExampleSchema>;
54
- declare const exampleSchema: z.ZodObject<{
54
+ export declare const exampleSchema: z.ZodObject<{
55
55
  sentence: z.ZodString;
56
56
  supplement: z.ZodString;
57
57
  translation: z.ZodString;
@@ -102,7 +102,7 @@ export declare const editableWordSchema: z.ZodObject<{
102
102
  }, z.core.$strip>>;
103
103
  }, z.core.$strip>;
104
104
  export type EditableWord = z.infer<typeof editableWordSchema>;
105
- declare const wordSchema: z.ZodObject<{
105
+ export declare const wordSchema: z.ZodObject<{
106
106
  name: z.ZodString;
107
107
  pronunciation: z.ZodString;
108
108
  equivalents: z.ZodArray<z.ZodObject<{
@@ -139,7 +139,7 @@ declare const wordSchema: z.ZodObject<{
139
139
  number: z.ZodInt;
140
140
  }, z.core.$strip>;
141
141
  export type Word = z.infer<typeof wordSchema>;
142
- declare const wordWithExamplesSchema: z.ZodObject<{
142
+ export declare const wordWithExamplesSchema: z.ZodObject<{
143
143
  name: z.ZodString;
144
144
  pronunciation: z.ZodString;
145
145
  equivalents: z.ZodArray<z.ZodObject<{
@@ -376,7 +376,7 @@ export declare const mExResponseSchema: z.ZodObject<{
376
376
  total: z.ZodInt;
377
377
  }, z.core.$strip>;
378
378
  export type MExResponse = z.infer<typeof mExResponseSchema>;
379
- declare const exampleOfferSchema: z.ZodObject<{
379
+ export declare const exampleOfferSchema: z.ZodObject<{
380
380
  id: z.ZodString;
381
381
  catalog: z.ZodString;
382
382
  number: z.ZodInt;
@@ -408,4 +408,3 @@ export declare const mExOfferResponseSchema: z.ZodObject<{
408
408
  total: z.ZodInt;
409
409
  }, z.core.$strip>;
410
410
  export type MExOfferResponse = z.infer<typeof mExOfferResponseSchema>;
411
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tktb-tess/my-zod-schema",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "license": "CC0-1.0",
6
6
  "publishConfig": {
@@ -20,7 +20,7 @@
20
20
  "import": "./dist/bundle.js"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/node": "^24.6.2",
23
+ "@types/node": "^24.10.2",
24
24
  "rehype-sanitize": "^6.0.0",
25
25
  "rehype-stringify": "^10.0.1",
26
26
  "remark-gfm": "^4.0.1",
@@ -28,9 +28,9 @@
28
28
  "remark-rehype": "^11.1.2",
29
29
  "typescript": "~5.9.3",
30
30
  "unified": "^11.0.5",
31
- "vite": "^7.1.9",
31
+ "vite": "^7.2.7",
32
32
  "vite-plugin-dts": "^4.5.4",
33
- "vitest": "^3.2.4"
33
+ "vitest": "^4.0.15"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "zod": "^3.0.0 || ^4.0.0"
package/dist/util.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};