sanity-plugin-cloudinary 1.4.0 → 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 +1 -1
- package/README.md +0 -1
- package/dist/index.d.ts +88 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +726 -0
- package/dist/index.js.map +1 -0
- package/package.json +37 -72
- package/lib/index.d.ts +0 -93
- package/lib/index.esm.js +0 -774
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js +0 -791
- package/lib/index.js.map +0 -1
- package/sanity.json +0 -8
- package/src/components/AssetDiff.tsx +0 -44
- package/src/components/AssetListFunctions.tsx +0 -100
- package/src/components/AssetPreview.tsx +0 -66
- package/src/components/CloudinaryInput.tsx +0 -121
- package/src/components/SecretsConfigView.tsx +0 -39
- package/src/components/VideoPlayer.tsx +0 -24
- package/src/components/WidgetInput.tsx +0 -66
- package/src/components/asset-source/CloudinaryAssetSource.tsx +0 -155
- package/src/components/asset-source/Icon.tsx +0 -93
- package/src/index.ts +0 -71
- package/src/schema/cloudinaryAsset.ts +0 -107
- package/src/schema/cloudinaryAssetContext.ts +0 -16
- package/src/schema/cloudinaryAssetContextCustom.ts +0 -21
- package/src/schema/cloudinaryAssetDerived.ts +0 -26
- package/src/types.ts +0 -72
- package/src/utils.ts +0 -115
- package/v2-incompatible.js +0 -11
package/LICENSE
CHANGED
package/README.md
CHANGED
package/dist/index.d.ts
ADDED
|
@@ -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"}
|