@digipair/skill-canvas 0.25.0 → 0.25.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.
- package/index.cjs.js +5 -5
- package/index.esm.js +5 -5
- package/package.json +1 -1
- package/schema.json +299 -17
package/index.cjs.js
CHANGED
@@ -23513,14 +23513,14 @@ function indent(str, spaces) {
|
|
23513
23513
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23514
23514
|
// match is required
|
23515
23515
|
if (!match) {
|
23516
|
-
return
|
23516
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
23517
23517
|
v: nextMatch1
|
23518
23518
|
};
|
23519
23519
|
}
|
23520
23520
|
var token = match.token, offset = match.offset;
|
23521
23521
|
i1 += offset;
|
23522
23522
|
if (token === " ") {
|
23523
|
-
return
|
23523
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
23524
23524
|
}
|
23525
23525
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
23526
23526
|
token
|
@@ -23539,7 +23539,7 @@ function indent(str, spaces) {
|
|
23539
23539
|
if (contextKeys.some(function(el) {
|
23540
23540
|
return el.startsWith(name);
|
23541
23541
|
})) {
|
23542
|
-
return
|
23542
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
23543
23543
|
}
|
23544
23544
|
if (dateTimeIdentifiers.some(function(el) {
|
23545
23545
|
return el === name;
|
@@ -23558,9 +23558,9 @@ function indent(str, spaces) {
|
|
23558
23558
|
if (dateTimeIdentifiers.some(function(el) {
|
23559
23559
|
return el.startsWith(name);
|
23560
23560
|
})) {
|
23561
|
-
return
|
23561
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
23562
23562
|
}
|
23563
|
-
return
|
23563
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
23564
23564
|
v: nextMatch1
|
23565
23565
|
};
|
23566
23566
|
};
|
package/index.esm.js
CHANGED
@@ -23491,14 +23491,14 @@ function indent(str, spaces) {
|
|
23491
23491
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23492
23492
|
// match is required
|
23493
23493
|
if (!match) {
|
23494
|
-
return
|
23494
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
23495
23495
|
v: nextMatch1
|
23496
23496
|
};
|
23497
23497
|
}
|
23498
23498
|
var token = match.token, offset = match.offset;
|
23499
23499
|
i1 += offset;
|
23500
23500
|
if (token === " ") {
|
23501
|
-
return
|
23501
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23502
23502
|
}
|
23503
23503
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
23504
23504
|
token
|
@@ -23517,7 +23517,7 @@ function indent(str, spaces) {
|
|
23517
23517
|
if (contextKeys.some(function(el) {
|
23518
23518
|
return el.startsWith(name);
|
23519
23519
|
})) {
|
23520
|
-
return
|
23520
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23521
23521
|
}
|
23522
23522
|
if (dateTimeIdentifiers.some(function(el) {
|
23523
23523
|
return el === name;
|
@@ -23536,9 +23536,9 @@ function indent(str, spaces) {
|
|
23536
23536
|
if (dateTimeIdentifiers.some(function(el) {
|
23537
23537
|
return el.startsWith(name);
|
23538
23538
|
})) {
|
23539
|
-
return
|
23539
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23540
23540
|
}
|
23541
|
-
return
|
23541
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
23542
23542
|
v: nextMatch1
|
23543
23543
|
};
|
23544
23544
|
};
|
package/package.json
CHANGED
package/schema.json
CHANGED
@@ -2,43 +2,325 @@
|
|
2
2
|
"openapi": "3.0.0",
|
3
3
|
"info": {
|
4
4
|
"title": "@digipair/skill-canvas",
|
5
|
-
"summary": "
|
6
|
-
"description": "Cette compétence permet aux utilisateurs de dessiner
|
5
|
+
"summary": "Manipulation de dessins",
|
6
|
+
"description": "Cette compétence permet aux utilisateurs de manipuler un canvas pour dessiner des éléments graphiques, charger des images, et effectuer diverses opérations de dessin.",
|
7
7
|
"version": "0.1.0",
|
8
8
|
"x-icon": "🎨"
|
9
9
|
},
|
10
10
|
"paths": {
|
11
|
-
"/
|
11
|
+
"/canvas": {
|
12
12
|
"post": {
|
13
13
|
"tags": ["service"],
|
14
|
-
"summary": "
|
15
|
-
"description": "
|
14
|
+
"summary": "Créer un canvas",
|
15
|
+
"description": "Crée un canvas avec des dimensions spécifiées et exécute des actions de dessin.",
|
16
16
|
"parameters": [
|
17
17
|
{
|
18
|
-
"name": "
|
19
|
-
"summary": "
|
18
|
+
"name": "width",
|
19
|
+
"summary": "Largeur",
|
20
20
|
"required": true,
|
21
|
-
"description": "
|
21
|
+
"description": "Largeur du canvas",
|
22
|
+
"schema": {
|
23
|
+
"type": "number"
|
24
|
+
}
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "height",
|
28
|
+
"summary": "Hauteur",
|
29
|
+
"required": true,
|
30
|
+
"description": "Hauteur du canvas",
|
31
|
+
"schema": {
|
32
|
+
"type": "number"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "execute",
|
37
|
+
"summary": "Exécuter",
|
38
|
+
"required": true,
|
39
|
+
"description": "Liste des actions à exécuter sur le canvas",
|
40
|
+
"schema": {
|
41
|
+
"type": "array",
|
42
|
+
"items": {
|
43
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
],
|
48
|
+
"x-events": []
|
49
|
+
}
|
50
|
+
},
|
51
|
+
"/loadImage": {
|
52
|
+
"post": {
|
53
|
+
"tags": ["service"],
|
54
|
+
"summary": "Charger une image",
|
55
|
+
"description": "Charge une image à partir d'une chaîne base64 et retourne l'image chargée.",
|
56
|
+
"parameters": [
|
57
|
+
{
|
58
|
+
"name": "image",
|
59
|
+
"summary": "Image",
|
60
|
+
"required": true,
|
61
|
+
"description": "Image en base64",
|
22
62
|
"schema": {
|
23
63
|
"type": "string"
|
24
64
|
}
|
65
|
+
}
|
66
|
+
],
|
67
|
+
"x-events": []
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"/drawImage": {
|
71
|
+
"post": {
|
72
|
+
"tags": ["service"],
|
73
|
+
"summary": "Dessiner une image",
|
74
|
+
"description": "Dessine une image sur le canvas aux coordonnées spécifiées.",
|
75
|
+
"parameters": [
|
76
|
+
{
|
77
|
+
"name": "image",
|
78
|
+
"summary": "Image",
|
79
|
+
"required": true,
|
80
|
+
"description": "Image à dessiner",
|
81
|
+
"schema": {
|
82
|
+
"type": "string"
|
83
|
+
}
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"name": "x",
|
87
|
+
"summary": "Coordonnée X",
|
88
|
+
"required": true,
|
89
|
+
"description": "Coordonnée X pour dessiner l'image",
|
90
|
+
"schema": {
|
91
|
+
"type": "number"
|
92
|
+
}
|
25
93
|
},
|
26
94
|
{
|
27
|
-
"name": "
|
28
|
-
"summary": "
|
29
|
-
"required":
|
30
|
-
"description": "
|
95
|
+
"name": "y",
|
96
|
+
"summary": "Coordonnée Y",
|
97
|
+
"required": true,
|
98
|
+
"description": "Coordonnée Y pour dessiner l'image",
|
99
|
+
"schema": {
|
100
|
+
"type": "number"
|
101
|
+
}
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"name": "width",
|
105
|
+
"summary": "Largeur",
|
106
|
+
"required": true,
|
107
|
+
"description": "Largeur de l'image à dessiner",
|
108
|
+
"schema": {
|
109
|
+
"type": "number"
|
110
|
+
}
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"name": "height",
|
114
|
+
"summary": "Hauteur",
|
115
|
+
"required": true,
|
116
|
+
"description": "Hauteur de l'image à dessiner",
|
117
|
+
"schema": {
|
118
|
+
"type": "number"
|
119
|
+
}
|
120
|
+
}
|
121
|
+
],
|
122
|
+
"x-events": []
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"/strokeRect": {
|
126
|
+
"post": {
|
127
|
+
"tags": ["service"],
|
128
|
+
"summary": "Dessiner un rectangle",
|
129
|
+
"description": "Dessine le contour d'un rectangle aux coordonnées spécifiées.",
|
130
|
+
"parameters": [
|
131
|
+
{
|
132
|
+
"name": "x",
|
133
|
+
"summary": "Coordonnée X",
|
134
|
+
"required": true,
|
135
|
+
"description": "Coordonnée X du rectangle",
|
136
|
+
"schema": {
|
137
|
+
"type": "number"
|
138
|
+
}
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"name": "y",
|
142
|
+
"summary": "Coordonnée Y",
|
143
|
+
"required": true,
|
144
|
+
"description": "Coordonnée Y du rectangle",
|
145
|
+
"schema": {
|
146
|
+
"type": "number"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"name": "width",
|
151
|
+
"summary": "Largeur",
|
152
|
+
"required": true,
|
153
|
+
"description": "Largeur du rectangle",
|
154
|
+
"schema": {
|
155
|
+
"type": "number"
|
156
|
+
}
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"name": "height",
|
160
|
+
"summary": "Hauteur",
|
161
|
+
"required": true,
|
162
|
+
"description": "Hauteur du rectangle",
|
163
|
+
"schema": {
|
164
|
+
"type": "number"
|
165
|
+
}
|
166
|
+
}
|
167
|
+
],
|
168
|
+
"x-events": []
|
169
|
+
}
|
170
|
+
},
|
171
|
+
"/fillRect": {
|
172
|
+
"post": {
|
173
|
+
"tags": ["service"],
|
174
|
+
"summary": "Déssine un rectangle",
|
175
|
+
"description": "Déssine un rectangle aux coordonnées spécifiées.",
|
176
|
+
"parameters": [
|
177
|
+
{
|
178
|
+
"name": "x",
|
179
|
+
"summary": "Coordonnée X",
|
180
|
+
"required": true,
|
181
|
+
"description": "Coordonnée X du rectangle",
|
182
|
+
"schema": {
|
183
|
+
"type": "number"
|
184
|
+
}
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"name": "y",
|
188
|
+
"summary": "Coordonnée Y",
|
189
|
+
"required": true,
|
190
|
+
"description": "Coordonnée Y du rectangle",
|
191
|
+
"schema": {
|
192
|
+
"type": "number"
|
193
|
+
}
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"name": "width",
|
197
|
+
"summary": "Largeur",
|
198
|
+
"required": true,
|
199
|
+
"description": "Largeur du rectangle",
|
200
|
+
"schema": {
|
201
|
+
"type": "number"
|
202
|
+
}
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"name": "height",
|
206
|
+
"summary": "Hauteur",
|
207
|
+
"required": true,
|
208
|
+
"description": "Hauteur du rectangle",
|
209
|
+
"schema": {
|
210
|
+
"type": "number"
|
211
|
+
}
|
212
|
+
}
|
213
|
+
],
|
214
|
+
"x-events": []
|
215
|
+
}
|
216
|
+
},
|
217
|
+
"/fillText": {
|
218
|
+
"post": {
|
219
|
+
"tags": ["service"],
|
220
|
+
"summary": "Ecrire un texte",
|
221
|
+
"description": "Ecrit du texte aux coordonnées spécifiées.",
|
222
|
+
"parameters": [
|
223
|
+
{
|
224
|
+
"name": "text",
|
225
|
+
"summary": "Texte",
|
226
|
+
"required": true,
|
227
|
+
"description": "Texte à dessiner",
|
31
228
|
"schema": {
|
32
229
|
"type": "string"
|
33
230
|
}
|
34
231
|
},
|
35
232
|
{
|
36
|
-
"name": "
|
37
|
-
"summary": "
|
38
|
-
"required":
|
39
|
-
"description": "
|
233
|
+
"name": "x",
|
234
|
+
"summary": "Coordonnée X",
|
235
|
+
"required": true,
|
236
|
+
"description": "Coordonnée X du texte",
|
237
|
+
"schema": {
|
238
|
+
"type": "number"
|
239
|
+
}
|
240
|
+
},
|
241
|
+
{
|
242
|
+
"name": "y",
|
243
|
+
"summary": "Coordonnée Y",
|
244
|
+
"required": true,
|
245
|
+
"description": "Coordonnée Y du texte",
|
246
|
+
"schema": {
|
247
|
+
"type": "number"
|
248
|
+
}
|
249
|
+
}
|
250
|
+
],
|
251
|
+
"x-events": []
|
252
|
+
}
|
253
|
+
},
|
254
|
+
"/strokeStyle": {
|
255
|
+
"post": {
|
256
|
+
"tags": ["service"],
|
257
|
+
"summary": "Définir le style du contour",
|
258
|
+
"description": "Définit le style de contour utilisé pour les dessins.",
|
259
|
+
"parameters": [
|
260
|
+
{
|
261
|
+
"name": "style",
|
262
|
+
"summary": "Style",
|
263
|
+
"required": true,
|
264
|
+
"description": "Style de contour",
|
40
265
|
"schema": {
|
41
|
-
"type": "
|
266
|
+
"type": "string"
|
267
|
+
}
|
268
|
+
}
|
269
|
+
],
|
270
|
+
"x-events": []
|
271
|
+
}
|
272
|
+
},
|
273
|
+
"/fillStyle": {
|
274
|
+
"post": {
|
275
|
+
"tags": ["service"],
|
276
|
+
"summary": "Définir le style de remplissage",
|
277
|
+
"description": "Définit le style de remplissage utilisé pour les dessins.",
|
278
|
+
"parameters": [
|
279
|
+
{
|
280
|
+
"name": "style",
|
281
|
+
"summary": "Style",
|
282
|
+
"required": true,
|
283
|
+
"description": "Style de remplissage",
|
284
|
+
"schema": {
|
285
|
+
"type": "string"
|
286
|
+
}
|
287
|
+
}
|
288
|
+
],
|
289
|
+
"x-events": []
|
290
|
+
}
|
291
|
+
},
|
292
|
+
"/lineWidth": {
|
293
|
+
"post": {
|
294
|
+
"tags": ["service"],
|
295
|
+
"summary": "Définir la largeur du trait",
|
296
|
+
"description": "Définit la largeur du trait utilisé pour les dessins.",
|
297
|
+
"parameters": [
|
298
|
+
{
|
299
|
+
"name": "style",
|
300
|
+
"summary": "Largeur",
|
301
|
+
"required": true,
|
302
|
+
"description": "Largeur du trait",
|
303
|
+
"schema": {
|
304
|
+
"type": "number"
|
305
|
+
}
|
306
|
+
}
|
307
|
+
],
|
308
|
+
"x-events": []
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"/measureText": {
|
312
|
+
"post": {
|
313
|
+
"tags": ["service"],
|
314
|
+
"summary": "Mesurer le texte",
|
315
|
+
"description": "Mesure le texte spécifié et retourne les métriques.",
|
316
|
+
"parameters": [
|
317
|
+
{
|
318
|
+
"name": "text",
|
319
|
+
"summary": "Texte",
|
320
|
+
"required": true,
|
321
|
+
"description": "Texte à mesurer",
|
322
|
+
"schema": {
|
323
|
+
"type": "string"
|
42
324
|
}
|
43
325
|
}
|
44
326
|
],
|