sanity 5.1.0 → 5.1.1-next.2

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.
@@ -7,7 +7,7 @@ try {
7
7
  try {
8
8
  buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
9
9
  // and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
10
- "5.1.0";
10
+ "5.1.1-next.2+dbf3af20e7";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.d.ts CHANGED
@@ -17,7 +17,7 @@ import {BooleanDiff as BooleanDiff_2} from '@sanity/diff'
17
17
  import {BooleanSchemaType} from '@sanity/types'
18
18
  import {BoxProps} from '@sanity/ui'
19
19
  import {BrowserHistory} from 'history'
20
- import {ButtonProps as ButtonProps_2} from '@sanity/ui'
20
+ import {ButtonProps} from '@sanity/ui'
21
21
  import {ButtonTone} from '@sanity/ui'
22
22
  import {CanvasResource} from '@sanity/message-protocol'
23
23
  import {CardProps} from '@sanity/ui'
@@ -156,7 +156,6 @@ import {ReferenceSchemaType} from '@sanity/types'
156
156
  import {ReferenceValue} from '@sanity/types'
157
157
  import {RefObject} from 'react'
158
158
  import {ReleaseDocument} from '@sanity/client'
159
- import {ReleaseState} from '@sanity/client'
160
159
  import {RenderBlockFunction} from '@portabletext/editor'
161
160
  import {ResizeObserverEntry as ResizeObserverEntry_2} from '@juggle/resize-observer'
162
161
  import {ResponsivePaddingProps} from '@sanity/ui'
@@ -1193,7 +1192,7 @@ export declare interface BaseActionDescription {
1193
1192
  }
1194
1193
 
1195
1194
  declare type BaseButtonProps = Pick<
1196
- ButtonProps_2,
1195
+ ButtonProps,
1197
1196
  | 'as'
1198
1197
  | 'icon'
1199
1198
  | 'iconRight'
@@ -2086,7 +2085,7 @@ declare const Button: ForwardRefExoticComponent<
2086
2085
  (
2087
2086
  | Omit<
2088
2087
  Pick<
2089
- ButtonProps_2,
2088
+ ButtonProps,
2090
2089
  | 'as'
2091
2090
  | 'selected'
2092
2091
  | 'type'
@@ -2108,7 +2107,7 @@ declare const Button: ForwardRefExoticComponent<
2108
2107
  >
2109
2108
  | Omit<
2110
2109
  Pick<
2111
- ButtonProps_2,
2110
+ ButtonProps,
2112
2111
  | 'as'
2113
2112
  | 'selected'
2114
2113
  | 'type'
@@ -2133,12 +2132,12 @@ declare const Button: ForwardRefExoticComponent<
2133
2132
  >
2134
2133
 
2135
2134
  /** @internal */
2136
- declare type ButtonProps = BaseButtonProps & (ButtonWithText | IconButton)
2135
+ declare type ButtonProps_2 = BaseButtonProps & (ButtonWithText | IconButton)
2137
2136
 
2138
2137
  declare type ButtonWithText = {
2139
2138
  text: string
2140
2139
  tooltipProps?: TooltipProps | null
2141
- icon?: ButtonProps_2['icon']
2140
+ icon?: ButtonProps['icon']
2142
2141
  }
2143
2142
 
2144
2143
  declare interface CalendarLabels {
@@ -2314,6 +2313,18 @@ export declare function checkoutPair(
2314
2313
  options?: DocumentStoreExtraOptions,
2315
2314
  ): Pair
2316
2315
 
2316
+ /**
2317
+ * @internal
2318
+ */
2319
+ export declare const Chip: ForwardRefExoticComponent<
2320
+ Omit<
2321
+ Omit<ButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'as' | 'width'>, 'ref'> &
2322
+ RefAttributes<HTMLButtonElement>,
2323
+ 'ref'
2324
+ > &
2325
+ RefAttributes<unknown>
2326
+ >
2327
+
2317
2328
  /**
2318
2329
  * @hidden
2319
2330
  * @beta */
@@ -3174,7 +3185,7 @@ export declare interface CommittedEvent {
3174
3185
  }
3175
3186
 
3176
3187
  /** @internal */
3177
- export declare interface CommonProps extends Omit<ButtonProps, 'text' | 'iconRight'> {
3188
+ export declare interface CommonProps extends Omit<ButtonProps_2, 'text' | 'iconRight'> {
3178
3189
  as?: ElementType | keyof React.JSX.IntrinsicElements
3179
3190
  dividerBefore?: boolean
3180
3191
  focused?: boolean
@@ -3393,7 +3404,7 @@ export declare const ContextMenuButton: ForwardRefExoticComponent<
3393
3404
  >
3394
3405
 
3395
3406
  declare type ContextMenuButtonProps = Pick<
3396
- ButtonProps,
3407
+ ButtonProps_2,
3397
3408
  'mode' | 'selected' | 'size' | 'tone' | 'tooltipProps'
3398
3409
  >
3399
3410
 
@@ -7487,7 +7498,7 @@ export declare type I18nSearchOperatorNameKey = `search.operator.${Lowercase<str
7487
7498
 
7488
7499
  declare type IconButton = {
7489
7500
  text?: undefined
7490
- icon?: ButtonProps_2['icon']
7501
+ icon?: ButtonProps['icon']
7491
7502
  /**
7492
7503
  * When using a button with an icon, tooltipProps are required to enforce consistency in UI.
7493
7504
  */
@@ -7723,7 +7734,9 @@ export declare interface InsufficientPermissionsMessageProps {
7723
7734
  * @beta
7724
7735
  */
7725
7736
  export declare function IntentButton(
7726
- props: IntentLinkProps & ButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'ref' | 'size' | 'as'>,
7737
+ props: IntentLinkProps &
7738
+ ButtonProps_2 &
7739
+ Omit<HTMLProps<HTMLButtonElement>, 'ref' | 'size' | 'as'>,
7727
7740
  ): JSX.Element
7728
7741
 
7729
7742
  declare interface IntermediaryError {
@@ -11420,7 +11433,7 @@ export declare type RetryingStatus = {
11420
11433
 
11421
11434
  /** @internal */
11422
11435
  export declare const RevertChangesButton: ForwardRefExoticComponent<
11423
- Omit<ButtonProps, 'tooltipProps'> &
11436
+ Omit<ButtonProps_2, 'tooltipProps'> &
11424
11437
  Omit<HTMLProps<HTMLButtonElement>, 'ref'> & {
11425
11438
  changeCount: number
11426
11439
  } & RefAttributes<HTMLButtonElement>
@@ -12893,7 +12906,7 @@ export declare const StatusButton: ForwardRefExoticComponent<
12893
12906
  >
12894
12907
 
12895
12908
  /** @hidden @beta */
12896
- export declare type StatusButtonProps = ButtonProps & {
12909
+ export declare type StatusButtonProps = ButtonProps_2 & {
12897
12910
  ['aria-label']: HTMLProps<HTMLButtonElement>['aria-label']
12898
12911
  forwardedAs?: string
12899
12912
  disabled?:
@@ -12901,7 +12914,7 @@ export declare type StatusButtonProps = ButtonProps & {
12901
12914
  | {
12902
12915
  reason: ReactNode
12903
12916
  }
12904
- mode?: ButtonProps['mode']
12917
+ mode?: ButtonProps_2['mode']
12905
12918
  iconRight?: undefined
12906
12919
  }
12907
12920
 
@@ -14288,6 +14301,8 @@ declare const studioLocaleStrings: {
14288
14301
  'release.action.view-scheduled-drafts': string
14289
14302
  /** Label for banner when release is scheduled */
14290
14303
  'release.banner.scheduled-for-publishing-on': string
14304
+ 'release.chip.button.other-versions_one': string
14305
+ 'release.chip.button.other-versions_other': string
14291
14306
  /** Label for Draft chip in document header */
14292
14307
  'release.chip.draft': string
14293
14308
  /** Label for Draft chip in global header */
@@ -14308,6 +14323,8 @@ declare const studioLocaleStrings: {
14308
14323
  'release.chip.tooltip.no-edits': string
14309
14324
  /** Label for tooltip in chip when document isn't published */
14310
14325
  'release.chip.tooltip.not-published': string
14326
+ 'release.chip.tooltip.other-versions_one': string
14327
+ 'release.chip.tooltip.other-versions_other': string
14311
14328
  /** Label for tooltip in chip with the published date */
14312
14329
  'release.chip.tooltip.published-date': string
14313
14330
  /** Label for tooltip in chip when document is in a release that has been scheduled */
@@ -18080,20 +18097,19 @@ export {VERSION_FOLDER}
18080
18097
  export declare const VersionChip: NamedExoticComponent<{
18081
18098
  disabled?: boolean
18082
18099
  selected: boolean
18083
- tooltipContent: ReactNode
18100
+ tooltipContent?: ReactNode
18084
18101
  onClick: () => void
18085
18102
  text: string
18103
+ contextMenuPortal?: boolean
18086
18104
  tone: BadgeTone
18087
18105
  locked?: boolean
18088
18106
  onCopyToDraftsNavigate: () => void
18089
18107
  contextValues: {
18090
18108
  documentId: string
18109
+ documentType: string
18091
18110
  releases: ReleaseDocument[]
18092
18111
  releasesLoading: boolean
18093
- documentType: string
18094
- menuReleaseId: string
18095
- fromRelease: string
18096
- releaseState?: ReleaseState
18112
+ bundleId: string
18097
18113
  isVersion: boolean
18098
18114
  disabled?: boolean
18099
18115
  isGoingToUnpublish?: boolean