@atmaticai/agent-tools-core 1.0.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.
Files changed (142) hide show
  1. package/README.md +742 -0
  2. package/dist/archive/index.d.mts +1 -0
  3. package/dist/archive/index.d.ts +1 -0
  4. package/dist/archive/index.js +90 -0
  5. package/dist/archive/index.js.map +1 -0
  6. package/dist/archive/index.mjs +80 -0
  7. package/dist/archive/index.mjs.map +1 -0
  8. package/dist/color/index.d.mts +1 -0
  9. package/dist/color/index.d.ts +1 -0
  10. package/dist/color/index.js +347 -0
  11. package/dist/color/index.js.map +1 -0
  12. package/dist/color/index.mjs +336 -0
  13. package/dist/color/index.mjs.map +1 -0
  14. package/dist/crypto/index.d.mts +1 -0
  15. package/dist/crypto/index.d.ts +1 -0
  16. package/dist/crypto/index.js +116 -0
  17. package/dist/crypto/index.js.map +1 -0
  18. package/dist/crypto/index.mjs +108 -0
  19. package/dist/crypto/index.mjs.map +1 -0
  20. package/dist/csv/index.d.mts +1 -0
  21. package/dist/csv/index.d.ts +1 -0
  22. package/dist/csv/index.js +371 -0
  23. package/dist/csv/index.js.map +1 -0
  24. package/dist/csv/index.mjs +348 -0
  25. package/dist/csv/index.mjs.map +1 -0
  26. package/dist/datetime/index.d.mts +1 -0
  27. package/dist/datetime/index.d.ts +1 -0
  28. package/dist/datetime/index.js +234 -0
  29. package/dist/datetime/index.js.map +1 -0
  30. package/dist/datetime/index.mjs +224 -0
  31. package/dist/datetime/index.mjs.map +1 -0
  32. package/dist/diff/index.d.mts +2 -0
  33. package/dist/diff/index.d.ts +2 -0
  34. package/dist/diff/index.js +84 -0
  35. package/dist/diff/index.js.map +1 -0
  36. package/dist/diff/index.mjs +78 -0
  37. package/dist/diff/index.mjs.map +1 -0
  38. package/dist/excel/index.d.mts +1 -0
  39. package/dist/excel/index.d.ts +1 -0
  40. package/dist/excel/index.js +163 -0
  41. package/dist/excel/index.js.map +1 -0
  42. package/dist/excel/index.mjs +153 -0
  43. package/dist/excel/index.mjs.map +1 -0
  44. package/dist/image/index.d.mts +1 -0
  45. package/dist/image/index.d.ts +1 -0
  46. package/dist/image/index.js +123 -0
  47. package/dist/image/index.js.map +1 -0
  48. package/dist/image/index.mjs +107 -0
  49. package/dist/image/index.mjs.map +1 -0
  50. package/dist/index--vbnYfdE.d.mts +142 -0
  51. package/dist/index--vbnYfdE.d.ts +142 -0
  52. package/dist/index-7FZQloN-.d.mts +62 -0
  53. package/dist/index-7FZQloN-.d.ts +62 -0
  54. package/dist/index-7XgaTVH5.d.mts +93 -0
  55. package/dist/index-7XgaTVH5.d.ts +93 -0
  56. package/dist/index-7bvFmh45.d.mts +87 -0
  57. package/dist/index-7bvFmh45.d.ts +87 -0
  58. package/dist/index-BDZcIVCU.d.mts +53 -0
  59. package/dist/index-BDZcIVCU.d.ts +53 -0
  60. package/dist/index-BN00EnUU.d.mts +55 -0
  61. package/dist/index-BN00EnUU.d.ts +55 -0
  62. package/dist/index-CQ1EukC4.d.mts +59 -0
  63. package/dist/index-CQ1EukC4.d.ts +59 -0
  64. package/dist/index-CgRVnFOt.d.mts +91 -0
  65. package/dist/index-CgRVnFOt.d.ts +91 -0
  66. package/dist/index-DjBDZzuj.d.mts +54 -0
  67. package/dist/index-DjBDZzuj.d.ts +54 -0
  68. package/dist/index-FFrvmr-n.d.mts +50 -0
  69. package/dist/index-FFrvmr-n.d.ts +50 -0
  70. package/dist/index-QWC8yIgW.d.mts +106 -0
  71. package/dist/index-QWC8yIgW.d.ts +106 -0
  72. package/dist/index-RVqNunxE.d.mts +193 -0
  73. package/dist/index-RVqNunxE.d.ts +193 -0
  74. package/dist/index-fJD8SORm.d.mts +61 -0
  75. package/dist/index-fJD8SORm.d.ts +61 -0
  76. package/dist/index-pPy_XDQU.d.mts +56 -0
  77. package/dist/index-pPy_XDQU.d.ts +56 -0
  78. package/dist/index-rwh9hdD9.d.mts +68 -0
  79. package/dist/index-rwh9hdD9.d.ts +68 -0
  80. package/dist/index-uXdkAfea.d.mts +93 -0
  81. package/dist/index-uXdkAfea.d.ts +93 -0
  82. package/dist/index.d.mts +17 -0
  83. package/dist/index.d.ts +17 -0
  84. package/dist/index.js +3744 -0
  85. package/dist/index.js.map +1 -0
  86. package/dist/index.mjs +3694 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/json/index.d.mts +1 -0
  89. package/dist/json/index.d.ts +1 -0
  90. package/dist/json/index.js +599 -0
  91. package/dist/json/index.js.map +1 -0
  92. package/dist/json/index.mjs +552 -0
  93. package/dist/json/index.mjs.map +1 -0
  94. package/dist/markdown/index.d.mts +1 -0
  95. package/dist/markdown/index.d.ts +1 -0
  96. package/dist/markdown/index.js +151 -0
  97. package/dist/markdown/index.js.map +1 -0
  98. package/dist/markdown/index.mjs +139 -0
  99. package/dist/markdown/index.mjs.map +1 -0
  100. package/dist/math/index.d.mts +1 -0
  101. package/dist/math/index.d.ts +1 -0
  102. package/dist/math/index.js +247 -0
  103. package/dist/math/index.js.map +1 -0
  104. package/dist/math/index.mjs +240 -0
  105. package/dist/math/index.mjs.map +1 -0
  106. package/dist/pdf/index.d.mts +1 -0
  107. package/dist/pdf/index.d.ts +1 -0
  108. package/dist/pdf/index.js +546 -0
  109. package/dist/pdf/index.js.map +1 -0
  110. package/dist/pdf/index.mjs +518 -0
  111. package/dist/pdf/index.mjs.map +1 -0
  112. package/dist/regex/index.d.mts +1 -0
  113. package/dist/regex/index.d.ts +1 -0
  114. package/dist/regex/index.js +93 -0
  115. package/dist/regex/index.js.map +1 -0
  116. package/dist/regex/index.mjs +88 -0
  117. package/dist/regex/index.mjs.map +1 -0
  118. package/dist/settings/index.d.mts +41 -0
  119. package/dist/settings/index.d.ts +41 -0
  120. package/dist/settings/index.js +146 -0
  121. package/dist/settings/index.js.map +1 -0
  122. package/dist/settings/index.mjs +139 -0
  123. package/dist/settings/index.mjs.map +1 -0
  124. package/dist/sql/index.d.mts +1 -0
  125. package/dist/sql/index.d.ts +1 -0
  126. package/dist/sql/index.js +146 -0
  127. package/dist/sql/index.js.map +1 -0
  128. package/dist/sql/index.mjs +139 -0
  129. package/dist/sql/index.mjs.map +1 -0
  130. package/dist/text/index.d.mts +1 -0
  131. package/dist/text/index.d.ts +1 -0
  132. package/dist/text/index.js +250 -0
  133. package/dist/text/index.js.map +1 -0
  134. package/dist/text/index.mjs +242 -0
  135. package/dist/text/index.mjs.map +1 -0
  136. package/dist/xml/index.d.mts +1 -0
  137. package/dist/xml/index.d.ts +1 -0
  138. package/dist/xml/index.js +188 -0
  139. package/dist/xml/index.js.map +1 -0
  140. package/dist/xml/index.mjs +180 -0
  141. package/dist/xml/index.mjs.map +1 -0
  142. package/package.json +150 -0
@@ -0,0 +1,193 @@
1
+ interface MergeOptions {
2
+ pageRanges?: string[];
3
+ }
4
+ interface SplitOptions {
5
+ ranges: string;
6
+ }
7
+ interface PageRange {
8
+ start: number;
9
+ end: number;
10
+ }
11
+ interface PDFMetadata {
12
+ title?: string;
13
+ author?: string;
14
+ subject?: string;
15
+ keywords?: string[];
16
+ creator?: string;
17
+ producer?: string;
18
+ creationDate?: Date;
19
+ modificationDate?: Date;
20
+ }
21
+ interface PDFInfo {
22
+ pageCount: number;
23
+ metadata: PDFMetadata;
24
+ encrypted: boolean;
25
+ version: string;
26
+ }
27
+ interface CompressOptions {
28
+ quality: 'low' | 'medium' | 'high';
29
+ }
30
+ interface ExtractTextOptions {
31
+ pages?: number[];
32
+ preserveLayout?: boolean;
33
+ }
34
+ interface PageInfo {
35
+ index: number;
36
+ width: number;
37
+ height: number;
38
+ rotation: number;
39
+ }
40
+ interface RotateOptions {
41
+ pages?: number[];
42
+ degrees: 0 | 90 | 180 | 270;
43
+ }
44
+ interface WatermarkOptions {
45
+ text?: string;
46
+ opacity?: number;
47
+ rotation?: number;
48
+ position?: 'center' | 'top' | 'bottom';
49
+ fontSize?: number;
50
+ color?: {
51
+ r: number;
52
+ g: number;
53
+ b: number;
54
+ };
55
+ }
56
+ interface TemplateColor {
57
+ r: number;
58
+ g: number;
59
+ b: number;
60
+ }
61
+ interface TemplateFont {
62
+ name: string;
63
+ size: number;
64
+ weight?: 'normal' | 'bold';
65
+ }
66
+ interface TemplateElement {
67
+ type: 'text' | 'placeholder';
68
+ content: string;
69
+ fieldName?: string;
70
+ x: number;
71
+ y: number;
72
+ font?: TemplateFont;
73
+ color?: TemplateColor;
74
+ }
75
+ interface TemplatePage {
76
+ width: number;
77
+ height: number;
78
+ elements: TemplateElement[];
79
+ }
80
+ interface TemplateField {
81
+ name: string;
82
+ defaultValue: string;
83
+ pages: number[];
84
+ }
85
+ interface PDFTemplate {
86
+ version: '1.0';
87
+ metadata: {
88
+ name?: string;
89
+ description?: string;
90
+ createdAt: string;
91
+ sourcePageCount: number;
92
+ };
93
+ pages: TemplatePage[];
94
+ fields: TemplateField[];
95
+ fonts: Record<string, TemplateFont>;
96
+ defaults?: {
97
+ font?: TemplateFont;
98
+ color?: TemplateColor;
99
+ missingFieldBehavior?: 'leave_placeholder' | 'use_default' | 'empty_string';
100
+ };
101
+ }
102
+ interface PdfToTemplateOptions {
103
+ name?: string;
104
+ description?: string;
105
+ }
106
+ interface TemplateToPdfOptions {
107
+ missingFieldBehavior?: 'leave_placeholder' | 'use_default' | 'empty_string';
108
+ }
109
+
110
+ declare function parsePageRanges(rangeStr: string, totalPages: number): number[];
111
+ declare function parseRangesToGroups(rangeStr: string, totalPages: number): PageRange[];
112
+ declare function formatBytes(bytes: number): string;
113
+ declare function toUint8Array(data: Buffer | Uint8Array | ArrayBuffer): Uint8Array;
114
+
115
+ declare function merge(files: (Buffer | Uint8Array)[], options?: MergeOptions): Promise<Uint8Array>;
116
+ declare function mergeAll(files: (Buffer | Uint8Array)[]): Promise<Uint8Array>;
117
+ declare function appendPages(target: Buffer | Uint8Array, source: Buffer | Uint8Array, pageRange?: string): Promise<Uint8Array>;
118
+
119
+ declare function split(file: Buffer | Uint8Array, options: SplitOptions): Promise<Uint8Array[]>;
120
+ declare function extractPages(file: Buffer | Uint8Array, pageRange: string): Promise<Uint8Array>;
121
+ declare function splitEveryN(file: Buffer | Uint8Array, n: number): Promise<Uint8Array[]>;
122
+ declare function splitIntoSingle(file: Buffer | Uint8Array): Promise<Uint8Array[]>;
123
+
124
+ declare function getInfo(file: Buffer | Uint8Array): Promise<PDFInfo>;
125
+ declare function getMetadata(file: Buffer | Uint8Array): Promise<PDFMetadata>;
126
+ declare function setMetadata(file: Buffer | Uint8Array, metadata: Partial<PDFMetadata>): Promise<Uint8Array>;
127
+ declare function getPageInfo(file: Buffer | Uint8Array): Promise<PageInfo[]>;
128
+ declare function getPageCount(file: Buffer | Uint8Array): Promise<number>;
129
+
130
+ declare function rotate(file: Buffer | Uint8Array, options: RotateOptions): Promise<Uint8Array>;
131
+ declare function addWatermark(file: Buffer | Uint8Array, options: WatermarkOptions): Promise<Uint8Array>;
132
+ declare function reorderPages(file: Buffer | Uint8Array, newOrder: number[]): Promise<Uint8Array>;
133
+ declare function deletePage(file: Buffer | Uint8Array, pageNumbers: number[]): Promise<Uint8Array>;
134
+ declare function compress(file: Buffer | Uint8Array, _options?: CompressOptions): Promise<Uint8Array>;
135
+
136
+ declare function extractText(file: Buffer | Uint8Array, options?: ExtractTextOptions): Promise<string>;
137
+ declare function extractTextFromPages(file: Buffer | Uint8Array, pageRange: string): Promise<Record<number, string>>;
138
+ declare function hasText(file: Buffer | Uint8Array): Promise<boolean>;
139
+
140
+ declare function pdfToTemplate(file: Buffer | Uint8Array, options?: PdfToTemplateOptions): Promise<PDFTemplate>;
141
+ declare function templateToPdf(template: PDFTemplate, data?: Record<string, string>, options?: TemplateToPdfOptions): Promise<Uint8Array>;
142
+ declare function validateTemplate(template: PDFTemplate): void;
143
+
144
+ type index_CompressOptions = CompressOptions;
145
+ type index_ExtractTextOptions = ExtractTextOptions;
146
+ type index_MergeOptions = MergeOptions;
147
+ type index_PDFInfo = PDFInfo;
148
+ type index_PDFMetadata = PDFMetadata;
149
+ type index_PDFTemplate = PDFTemplate;
150
+ type index_PageInfo = PageInfo;
151
+ type index_PageRange = PageRange;
152
+ type index_PdfToTemplateOptions = PdfToTemplateOptions;
153
+ type index_RotateOptions = RotateOptions;
154
+ type index_SplitOptions = SplitOptions;
155
+ type index_TemplateColor = TemplateColor;
156
+ type index_TemplateElement = TemplateElement;
157
+ type index_TemplateField = TemplateField;
158
+ type index_TemplateFont = TemplateFont;
159
+ type index_TemplatePage = TemplatePage;
160
+ type index_TemplateToPdfOptions = TemplateToPdfOptions;
161
+ type index_WatermarkOptions = WatermarkOptions;
162
+ declare const index_addWatermark: typeof addWatermark;
163
+ declare const index_appendPages: typeof appendPages;
164
+ declare const index_compress: typeof compress;
165
+ declare const index_deletePage: typeof deletePage;
166
+ declare const index_extractPages: typeof extractPages;
167
+ declare const index_extractText: typeof extractText;
168
+ declare const index_extractTextFromPages: typeof extractTextFromPages;
169
+ declare const index_formatBytes: typeof formatBytes;
170
+ declare const index_getInfo: typeof getInfo;
171
+ declare const index_getMetadata: typeof getMetadata;
172
+ declare const index_getPageCount: typeof getPageCount;
173
+ declare const index_getPageInfo: typeof getPageInfo;
174
+ declare const index_hasText: typeof hasText;
175
+ declare const index_merge: typeof merge;
176
+ declare const index_mergeAll: typeof mergeAll;
177
+ declare const index_parsePageRanges: typeof parsePageRanges;
178
+ declare const index_parseRangesToGroups: typeof parseRangesToGroups;
179
+ declare const index_pdfToTemplate: typeof pdfToTemplate;
180
+ declare const index_reorderPages: typeof reorderPages;
181
+ declare const index_rotate: typeof rotate;
182
+ declare const index_setMetadata: typeof setMetadata;
183
+ declare const index_split: typeof split;
184
+ declare const index_splitEveryN: typeof splitEveryN;
185
+ declare const index_splitIntoSingle: typeof splitIntoSingle;
186
+ declare const index_templateToPdf: typeof templateToPdf;
187
+ declare const index_toUint8Array: typeof toUint8Array;
188
+ declare const index_validateTemplate: typeof validateTemplate;
189
+ declare namespace index {
190
+ export { type index_CompressOptions as CompressOptions, type index_ExtractTextOptions as ExtractTextOptions, type index_MergeOptions as MergeOptions, type index_PDFInfo as PDFInfo, type index_PDFMetadata as PDFMetadata, type index_PDFTemplate as PDFTemplate, type index_PageInfo as PageInfo, type index_PageRange as PageRange, type index_PdfToTemplateOptions as PdfToTemplateOptions, type index_RotateOptions as RotateOptions, type index_SplitOptions as SplitOptions, type index_TemplateColor as TemplateColor, type index_TemplateElement as TemplateElement, type index_TemplateField as TemplateField, type index_TemplateFont as TemplateFont, type index_TemplatePage as TemplatePage, type index_TemplateToPdfOptions as TemplateToPdfOptions, type index_WatermarkOptions as WatermarkOptions, index_addWatermark as addWatermark, index_appendPages as appendPages, index_compress as compress, index_deletePage as deletePage, index_extractPages as extractPages, index_extractText as extractText, index_extractTextFromPages as extractTextFromPages, index_formatBytes as formatBytes, index_getInfo as getInfo, index_getMetadata as getMetadata, index_getPageCount as getPageCount, index_getPageInfo as getPageInfo, index_hasText as hasText, index_merge as merge, index_mergeAll as mergeAll, index_parsePageRanges as parsePageRanges, index_parseRangesToGroups as parseRangesToGroups, index_pdfToTemplate as pdfToTemplate, index_reorderPages as reorderPages, index_rotate as rotate, index_setMetadata as setMetadata, index_split as split, index_splitEveryN as splitEveryN, index_splitIntoSingle as splitIntoSingle, index_templateToPdf as templateToPdf, index_toUint8Array as toUint8Array, index_validateTemplate as validateTemplate };
191
+ }
192
+
193
+ export { parsePageRanges as A, parseRangesToGroups as B, type CompressOptions as C, pdfToTemplate as D, type ExtractTextOptions as E, reorderPages as F, rotate as G, setMetadata as H, split as I, splitEveryN as J, splitIntoSingle as K, templateToPdf as L, type MergeOptions as M, toUint8Array as N, validateTemplate as O, type PDFInfo as P, type RotateOptions as R, type SplitOptions as S, type TemplateColor as T, type WatermarkOptions as W, type PDFMetadata as a, type PDFTemplate as b, type PageInfo as c, type PageRange as d, type PdfToTemplateOptions as e, type TemplateElement as f, type TemplateField as g, type TemplateFont as h, index as i, type TemplatePage as j, type TemplateToPdfOptions as k, addWatermark as l, appendPages as m, compress as n, deletePage as o, extractPages as p, extractText as q, extractTextFromPages as r, formatBytes as s, getInfo as t, getMetadata as u, getPageCount as v, getPageInfo as w, hasText as x, merge as y, mergeAll as z };
@@ -0,0 +1,61 @@
1
+ type HashAlgorithm = 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512';
2
+ type EncodingFormat = 'base64' | 'hex' | 'url' | 'html';
3
+ interface HashResult {
4
+ algorithm: HashAlgorithm;
5
+ hash: string;
6
+ inputLength: number;
7
+ }
8
+ interface HmacOptions {
9
+ algorithm?: HashAlgorithm;
10
+ }
11
+ interface HmacResult {
12
+ algorithm: HashAlgorithm;
13
+ hmac: string;
14
+ }
15
+ interface JwtPayload {
16
+ header: Record<string, unknown>;
17
+ payload: Record<string, unknown>;
18
+ signature: string;
19
+ expired?: boolean;
20
+ expiresAt?: string;
21
+ }
22
+ interface ChecksumResult {
23
+ algorithm: HashAlgorithm;
24
+ checksum: string;
25
+ sizeBytes: number;
26
+ }
27
+ interface UuidResult {
28
+ uuid: string;
29
+ version: number;
30
+ }
31
+
32
+ declare function hash(input: string, algorithm?: HashAlgorithm): HashResult;
33
+ declare function hmac(input: string, key: string, options?: HmacOptions): HmacResult;
34
+ declare function checksum(data: Buffer | Uint8Array | string, algorithm?: HashAlgorithm): ChecksumResult;
35
+ declare function generateUuid(): UuidResult;
36
+
37
+ declare function encode(input: string, format: EncodingFormat): string;
38
+ declare function decode(input: string, format: EncodingFormat): string;
39
+
40
+ declare function decodeJwt(token: string): JwtPayload;
41
+
42
+ type index_ChecksumResult = ChecksumResult;
43
+ type index_EncodingFormat = EncodingFormat;
44
+ type index_HashAlgorithm = HashAlgorithm;
45
+ type index_HashResult = HashResult;
46
+ type index_HmacOptions = HmacOptions;
47
+ type index_HmacResult = HmacResult;
48
+ type index_JwtPayload = JwtPayload;
49
+ type index_UuidResult = UuidResult;
50
+ declare const index_checksum: typeof checksum;
51
+ declare const index_decode: typeof decode;
52
+ declare const index_decodeJwt: typeof decodeJwt;
53
+ declare const index_encode: typeof encode;
54
+ declare const index_generateUuid: typeof generateUuid;
55
+ declare const index_hash: typeof hash;
56
+ declare const index_hmac: typeof hmac;
57
+ declare namespace index {
58
+ export { type index_ChecksumResult as ChecksumResult, type index_EncodingFormat as EncodingFormat, type index_HashAlgorithm as HashAlgorithm, type index_HashResult as HashResult, type index_HmacOptions as HmacOptions, type index_HmacResult as HmacResult, type index_JwtPayload as JwtPayload, type index_UuidResult as UuidResult, index_checksum as checksum, index_decode as decode, index_decodeJwt as decodeJwt, index_encode as encode, index_generateUuid as generateUuid, index_hash as hash, index_hmac as hmac };
59
+ }
60
+
61
+ export { type ChecksumResult as C, type EncodingFormat as E, type HashAlgorithm as H, type JwtPayload as J, type UuidResult as U, type HashResult as a, type HmacOptions as b, type HmacResult as c, checksum as d, decode as e, decodeJwt as f, encode as g, generateUuid as h, index as i, hash as j, hmac as k };
@@ -0,0 +1,61 @@
1
+ type HashAlgorithm = 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512';
2
+ type EncodingFormat = 'base64' | 'hex' | 'url' | 'html';
3
+ interface HashResult {
4
+ algorithm: HashAlgorithm;
5
+ hash: string;
6
+ inputLength: number;
7
+ }
8
+ interface HmacOptions {
9
+ algorithm?: HashAlgorithm;
10
+ }
11
+ interface HmacResult {
12
+ algorithm: HashAlgorithm;
13
+ hmac: string;
14
+ }
15
+ interface JwtPayload {
16
+ header: Record<string, unknown>;
17
+ payload: Record<string, unknown>;
18
+ signature: string;
19
+ expired?: boolean;
20
+ expiresAt?: string;
21
+ }
22
+ interface ChecksumResult {
23
+ algorithm: HashAlgorithm;
24
+ checksum: string;
25
+ sizeBytes: number;
26
+ }
27
+ interface UuidResult {
28
+ uuid: string;
29
+ version: number;
30
+ }
31
+
32
+ declare function hash(input: string, algorithm?: HashAlgorithm): HashResult;
33
+ declare function hmac(input: string, key: string, options?: HmacOptions): HmacResult;
34
+ declare function checksum(data: Buffer | Uint8Array | string, algorithm?: HashAlgorithm): ChecksumResult;
35
+ declare function generateUuid(): UuidResult;
36
+
37
+ declare function encode(input: string, format: EncodingFormat): string;
38
+ declare function decode(input: string, format: EncodingFormat): string;
39
+
40
+ declare function decodeJwt(token: string): JwtPayload;
41
+
42
+ type index_ChecksumResult = ChecksumResult;
43
+ type index_EncodingFormat = EncodingFormat;
44
+ type index_HashAlgorithm = HashAlgorithm;
45
+ type index_HashResult = HashResult;
46
+ type index_HmacOptions = HmacOptions;
47
+ type index_HmacResult = HmacResult;
48
+ type index_JwtPayload = JwtPayload;
49
+ type index_UuidResult = UuidResult;
50
+ declare const index_checksum: typeof checksum;
51
+ declare const index_decode: typeof decode;
52
+ declare const index_decodeJwt: typeof decodeJwt;
53
+ declare const index_encode: typeof encode;
54
+ declare const index_generateUuid: typeof generateUuid;
55
+ declare const index_hash: typeof hash;
56
+ declare const index_hmac: typeof hmac;
57
+ declare namespace index {
58
+ export { type index_ChecksumResult as ChecksumResult, type index_EncodingFormat as EncodingFormat, type index_HashAlgorithm as HashAlgorithm, type index_HashResult as HashResult, type index_HmacOptions as HmacOptions, type index_HmacResult as HmacResult, type index_JwtPayload as JwtPayload, type index_UuidResult as UuidResult, index_checksum as checksum, index_decode as decode, index_decodeJwt as decodeJwt, index_encode as encode, index_generateUuid as generateUuid, index_hash as hash, index_hmac as hmac };
59
+ }
60
+
61
+ export { type ChecksumResult as C, type EncodingFormat as E, type HashAlgorithm as H, type JwtPayload as J, type UuidResult as U, type HashResult as a, type HmacOptions as b, type HmacResult as c, checksum as d, decode as e, decodeJwt as f, encode as g, generateUuid as h, index as i, hash as j, hmac as k };
@@ -0,0 +1,56 @@
1
+ type SqlDialect = 'mysql' | 'postgresql' | 'sqlite' | 'transactsql' | 'bigquery';
2
+ interface SqlFormatOptions {
3
+ dialect?: SqlDialect;
4
+ indent?: number;
5
+ uppercase?: boolean;
6
+ linesBetweenQueries?: number;
7
+ }
8
+ interface SqlValidationResult {
9
+ valid: boolean;
10
+ error?: string;
11
+ ast?: unknown;
12
+ }
13
+ interface SqlParseResult {
14
+ type: string;
15
+ tables: string[];
16
+ columns: string[];
17
+ ast: unknown;
18
+ }
19
+ interface SqlConvertOptions {
20
+ from?: SqlDialect;
21
+ to: SqlDialect;
22
+ }
23
+ interface SqlStats {
24
+ queryCount: number;
25
+ queryTypes: Record<string, number>;
26
+ tables: string[];
27
+ joins: number;
28
+ subqueries: number;
29
+ }
30
+
31
+ declare function format(input: string, options?: SqlFormatOptions): string;
32
+ declare function minify(input: string): string;
33
+
34
+ declare function parse(input: string, dialect?: SqlDialect): SqlParseResult;
35
+ declare function validate(input: string, dialect?: SqlDialect): SqlValidationResult;
36
+ declare function getStats(input: string, dialect?: SqlDialect): SqlStats;
37
+
38
+ declare function convert(input: string, options: SqlConvertOptions): string;
39
+
40
+ type index_SqlConvertOptions = SqlConvertOptions;
41
+ type index_SqlDialect = SqlDialect;
42
+ type index_SqlFormatOptions = SqlFormatOptions;
43
+ type index_SqlParseResult = SqlParseResult;
44
+ type index_SqlStats = SqlStats;
45
+ type index_SqlValidationResult = SqlValidationResult;
46
+ declare const index_convert: typeof convert;
47
+ declare const index_format: typeof format;
48
+ declare const index_getStats: typeof getStats;
49
+ declare const index_minify: typeof minify;
50
+ declare const index_parse: typeof parse;
51
+ declare const index_validate: typeof validate;
52
+ declare namespace index {
53
+ export { type index_SqlConvertOptions as SqlConvertOptions, type index_SqlDialect as SqlDialect, type index_SqlFormatOptions as SqlFormatOptions, type index_SqlParseResult as SqlParseResult, type index_SqlStats as SqlStats, type index_SqlValidationResult as SqlValidationResult, index_convert as convert, index_format as format, index_getStats as getStats, index_minify as minify, index_parse as parse, index_validate as validate };
54
+ }
55
+
56
+ export { type SqlConvertOptions as S, type SqlDialect as a, type SqlFormatOptions as b, type SqlParseResult as c, type SqlStats as d, type SqlValidationResult as e, convert as f, format as g, getStats as h, index as i, minify as m, parse as p, validate as v };
@@ -0,0 +1,56 @@
1
+ type SqlDialect = 'mysql' | 'postgresql' | 'sqlite' | 'transactsql' | 'bigquery';
2
+ interface SqlFormatOptions {
3
+ dialect?: SqlDialect;
4
+ indent?: number;
5
+ uppercase?: boolean;
6
+ linesBetweenQueries?: number;
7
+ }
8
+ interface SqlValidationResult {
9
+ valid: boolean;
10
+ error?: string;
11
+ ast?: unknown;
12
+ }
13
+ interface SqlParseResult {
14
+ type: string;
15
+ tables: string[];
16
+ columns: string[];
17
+ ast: unknown;
18
+ }
19
+ interface SqlConvertOptions {
20
+ from?: SqlDialect;
21
+ to: SqlDialect;
22
+ }
23
+ interface SqlStats {
24
+ queryCount: number;
25
+ queryTypes: Record<string, number>;
26
+ tables: string[];
27
+ joins: number;
28
+ subqueries: number;
29
+ }
30
+
31
+ declare function format(input: string, options?: SqlFormatOptions): string;
32
+ declare function minify(input: string): string;
33
+
34
+ declare function parse(input: string, dialect?: SqlDialect): SqlParseResult;
35
+ declare function validate(input: string, dialect?: SqlDialect): SqlValidationResult;
36
+ declare function getStats(input: string, dialect?: SqlDialect): SqlStats;
37
+
38
+ declare function convert(input: string, options: SqlConvertOptions): string;
39
+
40
+ type index_SqlConvertOptions = SqlConvertOptions;
41
+ type index_SqlDialect = SqlDialect;
42
+ type index_SqlFormatOptions = SqlFormatOptions;
43
+ type index_SqlParseResult = SqlParseResult;
44
+ type index_SqlStats = SqlStats;
45
+ type index_SqlValidationResult = SqlValidationResult;
46
+ declare const index_convert: typeof convert;
47
+ declare const index_format: typeof format;
48
+ declare const index_getStats: typeof getStats;
49
+ declare const index_minify: typeof minify;
50
+ declare const index_parse: typeof parse;
51
+ declare const index_validate: typeof validate;
52
+ declare namespace index {
53
+ export { type index_SqlConvertOptions as SqlConvertOptions, type index_SqlDialect as SqlDialect, type index_SqlFormatOptions as SqlFormatOptions, type index_SqlParseResult as SqlParseResult, type index_SqlStats as SqlStats, type index_SqlValidationResult as SqlValidationResult, index_convert as convert, index_format as format, index_getStats as getStats, index_minify as minify, index_parse as parse, index_validate as validate };
54
+ }
55
+
56
+ export { type SqlConvertOptions as S, type SqlDialect as a, type SqlFormatOptions as b, type SqlParseResult as c, type SqlStats as d, type SqlValidationResult as e, convert as f, format as g, getStats as h, index as i, minify as m, parse as p, validate as v };
@@ -0,0 +1,68 @@
1
+ type MarkdownConvertFormat = 'html' | 'text' | 'markdown';
2
+ interface MarkdownConvertOptions {
3
+ from: MarkdownConvertFormat;
4
+ to: MarkdownConvertFormat;
5
+ gfm?: boolean;
6
+ }
7
+ interface MarkdownTocEntry {
8
+ level: number;
9
+ text: string;
10
+ slug: string;
11
+ }
12
+ interface MarkdownLinkInfo {
13
+ text: string;
14
+ href: string;
15
+ line: number;
16
+ }
17
+ interface MarkdownStats {
18
+ words: number;
19
+ characters: number;
20
+ lines: number;
21
+ paragraphs: number;
22
+ headings: number;
23
+ links: number;
24
+ images: number;
25
+ codeBlocks: number;
26
+ lists: number;
27
+ sizeBytes: number;
28
+ }
29
+ interface MarkdownFormatOptions {
30
+ lineWidth?: number;
31
+ bullet?: '-' | '*' | '+';
32
+ emphasis?: '_' | '*';
33
+ strong?: '__' | '**';
34
+ }
35
+ interface MarkdownFrontmatter {
36
+ [key: string]: unknown;
37
+ }
38
+
39
+ declare function convert(input: string, options: MarkdownConvertOptions): string;
40
+
41
+ declare function generateToc(input: string): MarkdownTocEntry[];
42
+ declare function renderToc(entries: MarkdownTocEntry[]): string;
43
+
44
+ declare function extractLinks(input: string): MarkdownLinkInfo[];
45
+ declare function extractFrontmatter(input: string): MarkdownFrontmatter | null;
46
+ declare function stripFrontmatter(input: string): string;
47
+
48
+ declare function getStats(input: string): MarkdownStats;
49
+
50
+ type index_MarkdownConvertFormat = MarkdownConvertFormat;
51
+ type index_MarkdownConvertOptions = MarkdownConvertOptions;
52
+ type index_MarkdownFormatOptions = MarkdownFormatOptions;
53
+ type index_MarkdownFrontmatter = MarkdownFrontmatter;
54
+ type index_MarkdownLinkInfo = MarkdownLinkInfo;
55
+ type index_MarkdownStats = MarkdownStats;
56
+ type index_MarkdownTocEntry = MarkdownTocEntry;
57
+ declare const index_convert: typeof convert;
58
+ declare const index_extractFrontmatter: typeof extractFrontmatter;
59
+ declare const index_extractLinks: typeof extractLinks;
60
+ declare const index_generateToc: typeof generateToc;
61
+ declare const index_getStats: typeof getStats;
62
+ declare const index_renderToc: typeof renderToc;
63
+ declare const index_stripFrontmatter: typeof stripFrontmatter;
64
+ declare namespace index {
65
+ export { type index_MarkdownConvertFormat as MarkdownConvertFormat, type index_MarkdownConvertOptions as MarkdownConvertOptions, type index_MarkdownFormatOptions as MarkdownFormatOptions, type index_MarkdownFrontmatter as MarkdownFrontmatter, type index_MarkdownLinkInfo as MarkdownLinkInfo, type index_MarkdownStats as MarkdownStats, type index_MarkdownTocEntry as MarkdownTocEntry, index_convert as convert, index_extractFrontmatter as extractFrontmatter, index_extractLinks as extractLinks, index_generateToc as generateToc, index_getStats as getStats, index_renderToc as renderToc, index_stripFrontmatter as stripFrontmatter };
66
+ }
67
+
68
+ export { type MarkdownConvertFormat as M, type MarkdownConvertOptions as a, type MarkdownFormatOptions as b, type MarkdownFrontmatter as c, type MarkdownLinkInfo as d, type MarkdownStats as e, type MarkdownTocEntry as f, convert as g, extractFrontmatter as h, index as i, extractLinks as j, generateToc as k, getStats as l, renderToc as r, stripFrontmatter as s };
@@ -0,0 +1,68 @@
1
+ type MarkdownConvertFormat = 'html' | 'text' | 'markdown';
2
+ interface MarkdownConvertOptions {
3
+ from: MarkdownConvertFormat;
4
+ to: MarkdownConvertFormat;
5
+ gfm?: boolean;
6
+ }
7
+ interface MarkdownTocEntry {
8
+ level: number;
9
+ text: string;
10
+ slug: string;
11
+ }
12
+ interface MarkdownLinkInfo {
13
+ text: string;
14
+ href: string;
15
+ line: number;
16
+ }
17
+ interface MarkdownStats {
18
+ words: number;
19
+ characters: number;
20
+ lines: number;
21
+ paragraphs: number;
22
+ headings: number;
23
+ links: number;
24
+ images: number;
25
+ codeBlocks: number;
26
+ lists: number;
27
+ sizeBytes: number;
28
+ }
29
+ interface MarkdownFormatOptions {
30
+ lineWidth?: number;
31
+ bullet?: '-' | '*' | '+';
32
+ emphasis?: '_' | '*';
33
+ strong?: '__' | '**';
34
+ }
35
+ interface MarkdownFrontmatter {
36
+ [key: string]: unknown;
37
+ }
38
+
39
+ declare function convert(input: string, options: MarkdownConvertOptions): string;
40
+
41
+ declare function generateToc(input: string): MarkdownTocEntry[];
42
+ declare function renderToc(entries: MarkdownTocEntry[]): string;
43
+
44
+ declare function extractLinks(input: string): MarkdownLinkInfo[];
45
+ declare function extractFrontmatter(input: string): MarkdownFrontmatter | null;
46
+ declare function stripFrontmatter(input: string): string;
47
+
48
+ declare function getStats(input: string): MarkdownStats;
49
+
50
+ type index_MarkdownConvertFormat = MarkdownConvertFormat;
51
+ type index_MarkdownConvertOptions = MarkdownConvertOptions;
52
+ type index_MarkdownFormatOptions = MarkdownFormatOptions;
53
+ type index_MarkdownFrontmatter = MarkdownFrontmatter;
54
+ type index_MarkdownLinkInfo = MarkdownLinkInfo;
55
+ type index_MarkdownStats = MarkdownStats;
56
+ type index_MarkdownTocEntry = MarkdownTocEntry;
57
+ declare const index_convert: typeof convert;
58
+ declare const index_extractFrontmatter: typeof extractFrontmatter;
59
+ declare const index_extractLinks: typeof extractLinks;
60
+ declare const index_generateToc: typeof generateToc;
61
+ declare const index_getStats: typeof getStats;
62
+ declare const index_renderToc: typeof renderToc;
63
+ declare const index_stripFrontmatter: typeof stripFrontmatter;
64
+ declare namespace index {
65
+ export { type index_MarkdownConvertFormat as MarkdownConvertFormat, type index_MarkdownConvertOptions as MarkdownConvertOptions, type index_MarkdownFormatOptions as MarkdownFormatOptions, type index_MarkdownFrontmatter as MarkdownFrontmatter, type index_MarkdownLinkInfo as MarkdownLinkInfo, type index_MarkdownStats as MarkdownStats, type index_MarkdownTocEntry as MarkdownTocEntry, index_convert as convert, index_extractFrontmatter as extractFrontmatter, index_extractLinks as extractLinks, index_generateToc as generateToc, index_getStats as getStats, index_renderToc as renderToc, index_stripFrontmatter as stripFrontmatter };
66
+ }
67
+
68
+ export { type MarkdownConvertFormat as M, type MarkdownConvertOptions as a, type MarkdownFormatOptions as b, type MarkdownFrontmatter as c, type MarkdownLinkInfo as d, type MarkdownStats as e, type MarkdownTocEntry as f, convert as g, extractFrontmatter as h, index as i, extractLinks as j, generateToc as k, getStats as l, renderToc as r, stripFrontmatter as s };
@@ -0,0 +1,93 @@
1
+ type LengthUnit = 'mm' | 'cm' | 'm' | 'km' | 'in' | 'ft' | 'yd' | 'mi';
2
+ type WeightUnit = 'mg' | 'g' | 'kg' | 'oz' | 'lb' | 'ton';
3
+ type TemperatureUnit = 'celsius' | 'fahrenheit' | 'kelvin';
4
+ type DataUnit = 'b' | 'kb' | 'mb' | 'gb' | 'tb';
5
+ type UnitCategory = 'length' | 'weight' | 'temperature' | 'data';
6
+ type NumberBase = 'binary' | 'octal' | 'decimal' | 'hex';
7
+ interface UnitConversionResult {
8
+ value: number;
9
+ from: string;
10
+ to: string;
11
+ result: number;
12
+ }
13
+ interface BaseConversionResult {
14
+ input: string;
15
+ fromBase: NumberBase;
16
+ binary: string;
17
+ octal: string;
18
+ decimal: string;
19
+ hex: string;
20
+ }
21
+ interface StatisticsResult {
22
+ count: number;
23
+ sum: number;
24
+ mean: number;
25
+ median: number;
26
+ mode: number[];
27
+ min: number;
28
+ max: number;
29
+ range: number;
30
+ standardDeviation: number;
31
+ variance: number;
32
+ percentiles: {
33
+ p25: number;
34
+ p50: number;
35
+ p75: number;
36
+ p90: number;
37
+ p99: number;
38
+ };
39
+ }
40
+ interface NumberFormatOptions {
41
+ locale?: string;
42
+ style?: 'decimal' | 'currency' | 'percent';
43
+ currency?: string;
44
+ minimumFractionDigits?: number;
45
+ maximumFractionDigits?: number;
46
+ }
47
+ interface PercentageResult {
48
+ value: number;
49
+ total: number;
50
+ percentage: number;
51
+ formatted: string;
52
+ }
53
+ interface PercentageChangeResult {
54
+ from: number;
55
+ to: number;
56
+ change: number;
57
+ formatted: string;
58
+ }
59
+
60
+ declare function convertUnit(value: number, from: string, to: string, category: UnitCategory): UnitConversionResult;
61
+
62
+ declare function convertBase(input: string, fromBase: NumberBase): BaseConversionResult;
63
+
64
+ declare function calculateStats(numbers: number[]): StatisticsResult;
65
+
66
+ declare function formatNumber(value: number, options?: NumberFormatOptions): string;
67
+
68
+ declare function percentage(value: number, total: number): PercentageResult;
69
+ declare function percentageChange(from: number, to: number): PercentageChangeResult;
70
+
71
+ type index_BaseConversionResult = BaseConversionResult;
72
+ type index_DataUnit = DataUnit;
73
+ type index_LengthUnit = LengthUnit;
74
+ type index_NumberBase = NumberBase;
75
+ type index_NumberFormatOptions = NumberFormatOptions;
76
+ type index_PercentageChangeResult = PercentageChangeResult;
77
+ type index_PercentageResult = PercentageResult;
78
+ type index_StatisticsResult = StatisticsResult;
79
+ type index_TemperatureUnit = TemperatureUnit;
80
+ type index_UnitCategory = UnitCategory;
81
+ type index_UnitConversionResult = UnitConversionResult;
82
+ type index_WeightUnit = WeightUnit;
83
+ declare const index_calculateStats: typeof calculateStats;
84
+ declare const index_convertBase: typeof convertBase;
85
+ declare const index_convertUnit: typeof convertUnit;
86
+ declare const index_formatNumber: typeof formatNumber;
87
+ declare const index_percentage: typeof percentage;
88
+ declare const index_percentageChange: typeof percentageChange;
89
+ declare namespace index {
90
+ export { type index_BaseConversionResult as BaseConversionResult, type index_DataUnit as DataUnit, type index_LengthUnit as LengthUnit, type index_NumberBase as NumberBase, type index_NumberFormatOptions as NumberFormatOptions, type index_PercentageChangeResult as PercentageChangeResult, type index_PercentageResult as PercentageResult, type index_StatisticsResult as StatisticsResult, type index_TemperatureUnit as TemperatureUnit, type index_UnitCategory as UnitCategory, type index_UnitConversionResult as UnitConversionResult, type index_WeightUnit as WeightUnit, index_calculateStats as calculateStats, index_convertBase as convertBase, index_convertUnit as convertUnit, index_formatNumber as formatNumber, index_percentage as percentage, index_percentageChange as percentageChange };
91
+ }
92
+
93
+ export { type BaseConversionResult as B, type DataUnit as D, type LengthUnit as L, type NumberBase as N, type PercentageChangeResult as P, type StatisticsResult as S, type TemperatureUnit as T, type UnitCategory as U, type WeightUnit as W, type NumberFormatOptions as a, type PercentageResult as b, type UnitConversionResult as c, calculateStats as d, convertBase as e, convertUnit as f, formatNumber as g, percentageChange as h, index as i, percentage as p };