apexify.js 3.0.2 → 3.1.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.
Files changed (119) hide show
  1. package/.tsbuildinfo +1 -0
  2. package/README.md +190 -151
  3. package/dist/ai/ApexAI.d.ts +37 -0
  4. package/dist/ai/ApexAI.d.ts.map +1 -0
  5. package/dist/ai/ApexAI.js +258 -0
  6. package/dist/ai/ApexAI.js.map +1 -0
  7. package/dist/ai/buttons/drawMenu.d.ts +3 -0
  8. package/dist/ai/buttons/drawMenu.d.ts.map +1 -0
  9. package/dist/ai/buttons/drawMenu.js +271 -0
  10. package/dist/ai/buttons/drawMenu.js.map +1 -0
  11. package/dist/ai/buttons/tools.d.ts +3 -0
  12. package/dist/ai/buttons/tools.d.ts.map +1 -0
  13. package/dist/ai/buttons/tools.js +442 -0
  14. package/dist/ai/buttons/tools.js.map +1 -0
  15. package/dist/ai/functions/chunkString.d.ts +2 -0
  16. package/dist/ai/functions/chunkString.d.ts.map +1 -0
  17. package/{lib → dist}/ai/functions/chunkString.js +8 -8
  18. package/dist/ai/functions/chunkString.js.map +1 -0
  19. package/dist/ai/functions/draw.d.ts +3 -0
  20. package/dist/ai/functions/draw.d.ts.map +1 -0
  21. package/dist/ai/functions/draw.js +377 -0
  22. package/dist/ai/functions/draw.js.map +1 -0
  23. package/dist/ai/functions/generateVoiceResponse.d.ts +3 -0
  24. package/dist/ai/functions/generateVoiceResponse.d.ts.map +1 -0
  25. package/dist/ai/functions/generateVoiceResponse.js +158 -0
  26. package/dist/ai/functions/generateVoiceResponse.js.map +1 -0
  27. package/dist/ai/functions/imageReader.d.ts +3 -0
  28. package/dist/ai/functions/imageReader.d.ts.map +1 -0
  29. package/dist/ai/functions/imageReader.js +23 -0
  30. package/dist/ai/functions/imageReader.js.map +1 -0
  31. package/dist/ai/functions/readFiles.d.ts +3 -0
  32. package/dist/ai/functions/readFiles.d.ts.map +1 -0
  33. package/dist/ai/functions/readFiles.js +62 -0
  34. package/dist/ai/functions/readFiles.js.map +1 -0
  35. package/dist/ai/functions/shouldDrawImage.d.ts +2 -0
  36. package/dist/ai/functions/shouldDrawImage.d.ts.map +1 -0
  37. package/dist/ai/functions/shouldDrawImage.js +12 -0
  38. package/dist/ai/functions/shouldDrawImage.js.map +1 -0
  39. package/dist/ai/models.d.ts +9 -0
  40. package/dist/ai/models.d.ts.map +1 -0
  41. package/dist/ai/models.js +538 -0
  42. package/dist/ai/models.js.map +1 -0
  43. package/dist/ai/utils.d.ts +9 -0
  44. package/dist/ai/utils.d.ts.map +1 -0
  45. package/dist/ai/utils.js +20 -0
  46. package/dist/ai/utils.js.map +1 -0
  47. package/dist/canvas/ApexPainter.d.ts +26 -0
  48. package/dist/canvas/ApexPainter.d.ts.map +1 -0
  49. package/dist/canvas/ApexPainter.js +412 -0
  50. package/dist/canvas/ApexPainter.js.map +1 -0
  51. package/dist/canvas/utils/bg.d.ts +24 -0
  52. package/dist/canvas/utils/bg.d.ts.map +1 -0
  53. package/dist/canvas/utils/bg.js +77 -0
  54. package/dist/canvas/utils/bg.js.map +1 -0
  55. package/dist/canvas/utils/charts.d.ts +9 -0
  56. package/dist/canvas/utils/charts.d.ts.map +1 -0
  57. package/dist/canvas/utils/charts.js +453 -0
  58. package/dist/canvas/utils/charts.js.map +1 -0
  59. package/dist/canvas/utils/circular.d.ts +10 -0
  60. package/dist/canvas/utils/circular.d.ts.map +1 -0
  61. package/dist/canvas/utils/circular.js +22 -0
  62. package/dist/canvas/utils/circular.js.map +1 -0
  63. package/dist/canvas/utils/customLines.d.ts +2 -0
  64. package/dist/canvas/utils/customLines.d.ts.map +1 -0
  65. package/dist/canvas/utils/customLines.js +50 -0
  66. package/dist/canvas/utils/customLines.js.map +1 -0
  67. package/dist/canvas/utils/general functions.d.ts +8 -0
  68. package/dist/canvas/utils/general functions.d.ts.map +1 -0
  69. package/dist/canvas/utils/general functions.js +187 -0
  70. package/dist/canvas/utils/general functions.js.map +1 -0
  71. package/dist/canvas/utils/imageProperties.d.ts +60 -0
  72. package/dist/canvas/utils/imageProperties.d.ts.map +1 -0
  73. package/dist/canvas/utils/imageProperties.js +331 -0
  74. package/dist/canvas/utils/imageProperties.js.map +1 -0
  75. package/dist/canvas/utils/radius.d.ts +10 -0
  76. package/dist/canvas/utils/radius.d.ts.map +1 -0
  77. package/dist/canvas/utils/radius.js +31 -0
  78. package/dist/canvas/utils/radius.js.map +1 -0
  79. package/dist/canvas/utils/textProperties.d.ts +18 -0
  80. package/dist/canvas/utils/textProperties.d.ts.map +1 -0
  81. package/dist/canvas/utils/textProperties.js +67 -0
  82. package/dist/canvas/utils/textProperties.js.map +1 -0
  83. package/dist/canvas/utils/types.d.ts +389 -0
  84. package/dist/canvas/utils/types.d.ts.map +1 -0
  85. package/dist/canvas/utils/types.js +5 -0
  86. package/dist/canvas/utils/types.js.map +1 -0
  87. package/dist/canvas/utils/utils.d.ts +20 -0
  88. package/dist/canvas/utils/utils.d.ts.map +1 -0
  89. package/dist/canvas/utils/utils.js +43 -0
  90. package/dist/canvas/utils/utils.js.map +1 -0
  91. package/dist/index.d.ts +11 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +66 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/utils.d.ts +12 -0
  96. package/dist/utils.d.ts.map +1 -0
  97. package/dist/utils.js +12 -0
  98. package/dist/utils.js.map +1 -0
  99. package/examples/barchart.txt +69 -0
  100. package/examples/linechart.txt +84 -0
  101. package/examples/piechart.txt +63 -0
  102. package/package.json +137 -78
  103. package/dataSQL/data.sql +0 -5
  104. package/dataSQL/dataName.sql +0 -0
  105. package/dataSQL/example_table.sql +0 -1
  106. package/index.js +0 -35
  107. package/lib/ai/apexAI.js +0 -446
  108. package/lib/ai/buttons/drawMenu.js +0 -351
  109. package/lib/ai/buttons/tools.js +0 -652
  110. package/lib/ai/functions/draw.js +0 -514
  111. package/lib/ai/functions/generateVoiceResponse.js +0 -239
  112. package/lib/ai/functions/processImageAttachments.js +0 -93
  113. package/lib/ai/functions/processMessageContent.js +0 -48
  114. package/lib/ai/functions/readFiles.js +0 -95
  115. package/lib/ai/functions/shouldDrawImage.js +0 -12
  116. package/lib/ai/models.js +0 -654
  117. package/lib/ai/utils.js +0 -21
  118. package/lib/canvas/ApexPainter.js +0 -1396
  119. package/lib/utils.js +0 -24
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radius.js","sourceRoot":"","sources":["../../../lib/canvas/utils/radius.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,SAAgB,YAAY,CAAC,GAAQ,EAAE,IAAY,CAAC,EAAE,IAAY,CAAC,EAAE,KAAa,EAAE,MAAc,EAAE,SAAiB,CAAC;IAClH,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/C,GAAG,CAAC,IAAI,EAAE,CAAC;IACX,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC,CAAC,CAAC;IAC9B,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,GAAG,UAAU,EAAE,CAAC,CAAC,CAAC;IACtC,GAAG,CAAC,gBAAgB,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;IAC9D,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC;IAC/C,GAAG,CAAC,gBAAgB,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,KAAK,GAAG,UAAU,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;IAChF,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;IACvC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC;IAChE,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;IAC9B,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,CAAC,CAAC;IAC9C,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,IAAI,EAAE,CAAC;AACf,CAAC;AAjBD,oCAiBC"}
@@ -0,0 +1,18 @@
1
+ import { TextObject } from "./types";
2
+ /**
3
+ * Draws text on the canvas context.
4
+ * @param ctx The canvas rendering context.
5
+ * @param textOptions The options for the text.
6
+ */
7
+ export declare function drawText(ctx: any, textOptions: TextObject): void;
8
+ /**
9
+ * Draws wrapped text on the canvas context.
10
+ * @param ctx The canvas rendering context.
11
+ * @param text The text to be drawn.
12
+ * @param x The x-coordinate of the starting point of the text.
13
+ * @param y The y-coordinate of the starting point of the text.
14
+ * @param maxWidth The maximum width for wrapping the text.
15
+ * @param textOptions The options for the text.
16
+ */
17
+ export declare function WrappedText(ctx: any, text: string, x: number, y: number, maxWidth: number, textOptions: TextObject): void;
18
+ //# sourceMappingURL=textProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textProperties.d.ts","sourceRoot":"","sources":["../../../lib/canvas/utils/textProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,QA4BzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,QAqBhH"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WrappedText = exports.drawText = void 0;
4
+ /**
5
+ * Draws text on the canvas context.
6
+ * @param ctx The canvas rendering context.
7
+ * @param textOptions The options for the text.
8
+ */
9
+ function drawText(ctx, textOptions) {
10
+ ctx.save();
11
+ ctx.font = `${textOptions.isBold ? 'bold ' : ''}${textOptions.fontSize || 16}px ${textOptions.fontName || "Arial"}`;
12
+ ctx.textAlign = textOptions.textAlign || 'left';
13
+ ctx.textBaseline = textOptions.textBaseline || 'alphabetic';
14
+ if (textOptions.shadow) {
15
+ const { color, offsetX, offsetY, blur } = textOptions.shadow;
16
+ ctx.shadowColor = color || "transparent";
17
+ ctx.shadowOffsetX = offsetX || 0;
18
+ ctx.shadowOffsetY = offsetY || 0;
19
+ ctx.shadowBlur = blur || 0;
20
+ }
21
+ ctx.fillStyle = textOptions.color || 'darkgray';
22
+ if (textOptions.maxWidth) {
23
+ WrappedText(ctx, textOptions.text || 'Hello World', textOptions.x || 0, textOptions.y || 0, textOptions.maxWidth, textOptions);
24
+ }
25
+ else {
26
+ ctx.fillText(textOptions.text, textOptions.x, textOptions.y);
27
+ }
28
+ if (textOptions.stroke && textOptions.stroke.color && textOptions.stroke.width) {
29
+ ctx.strokeStyle = textOptions.stroke.color;
30
+ ctx.lineWidth = textOptions.stroke.width;
31
+ ctx.strokeText(textOptions.text, textOptions.x, textOptions.y);
32
+ }
33
+ ctx.restore();
34
+ }
35
+ exports.drawText = drawText;
36
+ /**
37
+ * Draws wrapped text on the canvas context.
38
+ * @param ctx The canvas rendering context.
39
+ * @param text The text to be drawn.
40
+ * @param x The x-coordinate of the starting point of the text.
41
+ * @param y The y-coordinate of the starting point of the text.
42
+ * @param maxWidth The maximum width for wrapping the text.
43
+ * @param textOptions The options for the text.
44
+ */
45
+ function WrappedText(ctx, text, x, y, maxWidth, textOptions) {
46
+ const words = text.split(' ');
47
+ let currentLine = '';
48
+ const fontSize = textOptions.fontSize || 16;
49
+ for (let n = 0; n < words.length; n++) {
50
+ const testLine = currentLine + words[n] + ' ';
51
+ const metrics = ctx.measureText(testLine);
52
+ const testWidth = metrics.width;
53
+ if (testWidth > maxWidth && n > 0) {
54
+ const adjustedY = y + (textOptions.lineHeight || fontSize) / 2;
55
+ ctx.fillText(currentLine.trim(), x, adjustedY);
56
+ currentLine = words[n] + ' ';
57
+ y += textOptions.lineHeight || fontSize;
58
+ }
59
+ else {
60
+ currentLine = testLine;
61
+ }
62
+ }
63
+ const adjustedY = y + (textOptions.lineHeight || fontSize) / 2;
64
+ ctx.fillText(currentLine.trim(), x, adjustedY);
65
+ }
66
+ exports.WrappedText = WrappedText;
67
+ //# sourceMappingURL=textProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textProperties.js","sourceRoot":"","sources":["../../../lib/canvas/utils/textProperties.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,GAAQ,EAAE,WAAuB;IACtD,GAAG,CAAC,IAAI,EAAE,CAAC;IACX,GAAG,CAAC,IAAI,GAAG,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,QAAQ,IAAI,EAAE,MAAM,WAAW,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;IACpH,GAAG,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,IAAI,MAAM,CAAC;IAChD,GAAG,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,IAAI,YAAY,CAAC;IAE5D,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;QACrB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAA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 /**
4
+ * Configuration options for the canvas.
5
+ * @param {number} width - The width of the canvas.
6
+ * @param {number} height - The height of the canvas.
7
+ * @param {string} customBg - The URL or local path to the custom background image.
8
+ * @param {string} colorBg - The background color of the canvas.
9
+ * @param {object} gradientBg - The gradient settings for the canvas background.
10
+ * @param {number | string} borderRadius - The border radius of the canvas.
11
+ */
12
+ export interface CanvasConfig {
13
+ width?: number;
14
+ height?: number;
15
+ x?: number;
16
+ y?: number;
17
+ customBg?: string;
18
+ colorBg?: string | 'transparent';
19
+ gradientBg?: {
20
+ type?: string | 'linear' | 'radial' | undefined;
21
+ startX?: number;
22
+ startY?: number;
23
+ startRadius?: number;
24
+ endRadius?: number;
25
+ endX?: number;
26
+ endY?: number;
27
+ colors?: {
28
+ stop?: number;
29
+ color?: string;
30
+ }[];
31
+ };
32
+ stroke?: {
33
+ color?: string;
34
+ width?: number;
35
+ position?: number;
36
+ borderRadius?: number | string | "circular";
37
+ };
38
+ shadow?: {
39
+ color?: string;
40
+ offsetX?: number;
41
+ offsetY?: number;
42
+ blur?: number;
43
+ opacity?: number;
44
+ };
45
+ rotation?: number;
46
+ borderRadius?: number | string | "circular";
47
+ }
48
+ /**
49
+ * Properties of an image or shape to be drawn on the canvas.
50
+ * @param {string} source - URL or path to the image or shape name.
51
+ * @param {number} width - The width of the image or shape.
52
+ * @param {number} height - The height of the image or shape.
53
+ * @param {number} x - The x-coordinate of the image or shape.
54
+ * @param {number} y - The y-coordinate of the image or shape.
55
+ * @param {boolean} isFilled - Whether the shape is filled or not (Only applicable if source is a shape name).
56
+ * @param {string} color - The color of the shape (Only applicable if source is a shape name).
57
+ * @param {object} gradient - The gradient settings for the shape (Only applicable if source is a shape name).
58
+ * @param {number} rotation - Rotation angle in degrees.
59
+ * @param {number | string} borderRadius - The border radius of the image or shape.
60
+ * @param {object} stroke - The stroke properties.
61
+ * @param {string} stroke.color - The color of the stroke.
62
+ * @param {number} stroke.width - The width of the stroke.
63
+ * @param {number} stroke.position - Space between stroke and the image it's stroked on.
64
+ * @param {number | string} stroke.borderRadius - The border radius of the stroke.
65
+ * @param {object} shadow - The shadow properties.
66
+ * @param {string} shadow.color - The color of the shadow.
67
+ * @param {number} shadow.offsetX - The horizontal offset of the shadow.
68
+ * @param {number} shadow.offsetY - The vertical offset of the shadow.
69
+ * @param {number} shadow.blur - The blur radius of the shadow.
70
+ * @param {number} shadow.opacity - The opacity of the shadow.
71
+ * @param {number | string} shadow.borderRadius - The border radius of the shadow.
72
+ */
73
+ export interface ImageProperties {
74
+ source: string;
75
+ width?: number;
76
+ height?: number;
77
+ x?: number;
78
+ y?: number;
79
+ isFilled?: boolean;
80
+ color?: string;
81
+ gradient?: {
82
+ type?: string | 'linear' | 'radial' | undefined;
83
+ startX?: number;
84
+ startY?: number;
85
+ startRadius?: number;
86
+ endRadius?: number;
87
+ endX?: number;
88
+ endY?: number;
89
+ colors?: {
90
+ stop?: number;
91
+ color?: string;
92
+ }[];
93
+ };
94
+ rotation?: number;
95
+ borderRadius?: number | string | "circular";
96
+ stroke?: {
97
+ color?: string;
98
+ width?: number;
99
+ position?: number;
100
+ borderRadius?: number | string | "circular";
101
+ };
102
+ shadow?: {
103
+ color?: string;
104
+ offsetX?: number;
105
+ offsetY?: number;
106
+ blur?: number;
107
+ opacity?: number;
108
+ borderRadius?: number | string | "circular";
109
+ };
110
+ }
111
+ export interface TextObject {
112
+ text?: string;
113
+ x?: number;
114
+ y?: number;
115
+ fontPath?: string;
116
+ fontName?: string;
117
+ fontSize?: number;
118
+ isBold?: boolean;
119
+ color?: string;
120
+ maxWidth?: number;
121
+ lineHeight?: number;
122
+ textAlign?: CanvasTextAlign;
123
+ textBaseline?: CanvasTextBaseline;
124
+ shadow?: {
125
+ color?: string;
126
+ offsetX?: number;
127
+ offsetY?: number;
128
+ blur?: number;
129
+ opacity?: number;
130
+ };
131
+ stroke?: {
132
+ color?: string;
133
+ width?: number;
134
+ };
135
+ }
136
+ /**
137
+ * Represents an image object.
138
+ * @param source The source of the image.
139
+ * @param isRemote Indicates whether the image is remote or local.
140
+ */
141
+ export interface ImageObject {
142
+ source: string;
143
+ isRemote: boolean;
144
+ }
145
+ /**
146
+ * Options for creating a GIF.
147
+ * @param outputFormat The format of the output ('file', 'base64', 'attachment', or 'buffer').
148
+ * @param outputFile The file path if output format is 'file'.
149
+ * @param width The width of the GIF.
150
+ * @param height The height of the GIF.
151
+ * @param repeat The number of times the GIF should repeat.
152
+ * @param quality The quality of the GIF.
153
+ * @param delay The delay between frames in milliseconds.
154
+ * @param watermark The watermark settings.
155
+ * @param textOverlay The text overlay settings.
156
+ * @param basDir The base directory for files.
157
+ */
158
+ export interface GIFOptions {
159
+ outputFormat: 'file' | 'base64' | 'attachment' | 'buffer' | string;
160
+ outputFile?: string;
161
+ width?: number;
162
+ height?: number;
163
+ repeat?: number;
164
+ quality?: number;
165
+ delay?: number;
166
+ watermark?: {
167
+ enable: boolean;
168
+ url: string;
169
+ };
170
+ textOverlay?: {
171
+ text: string;
172
+ fontName?: string;
173
+ fontPath?: string;
174
+ fontSize?: number;
175
+ fontColor?: string;
176
+ x?: number;
177
+ y?: number;
178
+ };
179
+ basDir?: any;
180
+ }
181
+ /**
182
+ * Results of creating a GIF.
183
+ * @param buffer The buffer containing the GIF data.
184
+ * @param base64 The base64 representation of the GIF.
185
+ * @param attachment The attachment containing the GIF stream.
186
+ */
187
+ export interface GIFResults {
188
+ buffer?: Buffer;
189
+ base64?: string;
190
+ attachment?: {
191
+ attachment: NodeJS.ReadableStream | any;
192
+ name: string;
193
+ };
194
+ }
195
+ /**
196
+ * Custom options for drawing.
197
+ * @param startCoordinates The starting coordinates.
198
+ * @param endCoordinates The ending coordinates.
199
+ * @param lineStyle The style of the line.
200
+ */
201
+ export interface CustomOptions {
202
+ startCoordinates: {
203
+ x: number;
204
+ y: number;
205
+ };
206
+ endCoordinates: {
207
+ x: number;
208
+ y: number;
209
+ };
210
+ lineStyle: {
211
+ width?: number;
212
+ color?: string;
213
+ lineRadius?: number | string;
214
+ stroke?: {
215
+ color?: string;
216
+ width?: number;
217
+ lineRadius?: number | string;
218
+ };
219
+ shadow?: {
220
+ offsetX?: number;
221
+ offsetY?: number;
222
+ blur?: number;
223
+ color?: string;
224
+ lineRadius?: number | string;
225
+ };
226
+ };
227
+ }
228
+ export interface ChartData {
229
+ height?: number;
230
+ width?: number;
231
+ widthPerc?: number;
232
+ heightPerc?: number;
233
+ title?: {
234
+ title?: string;
235
+ color?: string;
236
+ size?: number;
237
+ };
238
+ bg?: {
239
+ image?: string;
240
+ baseDir?: any;
241
+ bgColor?: string;
242
+ };
243
+ grid?: {
244
+ enable: boolean;
245
+ color?: string;
246
+ width?: number;
247
+ };
248
+ axis?: {
249
+ color?: string;
250
+ size?: number;
251
+ };
252
+ labels?: {
253
+ color?: string;
254
+ fontSize?: number;
255
+ };
256
+ }
257
+ export interface DataPoint {
258
+ label: string;
259
+ barColor?: string;
260
+ stroke?: {
261
+ color?: string;
262
+ width?: number;
263
+ };
264
+ value: number;
265
+ position: {
266
+ startsXLabel: number;
267
+ endsXLabel: number;
268
+ };
269
+ }
270
+ export interface barChart_1 {
271
+ chartData?: ChartData;
272
+ xLabels: number[];
273
+ yLabels: number[];
274
+ data: {
275
+ xAxis: DataPoint[];
276
+ yAxis: number[];
277
+ keys?: {
278
+ [color: string]: string;
279
+ };
280
+ keyColor?: string;
281
+ xTitle?: string;
282
+ yTitle?: string;
283
+ labelStyle?: {
284
+ color?: string;
285
+ size?: number;
286
+ };
287
+ };
288
+ }
289
+ export interface bgConfig {
290
+ width?: number;
291
+ height?: number;
292
+ bgcolor?: string;
293
+ }
294
+ export interface KeyBoxConfig {
295
+ width?: number;
296
+ height?: number;
297
+ radius?: number;
298
+ bgcolor?: string;
299
+ x?: number;
300
+ y?: number;
301
+ content?: KeyBoxContent;
302
+ }
303
+ export interface KeyBoxContent {
304
+ keyTitle?: {
305
+ text?: string;
306
+ fontSize?: number;
307
+ x?: number;
308
+ y?: number;
309
+ };
310
+ keys?: {
311
+ x?: number;
312
+ y?: number;
313
+ fontSize?: number;
314
+ };
315
+ }
316
+ export interface StrokeConfig {
317
+ color?: string;
318
+ size?: number;
319
+ }
320
+ export interface TitleConfig {
321
+ text?: string;
322
+ color?: string;
323
+ fontSize?: number;
324
+ x?: number;
325
+ y?: number;
326
+ }
327
+ export interface PieDataConfig {
328
+ x?: number;
329
+ y?: number;
330
+ stroke?: StrokeConfig;
331
+ title?: TitleConfig;
332
+ boxes?: {
333
+ labelDistance?: number;
334
+ width?: number;
335
+ height?: number;
336
+ fontSize?: number;
337
+ };
338
+ radius?: number;
339
+ }
340
+ export interface PieConfig {
341
+ canvas?: bgConfig;
342
+ keyBox?: KeyBoxConfig;
343
+ pieData?: PieDataConfig;
344
+ }
345
+ export interface DataItem {
346
+ label: string;
347
+ color: string;
348
+ value: number;
349
+ key: string;
350
+ }
351
+ export interface PieChartData {
352
+ data?: DataItem[];
353
+ pieConfig?: PieConfig;
354
+ }
355
+ export interface DataPoint {
356
+ label: string;
357
+ y: number;
358
+ }
359
+ export interface LineChartConfig {
360
+ yLabels: string[];
361
+ fillArea: {
362
+ color: string;
363
+ }[];
364
+ lineColor: string[];
365
+ plot: {
366
+ enable: boolean;
367
+ color: string[];
368
+ size: number;
369
+ };
370
+ lineTension: number[];
371
+ grid: {
372
+ type: 'vertical' | 'horizontal' | 'both' | string;
373
+ color: string;
374
+ width: number;
375
+ };
376
+ keys: {
377
+ [color: string]: string;
378
+ };
379
+ canvas?: {
380
+ bgColor?: string;
381
+ fontColor?: string;
382
+ fontSize?: number;
383
+ width?: number;
384
+ height?: number;
385
+ image?: string;
386
+ baseDir?: any;
387
+ };
388
+ }
389
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/canvas/utils/types.ts"],"names":[],"mappings":";;AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;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;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE;QACF,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE;QACF,IAAI,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;QAClD,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClC,MAAM,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,GAAG,CAAA;KAChB,CAAC;CACL"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/canvas/utils/types.ts"],"names":[],"mappings":";;AAyCC,CAAC;AA6DD,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Exported utilities for handling canvas configurations and drawing operations.
3
+ * @param CanvasConfig The configuration options for the canvas.
4
+ * @param radiusBorder The function for applying a radius border to the canvas.
5
+ * @param circularBorder The function for applying a circular border to the canvas.
6
+ * @param drawBackgroundColor The function for drawing a solid background color on the canvas.
7
+ * @param drawBackgroundGradient The function for drawing a gradient background on the canvas.
8
+ * @param customBackground The function for drawing a custom background image on the canvas.
9
+ */
10
+ import { CanvasConfig, ImageProperties, TextObject, ImageObject, GIFOptions, GIFResults, CustomOptions, barChart_1 } from "./types";
11
+ import { radiusBorder } from "./radius";
12
+ import { circularBorder } from "./circular";
13
+ import { drawBackgroundColor, drawBackgroundGradient, customBackground } from "./bg";
14
+ import { applyRotation, imageRadius, applyStroke, applyShadow, objectRadius, drawShape } from './imageProperties';
15
+ import { drawText, WrappedText } from "./textProperties";
16
+ import { loadImages, resizingImg, converter, applyColorFilters, imgEffects } from './general functions';
17
+ import { customLines } from "./customLines";
18
+ import { verticalBarChart, pieChart, lineChart } from './charts';
19
+ export { CanvasConfig, ImageProperties, TextObject, ImageObject, GIFOptions, GIFResults, CustomOptions, barChart_1, radiusBorder, customLines, circularBorder, drawBackgroundColor, drawBackgroundGradient, customBackground, applyRotation, imageRadius, applyStroke, applyShadow, objectRadius, drawShape, drawText, WrappedText, loadImages, resizingImg, converter, applyColorFilters, imgEffects, verticalBarChart, pieChart, lineChart, };
20
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/canvas/utils/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACpI,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAA;AAChH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEhE,OAAO,EACH,YAAY,EACZ,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,SAAS,GACZ,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /**
3
+ * Exported utilities for handling canvas configurations and drawing operations.
4
+ * @param CanvasConfig The configuration options for the canvas.
5
+ * @param radiusBorder The function for applying a radius border to the canvas.
6
+ * @param circularBorder The function for applying a circular border to the canvas.
7
+ * @param drawBackgroundColor The function for drawing a solid background color on the canvas.
8
+ * @param drawBackgroundGradient The function for drawing a gradient background on the canvas.
9
+ * @param customBackground The function for drawing a custom background image on the canvas.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.lineChart = exports.pieChart = exports.verticalBarChart = exports.imgEffects = exports.applyColorFilters = exports.converter = exports.resizingImg = exports.loadImages = exports.WrappedText = exports.drawText = exports.drawShape = exports.objectRadius = exports.applyShadow = exports.applyStroke = exports.imageRadius = exports.applyRotation = exports.customBackground = exports.drawBackgroundGradient = exports.drawBackgroundColor = exports.circularBorder = exports.customLines = exports.radiusBorder = void 0;
13
+ const radius_1 = require("./radius");
14
+ Object.defineProperty(exports, "radiusBorder", { enumerable: true, get: function () { return radius_1.radiusBorder; } });
15
+ const circular_1 = require("./circular");
16
+ Object.defineProperty(exports, "circularBorder", { enumerable: true, get: function () { return circular_1.circularBorder; } });
17
+ const bg_1 = require("./bg");
18
+ Object.defineProperty(exports, "drawBackgroundColor", { enumerable: true, get: function () { return bg_1.drawBackgroundColor; } });
19
+ Object.defineProperty(exports, "drawBackgroundGradient", { enumerable: true, get: function () { return bg_1.drawBackgroundGradient; } });
20
+ Object.defineProperty(exports, "customBackground", { enumerable: true, get: function () { return bg_1.customBackground; } });
21
+ const imageProperties_1 = require("./imageProperties");
22
+ Object.defineProperty(exports, "applyRotation", { enumerable: true, get: function () { return imageProperties_1.applyRotation; } });
23
+ Object.defineProperty(exports, "imageRadius", { enumerable: true, get: function () { return imageProperties_1.imageRadius; } });
24
+ Object.defineProperty(exports, "applyStroke", { enumerable: true, get: function () { return imageProperties_1.applyStroke; } });
25
+ Object.defineProperty(exports, "applyShadow", { enumerable: true, get: function () { return imageProperties_1.applyShadow; } });
26
+ Object.defineProperty(exports, "objectRadius", { enumerable: true, get: function () { return imageProperties_1.objectRadius; } });
27
+ Object.defineProperty(exports, "drawShape", { enumerable: true, get: function () { return imageProperties_1.drawShape; } });
28
+ const textProperties_1 = require("./textProperties");
29
+ Object.defineProperty(exports, "drawText", { enumerable: true, get: function () { return textProperties_1.drawText; } });
30
+ Object.defineProperty(exports, "WrappedText", { enumerable: true, get: function () { return textProperties_1.WrappedText; } });
31
+ const general_functions_1 = require("./general functions");
32
+ Object.defineProperty(exports, "loadImages", { enumerable: true, get: function () { return general_functions_1.loadImages; } });
33
+ Object.defineProperty(exports, "resizingImg", { enumerable: true, get: function () { return general_functions_1.resizingImg; } });
34
+ Object.defineProperty(exports, "converter", { enumerable: true, get: function () { return general_functions_1.converter; } });
35
+ Object.defineProperty(exports, "applyColorFilters", { enumerable: true, get: function () { return general_functions_1.applyColorFilters; } });
36
+ Object.defineProperty(exports, "imgEffects", { enumerable: true, get: function () { return general_functions_1.imgEffects; } });
37
+ const customLines_1 = require("./customLines");
38
+ Object.defineProperty(exports, "customLines", { enumerable: true, get: function () { return customLines_1.customLines; } });
39
+ const charts_1 = require("./charts");
40
+ Object.defineProperty(exports, "verticalBarChart", { enumerable: true, get: function () { return charts_1.verticalBarChart; } });
41
+ Object.defineProperty(exports, "pieChart", { enumerable: true, get: function () { return charts_1.pieChart; } });
42
+ Object.defineProperty(exports, "lineChart", { enumerable: true, get: function () { return charts_1.lineChart; } });
43
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../lib/canvas/utils/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAKH,qCAAwC;AAkBpC,6FAlBK,qBAAY,OAkBL;AAjBhB,yCAA4C;AAmBxC,+FAnBK,yBAAc,OAmBL;AAlBlB,6BAAqF;AAmBjF,oGAnBK,wBAAmB,OAmBL;AACnB,uGApB0B,2BAAsB,OAoB1B;AACtB,iGArBkD,qBAAgB,OAqBlD;AApBpB,uDAAgH;AAqB5G,8FArBK,+BAAa,OAqBL;AACb,4FAtBoB,6BAAW,OAsBpB;AACX,4FAvBiC,6BAAW,OAuBjC;AACX,4FAxB8C,6BAAW,OAwB9C;AACX,6FAzB2D,8BAAY,OAyB3D;AACZ,0FA1ByE,2BAAS,OA0BzE;AAzBb,qDAAyD;AA0BrD,yFA1BK,yBAAQ,OA0BL;AACR,4FA3Be,4BAAW,OA2Bf;AA1Bf,2DAAwG;AA2BpG,2FA3BK,8BAAU,OA2BL;AACV,4FA5BiB,+BAAW,OA4BjB;AACX,0FA7B8B,6BAAS,OA6B9B;AACT,kGA9ByC,qCAAiB,OA8BzC;AACjB,2FA/B4D,8BAAU,OA+B5D;AA9Bd,+CAA4C;AAaxC,4FAbK,yBAAW,OAaL;AAZf,qCAAgE;AA8B5D,iGA9BK,yBAAgB,OA8BL;AAChB,yFA/BuB,iBAAQ,OA+BvB;AACR,0FAhCiC,kBAAS,OAgCjC"}
@@ -0,0 +1,11 @@
1
+ import { ApexAI, ApexChat, ApexImagine, ApexPainter } from "./utils";
2
+ export { ApexPainter, ApexAI, ApexImagine, ApexChat };
3
+ declare const _default: {
4
+ ApexPainter: typeof ApexPainter;
5
+ ApexAI: typeof ApexAI;
6
+ ApexImagine: typeof ApexImagine;
7
+ ApexChat: typeof ApexChat;
8
+ };
9
+ export default _default;
10
+ export declare function apexAI(): Promise<void>;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;;;;;;;AACtD,wBAA8D;AAE9D,wBAAsB,MAAM,kBAE1B"}