@sanity/types
Advanced tools
Comparing version 2.13.2-canary.13 to 2.13.2-conditional-fields.29
@@ -5,2 +5,3 @@ import React from 'react'; | ||
import { SlugOptions } from '../slug'; | ||
import { SanityDocument } from '../documents'; | ||
export interface Schema { | ||
@@ -29,2 +30,9 @@ name: string; | ||
}; | ||
export interface HiddenOptionCallbackContext { | ||
parent?: Record<string, unknown>; | ||
document: SanityDocument; | ||
value: unknown; | ||
} | ||
export declare type HiddenOption = boolean | HiddenOptionCallback; | ||
export declare type HiddenOptionCallback = (context: HiddenOptionCallbackContext) => boolean; | ||
export declare type InitialValueParams = Record<string, unknown>; | ||
@@ -43,3 +51,3 @@ export declare type InitialValueResolver<T> = (params?: InitialValueParams) => Promise<T> | T; | ||
options?: unknown; | ||
hidden?: boolean; | ||
hidden?: HiddenOption; | ||
preview?: { | ||
@@ -46,0 +54,0 @@ select?: PreviewValue; |
{ | ||
"name": "@sanity/types", | ||
"version": "2.13.2-canary.13+f501df9db0", | ||
"version": "2.13.2-conditional-fields.29+0ab995f24", | ||
"description": "Type definitions for common Sanity data structures", | ||
@@ -23,5 +23,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@sanity/client": "2.13.2-canary.13+f501df9db0", | ||
"@sanity/client": "2.13.2-conditional-fields.29+0ab995f24", | ||
"@sanity/color": "^2.1.3", | ||
"@types/react": "^17.0.0", | ||
"react": "17.0.1", | ||
"rxjs": "^6.5.3" | ||
@@ -41,3 +42,3 @@ }, | ||
"homepage": "https://www.sanity.io/", | ||
"gitHead": "f501df9db0183b5a8b1da6df2021fe705cb5856f" | ||
"gitHead": "0ab995f241003cbc3fe458f3022d0985125d94dc" | ||
} |
@@ -1,2 +0,1 @@ | ||
/// <reference types="lodash" /> | ||
import elementResizeDetectorMaker from 'element-resize-detector' | ||
@@ -53,5 +52,5 @@ import React from 'react' | ||
setDateElement: (element: HTMLDivElement | null) => void | ||
onResize: import('lodash').DebouncedFunc<() => void> | ||
onResize: () => void | ||
render(): JSX.Element | ||
} | ||
export {} |
@@ -6,2 +6,3 @@ // Note: INCOMPLETE, but it's a start | ||
import {SlugOptions} from '../slug' | ||
import {SanityDocument} from '../documents' | ||
@@ -35,2 +36,11 @@ export interface Schema { | ||
export interface HiddenOptionCallbackContext { | ||
parent?: Record<string, unknown> | ||
document: SanityDocument | ||
value: unknown | ||
} | ||
export type HiddenOption = boolean | HiddenOptionCallback | ||
export type HiddenOptionCallback = (context: HiddenOptionCallbackContext) => boolean | ||
export type InitialValueParams = Record<string, unknown> | ||
@@ -50,3 +60,3 @@ export type InitialValueResolver<T> = (params?: InitialValueParams) => Promise<T> | T | ||
options?: unknown | ||
hidden?: boolean | ||
hidden?: HiddenOption | ||
@@ -53,0 +63,0 @@ preview?: { |
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
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
429169
532
14519
5
+ Addedreact@17.0.1
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedreact@17.0.1(transitive)
Updated@sanity/client@2.13.2-conditional-fields.29+0ab995f24