@digipair/skill-canvas 0.25.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/index.cjs.d.ts +1 -0
- package/index.cjs.js +27561 -0
- package/index.d.ts +1 -0
- package/index.esm.js +27531 -0
- package/libs/engine/src/index.d.ts +2 -0
- package/libs/engine/src/lib/engine.d.ts +10 -0
- package/libs/engine/src/lib/pins-settings.interface.d.ts +21 -0
- package/libs/skill-canvas/src/index.d.ts +1 -0
- package/libs/skill-canvas/src/lib/skill-canvas.d.ts +10 -0
- package/package.json +9 -0
- package/schema.json +52 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PinsSettings } from './pins-settings.interface';
|
2
|
+
type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES';
|
3
|
+
export declare const config: {
|
4
|
+
set: (key: CONFIG_KEY, value: any) => void;
|
5
|
+
};
|
6
|
+
export declare const applyTemplate: (value: any, context: any) => any;
|
7
|
+
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
8
|
+
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any) => Promise<Element | void>;
|
9
|
+
export declare const preparePinsSettings: (settings: PinsSettings, context: any) => Promise<PinsSettings>;
|
10
|
+
export {};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export interface PinsSettings {
|
2
|
+
element: string;
|
3
|
+
name: string;
|
4
|
+
description: string;
|
5
|
+
library: string;
|
6
|
+
properties?: {
|
7
|
+
[key: string]: any;
|
8
|
+
};
|
9
|
+
variables?: {
|
10
|
+
[key: string]: any;
|
11
|
+
};
|
12
|
+
conditions?: {
|
13
|
+
if?: boolean;
|
14
|
+
each?: any[];
|
15
|
+
};
|
16
|
+
pins?: PinsSettings[];
|
17
|
+
events?: {
|
18
|
+
[key: string]: PinsSettings[];
|
19
|
+
};
|
20
|
+
context?: any;
|
21
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/skill-canvas';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
2
|
+
export declare const canvas: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string>;
|
3
|
+
export declare const loadImage: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("canvas").Image>;
|
4
|
+
export declare const drawImage: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
5
|
+
export declare const strokeRect: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
6
|
+
export declare const fillRect: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
7
|
+
export declare const fillText: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
8
|
+
export declare const strokeStyle: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
9
|
+
export declare const fillStyle: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
10
|
+
export declare const lineWidth: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
package/package.json
ADDED
package/schema.json
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.0.0",
|
3
|
+
"info": {
|
4
|
+
"title": "@digipair/skill-canvas",
|
5
|
+
"summary": "Dessin sur canvas",
|
6
|
+
"description": "Cette compétence permet aux utilisateurs de dessiner sur un canvas.",
|
7
|
+
"version": "0.1.0",
|
8
|
+
"x-icon": "🎨"
|
9
|
+
},
|
10
|
+
"paths": {
|
11
|
+
"/log": {
|
12
|
+
"post": {
|
13
|
+
"tags": ["service"],
|
14
|
+
"summary": "Afficher dans les logs",
|
15
|
+
"description": "Element permettant d'afficher un message dans les logs",
|
16
|
+
"parameters": [
|
17
|
+
{
|
18
|
+
"name": "label",
|
19
|
+
"summary": "Sujet",
|
20
|
+
"required": true,
|
21
|
+
"description": "Sujet du log",
|
22
|
+
"schema": {
|
23
|
+
"type": "string"
|
24
|
+
}
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "type",
|
28
|
+
"summary": "Type",
|
29
|
+
"required": false,
|
30
|
+
"description": "Type de log",
|
31
|
+
"schema": {
|
32
|
+
"type": "string"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "value",
|
37
|
+
"summary": "Valeur",
|
38
|
+
"required": false,
|
39
|
+
"description": "Valeur supplémentaire à afficher",
|
40
|
+
"schema": {
|
41
|
+
"type": "object"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"x-events": []
|
46
|
+
}
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"components": {
|
50
|
+
"schemas": {}
|
51
|
+
}
|
52
|
+
}
|