sanity-plugin-cloudinary 1.4.1 → 2.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Sanity.io
3
+ Copyright (c) 2026 Sanity.io
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # sanity-plugin-cloudinary
2
2
 
3
-
4
3
  ## Installation
5
4
 
6
5
  ```
@@ -0,0 +1,88 @@
1
+ import { AssetSource } from "sanity";
2
+ declare const cloudinaryAssetSchema: {
3
+ type: "object";
4
+ name: "cloudinary.asset";
5
+ } & Omit<import("sanity").ObjectDefinition, "preview"> & {
6
+ preview?: import("sanity").PreviewConfig<{
7
+ url: string;
8
+ resource_type: string;
9
+ derived: string;
10
+ }, Record<"url" | "resource_type" | "derived", any>> | undefined;
11
+ };
12
+ interface CloudinaryAssetContext {
13
+ custom: object;
14
+ }
15
+ declare const cloudinaryAssetContext: {
16
+ type: "object";
17
+ name: "cloudinary.assetContext";
18
+ } & Omit<import("sanity").ObjectDefinition, "preview"> & {
19
+ preview?: import("sanity").PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
20
+ };
21
+ type CloudinaryAssetContextCustom = {
22
+ alt: string;
23
+ caption: string;
24
+ };
25
+ declare const cloudinaryAssetContextCustom: {
26
+ type: "object";
27
+ name: "cloudinary.assetContextCustom";
28
+ } & Omit<import("sanity").ObjectDefinition, "preview"> & {
29
+ preview?: import("sanity").PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
30
+ };
31
+ type CloudinaryAssetDerived = {
32
+ raw_transformation: string;
33
+ url: string;
34
+ secure_url: string;
35
+ };
36
+ declare const cloudinaryAssetDerivedSchema: {
37
+ type: "object";
38
+ name: "cloudinary.assetDerived";
39
+ } & Omit<import("sanity").ObjectDefinition, "preview"> & {
40
+ preview?: import("sanity").PreviewConfig<Record<string, string>, Record<never, any>> | undefined;
41
+ };
42
+ interface CloudinaryMediaLibrary {
43
+ show: (config?: {
44
+ asset: any;
45
+ folder: any;
46
+ }) => void;
47
+ hide: () => void;
48
+ }
49
+ type CloudinaryAsset = {
50
+ _type: string;
51
+ _key?: string;
52
+ _version: number;
53
+ public_id: string;
54
+ resource_type: string;
55
+ type: string;
56
+ format: string;
57
+ version: number;
58
+ url: string;
59
+ secure_url: string;
60
+ derived?: CloudinaryAssetDerived[];
61
+ display_name?: string;
62
+ };
63
+ type AssetDocument = {
64
+ _id: string;
65
+ label?: string;
66
+ title?: string;
67
+ description?: string;
68
+ source?: {
69
+ id: string;
70
+ name: string;
71
+ url?: string;
72
+ };
73
+ creditLine?: string;
74
+ originalFilename?: string;
75
+ };
76
+ declare global {
77
+ interface Window {
78
+ cloudinary: {
79
+ openMediaLibrary: (config: any, callbacks: any) => void;
80
+ createMediaLibrary: (config: any, callbacks?: any) => CloudinaryMediaLibrary;
81
+ };
82
+ }
83
+ } //# sourceMappingURL=types.d.ts.map
84
+ declare const cloudinarySchemaPlugin: import("sanity").Plugin<void>;
85
+ declare const cloudinaryImageSource: AssetSource;
86
+ declare const cloudinaryAssetSourcePlugin: import("sanity").Plugin<void>;
87
+ export { type AssetDocument, type CloudinaryAsset, type CloudinaryAssetContext, type CloudinaryAssetContextCustom, type CloudinaryAssetDerived, cloudinaryAssetContext, cloudinaryAssetContextCustom, cloudinaryAssetDerivedSchema, cloudinaryAssetSchema, cloudinaryAssetSourcePlugin, cloudinaryImageSource, cloudinarySchemaPlugin };
88
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/schema/cloudinaryAsset.ts","../src/schema/cloudinaryAssetContext.ts","../src/schema/cloudinaryAssetContextCustom.ts","../src/schema/cloudinaryAssetDerived.ts","../src/types.ts","../src/index.ts"],"mappings":";cAMa,qBAAA;;;IAsGX,IAAA;;;;;KAAA,MAAA;AAAA;AAAA,UC1Ge,sBAAA;EACf,MAAM;AAAA;AAAA,cAGK,sBAAA;;;;;;KCJD,4BAAA;EACV,GAAA;EACA,OAAO;AAAA;AAAA,cAGI,4BAAA;;;;;;KCLD,sBAAA;EACV,kBAAA;EACA,GAAA;EACA,UAAA;AAAA;AAAA,cAGW,4BAAA;;;;;;UCqBI,sBAAA;EACf,IAAA,GAAO,MAAA;IAAU,KAAA;IAAY,MAAA;EAAA;EAC7B,IAAA;AAAA;AAAA,KAGU,eAAA;EACV,KAAA;EACA,IAAA;EACA,QAAA;EACA,SAAA;EACA,aAAA;EACA,IAAA;EACA,MAAA;EACA,OAAA;EACA,GAAA;EACA,UAAA;EACA,OAAA,GAAU,sBAAsB;EAChC,YAAA;AAAA;AAAA,KAGU,aAAA;EACV,GAAA;EACA,KAAA;EACA,KAAA;EACA,WAAA;EACA,MAAA;IACE,EAAA;IACA,IAAA;IACA,GAAA;EAAA;EAEF,UAAA;EACA,gBAAA;AAAA;AAAA,QAGM,MAAA;EAAA,UACI,MAAA;IACR,UAAA;MACE,gBAAA,GAAmB,MAAA,OAAa,SAAA;MAChC,kBAAA,GAAqB,MAAA,OAAa,SAAA,WAAoB,sBAAsB;IAAA;EAAA;AAAA;AAAA,cC5CrE,sBAAA,mBAAsB,MAAA;AAAA,cA2BtB,qBAAA,EAAuB,WAKnC;AAAA,cAEY,2BAAA,mBAA2B,MAAA"}