@3rtools/tyts-mcp 0.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/README.md +103 -0
- package/dist/chrome.d.ts +3 -0
- package/dist/chrome.js +36 -0
- package/dist/chrome.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +23 -0
- package/dist/cli.js.map +1 -0
- package/dist/document.d.ts +76 -0
- package/dist/document.js +101 -0
- package/dist/document.js.map +1 -0
- package/dist/image.d.ts +16 -0
- package/dist/image.js +70 -0
- package/dist/image.js.map +1 -0
- package/dist/schemas.d.ts +490 -0
- package/dist/schemas.js +49 -0
- package/dist/schemas.js.map +1 -0
- package/dist/server.d.ts +20 -0
- package/dist/server.js +197 -0
- package/dist/server.js.map +1 -0
- package/dist/session.d.ts +57 -0
- package/dist/session.js +186 -0
- package/dist/session.js.map +1 -0
- package/editor/appicon/Icon 1024.png +0 -0
- package/editor/appicon/Icon 128.png +0 -0
- package/editor/appicon/Icon 16.png +0 -0
- package/editor/appicon/Icon 256.png +0 -0
- package/editor/appicon/Icon 32.png +0 -0
- package/editor/appicon/Icon 512.png +0 -0
- package/editor/appicon/Icon 64.png +0 -0
- package/editor/assets/bootstrap-icons-BeopsB42.woff +0 -0
- package/editor/assets/bootstrap-icons-mSm7cUeB.woff2 +0 -0
- package/editor/assets/html2canvas.esm-DXEQVQnt.js +5 -0
- package/editor/assets/index-Bnr_82GS.js +236 -0
- package/editor/assets/index-DkXpHR6W.css +1 -0
- package/editor/assets/index.es-COZX40-D.js +5 -0
- package/editor/assets/purify.es-C0_7NiBM.js +2 -0
- package/editor/favicon/192.png +0 -0
- package/editor/favicon/512.png +0 -0
- package/editor/favicon/apple-touch-icon.png +0 -0
- package/editor/favicon/favicon.ico +0 -0
- package/editor/favicon/favicon.svg +12 -0
- package/editor/favicon/png/favicon-16x16.png +0 -0
- package/editor/favicon/png/favicon-32x32.png +0 -0
- package/editor/favicon/png/favicon-64x64.png +0 -0
- package/editor/fonts/road-ui/RoadUI-Bold.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-Bold.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-BoldOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-BoldOblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraBold.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraBold.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraBoldOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraBoldOblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraLight.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraLight.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraLightOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-ExtraLightOblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-Light.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-Light.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-LightOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-LightOblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-Medium.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-Medium.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-MediumOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-MediumOblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-Oblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-Oblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-Regular.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-Regular.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-SemiBold.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-SemiBold.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-SemiBoldOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-SemiBoldOblique.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-Thin.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-Thin.woff2 +0 -0
- package/editor/fonts/road-ui/RoadUI-ThinOblique.woff +0 -0
- package/editor/fonts/road-ui/RoadUI-ThinOblique.woff2 +0 -0
- package/editor/fonts/road-ui/road-ui.css +113 -0
- package/editor/images/crypto/btc.svg +31 -0
- package/editor/images/crypto/eth.svg +11 -0
- package/editor/images/crypto/trx.svg +11 -0
- package/editor/images/crypto/usdt.svg +8 -0
- package/editor/index.html +23 -0
- package/editor/tyts-embed.js +242 -0
- package/package.json +43 -0
- package/static/harness.html +45 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const simplePinSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4
|
+
text: z.ZodOptional<z.ZodString>;
|
|
5
|
+
color: z.ZodOptional<z.ZodString>;
|
|
6
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
solid: "solid";
|
|
8
|
+
dashed: "dashed";
|
|
9
|
+
}>>;
|
|
10
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
filled: "filled";
|
|
12
|
+
none: "none";
|
|
13
|
+
}>>;
|
|
14
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
x: z.ZodNumber;
|
|
16
|
+
y: z.ZodNumber;
|
|
17
|
+
width: z.ZodNumber;
|
|
18
|
+
height: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
type: z.ZodLiteral<"point">;
|
|
21
|
+
x: z.ZodNumber;
|
|
22
|
+
y: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
text: z.ZodOptional<z.ZodString>;
|
|
26
|
+
color: z.ZodOptional<z.ZodString>;
|
|
27
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
solid: "solid";
|
|
29
|
+
dashed: "dashed";
|
|
30
|
+
}>>;
|
|
31
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
filled: "filled";
|
|
33
|
+
none: "none";
|
|
34
|
+
}>>;
|
|
35
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
x: z.ZodNumber;
|
|
37
|
+
y: z.ZodNumber;
|
|
38
|
+
width: z.ZodNumber;
|
|
39
|
+
height: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
type: z.ZodLiteral<"standalone">;
|
|
42
|
+
x: z.ZodNumber;
|
|
43
|
+
y: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
id: z.ZodOptional<z.ZodString>;
|
|
46
|
+
text: z.ZodOptional<z.ZodString>;
|
|
47
|
+
color: z.ZodOptional<z.ZodString>;
|
|
48
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
solid: "solid";
|
|
50
|
+
dashed: "dashed";
|
|
51
|
+
}>>;
|
|
52
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
filled: "filled";
|
|
54
|
+
none: "none";
|
|
55
|
+
}>>;
|
|
56
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
x: z.ZodNumber;
|
|
58
|
+
y: z.ZodNumber;
|
|
59
|
+
width: z.ZodNumber;
|
|
60
|
+
height: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
type: z.ZodLiteral<"rectangle">;
|
|
63
|
+
x: z.ZodNumber;
|
|
64
|
+
y: z.ZodNumber;
|
|
65
|
+
width: z.ZodNumber;
|
|
66
|
+
height: z.ZodNumber;
|
|
67
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
id: z.ZodOptional<z.ZodString>;
|
|
70
|
+
text: z.ZodOptional<z.ZodString>;
|
|
71
|
+
color: z.ZodOptional<z.ZodString>;
|
|
72
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
solid: "solid";
|
|
74
|
+
dashed: "dashed";
|
|
75
|
+
}>>;
|
|
76
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
filled: "filled";
|
|
78
|
+
none: "none";
|
|
79
|
+
}>>;
|
|
80
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
x: z.ZodNumber;
|
|
82
|
+
y: z.ZodNumber;
|
|
83
|
+
width: z.ZodNumber;
|
|
84
|
+
height: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
type: z.ZodLiteral<"ellipse">;
|
|
87
|
+
cx: z.ZodNumber;
|
|
88
|
+
cy: z.ZodNumber;
|
|
89
|
+
rx: z.ZodNumber;
|
|
90
|
+
ry: z.ZodNumber;
|
|
91
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
id: z.ZodOptional<z.ZodString>;
|
|
94
|
+
text: z.ZodOptional<z.ZodString>;
|
|
95
|
+
color: z.ZodOptional<z.ZodString>;
|
|
96
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
solid: "solid";
|
|
98
|
+
dashed: "dashed";
|
|
99
|
+
}>>;
|
|
100
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
filled: "filled";
|
|
102
|
+
none: "none";
|
|
103
|
+
}>>;
|
|
104
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
x: z.ZodNumber;
|
|
106
|
+
y: z.ZodNumber;
|
|
107
|
+
width: z.ZodNumber;
|
|
108
|
+
height: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
type: z.ZodLiteral<"polygon">;
|
|
111
|
+
points: z.ZodArray<z.ZodObject<{
|
|
112
|
+
x: z.ZodNumber;
|
|
113
|
+
y: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
id: z.ZodOptional<z.ZodString>;
|
|
118
|
+
text: z.ZodOptional<z.ZodString>;
|
|
119
|
+
color: z.ZodOptional<z.ZodString>;
|
|
120
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
solid: "solid";
|
|
122
|
+
dashed: "dashed";
|
|
123
|
+
}>>;
|
|
124
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
filled: "filled";
|
|
126
|
+
none: "none";
|
|
127
|
+
}>>;
|
|
128
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
129
|
+
x: z.ZodNumber;
|
|
130
|
+
y: z.ZodNumber;
|
|
131
|
+
width: z.ZodNumber;
|
|
132
|
+
height: z.ZodNumber;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
type: z.ZodLiteral<"polyline">;
|
|
135
|
+
points: z.ZodArray<z.ZodObject<{
|
|
136
|
+
x: z.ZodNumber;
|
|
137
|
+
y: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
id: z.ZodOptional<z.ZodString>;
|
|
142
|
+
text: z.ZodOptional<z.ZodString>;
|
|
143
|
+
color: z.ZodOptional<z.ZodString>;
|
|
144
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
solid: "solid";
|
|
146
|
+
dashed: "dashed";
|
|
147
|
+
}>>;
|
|
148
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
filled: "filled";
|
|
150
|
+
none: "none";
|
|
151
|
+
}>>;
|
|
152
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
x: z.ZodNumber;
|
|
154
|
+
y: z.ZodNumber;
|
|
155
|
+
width: z.ZodNumber;
|
|
156
|
+
height: z.ZodNumber;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
type: z.ZodLiteral<"arrow">;
|
|
159
|
+
start: z.ZodObject<{
|
|
160
|
+
x: z.ZodNumber;
|
|
161
|
+
y: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
end: z.ZodObject<{
|
|
164
|
+
x: z.ZodNumber;
|
|
165
|
+
y: z.ZodNumber;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
168
|
+
x: z.ZodNumber;
|
|
169
|
+
y: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
id: z.ZodOptional<z.ZodString>;
|
|
173
|
+
text: z.ZodOptional<z.ZodString>;
|
|
174
|
+
color: z.ZodOptional<z.ZodString>;
|
|
175
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
176
|
+
solid: "solid";
|
|
177
|
+
dashed: "dashed";
|
|
178
|
+
}>>;
|
|
179
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
filled: "filled";
|
|
181
|
+
none: "none";
|
|
182
|
+
}>>;
|
|
183
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
x: z.ZodNumber;
|
|
185
|
+
y: z.ZodNumber;
|
|
186
|
+
width: z.ZodNumber;
|
|
187
|
+
height: z.ZodNumber;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
type: z.ZodLiteral<"text">;
|
|
190
|
+
x: z.ZodNumber;
|
|
191
|
+
y: z.ZodNumber;
|
|
192
|
+
width: z.ZodNumber;
|
|
193
|
+
height: z.ZodNumber;
|
|
194
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
+
id: z.ZodOptional<z.ZodString>;
|
|
196
|
+
text: z.ZodOptional<z.ZodString>;
|
|
197
|
+
color: z.ZodOptional<z.ZodString>;
|
|
198
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
solid: "solid";
|
|
200
|
+
dashed: "dashed";
|
|
201
|
+
}>>;
|
|
202
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
203
|
+
filled: "filled";
|
|
204
|
+
none: "none";
|
|
205
|
+
}>>;
|
|
206
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
x: z.ZodNumber;
|
|
208
|
+
y: z.ZodNumber;
|
|
209
|
+
width: z.ZodNumber;
|
|
210
|
+
height: z.ZodNumber;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
type: z.ZodLiteral<"compass">;
|
|
213
|
+
cx: z.ZodNumber;
|
|
214
|
+
cy: z.ZodNumber;
|
|
215
|
+
radius: z.ZodNumber;
|
|
216
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
}, z.core.$strip>], "type">;
|
|
218
|
+
export type SimplePin = z.infer<typeof simplePinSchema>;
|
|
219
|
+
export declare const exportFormatSchema: z.ZodEnum<{
|
|
220
|
+
png: "png";
|
|
221
|
+
jpeg: "jpeg";
|
|
222
|
+
pdf: "pdf";
|
|
223
|
+
}>;
|
|
224
|
+
export type ExportFormat = z.infer<typeof exportFormatSchema>;
|
|
225
|
+
/** Повний документ перевіряє редактор; тут лише форма, щоб MCP не впав на сміттєвому вході. */
|
|
226
|
+
export declare const looseDocumentSchema: z.ZodObject<{
|
|
227
|
+
version: z.ZodLiteral<1>;
|
|
228
|
+
backgroundImage: z.ZodString;
|
|
229
|
+
imageSize: z.ZodObject<{
|
|
230
|
+
w: z.ZodNumber;
|
|
231
|
+
h: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
sourceImageSize: z.ZodNullable<z.ZodObject<{
|
|
234
|
+
w: z.ZodNumber;
|
|
235
|
+
h: z.ZodNumber;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
pins: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
238
|
+
cardPositions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
239
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
240
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
export type LooseDocument = z.infer<typeof looseDocumentSchema>;
|
|
243
|
+
export declare const renderInputShape: {
|
|
244
|
+
image: z.ZodOptional<z.ZodString>;
|
|
245
|
+
pins: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
246
|
+
id: z.ZodOptional<z.ZodString>;
|
|
247
|
+
text: z.ZodOptional<z.ZodString>;
|
|
248
|
+
color: z.ZodOptional<z.ZodString>;
|
|
249
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
250
|
+
solid: "solid";
|
|
251
|
+
dashed: "dashed";
|
|
252
|
+
}>>;
|
|
253
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
254
|
+
filled: "filled";
|
|
255
|
+
none: "none";
|
|
256
|
+
}>>;
|
|
257
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
x: z.ZodNumber;
|
|
259
|
+
y: z.ZodNumber;
|
|
260
|
+
width: z.ZodNumber;
|
|
261
|
+
height: z.ZodNumber;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
type: z.ZodLiteral<"point">;
|
|
264
|
+
x: z.ZodNumber;
|
|
265
|
+
y: z.ZodNumber;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
id: z.ZodOptional<z.ZodString>;
|
|
268
|
+
text: z.ZodOptional<z.ZodString>;
|
|
269
|
+
color: z.ZodOptional<z.ZodString>;
|
|
270
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
271
|
+
solid: "solid";
|
|
272
|
+
dashed: "dashed";
|
|
273
|
+
}>>;
|
|
274
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
275
|
+
filled: "filled";
|
|
276
|
+
none: "none";
|
|
277
|
+
}>>;
|
|
278
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
x: z.ZodNumber;
|
|
280
|
+
y: z.ZodNumber;
|
|
281
|
+
width: z.ZodNumber;
|
|
282
|
+
height: z.ZodNumber;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
type: z.ZodLiteral<"standalone">;
|
|
285
|
+
x: z.ZodNumber;
|
|
286
|
+
y: z.ZodNumber;
|
|
287
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
288
|
+
id: z.ZodOptional<z.ZodString>;
|
|
289
|
+
text: z.ZodOptional<z.ZodString>;
|
|
290
|
+
color: z.ZodOptional<z.ZodString>;
|
|
291
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
292
|
+
solid: "solid";
|
|
293
|
+
dashed: "dashed";
|
|
294
|
+
}>>;
|
|
295
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
296
|
+
filled: "filled";
|
|
297
|
+
none: "none";
|
|
298
|
+
}>>;
|
|
299
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
x: z.ZodNumber;
|
|
301
|
+
y: z.ZodNumber;
|
|
302
|
+
width: z.ZodNumber;
|
|
303
|
+
height: z.ZodNumber;
|
|
304
|
+
}, z.core.$strip>>;
|
|
305
|
+
type: z.ZodLiteral<"rectangle">;
|
|
306
|
+
x: z.ZodNumber;
|
|
307
|
+
y: z.ZodNumber;
|
|
308
|
+
width: z.ZodNumber;
|
|
309
|
+
height: z.ZodNumber;
|
|
310
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
id: z.ZodOptional<z.ZodString>;
|
|
313
|
+
text: z.ZodOptional<z.ZodString>;
|
|
314
|
+
color: z.ZodOptional<z.ZodString>;
|
|
315
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
316
|
+
solid: "solid";
|
|
317
|
+
dashed: "dashed";
|
|
318
|
+
}>>;
|
|
319
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
320
|
+
filled: "filled";
|
|
321
|
+
none: "none";
|
|
322
|
+
}>>;
|
|
323
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
x: z.ZodNumber;
|
|
325
|
+
y: z.ZodNumber;
|
|
326
|
+
width: z.ZodNumber;
|
|
327
|
+
height: z.ZodNumber;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
type: z.ZodLiteral<"ellipse">;
|
|
330
|
+
cx: z.ZodNumber;
|
|
331
|
+
cy: z.ZodNumber;
|
|
332
|
+
rx: z.ZodNumber;
|
|
333
|
+
ry: z.ZodNumber;
|
|
334
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
336
|
+
id: z.ZodOptional<z.ZodString>;
|
|
337
|
+
text: z.ZodOptional<z.ZodString>;
|
|
338
|
+
color: z.ZodOptional<z.ZodString>;
|
|
339
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
340
|
+
solid: "solid";
|
|
341
|
+
dashed: "dashed";
|
|
342
|
+
}>>;
|
|
343
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
344
|
+
filled: "filled";
|
|
345
|
+
none: "none";
|
|
346
|
+
}>>;
|
|
347
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
x: z.ZodNumber;
|
|
349
|
+
y: z.ZodNumber;
|
|
350
|
+
width: z.ZodNumber;
|
|
351
|
+
height: z.ZodNumber;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
type: z.ZodLiteral<"polygon">;
|
|
354
|
+
points: z.ZodArray<z.ZodObject<{
|
|
355
|
+
x: z.ZodNumber;
|
|
356
|
+
y: z.ZodNumber;
|
|
357
|
+
}, z.core.$strip>>;
|
|
358
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
360
|
+
id: z.ZodOptional<z.ZodString>;
|
|
361
|
+
text: z.ZodOptional<z.ZodString>;
|
|
362
|
+
color: z.ZodOptional<z.ZodString>;
|
|
363
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
solid: "solid";
|
|
365
|
+
dashed: "dashed";
|
|
366
|
+
}>>;
|
|
367
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
368
|
+
filled: "filled";
|
|
369
|
+
none: "none";
|
|
370
|
+
}>>;
|
|
371
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
372
|
+
x: z.ZodNumber;
|
|
373
|
+
y: z.ZodNumber;
|
|
374
|
+
width: z.ZodNumber;
|
|
375
|
+
height: z.ZodNumber;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
type: z.ZodLiteral<"polyline">;
|
|
378
|
+
points: z.ZodArray<z.ZodObject<{
|
|
379
|
+
x: z.ZodNumber;
|
|
380
|
+
y: z.ZodNumber;
|
|
381
|
+
}, z.core.$strip>>;
|
|
382
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
384
|
+
id: z.ZodOptional<z.ZodString>;
|
|
385
|
+
text: z.ZodOptional<z.ZodString>;
|
|
386
|
+
color: z.ZodOptional<z.ZodString>;
|
|
387
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
388
|
+
solid: "solid";
|
|
389
|
+
dashed: "dashed";
|
|
390
|
+
}>>;
|
|
391
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
392
|
+
filled: "filled";
|
|
393
|
+
none: "none";
|
|
394
|
+
}>>;
|
|
395
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
396
|
+
x: z.ZodNumber;
|
|
397
|
+
y: z.ZodNumber;
|
|
398
|
+
width: z.ZodNumber;
|
|
399
|
+
height: z.ZodNumber;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
type: z.ZodLiteral<"arrow">;
|
|
402
|
+
start: z.ZodObject<{
|
|
403
|
+
x: z.ZodNumber;
|
|
404
|
+
y: z.ZodNumber;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
end: z.ZodObject<{
|
|
407
|
+
x: z.ZodNumber;
|
|
408
|
+
y: z.ZodNumber;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
411
|
+
x: z.ZodNumber;
|
|
412
|
+
y: z.ZodNumber;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
id: z.ZodOptional<z.ZodString>;
|
|
416
|
+
text: z.ZodOptional<z.ZodString>;
|
|
417
|
+
color: z.ZodOptional<z.ZodString>;
|
|
418
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
419
|
+
solid: "solid";
|
|
420
|
+
dashed: "dashed";
|
|
421
|
+
}>>;
|
|
422
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
423
|
+
filled: "filled";
|
|
424
|
+
none: "none";
|
|
425
|
+
}>>;
|
|
426
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
427
|
+
x: z.ZodNumber;
|
|
428
|
+
y: z.ZodNumber;
|
|
429
|
+
width: z.ZodNumber;
|
|
430
|
+
height: z.ZodNumber;
|
|
431
|
+
}, z.core.$strip>>;
|
|
432
|
+
type: z.ZodLiteral<"text">;
|
|
433
|
+
x: z.ZodNumber;
|
|
434
|
+
y: z.ZodNumber;
|
|
435
|
+
width: z.ZodNumber;
|
|
436
|
+
height: z.ZodNumber;
|
|
437
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
438
|
+
id: z.ZodOptional<z.ZodString>;
|
|
439
|
+
text: z.ZodOptional<z.ZodString>;
|
|
440
|
+
color: z.ZodOptional<z.ZodString>;
|
|
441
|
+
strokeStyle: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
solid: "solid";
|
|
443
|
+
dashed: "dashed";
|
|
444
|
+
}>>;
|
|
445
|
+
fillStyle: z.ZodOptional<z.ZodEnum<{
|
|
446
|
+
filled: "filled";
|
|
447
|
+
none: "none";
|
|
448
|
+
}>>;
|
|
449
|
+
card: z.ZodOptional<z.ZodObject<{
|
|
450
|
+
x: z.ZodNumber;
|
|
451
|
+
y: z.ZodNumber;
|
|
452
|
+
width: z.ZodNumber;
|
|
453
|
+
height: z.ZodNumber;
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
type: z.ZodLiteral<"compass">;
|
|
456
|
+
cx: z.ZodNumber;
|
|
457
|
+
cy: z.ZodNumber;
|
|
458
|
+
radius: z.ZodNumber;
|
|
459
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
460
|
+
}, z.core.$strip>], "type">>>;
|
|
461
|
+
document: z.ZodOptional<z.ZodObject<{
|
|
462
|
+
version: z.ZodLiteral<1>;
|
|
463
|
+
backgroundImage: z.ZodString;
|
|
464
|
+
imageSize: z.ZodObject<{
|
|
465
|
+
w: z.ZodNumber;
|
|
466
|
+
h: z.ZodNumber;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
sourceImageSize: z.ZodNullable<z.ZodObject<{
|
|
469
|
+
w: z.ZodNumber;
|
|
470
|
+
h: z.ZodNumber;
|
|
471
|
+
}, z.core.$strip>>;
|
|
472
|
+
pins: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
473
|
+
cardPositions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
474
|
+
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
475
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
476
|
+
}, z.core.$strip>>;
|
|
477
|
+
coordinates: z.ZodDefault<z.ZodEnum<{
|
|
478
|
+
source: "source";
|
|
479
|
+
editor: "editor";
|
|
480
|
+
}>>;
|
|
481
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
482
|
+
png: "png";
|
|
483
|
+
jpeg: "jpeg";
|
|
484
|
+
pdf: "pdf";
|
|
485
|
+
}>>;
|
|
486
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
output: z.ZodOptional<z.ZodString>;
|
|
489
|
+
preview: z.ZodDefault<z.ZodBoolean>;
|
|
490
|
+
};
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const point = z.object({ x: z.number(), y: z.number() });
|
|
3
|
+
const common = {
|
|
4
|
+
/** Свій id; інакше `pin-N`. */
|
|
5
|
+
id: z.string().min(1).optional(),
|
|
6
|
+
/** Текст картки-виноски; рядки через `\n`. Порожньо — лише фігура з номером. */
|
|
7
|
+
text: z.string().optional(),
|
|
8
|
+
/** CSS-колір маркера і лінії; типово — палітра редактора по колу. */
|
|
9
|
+
color: z.string().min(1).optional(),
|
|
10
|
+
strokeStyle: z.enum(['solid', 'dashed']).optional(),
|
|
11
|
+
fillStyle: z.enum(['filled', 'none']).optional(),
|
|
12
|
+
/** Позиція картки в тих самих координатах; немає — редактор розкладе сам. */
|
|
13
|
+
card: z.object({ x: z.number(), y: z.number(), width: z.number().positive(), height: z.number().positive() }).optional(),
|
|
14
|
+
};
|
|
15
|
+
export const simplePinSchema = z.discriminatedUnion('type', [
|
|
16
|
+
z.object({ type: z.literal('point'), x: z.number(), y: z.number(), ...common }),
|
|
17
|
+
z.object({ type: z.literal('standalone'), x: z.number(), y: z.number(), ...common }),
|
|
18
|
+
z.object({ type: z.literal('rectangle'), x: z.number(), y: z.number(), width: z.number().positive(), height: z.number().positive(), rotation: z.number().optional(), ...common }),
|
|
19
|
+
z.object({ type: z.literal('ellipse'), cx: z.number(), cy: z.number(), rx: z.number().positive(), ry: z.number().positive(), rotation: z.number().optional(), ...common }),
|
|
20
|
+
z.object({ type: z.literal('polygon'), points: z.array(point).min(3), rotation: z.number().optional(), ...common }),
|
|
21
|
+
z.object({ type: z.literal('polyline'), points: z.array(point).min(2), rotation: z.number().optional(), ...common }),
|
|
22
|
+
z.object({ type: z.literal('arrow'), start: point, end: point, control: point.optional(), ...common }),
|
|
23
|
+
z.object({ type: z.literal('text'), x: z.number(), y: z.number(), width: z.number().positive(), height: z.number().positive(), ...common }),
|
|
24
|
+
z.object({ type: z.literal('compass'), cx: z.number(), cy: z.number(), radius: z.number().positive(), rotation: z.number().optional(), ...common }),
|
|
25
|
+
]);
|
|
26
|
+
export const exportFormatSchema = z.enum(['png', 'jpeg', 'pdf']);
|
|
27
|
+
/** Повний документ перевіряє редактор; тут лише форма, щоб MCP не впав на сміттєвому вході. */
|
|
28
|
+
export const looseDocumentSchema = z.object({
|
|
29
|
+
version: z.literal(1),
|
|
30
|
+
backgroundImage: z.string(),
|
|
31
|
+
imageSize: z.object({ w: z.number(), h: z.number() }),
|
|
32
|
+
sourceImageSize: z.object({ w: z.number(), h: z.number() }).nullable(),
|
|
33
|
+
pins: z.array(z.record(z.string(), z.unknown())),
|
|
34
|
+
cardPositions: z.record(z.string(), z.unknown()),
|
|
35
|
+
settings: z.record(z.string(), z.unknown()).optional(),
|
|
36
|
+
meta: z.record(z.string(), z.unknown()).optional(),
|
|
37
|
+
});
|
|
38
|
+
export const renderInputShape = {
|
|
39
|
+
image: z.string().min(1).optional().describe('Картинка: шлях до файлу, http(s) URL або data URL. Не потрібна, якщо передано document.'),
|
|
40
|
+
pins: z.array(simplePinSchema).optional().describe('Анотації. Координати — у пікселях оригінальної картинки (див. coordinates).'),
|
|
41
|
+
document: looseDocumentSchema.optional().describe('Повний TytsDocument замість image+pins (наприклад, з попереднього рендера).'),
|
|
42
|
+
coordinates: z.enum(['source', 'editor']).default('source').describe("'source' — пікселі оригінальної картинки (типово); 'editor' — простір imageSize редактора."),
|
|
43
|
+
format: exportFormatSchema.default('png'),
|
|
44
|
+
scale: z.number().positive().max(4).optional().describe('Множник роздільної здатності редактора: 1 = imageSize × 2 px.'),
|
|
45
|
+
width: z.number().int().positive().max(8000).optional().describe('Цільова ширина результату в px (замість scale).'),
|
|
46
|
+
output: z.string().optional().describe('Куди зберегти файл. Типово TYTS_OUTPUT_DIR або тимчасова тека.'),
|
|
47
|
+
preview: z.boolean().default(true).describe('Повернути зменшений PNG (≤1024 px) як картинку для самоперевірки.'),
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEzD,MAAM,MAAM,GAAG;IACb,+BAA+B;IAC/B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChC,gFAAgF;IAChF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,qEAAqE;IACrE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnD,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,CA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AAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;IACxG,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,mEAAmE,CAAC;CACjH,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { type Size } from './document.js';
|
|
3
|
+
import { type ExportFormat } from './schemas.js';
|
|
4
|
+
import { EditorSession } from './session.js';
|
|
5
|
+
export declare const SERVER_VERSION = "0.1.0";
|
|
6
|
+
/** Редактор масштабує полотно до 1500 px по більшій стороні (src/constants.ts MAX_LOGICAL_IMAGE_SIZE). */
|
|
7
|
+
export declare const MAX_LOGICAL_IMAGE_SIZE = 1500;
|
|
8
|
+
/** Експорт при scale=1 має роздільність imageSize × 2 (dprBase у handleExport). */
|
|
9
|
+
export declare const EXPORT_DPR_BASE = 2;
|
|
10
|
+
export declare function computeEditorSize(width: number, height: number): Size;
|
|
11
|
+
export declare function outputPath(requested: string | undefined, format: ExportFormat, env?: NodeJS.ProcessEnv): string;
|
|
12
|
+
export interface CreateServerOptions {
|
|
13
|
+
session?: EditorSession;
|
|
14
|
+
log?: (message: string) => void;
|
|
15
|
+
env?: NodeJS.ProcessEnv;
|
|
16
|
+
}
|
|
17
|
+
export declare function createServer(options?: CreateServerOptions): {
|
|
18
|
+
server: McpServer;
|
|
19
|
+
session: EditorSession;
|
|
20
|
+
};
|