@sanity/types
Advanced tools
Comparing version 2.5.0 to 2.5.1-canary.79
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { Reference } from '../reference'; | ||
@@ -86,8 +86,19 @@ import { SanityDocument } from '../documents'; | ||
} | ||
export declare type AssetFromSource = { | ||
kind: 'assetDocumentId' | 'file' | 'base64' | 'url'; | ||
value: string | File; | ||
assetDocumentProps?: ImageAsset; | ||
}; | ||
export interface AssetSourceComponentProps { | ||
selectedAssets: Asset[]; | ||
selectionType: 'single' | 'multiple'; | ||
onClose: () => void; | ||
onSelect: (assetFromSource: AssetFromSource) => void; | ||
} | ||
export interface AssetSource { | ||
name: string; | ||
title: string; | ||
component: React.ComponentType; | ||
icon?: React.ComponentType; | ||
component: React.ComponentType<AssetSourceComponentProps>; | ||
icon?: React.ComponentType<void>; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@sanity/types", | ||
"version": "2.5.0", | ||
"version": "2.5.1-canary.79+d68b61878", | ||
"description": "Type definitions for common Sanity data structures", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
"homepage": "https://www.sanity.io/", | ||
"gitHead": "0f8192f4b95fd6457b11f53998d26d4fd8136247" | ||
"gitHead": "d68b61878053db0eb78e2085dfeb772585b4d95d" | ||
} |
@@ -0,1 +1,2 @@ | ||
import React from 'react' | ||
import {Reference} from '../reference' | ||
@@ -108,7 +109,20 @@ import {SanityDocument} from '../documents' | ||
export type AssetFromSource = { | ||
kind: 'assetDocumentId' | 'file' | 'base64' | 'url' | ||
value: string | File | ||
assetDocumentProps?: ImageAsset | ||
} | ||
export interface AssetSourceComponentProps { | ||
selectedAssets: Asset[] | ||
selectionType: 'single' | 'multiple' | ||
onClose: () => void | ||
onSelect: (assetFromSource: AssetFromSource) => void | ||
} | ||
export interface AssetSource { | ||
name: string | ||
title: string | ||
component: React.ComponentType | ||
icon?: React.ComponentType | ||
component: React.ComponentType<AssetSourceComponentProps> | ||
icon?: React.ComponentType<void> | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
419262
14290
1
1