@sanity/types
Advanced tools
Comparing version 2.4.4-canary.81 to 2.5.0
@@ -1,2 +0,2 @@ | ||
import React from 'react'; | ||
/// <reference types="react" /> | ||
import { Reference } from '../reference'; | ||
@@ -86,19 +86,8 @@ 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<AssetSourceComponentProps>; | ||
icon?: React.ComponentType<void>; | ||
component: React.ComponentType; | ||
icon?: React.ComponentType; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -1,2 +0,2 @@ | ||
/// <reference types="react" /> | ||
import React from 'react'; | ||
import { ReferenceOptions } from '../reference'; | ||
@@ -66,2 +66,3 @@ import { AssetSource } from '../assets'; | ||
}; | ||
initialValue?: ((arg?: any) => Promise<string> | string) | string | undefined; | ||
} | ||
@@ -74,2 +75,3 @@ export interface TextSchemaType extends StringSchemaType { | ||
options?: EnumListProps<number>; | ||
initialValue?: ((arg?: any) => Promise<number> | number) | number | undefined; | ||
} | ||
@@ -81,2 +83,3 @@ export interface BooleanSchemaType extends BaseSchemaType { | ||
}; | ||
initialValue?: ((arg?: any) => Promise<boolean> | boolean) | boolean | undefined; | ||
} | ||
@@ -115,2 +118,3 @@ export interface ArraySchemaType<V = unknown> extends BaseSchemaType { | ||
fieldsets?: Fieldset[]; | ||
initialValue?: ((arg?: any) => Promise<any> | any) | any | undefined; | ||
} | ||
@@ -117,0 +121,0 @@ export interface ObjectSchemaTypeWithOptions extends ObjectSchemaType { |
{ | ||
"name": "@sanity/types", | ||
"version": "2.4.4-canary.81+cd7d825ea", | ||
"version": "2.5.0", | ||
"description": "Type definitions for common Sanity data structures", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
"homepage": "https://www.sanity.io/", | ||
"gitHead": "cd7d825ea1fcb35eae0f3e4d183cbdfc54e6de36" | ||
"gitHead": "0f8192f4b95fd6457b11f53998d26d4fd8136247" | ||
} |
@@ -195,2 +195,11 @@ /// <reference types="react" /> | ||
} | ||
declare module 'part:@sanity/components/scroll' { | ||
export { | ||
ScrollContainer, | ||
ScrollMonitor, | ||
ScrollContextValue, | ||
ScrollEventHandler, | ||
useOnScroll, | ||
} from './build-snapshot/__legacy/@sanity/components/scroll' | ||
} | ||
declare module 'part:@sanity/components/selects/custom' { | ||
@@ -197,0 +206,0 @@ export {default} from './build-snapshot/__legacy/@sanity/components/selects/CustomSelect' |
@@ -1,2 +0,1 @@ | ||
import React from 'react' | ||
import {Reference} from '../reference' | ||
@@ -109,20 +108,7 @@ 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<AssetSourceComponentProps> | ||
icon?: React.ComponentType<void> | ||
component: React.ComponentType | ||
icon?: React.ComponentType | ||
} |
// Note: INCOMPLETE, but it's a start | ||
import React from 'react' | ||
import {ReferenceOptions} from '../reference' | ||
@@ -80,2 +81,3 @@ import {AssetSource} from '../assets' | ||
} | ||
initialValue?: ((arg?: any) => Promise<string> | string) | string | undefined | ||
} | ||
@@ -90,2 +92,3 @@ | ||
options?: EnumListProps<number> | ||
initialValue?: ((arg?: any) => Promise<number> | number) | number | undefined | ||
} | ||
@@ -98,2 +101,3 @@ | ||
} | ||
initialValue?: ((arg?: any) => Promise<boolean> | boolean) | boolean | undefined | ||
} | ||
@@ -138,2 +142,3 @@ | ||
fieldsets?: Fieldset[] | ||
initialValue?: ((arg?: any) => Promise<any> | any) | any | undefined | ||
} | ||
@@ -140,0 +145,0 @@ |
Sorry, the diff of this file is not supported yet
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
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
418057
0
0
14267