@gallop.software/studio 0.1.69 → 0.1.70
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/dist/handlers.d.mts +1 -1
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +19 -4
- package/dist/handlers.js.map +1 -1
- package/dist/handlers.mjs +17 -2
- package/dist/handlers.mjs.map +1 -1
- package/dist/index.d.mts +12 -17
- package/dist/index.d.ts +12 -17
- package/dist/index.js +18 -90
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -90
- package/dist/index.mjs.map +1 -1
- package/dist/types-1m_7EjJU.d.mts +79 -0
- package/dist/types-1m_7EjJU.d.ts +79 -0
- package/package.json +1 -1
- package/dist/types-CNVLjvIw.d.mts +0 -119
- package/dist/types-CNVLjvIw.d.ts +0 -119
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image size variants (verbose format used by handlers)
|
|
3
|
-
*/
|
|
4
|
-
type ImageSize = 'small' | 'medium' | 'large' | 'full';
|
|
5
|
-
/**
|
|
6
|
-
* Image size variants (lean format for consumers)
|
|
7
|
-
*/
|
|
8
|
-
type LeanImageSize = 'sm' | 'md' | 'lg';
|
|
9
|
-
/**
|
|
10
|
-
* Size entry with path and dimensions
|
|
11
|
-
*/
|
|
12
|
-
interface SizeEntry {
|
|
13
|
-
path: string;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* CDN sync status
|
|
19
|
-
*/
|
|
20
|
-
interface CdnStatus {
|
|
21
|
-
synced: boolean;
|
|
22
|
-
baseUrl: string;
|
|
23
|
-
syncedAt: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Image entry in meta (verbose format - used by Studio handlers)
|
|
27
|
-
*/
|
|
28
|
-
interface ImageEntry {
|
|
29
|
-
original: {
|
|
30
|
-
path: string;
|
|
31
|
-
width: number;
|
|
32
|
-
height: number;
|
|
33
|
-
fileSize: number;
|
|
34
|
-
};
|
|
35
|
-
sizes: {
|
|
36
|
-
full: SizeEntry;
|
|
37
|
-
large: SizeEntry;
|
|
38
|
-
medium: SizeEntry;
|
|
39
|
-
small: SizeEntry;
|
|
40
|
-
[key: string]: SizeEntry;
|
|
41
|
-
};
|
|
42
|
-
blurhash: string;
|
|
43
|
-
dominantColor: string;
|
|
44
|
-
cdn: CdnStatus | null;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Studio meta schema (verbose format - used by Studio handlers)
|
|
48
|
-
*/
|
|
49
|
-
interface StudioMeta {
|
|
50
|
-
$schema: string;
|
|
51
|
-
version: number;
|
|
52
|
-
generatedAt: string;
|
|
53
|
-
images: Record<string, ImageEntry>;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Lean image entry - minimal metadata for consumers
|
|
57
|
-
* ~80 bytes per image vs ~500 bytes in verbose format
|
|
58
|
-
*/
|
|
59
|
-
interface LeanImageEntry {
|
|
60
|
-
/** Original width */
|
|
61
|
-
w: number;
|
|
62
|
-
/** Original height */
|
|
63
|
-
h: number;
|
|
64
|
-
/** Blurhash for placeholder */
|
|
65
|
-
blur: string;
|
|
66
|
-
/** Synced to CDN (present and 1 if synced, omit if not) */
|
|
67
|
-
s?: 1;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Lean meta schema - flat structure with path as key
|
|
71
|
-
*/
|
|
72
|
-
type LeanMeta = Record<string, LeanImageEntry>;
|
|
73
|
-
/**
|
|
74
|
-
* File/folder item for browser
|
|
75
|
-
*/
|
|
76
|
-
interface FileItem {
|
|
77
|
-
name: string;
|
|
78
|
-
path: string;
|
|
79
|
-
type: 'file' | 'folder';
|
|
80
|
-
size?: number;
|
|
81
|
-
dimensions?: {
|
|
82
|
-
width: number;
|
|
83
|
-
height: number;
|
|
84
|
-
};
|
|
85
|
-
cdnSynced?: boolean;
|
|
86
|
-
fileCount?: number;
|
|
87
|
-
totalSize?: number;
|
|
88
|
-
thumbnail?: string;
|
|
89
|
-
hasThumbnail?: boolean;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Studio configuration
|
|
93
|
-
*/
|
|
94
|
-
interface StudioConfig {
|
|
95
|
-
r2AccountId?: string;
|
|
96
|
-
r2AccessKeyId?: string;
|
|
97
|
-
r2SecretAccessKey?: string;
|
|
98
|
-
r2BucketName?: string;
|
|
99
|
-
r2PublicUrl?: string;
|
|
100
|
-
thumbnailSizes?: {
|
|
101
|
-
small: number;
|
|
102
|
-
medium: number;
|
|
103
|
-
large: number;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Helper to derive thumbnail path from original path
|
|
108
|
-
*/
|
|
109
|
-
declare function getThumbnailPath(originalPath: string, size: LeanImageSize): string;
|
|
110
|
-
/**
|
|
111
|
-
* Convert verbose StudioMeta to LeanMeta
|
|
112
|
-
*/
|
|
113
|
-
declare function toLeanMeta(verbose: StudioMeta): LeanMeta;
|
|
114
|
-
/**
|
|
115
|
-
* Check if meta is in lean format (no 'images' wrapper)
|
|
116
|
-
*/
|
|
117
|
-
declare function isLeanMeta(meta: unknown): meta is LeanMeta;
|
|
118
|
-
|
|
119
|
-
export { type CdnStatus as C, type FileItem as F, type ImageEntry as I, type LeanMeta as L, type StudioMeta as S, type ImageSize as a, type LeanImageEntry as b, type LeanImageSize as c, type SizeEntry as d, type StudioConfig as e, getThumbnailPath as g, isLeanMeta as i, toLeanMeta as t };
|
package/dist/types-CNVLjvIw.d.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image size variants (verbose format used by handlers)
|
|
3
|
-
*/
|
|
4
|
-
type ImageSize = 'small' | 'medium' | 'large' | 'full';
|
|
5
|
-
/**
|
|
6
|
-
* Image size variants (lean format for consumers)
|
|
7
|
-
*/
|
|
8
|
-
type LeanImageSize = 'sm' | 'md' | 'lg';
|
|
9
|
-
/**
|
|
10
|
-
* Size entry with path and dimensions
|
|
11
|
-
*/
|
|
12
|
-
interface SizeEntry {
|
|
13
|
-
path: string;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* CDN sync status
|
|
19
|
-
*/
|
|
20
|
-
interface CdnStatus {
|
|
21
|
-
synced: boolean;
|
|
22
|
-
baseUrl: string;
|
|
23
|
-
syncedAt: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Image entry in meta (verbose format - used by Studio handlers)
|
|
27
|
-
*/
|
|
28
|
-
interface ImageEntry {
|
|
29
|
-
original: {
|
|
30
|
-
path: string;
|
|
31
|
-
width: number;
|
|
32
|
-
height: number;
|
|
33
|
-
fileSize: number;
|
|
34
|
-
};
|
|
35
|
-
sizes: {
|
|
36
|
-
full: SizeEntry;
|
|
37
|
-
large: SizeEntry;
|
|
38
|
-
medium: SizeEntry;
|
|
39
|
-
small: SizeEntry;
|
|
40
|
-
[key: string]: SizeEntry;
|
|
41
|
-
};
|
|
42
|
-
blurhash: string;
|
|
43
|
-
dominantColor: string;
|
|
44
|
-
cdn: CdnStatus | null;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Studio meta schema (verbose format - used by Studio handlers)
|
|
48
|
-
*/
|
|
49
|
-
interface StudioMeta {
|
|
50
|
-
$schema: string;
|
|
51
|
-
version: number;
|
|
52
|
-
generatedAt: string;
|
|
53
|
-
images: Record<string, ImageEntry>;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Lean image entry - minimal metadata for consumers
|
|
57
|
-
* ~80 bytes per image vs ~500 bytes in verbose format
|
|
58
|
-
*/
|
|
59
|
-
interface LeanImageEntry {
|
|
60
|
-
/** Original width */
|
|
61
|
-
w: number;
|
|
62
|
-
/** Original height */
|
|
63
|
-
h: number;
|
|
64
|
-
/** Blurhash for placeholder */
|
|
65
|
-
blur: string;
|
|
66
|
-
/** Synced to CDN (present and 1 if synced, omit if not) */
|
|
67
|
-
s?: 1;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Lean meta schema - flat structure with path as key
|
|
71
|
-
*/
|
|
72
|
-
type LeanMeta = Record<string, LeanImageEntry>;
|
|
73
|
-
/**
|
|
74
|
-
* File/folder item for browser
|
|
75
|
-
*/
|
|
76
|
-
interface FileItem {
|
|
77
|
-
name: string;
|
|
78
|
-
path: string;
|
|
79
|
-
type: 'file' | 'folder';
|
|
80
|
-
size?: number;
|
|
81
|
-
dimensions?: {
|
|
82
|
-
width: number;
|
|
83
|
-
height: number;
|
|
84
|
-
};
|
|
85
|
-
cdnSynced?: boolean;
|
|
86
|
-
fileCount?: number;
|
|
87
|
-
totalSize?: number;
|
|
88
|
-
thumbnail?: string;
|
|
89
|
-
hasThumbnail?: boolean;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Studio configuration
|
|
93
|
-
*/
|
|
94
|
-
interface StudioConfig {
|
|
95
|
-
r2AccountId?: string;
|
|
96
|
-
r2AccessKeyId?: string;
|
|
97
|
-
r2SecretAccessKey?: string;
|
|
98
|
-
r2BucketName?: string;
|
|
99
|
-
r2PublicUrl?: string;
|
|
100
|
-
thumbnailSizes?: {
|
|
101
|
-
small: number;
|
|
102
|
-
medium: number;
|
|
103
|
-
large: number;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Helper to derive thumbnail path from original path
|
|
108
|
-
*/
|
|
109
|
-
declare function getThumbnailPath(originalPath: string, size: LeanImageSize): string;
|
|
110
|
-
/**
|
|
111
|
-
* Convert verbose StudioMeta to LeanMeta
|
|
112
|
-
*/
|
|
113
|
-
declare function toLeanMeta(verbose: StudioMeta): LeanMeta;
|
|
114
|
-
/**
|
|
115
|
-
* Check if meta is in lean format (no 'images' wrapper)
|
|
116
|
-
*/
|
|
117
|
-
declare function isLeanMeta(meta: unknown): meta is LeanMeta;
|
|
118
|
-
|
|
119
|
-
export { type CdnStatus as C, type FileItem as F, type ImageEntry as I, type LeanMeta as L, type StudioMeta as S, type ImageSize as a, type LeanImageEntry as b, type LeanImageSize as c, type SizeEntry as d, type StudioConfig as e, getThumbnailPath as g, isLeanMeta as i, toLeanMeta as t };
|