@imagekit/javascript 5.0.0-beta.3

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 ADDED
@@ -0,0 +1,38 @@
1
+ [<img width="250" alt="ImageKit.io" src="https://raw.githubusercontent.com/imagekit-developer/imagekit-javascript/master/assets/imagekit-light-logo.svg"/>](https://imagekit.io)
2
+
3
+ # ImageKit.io JavaScript SDK
4
+
5
+ ![gzip size](https://img.badgesize.io/https://unpkg.com/@imagekit/javascript/dist/imagekit.min.js?compression=gzip&label=gzip)
6
+ ![brotli size](https://img.badgesize.io/https://unpkg.com/@imagekit/javascript/dist/imagekit.min.js?compression=brotli&label=brotli)
7
+ ![Node CI](https://github.com/imagekit-developer/imagekit-javascript/workflows/Node%20CI/badge.svg)
8
+ [![npm version](https://img.shields.io/npm/v/@imagekit/javascript)](https://www.npmjs.com/package/@imagekit/javascript)
9
+ [![codecov](https://codecov.io/gh/imagekit-developer/imagekit-javascript/branch/master/graph/badge.svg)](https://codecov.io/gh/imagekit-developer/imagekit-javascript)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
+ [![Twitter Follow](https://img.shields.io/twitter/follow/imagekitio?label=Follow&style=social)](https://twitter.com/ImagekitIo)
12
+
13
+ This lightweight, dependency-free JavaScript SDK is designed specifically for browser use. It provides utility functions to generate image and video `src` URLs using [ImageKit transformations](https://imagekit.io/docs/transformations) and to upload files to the ImageKit media library.
14
+
15
+ For server-side applications with Node.js, please refer to our official [Node.js SDK](https://github.com/imagekit-developer/imagekit-nodejs).
16
+
17
+ ## Installation
18
+
19
+ You can install the SDK in your project using npm or yarn.
20
+
21
+ ```bash
22
+ npm install @imagekit/javascript
23
+ ```
24
+
25
+ ## TypeScript support
26
+
27
+ The SDK is written in TypeScript, offering first-class TypeScript support. Enjoy excellent type safety and IntelliSense in your IDE. You can use it in your TypeScript projects without any additional configuration.
28
+
29
+
30
+ To enable type checking in JavaScript projects, add `//@ts-check` at the top of your JavaScript files. This will activate type checking in your IDE.
31
+
32
+ ## Documentation
33
+
34
+ Refer to the ImageKit [official documentation](https://imagekit.io/docs/integration/javascript) for more details on how to use the SDK.
35
+
36
+ ## Changelog
37
+
38
+ For a detailed history of changes, refer to [CHANGELOG.md](CHANGELOG.md).
@@ -0,0 +1,63 @@
1
+ declare const _default: {
2
+ MANDATORY_INITIALIZATION_MISSING: {
3
+ message: string;
4
+ };
5
+ INVALID_TRANSFORMATION_POSITION: {
6
+ message: string;
7
+ };
8
+ PRIVATE_KEY_CLIENT_SIDE: {
9
+ message: string;
10
+ };
11
+ MISSING_UPLOAD_DATA: {
12
+ message: string;
13
+ };
14
+ MISSING_UPLOAD_FILE_PARAMETER: {
15
+ message: string;
16
+ };
17
+ MISSING_UPLOAD_FILENAME_PARAMETER: {
18
+ message: string;
19
+ };
20
+ MISSING_AUTHENTICATION_ENDPOINT: {
21
+ message: string;
22
+ };
23
+ MISSING_PUBLIC_KEY: {
24
+ message: string;
25
+ };
26
+ AUTH_ENDPOINT_TIMEOUT: {
27
+ message: string;
28
+ };
29
+ AUTH_ENDPOINT_NETWORK_ERROR: {
30
+ message: string;
31
+ };
32
+ AUTH_INVALID_RESPONSE: {
33
+ message: string;
34
+ };
35
+ UPLOAD_ENDPOINT_NETWORK_ERROR: {
36
+ message: string;
37
+ };
38
+ INVALID_UPLOAD_OPTIONS: {
39
+ message: string;
40
+ };
41
+ MISSING_SIGNATURE: {
42
+ message: string;
43
+ };
44
+ MISSING_TOKEN: {
45
+ message: string;
46
+ };
47
+ MISSING_EXPIRE: {
48
+ message: string;
49
+ };
50
+ INVALID_TRANSFORMATION: {
51
+ message: string;
52
+ };
53
+ INVALID_PRE_TRANSFORMATION: {
54
+ message: string;
55
+ };
56
+ INVALID_POST_TRANSFORMATION: {
57
+ message: string;
58
+ };
59
+ UPLOAD_ABORTED: {
60
+ message: string;
61
+ };
62
+ };
63
+ export default _default;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * {@link https://imagekit.io/docs/transformations}
3
+ */
4
+ export declare const supportedTransforms: {
5
+ [key: string]: string;
6
+ };
7
+ export default supportedTransforms;