@depup/sanity 5.17.1-depup.0
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.
- package/LICENSE +21 -0
- package/README.md +57 -0
- package/bin/sanity +209 -0
- package/changes.json +114 -0
- package/lib/_chunks-dts/ActiveWorkspaceMatcherContext.d.ts +16164 -0
- package/lib/_chunks-dts/index.d.ts +780 -0
- package/lib/_chunks-dts/types.d.ts +2765 -0
- package/lib/_chunks-dts/types2.d.ts +656 -0
- package/lib/_chunks-dts/types3.d.ts +303 -0
- package/lib/_chunks-es/BroadcastDisplayedDocument.js +20 -0
- package/lib/_chunks-es/BroadcastDisplayedDocument.js.map +1 -0
- package/lib/_chunks-es/DisplayedDocumentBroadcaster.js +32 -0
- package/lib/_chunks-es/DisplayedDocumentBroadcaster.js.map +1 -0
- package/lib/_chunks-es/LiveQueries.js +339 -0
- package/lib/_chunks-es/LiveQueries.js.map +1 -0
- package/lib/_chunks-es/MenuGroup.js +106 -0
- package/lib/_chunks-es/MenuGroup.js.map +1 -0
- package/lib/_chunks-es/PostMessageDocuments.js +72 -0
- package/lib/_chunks-es/PostMessageDocuments.js.map +1 -0
- package/lib/_chunks-es/PostMessagePerspective.js +23 -0
- package/lib/_chunks-es/PostMessagePerspective.js.map +1 -0
- package/lib/_chunks-es/PostMessagePreviewSnapshots.js +69 -0
- package/lib/_chunks-es/PostMessagePreviewSnapshots.js.map +1 -0
- package/lib/_chunks-es/PostMessageRefreshMutations.js +74 -0
- package/lib/_chunks-es/PostMessageRefreshMutations.js.map +1 -0
- package/lib/_chunks-es/PostMessageSchema.js +502 -0
- package/lib/_chunks-es/PostMessageSchema.js.map +1 -0
- package/lib/_chunks-es/PostMessageTelemetry.js +21 -0
- package/lib/_chunks-es/PostMessageTelemetry.js.map +1 -0
- package/lib/_chunks-es/PresentationToolGrantsCheck.js +3848 -0
- package/lib/_chunks-es/PresentationToolGrantsCheck.js.map +1 -0
- package/lib/_chunks-es/QRCodeSVG.js +692 -0
- package/lib/_chunks-es/QRCodeSVG.js.map +1 -0
- package/lib/_chunks-es/StructureToolProvider.js +2360 -0
- package/lib/_chunks-es/StructureToolProvider.js.map +1 -0
- package/lib/_chunks-es/VideoPlayer.js +22 -0
- package/lib/_chunks-es/VideoPlayer.js.map +1 -0
- package/lib/_chunks-es/ViteDevServerStopped.js +52 -0
- package/lib/_chunks-es/ViteDevServerStopped.js.map +1 -0
- package/lib/_chunks-es/index.js +285 -0
- package/lib/_chunks-es/index.js.map +1 -0
- package/lib/_chunks-es/index2.js +105 -0
- package/lib/_chunks-es/index2.js.map +1 -0
- package/lib/_chunks-es/index3.js +139 -0
- package/lib/_chunks-es/index3.js.map +1 -0
- package/lib/_chunks-es/index4.js +1020 -0
- package/lib/_chunks-es/index4.js.map +1 -0
- package/lib/_chunks-es/pane.js +5 -0
- package/lib/_chunks-es/pane.js.map +1 -0
- package/lib/_chunks-es/pane2.js +5 -0
- package/lib/_chunks-es/pane2.js.map +1 -0
- package/lib/_chunks-es/presentation.js +549 -0
- package/lib/_chunks-es/presentation.js.map +1 -0
- package/lib/_chunks-es/resources.js +303 -0
- package/lib/_chunks-es/resources.js.map +1 -0
- package/lib/_chunks-es/resources2.js +459 -0
- package/lib/_chunks-es/resources2.js.map +1 -0
- package/lib/_chunks-es/resources3.js +281 -0
- package/lib/_chunks-es/resources3.js.map +1 -0
- package/lib/_chunks-es/resources4.js +184 -0
- package/lib/_chunks-es/resources4.js.map +1 -0
- package/lib/_chunks-es/resources5.js +161 -0
- package/lib/_chunks-es/resources5.js.map +1 -0
- package/lib/_chunks-es/resources6.js +141 -0
- package/lib/_chunks-es/resources6.js.map +1 -0
- package/lib/_chunks-es/resources7.js +24 -0
- package/lib/_chunks-es/resources7.js.map +1 -0
- package/lib/_chunks-es/resources8.js +603 -0
- package/lib/_chunks-es/resources8.js.map +1 -0
- package/lib/_chunks-es/resources9.js +126 -0
- package/lib/_chunks-es/resources9.js.map +1 -0
- package/lib/_chunks-es/structureTool.js +13673 -0
- package/lib/_chunks-es/structureTool.js.map +1 -0
- package/lib/_chunks-es/version.js +17 -0
- package/lib/_chunks-es/version.js.map +1 -0
- package/lib/_createContext.d.ts +12 -0
- package/lib/_createContext.js +38 -0
- package/lib/_createContext.js.map +1 -0
- package/lib/_internal.d.ts +9 -0
- package/lib/_internal.js +12 -0
- package/lib/_internal.js.map +1 -0
- package/lib/_singletons.d.ts +951 -0
- package/lib/_singletons.js +284 -0
- package/lib/_singletons.js.map +1 -0
- package/lib/cli.d.ts +3 -0
- package/lib/cli.js +9 -0
- package/lib/cli.js.map +1 -0
- package/lib/desk.d.ts +910 -0
- package/lib/desk.js +71 -0
- package/lib/desk.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +92934 -0
- package/lib/index.js.map +1 -0
- package/lib/media-library.d.ts +85 -0
- package/lib/media-library.js +11 -0
- package/lib/media-library.js.map +1 -0
- package/lib/migrate.d.ts +1 -0
- package/lib/migrate.js +2 -0
- package/lib/migrate.js.map +1 -0
- package/lib/presentation.d.ts +28 -0
- package/lib/presentation.js +10 -0
- package/lib/presentation.js.map +1 -0
- package/lib/router.d.ts +560 -0
- package/lib/router.js +777 -0
- package/lib/router.js.map +1 -0
- package/lib/structure.d.ts +3 -0
- package/lib/structure.js +639 -0
- package/lib/structure.js.map +1 -0
- package/mock-browser-env-stub-loader.mjs +27 -0
- package/package.json +383 -0
- package/static/favicons/apple-touch-icon.png +0 -0
- package/static/favicons/favicon-192.png +0 -0
- package/static/favicons/favicon-512.png +0 -0
- package/static/favicons/favicon-96.png +0 -0
- package/static/favicons/favicon.ico +0 -0
- package/static/favicons/favicon.svg +12 -0
|
@@ -0,0 +1,951 @@
|
|
|
1
|
+
import { Ah as EventsStore, BS as ChangeIndicatorTrackerContextValue, Bf as TasksContextValue, Bg as CommentsContextValue, Bt as DocumentFieldActionNode$1, Ft as DocumentFieldAction$1, Fu as MetadataWrapper, Gg as CommentInputContextValue, Hc as FormCallbacksValue, Hf as MentionUserContextValue, Hu as DivergenceNavigator, IC as PerspectiveContextValue, Ib as Locale, Ig as CommentsOnboardingContextValue, Lc as ReferenceInputOptions, Ny as CommentsSelectedPathContextValue, QS as ConnectorContextValue, Ql as PreviewCardContextValue, Qp as DocumentChangeContextInstance, Rg as CommentsEnabledContextValue, Rn as PortableTextMemberItem, Sr as FormValueContextValue, Sv as SearchContextValue, US as TrackerContextGetSnapshot, Vf as TasksNavigationContextValue, WS as TrackerContextStore, Wf as TasksEnabledContextValue, Wy as CommentIntentGetter, Xg as CommentsUpsellContextValue, Zg as UpsellData, b_ as StudioAnnouncementsContextValue, bp as SchedulesContextValue, by as WorkspacesContextValue, cy as StudioColorScheme, d_ as UpsellDialogViewedInfo, dp as DocumentActionDescription, dr as FormBuilderContextValue, ds as FieldCommentsProps, fg as SanityCreateConfigContextValue, fy as AddonDatasetContextValue, gp as DocumentActionProps, jy as RouterHistory, ku as ReleasesUpsellContextValue, m_ as NavbarContextValue, ni as FieldPresenceData, oc as EnhancedObjectDialogContextValue, or as VirtualizerScrollInstance, pl as ZIndexContextValue, pt as Source$1, rg as UserColorManager, ri as FormNodePresence, rs as PortableTextMarker, t as ActiveWorkspaceMatcherContextValue, ub as CommentsAuthoringPathContextValue, vg as AppIdCache, vi as ResourceCache, vt as Workspace, z_ as CopyPasteContextType, zf as TasksUpsellContextValue } from "./_chunks-dts/ActiveWorkspaceMatcherContext.js";
|
|
2
|
+
import { F as PaneLayoutContextValue, P as PaneContextValue, c as DocumentPaneInfoContextValue, i as PaneRouterContextValue, k as StructureToolContextValue, s as DocumentPaneContextValue, w as RouterPanes, y as PaneNode } from "./_chunks-dts/types.js";
|
|
3
|
+
import { g as PresentationParamsContextValue, h as PresentationNavigateContextValue, m as PresentationContextValue, v as PresentationPluginOptions } from "./_chunks-dts/types2.js";
|
|
4
|
+
import { _ as RouterContextValue } from "./_chunks-dts/types3.js";
|
|
5
|
+
import * as react from "react";
|
|
6
|
+
import { CSSProperties, ComponentType, MutableRefObject, PropsWithChildren, ReactNode, RefObject } from "react";
|
|
7
|
+
import { ArraySchemaType, ObjectSchemaType, Path, PortableTextBlock, SanityDocument, ValidationMarker } from "@sanity/types";
|
|
8
|
+
import { SanityClient } from "@sanity/client";
|
|
9
|
+
import { i18n } from "i18next";
|
|
10
|
+
import { BehaviorSubject, Observable } from "rxjs";
|
|
11
|
+
import { PubSub } from "nano-pubsub";
|
|
12
|
+
import { PortableTextMemberSchemaTypes } from "@portabletext/sanity-bridge";
|
|
13
|
+
import { SanityDocument as SanityDocument$2 } from "sanity";
|
|
14
|
+
import { SemVer } from "semver";
|
|
15
|
+
import { Serializable } from "@sanity/presentation-comlink";
|
|
16
|
+
/** @internal */
|
|
17
|
+
declare const ActiveWorkspaceMatcherContext: react.Context<ActiveWorkspaceMatcherContextValue | null>;
|
|
18
|
+
/**
|
|
19
|
+
* @beta
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
declare const AddonDatasetContext: react.Context<AddonDatasetContextValue | null>;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
declare const AppIdCacheContext: react.Context<AppIdCache | null>;
|
|
27
|
+
/** @internal */
|
|
28
|
+
interface ArrayValidationState {
|
|
29
|
+
maxReached: boolean;
|
|
30
|
+
maxReachedReason: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
/** @internal */
|
|
33
|
+
declare const ArrayValidationContext: react.Context<ArrayValidationState | null>;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
interface AssetLimitUpsellContextValue {
|
|
38
|
+
upsellDialogOpen: boolean;
|
|
39
|
+
handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void;
|
|
40
|
+
upsellData: UpsellData | null;
|
|
41
|
+
telemetryLogs: {
|
|
42
|
+
dialogSecondaryClicked: () => void;
|
|
43
|
+
dialogPrimaryClicked: () => void;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
declare const AssetLimitUpsellContext: react.Context<AssetLimitUpsellContextValue | null>;
|
|
50
|
+
interface CalendarContextValue {
|
|
51
|
+
date?: Date;
|
|
52
|
+
endDate?: Date;
|
|
53
|
+
focusedDate: Date;
|
|
54
|
+
selectRange?: boolean;
|
|
55
|
+
selectTime?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* An integer indicating the first day of the week.
|
|
58
|
+
* Can be either 1 (Monday), 6 (Saturday) or 7 (Sunday).
|
|
59
|
+
*/
|
|
60
|
+
firstWeekDay: 1 | 6 | 7;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
declare const CalendarContext: react.Context<CalendarContextValue | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
type ChangeIndicatorTrackerContextStoreType = TrackerContextStore<ChangeIndicatorTrackerContextValue> | null;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* @hidden
|
|
74
|
+
*/
|
|
75
|
+
type ChangeIndicatorTrackerGetSnapshotType = TrackerContextGetSnapshot<ChangeIndicatorTrackerContextValue> | null;
|
|
76
|
+
/** @internal */
|
|
77
|
+
declare const ChangeIndicatorTrackerContextStore: react.Context<ChangeIndicatorTrackerContextStoreType>;
|
|
78
|
+
/** @internal */
|
|
79
|
+
declare const ChangeIndicatorTrackerContextGetSnapshot: react.Context<ChangeIndicatorTrackerGetSnapshotType>;
|
|
80
|
+
/**
|
|
81
|
+
* The setter for ColorSchemeValueContext, in a separate context to avoid unnecessary re-renders
|
|
82
|
+
* If set to false then the UI should adjust to reflect that the Studio can't change the color scheme
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
declare const ColorSchemeSetValueContext: react.Context<false | ((nextScheme: StudioColorScheme) => void) | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Used to keep track of the internal value, which can be "system" in addition to "light" and "dark"
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
declare const ColorSchemeValueContext: react.Context<StudioColorScheme | null>;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
declare const CommentInputContext: react.Context<CommentInputContextValue | null>;
|
|
95
|
+
/**
|
|
96
|
+
* @beta
|
|
97
|
+
* @hidden
|
|
98
|
+
*/
|
|
99
|
+
declare const CommentsAuthoringPathContext: react.Context<CommentsAuthoringPathContextValue | null>;
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
declare const CommentsContext: react.Context<CommentsContextValue | null>;
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
declare const CommentsEnabledContext: react.Context<CommentsEnabledContextValue>;
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
declare const CommentsIntentContext: react.Context<CommentIntentGetter | undefined>;
|
|
112
|
+
/**
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
declare const CommentsOnboardingContext: react.Context<CommentsOnboardingContextValue | null>;
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
declare const CommentsSelectedPathContext: react.Context<CommentsSelectedPathContextValue | null>;
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
declare const CommentsUpsellContext: react.Context<CommentsUpsellContextValue | null>;
|
|
124
|
+
/**
|
|
125
|
+
* @beta
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
declare const CopyPasteContext: react.Context<CopyPasteContextType | null>;
|
|
129
|
+
/**
|
|
130
|
+
* Entry in the dialog stack.
|
|
131
|
+
*
|
|
132
|
+
* @beta
|
|
133
|
+
*/
|
|
134
|
+
interface DialogStackEntry {
|
|
135
|
+
id: string;
|
|
136
|
+
path?: Path;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Context value for tracking the dialog stack.
|
|
140
|
+
*
|
|
141
|
+
* @beta
|
|
142
|
+
*/
|
|
143
|
+
interface DialogStackContextValue {
|
|
144
|
+
/** Stack of dialog entries, last one is the top */
|
|
145
|
+
stack: DialogStackEntry[];
|
|
146
|
+
/** Push a dialog onto the stack */
|
|
147
|
+
push: (id: string, path?: Path) => void;
|
|
148
|
+
/** Remove a dialog from the stack */
|
|
149
|
+
remove: (id: string) => void;
|
|
150
|
+
/** Update the path of an existing dialog entry */
|
|
151
|
+
update: (id: string, path?: Path) => void;
|
|
152
|
+
/** Close dialogs. Pass `{ toParent: true }` to close only the top dialog and navigate to the parent. */
|
|
153
|
+
close: (options?: {
|
|
154
|
+
/**
|
|
155
|
+
* When true, closes only the top dialog and navigates to its parent path.
|
|
156
|
+
* When false or omitted, closes all dialogs and resets to the root path.
|
|
157
|
+
*/
|
|
158
|
+
toParent?: boolean;
|
|
159
|
+
}) => void;
|
|
160
|
+
/** Navigate to a specific path, updating the form path and cleaning up stack entries that are at or deeper than the target. */
|
|
161
|
+
navigateTo: (path: Path) => void;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Context for tracking the stack of open dialogs.
|
|
165
|
+
*
|
|
166
|
+
* @beta
|
|
167
|
+
*/
|
|
168
|
+
declare const DialogStackContext: react.Context<DialogStackContextValue | null>;
|
|
169
|
+
/** @internal */
|
|
170
|
+
declare const DiffContext: react.Context<{
|
|
171
|
+
path: Path;
|
|
172
|
+
}>;
|
|
173
|
+
/**
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
declare const DocumentActionPropsContext: react.Context<DocumentActionProps | undefined>;
|
|
177
|
+
/**
|
|
178
|
+
* @internal
|
|
179
|
+
*/
|
|
180
|
+
declare const DocumentActionsStateContext: react.Context<DocumentActionDescription[] | null>;
|
|
181
|
+
/** @internal */
|
|
182
|
+
declare const DocumentChangeContext: react.Context<DocumentChangeContextInstance | null>;
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
type DocumentDivergencesContextValue = DivergenceNavigator;
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
*/
|
|
190
|
+
declare const DocumentDivergencesContext: react.Context<DivergenceNavigator | null>;
|
|
191
|
+
/**
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
interface DocumentFieldActionsContextValue {
|
|
195
|
+
actions: DocumentFieldAction$1[];
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
200
|
+
declare const DocumentFieldActionsContext: react.Context<DocumentFieldActionsContextValue | null>;
|
|
201
|
+
/**
|
|
202
|
+
* @internal
|
|
203
|
+
*/
|
|
204
|
+
interface DocumentIdContextValue {
|
|
205
|
+
id: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
declare const DocumentIdContext: react.Context<DocumentIdContextValue | null>;
|
|
211
|
+
/**
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
|
+
interface DocumentLimitUpsellContextValue {
|
|
215
|
+
upsellDialogOpen: boolean;
|
|
216
|
+
handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void;
|
|
217
|
+
handleClose: () => void;
|
|
218
|
+
upsellData: UpsellData | null;
|
|
219
|
+
telemetryLogs: {
|
|
220
|
+
dialogSecondaryClicked: () => void;
|
|
221
|
+
dialogPrimaryClicked: () => void;
|
|
222
|
+
panelPrimaryClicked: () => void;
|
|
223
|
+
panelSecondaryClicked: () => void;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
declare const DocumentLimitUpsellContext: react.Context<DocumentLimitUpsellContextValue | null>;
|
|
230
|
+
/** @internal */
|
|
231
|
+
declare const DocumentPaneContext: react.Context<DocumentPaneContextValue | null>;
|
|
232
|
+
/** @internal */
|
|
233
|
+
declare const DocumentPaneInfoContext: react.Context<DocumentPaneInfoContextValue | null>;
|
|
234
|
+
/** @internal */
|
|
235
|
+
interface DocumentSheetListContextValue {
|
|
236
|
+
focusAnchorCell: () => void;
|
|
237
|
+
resetFocusSelection: () => void;
|
|
238
|
+
setSelectedAnchorCell: (colId: string, rowIndex: number) => void;
|
|
239
|
+
getStateByCellId: (colId: string, rowIndex: number) => 'focused' | 'selectedAnchor' | 'selectedRange' | null;
|
|
240
|
+
submitFocusedCell: () => void;
|
|
241
|
+
}
|
|
242
|
+
/** @internal */
|
|
243
|
+
declare const DocumentSheetListContext: react.Context<DocumentSheetListContextValue | undefined>;
|
|
244
|
+
/**
|
|
245
|
+
* @internal
|
|
246
|
+
* @deprecated This context is no longer used and will be removed in a future release as we make the enhanced object dialog the default.
|
|
247
|
+
*/
|
|
248
|
+
declare const EnhancedObjectDialogContext: react.Context<EnhancedObjectDialogContextValue>;
|
|
249
|
+
/**
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
declare const EventsContext: react.Context<EventsStore | null>;
|
|
253
|
+
/** @internal */
|
|
254
|
+
interface FieldActionsContextValue {
|
|
255
|
+
actions: DocumentFieldActionNode$1[];
|
|
256
|
+
__internal_comments?: FieldCommentsProps;
|
|
257
|
+
__internal_slot?: ReactNode;
|
|
258
|
+
focused?: boolean;
|
|
259
|
+
hovered: boolean;
|
|
260
|
+
onMouseEnter: () => void;
|
|
261
|
+
onMouseLeave: () => void;
|
|
262
|
+
}
|
|
263
|
+
/** @internal */
|
|
264
|
+
declare const FieldActionsContext: react.Context<FieldActionsContextValue>;
|
|
265
|
+
/**
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
declare const FormBuilderContext: react.Context<FormBuilderContextValue | null>;
|
|
269
|
+
/**
|
|
270
|
+
* @internal
|
|
271
|
+
*/
|
|
272
|
+
declare const FormCallbacksContext: react.Context<FormCallbacksValue | null>;
|
|
273
|
+
/** @internal */
|
|
274
|
+
declare const FormFieldPresenceContext: react.Context<FormNodePresence[]>;
|
|
275
|
+
/**
|
|
276
|
+
* @internal
|
|
277
|
+
*/
|
|
278
|
+
declare const FormValueContext: react.Context<FormValueContextValue | null>;
|
|
279
|
+
interface FreeTrialResponse {
|
|
280
|
+
id: string;
|
|
281
|
+
icon: string;
|
|
282
|
+
style: string;
|
|
283
|
+
showOnLoad: FreeTrialDialog | null;
|
|
284
|
+
showOnClick: FreeTrialDialog | null;
|
|
285
|
+
daysLeft: number;
|
|
286
|
+
totalDays: number;
|
|
287
|
+
}
|
|
288
|
+
interface FreeTrialDialog {
|
|
289
|
+
_id: string;
|
|
290
|
+
_type: 'dialog';
|
|
291
|
+
_createdAt: string;
|
|
292
|
+
ctaButton?: {
|
|
293
|
+
text: string;
|
|
294
|
+
action: 'openNext' | 'closeDialog' | 'openUrl';
|
|
295
|
+
url?: string;
|
|
296
|
+
};
|
|
297
|
+
secondaryButton?: {
|
|
298
|
+
text: string;
|
|
299
|
+
};
|
|
300
|
+
descriptionText: PortableTextBlock[];
|
|
301
|
+
dialogType: 'modal' | 'popover';
|
|
302
|
+
headingText: string;
|
|
303
|
+
id: string;
|
|
304
|
+
image: Image$1 | null;
|
|
305
|
+
tags?: Tag[];
|
|
306
|
+
_rev: string;
|
|
307
|
+
_updatedAt: string;
|
|
308
|
+
}
|
|
309
|
+
interface Tag {
|
|
310
|
+
_type: 'tag';
|
|
311
|
+
_key: string;
|
|
312
|
+
tag: string;
|
|
313
|
+
}
|
|
314
|
+
interface Image$1 {
|
|
315
|
+
asset: {
|
|
316
|
+
url: string;
|
|
317
|
+
altText: string | null;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* @internal
|
|
322
|
+
*/
|
|
323
|
+
interface FreeTrialContextProps {
|
|
324
|
+
data: FreeTrialResponse | null;
|
|
325
|
+
showDialog: boolean;
|
|
326
|
+
showOnLoad: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* If the user is seeing the `showOnLoad` popover or modal, and clicks on the pricing button the `showOnClick` modal should be triggered.
|
|
329
|
+
*/
|
|
330
|
+
toggleShowContent: (closeAndReOpen?: boolean) => void;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* @internal
|
|
334
|
+
*/
|
|
335
|
+
declare const FreeTrialContext: react.Context<FreeTrialContextProps | undefined>;
|
|
336
|
+
/**
|
|
337
|
+
* Context for tracking fullscreen state of portable text editors by their path
|
|
338
|
+
* @internal
|
|
339
|
+
*/
|
|
340
|
+
interface FullscreenPTEContextValue {
|
|
341
|
+
/**
|
|
342
|
+
* Get the fullscreen state for a specific path
|
|
343
|
+
*/
|
|
344
|
+
getFullscreenPath: (path: Path) => string | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* Set the fullscreen state for a specific path
|
|
347
|
+
*/
|
|
348
|
+
setFullscreenPath: (path: Path, isFullscreen: boolean) => void;
|
|
349
|
+
/**
|
|
350
|
+
* Check if any portable text editor is currently in fullscreen mode
|
|
351
|
+
*/
|
|
352
|
+
hasAnyFullscreen: () => boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Get all fullscreen paths
|
|
355
|
+
*/
|
|
356
|
+
allFullscreenPaths: string[];
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
*/
|
|
361
|
+
declare const FullscreenPTEContext: react.Context<FullscreenPTEContextValue>;
|
|
362
|
+
/**
|
|
363
|
+
* @internal
|
|
364
|
+
* @hidden
|
|
365
|
+
*/
|
|
366
|
+
type GetFormValueContextValue = (path: Path) => unknown;
|
|
367
|
+
/**
|
|
368
|
+
* @internal
|
|
369
|
+
*/
|
|
370
|
+
declare const GetFormValueContext: react.Context<GetFormValueContextValue | null>;
|
|
371
|
+
/** @internal */
|
|
372
|
+
interface HoveredFieldContextValue {
|
|
373
|
+
store: {
|
|
374
|
+
subscribe: (onStoreCallback: () => void) => () => void;
|
|
375
|
+
getSnapshot: () => string[];
|
|
376
|
+
};
|
|
377
|
+
onMouseEnter: (path: Path) => void;
|
|
378
|
+
onMouseLeave: (path: Path) => void;
|
|
379
|
+
}
|
|
380
|
+
/** @internal */
|
|
381
|
+
declare const HoveredFieldContext: react.Context<HoveredFieldContextValue>;
|
|
382
|
+
/**
|
|
383
|
+
* TODO: remove this context when alternate document-specific context are
|
|
384
|
+
* introduced.
|
|
385
|
+
*
|
|
386
|
+
* The following context is used in the structure tool to set the active
|
|
387
|
+
* document if it's the last pane open in the structure tool. This is a
|
|
388
|
+
* temporary context provider that was introduced when the comments and tasks
|
|
389
|
+
* plugins were refactor and decoupled from the structure tool. ideally this
|
|
390
|
+
* should be removed and replaced with a document-specific context that gives
|
|
391
|
+
* plugin authors access to what the `usePane`, `usePaneRouter`, and
|
|
392
|
+
* `useDocumentPane` provides without exposing specifics from the structure tool
|
|
393
|
+
*/
|
|
394
|
+
/**
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
397
|
+
declare const IsLastPaneContext: react.Context<boolean>;
|
|
398
|
+
/**
|
|
399
|
+
* User application from the API
|
|
400
|
+
* @internal
|
|
401
|
+
*/
|
|
402
|
+
interface UserApplication {
|
|
403
|
+
id: string;
|
|
404
|
+
type: string;
|
|
405
|
+
projectId?: string;
|
|
406
|
+
organizationId?: string;
|
|
407
|
+
title?: string;
|
|
408
|
+
urlType: 'internal' | 'external';
|
|
409
|
+
appHost: string;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Cache for user applications fetched from the API.
|
|
413
|
+
* Caches by projectId to avoid duplicate fetches.
|
|
414
|
+
* @internal
|
|
415
|
+
*/
|
|
416
|
+
interface UserApplicationCache {
|
|
417
|
+
/**
|
|
418
|
+
* Get user applications for a project.
|
|
419
|
+
* Returns cached results if available, otherwise fetches from API.
|
|
420
|
+
*/
|
|
421
|
+
get: (client: SanityClient) => Promise<UserApplication[]>;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* @hidden
|
|
425
|
+
* @internal
|
|
426
|
+
*/
|
|
427
|
+
type LiveUserApplicationContextValue = {
|
|
428
|
+
userApplication: UserApplication | undefined;
|
|
429
|
+
isLoading: boolean;
|
|
430
|
+
};
|
|
431
|
+
/**
|
|
432
|
+
*
|
|
433
|
+
* @hidden
|
|
434
|
+
* @internal
|
|
435
|
+
*/
|
|
436
|
+
declare const LiveUserApplicationContext: react.Context<LiveUserApplicationContextValue>;
|
|
437
|
+
/**
|
|
438
|
+
* @internal
|
|
439
|
+
* @hidden
|
|
440
|
+
*/
|
|
441
|
+
interface LocaleContextValue {
|
|
442
|
+
locales: Locale[];
|
|
443
|
+
currentLocale: Locale;
|
|
444
|
+
__internal: {
|
|
445
|
+
i18next: i18n;
|
|
446
|
+
};
|
|
447
|
+
changeLocale: (newLocale: string) => Promise<void>;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* @internal
|
|
451
|
+
* @hidden
|
|
452
|
+
*/
|
|
453
|
+
declare const LocaleContext: react.Context<LocaleContextValue | undefined>;
|
|
454
|
+
/** @internal */
|
|
455
|
+
type MediaLibraryIds = {
|
|
456
|
+
libraryId: string;
|
|
457
|
+
organizationId: string;
|
|
458
|
+
};
|
|
459
|
+
/** @internal */
|
|
460
|
+
declare const MediaLibraryIdsContext: react.Context<MediaLibraryIds | null>;
|
|
461
|
+
/**
|
|
462
|
+
* @internal
|
|
463
|
+
*/
|
|
464
|
+
declare const MentionUserContext: react.Context<MentionUserContextValue | null>;
|
|
465
|
+
/** @internal */
|
|
466
|
+
declare const NavbarContext: react.Context<NavbarContextValue>;
|
|
467
|
+
/**
|
|
468
|
+
* @hidden
|
|
469
|
+
* @internal
|
|
470
|
+
*/
|
|
471
|
+
type PackageVersionInfoContextValue = {
|
|
472
|
+
/**
|
|
473
|
+
* Request a new update check
|
|
474
|
+
*/
|
|
475
|
+
checkForUpdates: () => void;
|
|
476
|
+
/**
|
|
477
|
+
* Status of version check (i.e. are we currently checking for updates)
|
|
478
|
+
*/
|
|
479
|
+
versionCheckStatus: {
|
|
480
|
+
lastCheckedAt: Date | null;
|
|
481
|
+
checking: boolean;
|
|
482
|
+
};
|
|
483
|
+
/**
|
|
484
|
+
* Whether this Studio is configured to be auto-updating
|
|
485
|
+
*/
|
|
486
|
+
isAutoUpdating: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* If an importmap for the sanity module exists in the DOM, includes details
|
|
489
|
+
* will be undefined if no importmap is found
|
|
490
|
+
*/
|
|
491
|
+
importMapInfo?: {
|
|
492
|
+
valid: false;
|
|
493
|
+
error: Error;
|
|
494
|
+
} | {
|
|
495
|
+
valid: true;
|
|
496
|
+
minVersion: SemVer;
|
|
497
|
+
appId?: string;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* What is the version tagged as latest (periodically checked)
|
|
501
|
+
*/
|
|
502
|
+
latestTaggedVersion?: SemVer;
|
|
503
|
+
/**
|
|
504
|
+
* What version is the Studio currently running
|
|
505
|
+
*/
|
|
506
|
+
currentVersion: SemVer;
|
|
507
|
+
/**
|
|
508
|
+
* What is the current auto-updating version (as periodically resolved via module server and configured via manage)
|
|
509
|
+
*/
|
|
510
|
+
autoUpdatingVersion?: SemVer;
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
* @hidden
|
|
515
|
+
* @internal
|
|
516
|
+
*/
|
|
517
|
+
declare const PackageVersionInfoContext: react.Context<PackageVersionInfoContextValue>;
|
|
518
|
+
/**
|
|
519
|
+
* @internal
|
|
520
|
+
*/
|
|
521
|
+
declare const PaneContext: react.Context<PaneContextValue | null>;
|
|
522
|
+
/**
|
|
523
|
+
* @internal
|
|
524
|
+
*/
|
|
525
|
+
declare const PaneLayoutContext: react.Context<PaneLayoutContextValue | null>;
|
|
526
|
+
/**
|
|
527
|
+
*
|
|
528
|
+
* @hidden
|
|
529
|
+
* @beta
|
|
530
|
+
*/
|
|
531
|
+
declare const PaneRouterContext: react.Context<PaneRouterContextValue>;
|
|
532
|
+
/**
|
|
533
|
+
*
|
|
534
|
+
* @hidden
|
|
535
|
+
* @beta
|
|
536
|
+
*/
|
|
537
|
+
declare const PerspectiveContext: react.Context<PerspectiveContextValue | null>;
|
|
538
|
+
/**
|
|
539
|
+
* @internal
|
|
540
|
+
*/
|
|
541
|
+
declare const PortableTextMarkersContext: react.Context<PortableTextMarker[]>;
|
|
542
|
+
/** @internal */
|
|
543
|
+
type PortableTextEditorElement = HTMLDivElement | HTMLSpanElement;
|
|
544
|
+
/**
|
|
545
|
+
* @internal
|
|
546
|
+
*/
|
|
547
|
+
declare const PortableTextMemberItemElementRefsContext: react.Context<BehaviorSubject<Record<string, PortableTextEditorElement | null | undefined>>>;
|
|
548
|
+
/**
|
|
549
|
+
* @internal
|
|
550
|
+
*/
|
|
551
|
+
declare const PortableTextMemberItemsContext: react.Context<PortableTextMemberItem[]>;
|
|
552
|
+
/**
|
|
553
|
+
* Context for Sanity-specific schema types for Portable Text.
|
|
554
|
+
* This provides access to the full Sanity schema types instead of relying on
|
|
555
|
+
* `editor.schemaTypes` from PTE, which will contain minimal PT schema types
|
|
556
|
+
* when PTE removes its Sanity dependencies.
|
|
557
|
+
*
|
|
558
|
+
* @internal
|
|
559
|
+
*/
|
|
560
|
+
declare const PortableTextMemberSchemaTypesContext: react.Context<PortableTextMemberSchemaTypes | null>;
|
|
561
|
+
/**
|
|
562
|
+
* @internal
|
|
563
|
+
*/
|
|
564
|
+
declare const PresenceContext: react.Context<FormNodePresence[]>;
|
|
565
|
+
/**
|
|
566
|
+
* @internal
|
|
567
|
+
* @hidden
|
|
568
|
+
*/
|
|
569
|
+
type PresenceTrackerContextStoreType = TrackerContextStore<FieldPresenceData> | null;
|
|
570
|
+
/**
|
|
571
|
+
* @internal
|
|
572
|
+
* @hidden
|
|
573
|
+
*/
|
|
574
|
+
type PresenceTrackerGetSnapshotType = TrackerContextGetSnapshot<FieldPresenceData> | null;
|
|
575
|
+
/** @internal */
|
|
576
|
+
declare const PresenceTrackerContextStore: react.Context<PresenceTrackerContextStoreType>;
|
|
577
|
+
/** @internal */
|
|
578
|
+
declare const PresenceTrackerContextGetSnapshot: react.Context<PresenceTrackerGetSnapshotType>;
|
|
579
|
+
/**
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
declare const PresentationContext: react.Context<PresentationContextValue | null>;
|
|
583
|
+
/** @internal */
|
|
584
|
+
type PresentationDisplayedDocumentContextValue = (displayed: Partial<SanityDocument$2> | null | undefined) => void;
|
|
585
|
+
/**
|
|
586
|
+
* @internal
|
|
587
|
+
*/
|
|
588
|
+
declare const PresentationDisplayedDocumentContext: react.Context<PresentationDisplayedDocumentContextValue | null>;
|
|
589
|
+
interface PresentationDocumentContextValue {
|
|
590
|
+
options: PresentationPluginOptions[];
|
|
591
|
+
register: (options: PresentationPluginOptions) => () => void;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* @internal
|
|
595
|
+
*/
|
|
596
|
+
declare const PresentationDocumentContext: react.Context<PresentationDocumentContextValue | null>;
|
|
597
|
+
/**
|
|
598
|
+
* @internal
|
|
599
|
+
*/
|
|
600
|
+
declare const PresentationNavigateContext: react.Context<PresentationNavigateContextValue | null>;
|
|
601
|
+
interface PanelElement {
|
|
602
|
+
id: string;
|
|
603
|
+
type: 'panel';
|
|
604
|
+
defaultSize: number | null;
|
|
605
|
+
order: number;
|
|
606
|
+
maxWidth: number | null;
|
|
607
|
+
minWidth: number;
|
|
608
|
+
}
|
|
609
|
+
interface ResizerElement {
|
|
610
|
+
id: string;
|
|
611
|
+
order: number;
|
|
612
|
+
type: 'resizer';
|
|
613
|
+
el: RefObject<HTMLDivElement | null>;
|
|
614
|
+
}
|
|
615
|
+
interface PresentationPanelsContextValue {
|
|
616
|
+
activeResizer: string | null;
|
|
617
|
+
drag: (id: string, event: MouseEvent) => void;
|
|
618
|
+
getPanelStyle: (id: string) => React.CSSProperties;
|
|
619
|
+
registerElement: (id: string, panel: PanelElement | ResizerElement) => void;
|
|
620
|
+
startDragging: (id: string, event: MouseEvent) => void;
|
|
621
|
+
stopDragging: () => void;
|
|
622
|
+
unregisterElement: (id: string) => void;
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* @internal
|
|
626
|
+
*/
|
|
627
|
+
declare const PresentationPanelsContext: react.Context<PresentationPanelsContextValue | null>;
|
|
628
|
+
/**
|
|
629
|
+
* @internal
|
|
630
|
+
*/
|
|
631
|
+
declare const PresentationParamsContext: react.Context<PresentationParamsContextValue | null>;
|
|
632
|
+
interface PresentationSharedStateContextValue {
|
|
633
|
+
removeValue: (key: string) => void;
|
|
634
|
+
setValue: (key: string, value: Serializable) => void;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* @internal
|
|
638
|
+
*/
|
|
639
|
+
declare const PresentationSharedStateContext: react.Context<PresentationSharedStateContextValue | null>;
|
|
640
|
+
/**
|
|
641
|
+
* @internal
|
|
642
|
+
*/
|
|
643
|
+
declare const PreviewCardContext: react.Context<PreviewCardContextValue>;
|
|
644
|
+
/**
|
|
645
|
+
* @internal
|
|
646
|
+
*/
|
|
647
|
+
declare const ReferenceInputOptionsContext: react.Context<ReferenceInputOptions>;
|
|
648
|
+
/**
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
651
|
+
interface ReferenceItemRef {
|
|
652
|
+
menuRef: MutableRefObject<HTMLDivElement | null>;
|
|
653
|
+
menuButtonRef: MutableRefObject<HTMLButtonElement | null>;
|
|
654
|
+
containerRef: MutableRefObject<HTMLDivElement | null>;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* This is a way to store ref of the menu as well as the container of the ReferenceItem
|
|
658
|
+
* so it can be used down the tree for clickOutside handling
|
|
659
|
+
* @internal
|
|
660
|
+
*/
|
|
661
|
+
declare const ReferenceItemRefContext: react.Context<ReferenceItemRef | null>;
|
|
662
|
+
/**
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
665
|
+
interface ReleasesMetadataContextValue {
|
|
666
|
+
state: MetadataWrapper;
|
|
667
|
+
addReleaseIdsToListener: (slugs: string[]) => void;
|
|
668
|
+
removeReleaseIdsFromListener: (slugs: string[]) => void;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* @internal
|
|
672
|
+
* @hidden
|
|
673
|
+
*/
|
|
674
|
+
declare const ReleasesMetadataContext: react.Context<ReleasesMetadataContextValue | null>;
|
|
675
|
+
type SortDirection = 'asc' | 'desc';
|
|
676
|
+
interface TableSort {
|
|
677
|
+
column: string;
|
|
678
|
+
direction: SortDirection;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* @internal
|
|
682
|
+
*/
|
|
683
|
+
interface TableContextValue {
|
|
684
|
+
searchTerm: string | null;
|
|
685
|
+
setSearchTerm: (searchTerm: string) => void;
|
|
686
|
+
sort: TableSort | null;
|
|
687
|
+
setSortColumn: (column: string) => void;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* @internal
|
|
691
|
+
*/
|
|
692
|
+
declare const TableContext: react.Context<TableContextValue | null>;
|
|
693
|
+
/**
|
|
694
|
+
* @beta
|
|
695
|
+
* @hidden
|
|
696
|
+
*/
|
|
697
|
+
declare const ReleasesUpsellContext: react.Context<ReleasesUpsellContextValue | null>;
|
|
698
|
+
declare const LOADING_PANE: unique symbol;
|
|
699
|
+
interface PaneData {
|
|
700
|
+
active: boolean;
|
|
701
|
+
childItemId: string | null;
|
|
702
|
+
groupIndex: number;
|
|
703
|
+
index: number;
|
|
704
|
+
itemId: string;
|
|
705
|
+
key: string;
|
|
706
|
+
pane: PaneNode | typeof LOADING_PANE;
|
|
707
|
+
params: Record<string, string | undefined> & {
|
|
708
|
+
perspective?: string;
|
|
709
|
+
};
|
|
710
|
+
path: string;
|
|
711
|
+
payload: unknown;
|
|
712
|
+
selected: boolean;
|
|
713
|
+
siblingIndex: number;
|
|
714
|
+
maximized: boolean;
|
|
715
|
+
}
|
|
716
|
+
interface Panes {
|
|
717
|
+
paneDataItems: PaneData[];
|
|
718
|
+
routerPanes: RouterPanes;
|
|
719
|
+
resolvedPanes: (PaneNode | typeof LOADING_PANE)[];
|
|
720
|
+
maximizedPane: PaneData | null;
|
|
721
|
+
setMaximizedPane: (pane: PaneData | null) => void;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* @internal
|
|
725
|
+
*/
|
|
726
|
+
declare const ResolvedPanesContext: react.Context<Panes | null>;
|
|
727
|
+
/**
|
|
728
|
+
* @internal
|
|
729
|
+
*/
|
|
730
|
+
declare function ResolvedPanesProvider({
|
|
731
|
+
children,
|
|
732
|
+
value
|
|
733
|
+
}: {
|
|
734
|
+
children: ReactNode;
|
|
735
|
+
value: Panes;
|
|
736
|
+
}): react.JSX.Element;
|
|
737
|
+
/**
|
|
738
|
+
* @internal
|
|
739
|
+
*/
|
|
740
|
+
declare const ResourceCacheContext: react.Context<ResourceCache | null>;
|
|
741
|
+
/** @internal */
|
|
742
|
+
declare const ReviewChangesContext: react.Context<ConnectorContextValue>;
|
|
743
|
+
/**
|
|
744
|
+
* @internal
|
|
745
|
+
*/
|
|
746
|
+
declare const RouterContext: react.Context<RouterContextValue | null>;
|
|
747
|
+
/**
|
|
748
|
+
* Internal use only. Userland should leverage the public `useRouter` APIs.
|
|
749
|
+
* @internal
|
|
750
|
+
*/
|
|
751
|
+
declare const RouterHistoryContext: react.Context<RouterHistory | null>;
|
|
752
|
+
/**
|
|
753
|
+
* @internal
|
|
754
|
+
*/
|
|
755
|
+
declare const SanityCreateConfigContext: react.Context<SanityCreateConfigContextValue>;
|
|
756
|
+
interface HasUsedScheduledPublishing {
|
|
757
|
+
used: boolean;
|
|
758
|
+
loading: boolean;
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* @internal
|
|
762
|
+
*/
|
|
763
|
+
type ScheduledPublishingEnabledContextValue = {
|
|
764
|
+
enabled: false;
|
|
765
|
+
mode: null;
|
|
766
|
+
hasUsedScheduledPublishing: HasUsedScheduledPublishing;
|
|
767
|
+
} | {
|
|
768
|
+
enabled: true;
|
|
769
|
+
mode: 'default' | 'upsell';
|
|
770
|
+
hasUsedScheduledPublishing: HasUsedScheduledPublishing;
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* @internal
|
|
774
|
+
*/
|
|
775
|
+
declare const ScheduledPublishingEnabledContext: react.Context<ScheduledPublishingEnabledContextValue>;
|
|
776
|
+
/**
|
|
777
|
+
* @internal
|
|
778
|
+
*/
|
|
779
|
+
interface SchedulePublishUpsellContextValue {
|
|
780
|
+
upsellDialogOpen: boolean;
|
|
781
|
+
handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void;
|
|
782
|
+
handleClose: () => void;
|
|
783
|
+
upsellData: UpsellData | null;
|
|
784
|
+
telemetryLogs: {
|
|
785
|
+
dialogSecondaryClicked: () => void;
|
|
786
|
+
dialogPrimaryClicked: () => void;
|
|
787
|
+
panelViewed: (source: UpsellDialogViewedInfo['source']) => void;
|
|
788
|
+
panelDismissed: () => void;
|
|
789
|
+
panelPrimaryClicked: () => void;
|
|
790
|
+
panelSecondaryClicked: () => void;
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* @internal
|
|
795
|
+
*/
|
|
796
|
+
declare const SchedulePublishUpsellContext: react.Context<SchedulePublishUpsellContextValue>;
|
|
797
|
+
/**
|
|
798
|
+
* @deprecated we will be dropping support for scheduled publishing on a future major version
|
|
799
|
+
* @internal
|
|
800
|
+
*/
|
|
801
|
+
declare const SchedulesContext: react.Context<SchedulesContextValue | undefined>;
|
|
802
|
+
/**
|
|
803
|
+
* @internal
|
|
804
|
+
*/
|
|
805
|
+
declare const ScrollContext: react.Context<PubSub<Event> | null>;
|
|
806
|
+
/**
|
|
807
|
+
* @internal
|
|
808
|
+
*/
|
|
809
|
+
declare const SearchContext: react.Context<SearchContextValue | undefined>;
|
|
810
|
+
/**
|
|
811
|
+
* Entry representing a selected annotation for the combined popover
|
|
812
|
+
* @internal
|
|
813
|
+
*/
|
|
814
|
+
interface AnnotationEntry {
|
|
815
|
+
key: string;
|
|
816
|
+
title: string;
|
|
817
|
+
schemaType: ObjectSchemaType;
|
|
818
|
+
onOpen: () => void;
|
|
819
|
+
onRemove: () => void;
|
|
820
|
+
referenceElement: HTMLElement | null;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Context value for tracking selected annotations
|
|
824
|
+
* @internal
|
|
825
|
+
*/
|
|
826
|
+
interface SelectedAnnotationsContextValue {
|
|
827
|
+
register: (entry: AnnotationEntry) => void;
|
|
828
|
+
unregister: (key: string) => void;
|
|
829
|
+
annotations: AnnotationEntry[];
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Context for managing selected annotations in the Portable Text editor.
|
|
833
|
+
* Used by CombinedAnnotationPopover to show all active annotations in a single popover.
|
|
834
|
+
* @internal
|
|
835
|
+
*/
|
|
836
|
+
declare const SelectedAnnotationsContext: react.Context<SelectedAnnotationsContextValue | null>;
|
|
837
|
+
/**
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
interface SingleDocReleaseContextValue {
|
|
841
|
+
/**
|
|
842
|
+
* Sets the scheduled draft perspective into the local router params.
|
|
843
|
+
*/
|
|
844
|
+
onSetScheduledDraftPerspective: (releaseId: string) => void;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* @internal
|
|
848
|
+
*/
|
|
849
|
+
declare const SingleDocReleaseContext: react.Context<SingleDocReleaseContextValue | null>;
|
|
850
|
+
/**
|
|
851
|
+
* @internal
|
|
852
|
+
*/
|
|
853
|
+
type SingleDocReleaseEnabledContextValue = {
|
|
854
|
+
enabled: false;
|
|
855
|
+
mode: null;
|
|
856
|
+
} | {
|
|
857
|
+
enabled: true;
|
|
858
|
+
mode: 'default' | 'upsell';
|
|
859
|
+
};
|
|
860
|
+
/**
|
|
861
|
+
* @internal
|
|
862
|
+
*/
|
|
863
|
+
declare const SingleDocReleaseEnabledContext: react.Context<SingleDocReleaseEnabledContextValue>;
|
|
864
|
+
/**
|
|
865
|
+
* @internal
|
|
866
|
+
*/
|
|
867
|
+
interface SingleDocReleaseUpsellContextValue {
|
|
868
|
+
upsellDialogOpen: boolean;
|
|
869
|
+
handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void;
|
|
870
|
+
handleClose: () => void;
|
|
871
|
+
upsellData: UpsellData | null;
|
|
872
|
+
telemetryLogs: {
|
|
873
|
+
dialogSecondaryClicked: () => void;
|
|
874
|
+
dialogPrimaryClicked: () => void;
|
|
875
|
+
panelViewed: (source: UpsellDialogViewedInfo['source']) => void;
|
|
876
|
+
panelDismissed: () => void;
|
|
877
|
+
panelPrimaryClicked: () => void;
|
|
878
|
+
panelSecondaryClicked: () => void;
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* @internal
|
|
883
|
+
*/
|
|
884
|
+
declare const SingleDocReleaseUpsellContext: react.Context<SingleDocReleaseUpsellContextValue>;
|
|
885
|
+
/**
|
|
886
|
+
* @internal
|
|
887
|
+
*/
|
|
888
|
+
declare const SortableItemIdContext: react.Context<string | null>;
|
|
889
|
+
/**
|
|
890
|
+
* @internal
|
|
891
|
+
*/
|
|
892
|
+
declare const SourceContext: react.Context<Source$1 | null>;
|
|
893
|
+
/**
|
|
894
|
+
* @internal
|
|
895
|
+
*/
|
|
896
|
+
declare const StructureToolContext: react.Context<StructureToolContextValue | null>;
|
|
897
|
+
/**
|
|
898
|
+
* @internal
|
|
899
|
+
*/
|
|
900
|
+
declare const StudioAnnouncementContext: react.Context<StudioAnnouncementsContextValue | undefined>;
|
|
901
|
+
/**
|
|
902
|
+
* @internal
|
|
903
|
+
*/
|
|
904
|
+
declare const TasksContext: react.Context<TasksContextValue | null>;
|
|
905
|
+
/**
|
|
906
|
+
* @internal
|
|
907
|
+
*/
|
|
908
|
+
declare const TasksEnabledContext: react.Context<TasksEnabledContextValue>;
|
|
909
|
+
/**
|
|
910
|
+
* @internal
|
|
911
|
+
*/
|
|
912
|
+
declare const TasksNavigationContext: react.Context<TasksNavigationContextValue | null>;
|
|
913
|
+
/**
|
|
914
|
+
* @beta
|
|
915
|
+
* @hidden
|
|
916
|
+
*/
|
|
917
|
+
declare const TasksUpsellContext: react.Context<TasksUpsellContextValue | null>;
|
|
918
|
+
/**
|
|
919
|
+
* @internal
|
|
920
|
+
*/
|
|
921
|
+
declare const UserApplicationCacheContext: react.Context<UserApplicationCache | null>;
|
|
922
|
+
/**
|
|
923
|
+
* @internal
|
|
924
|
+
*/
|
|
925
|
+
declare const UserColorManagerContext: react.Context<UserColorManager | null>;
|
|
926
|
+
/**
|
|
927
|
+
* @internal
|
|
928
|
+
*/
|
|
929
|
+
declare const ValidationContext: react.Context<ValidationMarker[]>;
|
|
930
|
+
/**
|
|
931
|
+
* This is used to store the reference to the scroll element for virtualizer
|
|
932
|
+
* @internal
|
|
933
|
+
*/
|
|
934
|
+
declare const VirtualizerScrollInstanceContext: react.Context<VirtualizerScrollInstance | null>;
|
|
935
|
+
/**
|
|
936
|
+
* @internal
|
|
937
|
+
*/
|
|
938
|
+
declare const WorkspaceContext: react.Context<Workspace | null>;
|
|
939
|
+
/** @internal */
|
|
940
|
+
declare const WorkspacesContext: react.Context<WorkspacesContextValue | null>;
|
|
941
|
+
/**
|
|
942
|
+
* @internal
|
|
943
|
+
*/
|
|
944
|
+
declare const zIndexContextDefaults: ZIndexContextValue;
|
|
945
|
+
/**
|
|
946
|
+
* TODO: Rename to `ZOffsetsContext`
|
|
947
|
+
*
|
|
948
|
+
* @internal
|
|
949
|
+
*/
|
|
950
|
+
declare const ZIndexContext: react.Context<ZIndexContextValue>;
|
|
951
|
+
export { ActiveWorkspaceMatcherContext, AddonDatasetContext, AnnotationEntry, AppIdCacheContext, ArrayValidationContext, AssetLimitUpsellContext, AssetLimitUpsellContextValue, CalendarContext, ChangeIndicatorTrackerContextGetSnapshot, ChangeIndicatorTrackerContextStore, ColorSchemeSetValueContext, ColorSchemeValueContext, CommentInputContext, CommentsAuthoringPathContext, CommentsContext, CommentsEnabledContext, CommentsIntentContext, CommentsOnboardingContext, CommentsSelectedPathContext, CommentsUpsellContext, CopyPasteContext, DialogStackContext, DialogStackContextValue, DialogStackEntry, DiffContext, DocumentActionPropsContext, DocumentActionsStateContext, DocumentChangeContext, DocumentDivergencesContext, DocumentDivergencesContextValue, DocumentFieldActionsContext, DocumentFieldActionsContextValue, DocumentIdContext, DocumentIdContextValue, DocumentLimitUpsellContext, DocumentLimitUpsellContextValue, DocumentPaneContext, DocumentPaneInfoContext, DocumentSheetListContext, EnhancedObjectDialogContext, EventsContext, FieldActionsContext, FieldActionsContextValue, FormBuilderContext, FormCallbacksContext, FormFieldPresenceContext, FormValueContext, FreeTrialContext, FullscreenPTEContext, GetFormValueContext, GetFormValueContextValue, HoveredFieldContext, HoveredFieldContextValue, IsLastPaneContext, LiveUserApplicationContext, LiveUserApplicationContextValue, LocaleContext, LocaleContextValue, MediaLibraryIdsContext, MentionUserContext, NavbarContext, PackageVersionInfoContext, PackageVersionInfoContextValue, PaneContext, PaneLayoutContext, PaneRouterContext, PerspectiveContext, PortableTextEditorElement, PortableTextMarkersContext, PortableTextMemberItemElementRefsContext, PortableTextMemberItemsContext, PortableTextMemberSchemaTypesContext, PresenceContext, PresenceTrackerContextGetSnapshot, PresenceTrackerContextStore, PresentationContext, PresentationDisplayedDocumentContext, PresentationDocumentContext, PresentationNavigateContext, PresentationPanelsContext, PresentationParamsContext, PresentationSharedStateContext, PreviewCardContext, ReferenceInputOptionsContext, ReferenceItemRef, ReferenceItemRefContext, ReleasesMetadataContext, ReleasesUpsellContext, ResolvedPanesContext, ResolvedPanesProvider, ResourceCacheContext, ReviewChangesContext, RouterContext, RouterHistoryContext, SanityCreateConfigContext, SchedulePublishUpsellContext, SchedulePublishUpsellContextValue, ScheduledPublishingEnabledContext, ScheduledPublishingEnabledContextValue, SchedulesContext, ScrollContext, SearchContext, SelectedAnnotationsContext, SelectedAnnotationsContextValue, SingleDocReleaseContext, SingleDocReleaseContextValue, SingleDocReleaseEnabledContext, SingleDocReleaseEnabledContextValue, SingleDocReleaseUpsellContext, SingleDocReleaseUpsellContextValue, SortableItemIdContext, SourceContext, StructureToolContext, StudioAnnouncementContext, TableContext, TasksContext, TasksEnabledContext, TasksNavigationContext, TasksUpsellContext, UserApplicationCacheContext, UserColorManagerContext, ValidationContext, VirtualizerScrollInstanceContext, WorkspaceContext, WorkspacesContext, ZIndexContext, zIndexContextDefaults };
|