Socket
Socket
Sign inDemoInstall

@sanity/types

Package Overview
Dependencies
Maintainers
24
Versions
912
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/types - npm Package Compare versions

Comparing version 2.4.4-canary.81 to 2.5.0

17

lib/assets/types.d.ts

@@ -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

6

lib/schema/types.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc