@phron/image-wasm32-wasip1 0.0.0-stage → 0.1.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/README.md +2 -2
- package/package.json +64 -4
- package/phron-image.wasip1-browser.js +1404 -0
- package/phron-image.wasip1-deferred.d.ts +83 -0
- package/phron-image.wasip1-deferred.js +1865 -0
- package/phron-image.wasip1.cjs +1626 -0
- package/phron-image.wasip1.d.cts +76 -0
- package/phron-image.wasm32-wasip1.wasm +0 -0
- package/phron-image.wasm32-wasip1.wasm.d.ts +5 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* auto-generated by NAPI-RS */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/** The WASI flavor this loader instantiates. */
|
|
5
|
+
export declare const __napiBindingTarget: 'wasm32-wasip1'
|
|
6
|
+
|
|
7
|
+
export interface ApiInput {
|
|
8
|
+
label: string
|
|
9
|
+
apiBaseUrl?: string
|
|
10
|
+
options?: Array<string>
|
|
11
|
+
path: string
|
|
12
|
+
format?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Build an API URL (`/v1/image/<label>/_/...`), sent with a bearer API key. */
|
|
16
|
+
export declare function apiUrl(input: ApiInput): string
|
|
17
|
+
|
|
18
|
+
/** Percent-encode a source path the way the URL builders do. */
|
|
19
|
+
export declare function encodePath(path: string): string
|
|
20
|
+
|
|
21
|
+
export interface InfoInput {
|
|
22
|
+
label: string
|
|
23
|
+
apiBaseUrl?: string
|
|
24
|
+
options?: Array<string>
|
|
25
|
+
path: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Build an info URL (`/v1/image/<label>/info/...`). */
|
|
29
|
+
export declare function infoUrl(input: InfoInput): string
|
|
30
|
+
|
|
31
|
+
export declare function optionExpires(unixSeconds: number): string
|
|
32
|
+
|
|
33
|
+
export declare function optionFormat(format: string): string
|
|
34
|
+
|
|
35
|
+
export declare function optionGravity(gravity: string, xOffset?: number | undefined | null, yOffset?: number | undefined | null): string
|
|
36
|
+
|
|
37
|
+
export declare function optionHeight(height: number): string
|
|
38
|
+
|
|
39
|
+
export declare function optionPreset(name: string): string
|
|
40
|
+
|
|
41
|
+
export declare function optionQuality(quality: number): string
|
|
42
|
+
|
|
43
|
+
export declare function optionRaw(option: string): string
|
|
44
|
+
|
|
45
|
+
export declare function optionResize(kind: string, width: number, height: number): string
|
|
46
|
+
|
|
47
|
+
export declare function optionWidth(width: number): string
|
|
48
|
+
|
|
49
|
+
export interface PublicInput {
|
|
50
|
+
baseUrl?: string
|
|
51
|
+
label?: string
|
|
52
|
+
preset: string
|
|
53
|
+
width?: number
|
|
54
|
+
path: string
|
|
55
|
+
format?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Build an unsigned browser URL for a source whose access is public. */
|
|
59
|
+
export declare function publicUrl(input: PublicInput): string
|
|
60
|
+
|
|
61
|
+
/** `now + ttl`, rounded up to a multiple of `bucketSeconds`, in unix seconds. */
|
|
62
|
+
export declare function roundedExpiry(nowSeconds: number, ttlSeconds: number, bucketSeconds: number): number
|
|
63
|
+
|
|
64
|
+
export interface SignInput {
|
|
65
|
+
baseUrl?: string
|
|
66
|
+
label?: string
|
|
67
|
+
key: string
|
|
68
|
+
salt: string
|
|
69
|
+
options?: Array<string>
|
|
70
|
+
path: string
|
|
71
|
+
format?: string
|
|
72
|
+
expiresAt?: number
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Build a signed browser URL. Server-side only: `key` and `salt` must never reach a browser. */
|
|
76
|
+
export declare function signUrl(input: SignInput): string
|
|
Binary file
|