sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
278 lines (277 loc) • 15.5 kB
JavaScript
import { createContext } from "sanity/_createContext";
import { BehaviorSubject } from "rxjs";
import { jsx } from "react/jsx-runtime";
import { c } from "react/compiler-runtime";
const ActiveWorkspaceMatcherContext = createContext("sanity/_singletons/context/active-workspace-matcher", null), AddonDatasetContext = createContext("sanity/_singletons/context/addon-dataset", null), AppIdCacheContext = createContext("sanity/_singletons/context/app-id-cache", null), AssetLimitUpsellContext = createContext("sanity/_singletons/context/asset-limit-upsell", null), CalendarContext = createContext("sanity/_singletons/context/calendar", void 0), ChangeIndicatorTrackerContextStore = createContext("sanity/_singletons/context/change-indicator-tracker-store", null), ChangeIndicatorTrackerContextGetSnapshot = createContext("sanity/_singletons/context/change-indicator-tracker-get-snapshot", null), ColorSchemeSetValueContext = createContext("sanity/_singletons/context/color-scheme-set-value", null), ColorSchemeValueContext = createContext("sanity/_singletons/context/color-scheme-value", null), CommentInputContext = createContext("sanity/_singletons/context/comment-input", null), CommentsAuthoringPathContext = createContext("sanity/_singletons/context/comments-authoring-path", null), CommentsContext = createContext("sanity/_singletons/context/comments", null), CommentsEnabledContext = createContext("sanity/_singletons/context/comments-enabled", {
enabled: !1,
mode: null
}), CommentsIntentContext = createContext("sanity/_singletons/context/comments-intent", void 0), CommentsOnboardingContext = createContext("sanity/_singletons/context/comments-onboarding", null), CommentsSelectedPathContext = createContext("sanity/_singletons/context/comments-selected-path", null), CommentsUpsellContext = createContext("sanity/_singletons/context/comments-upsell", null), CopyPasteContext = createContext("sanity/_singletons/context/copy-paste", null), DiffContext = createContext("sanity/_singletons/context/diff", {
path: []
}), DocumentActionPropsContext = createContext("sanity/_singletons/context/document-action-props", void 0), DocumentActionsStateContext = createContext("sanity/_singletons/context/actions-state", null), DocumentChangeContext = createContext("sanity/_singletons/context/document-change", null), DocumentFieldActionsContext = createContext("sanity/_singletons/context/document-field-actions", null), DocumentIdContext = createContext("sanity/_singletons/context/document-id", null), DocumentLimitUpsellContext = createContext("sanity/_singletons/context/document-limit-upsell", null), DocumentPaneContext = createContext("sanity/_singletons/context/document-pane", null), DocumentSheetListContext = createContext("sanity/_singletons/context/document-sheet-list", void 0), EnhancedObjectDialogContext = createContext("sanity/_singletons/context/enhanced-object-dialog-enabled", {
enabled: !1,
isDialogAvailable: !1,
legacyEditing: !1
}), EventsContext = createContext("sanity/_singletons/context/events", null), FieldActionsContext = createContext("sanity/_singletons/context/field-actions", {
actions: [],
focused: !1,
hovered: !1,
// eslint-disable-next-line camelcase
__internal_slot: void 0,
// eslint-disable-next-line camelcase
__internal_comments: void 0,
onMouseEnter: () => {
},
onMouseLeave: () => {
}
}), FormBuilderContext = createContext("sanity/_singletons/context/form-builder", null), FormCallbacksContext = createContext("sanity/_singletons/context/form-callbacks", null), FormFieldPresenceContext = createContext("sanity/_singletons/context/form-field-presence", []), FormValueContext = createContext("sanity/_singletons/context/form-value", null), FreeTrialContext = createContext("sanity/_singletons/context/free-trial", void 0), FullscreenPTEContext = createContext("sanity/_singletons/context/fullscreen-pte", {
getFullscreenPath: () => {
},
setFullscreenPath: () => {
},
hasAnyFullscreen: () => !1,
allFullscreenPaths: []
}), GetFormValueContext = createContext("sanity/_singletons/context/get-form-value", null), HoveredFieldContext = createContext("sanity/_singletons/context/hovered-field", {
store: {
subscribe: () => () => {
},
getSnapshot: () => []
},
onMouseEnter: () => {
},
onMouseLeave: () => {
}
}), IsLastPaneContext = createContext("sanity/_singletons/context/is-last-pane", !1), LiveUserApplicationContext = createContext("sanity/_singletons/context/live-user-application", {
userApplication: void 0
}), LocaleContext = createContext("sanity/_singletons/context/locale", void 0), MediaLibraryIdsContext = createContext("sanity/_singletons/context/media-library", null), MentionUserContext = createContext("sanity/_singletons/context/mention-user", null), NavbarContext = createContext("sanity/_singletons/context/navbar", {
onSearchFullscreenOpenChange: () => "",
onSearchOpenChange: () => "",
searchFullscreenOpen: !1,
searchFullscreenPortalEl: null,
searchOpen: !1
}), PackageVersionInfoContext = createContext("sanity/_singletons/context/package-version-info", {
isAutoUpdating: !1,
checkForUpdates: () => {
},
get currentVersion() {
throw new Error("PackageVersionInfoContext not provided");
},
versionCheckStatus: {
lastCheckedAt: null,
checking: !1
}
}), PaneContext = createContext("sanity/_singletons/context/pane", null), PaneLayoutContext = createContext("sanity/_singletons/context/pane-layout", null);
function missingContext() {
throw new Error("Pane is missing router context");
}
const PaneRouterContext = createContext("sanity/_singletons/context/pane-router", {
index: 0,
groupIndex: 0,
siblingIndex: 0,
payload: void 0,
params: {},
hasGroupSiblings: !1,
groupLength: 0,
routerPanesState: [],
BackLink: () => missingContext(),
ChildLink: () => missingContext(),
ReferenceChildLink: () => missingContext(),
handleEditReference: () => missingContext(),
ParameterizedLink: () => missingContext(),
replaceCurrent: () => missingContext(),
closeCurrentAndAfter: () => missingContext(),
closeCurrent: () => missingContext(),
duplicateCurrent: () => missingContext(),
setView: () => missingContext(),
setParams: () => missingContext(),
setPayload: () => missingContext(),
navigateIntent: () => missingContext(),
createPathWithParams: () => missingContext()
}), PerspectiveContext = createContext("sanity/_singletons/context/perspective-context", null), PortableTextMarkersContext = createContext("sanity/_singletons/context/portable-text-markers", []), PortableTextMemberItemElementRefsContext = createContext("sanity/_singletons/context/portable-text-member-item-element-refs", new BehaviorSubject({})), PortableTextMemberItemsContext = createContext("sanity/_singletons/context/portable-text-member-items", []), PresenceContext = createContext("sanity/_singletons/context/presence", []), PresenceTrackerContextStore = createContext("sanity/_singletons/context/presence-tracker-store", null), PresenceTrackerContextGetSnapshot = createContext("sanity/_singletons/context/presence-tracker-get-snapshot", null), PresentationContext = createContext("sanity/_singletons/context/presentation", null), PresentationDisplayedDocumentContext = createContext("sanity/_singletons/context/presentation/displayed-document", null), PresentationDocumentContext = createContext("sanity/_singletons/context/presentation/document", null), PresentationNavigateContext = createContext("sanity/_singletons/context/presentation/navigate", null), PresentationPanelsContext = createContext("sanity/_singletons/context/presentation/panels", null), PresentationParamsContext = createContext("sanity/_singletons/context/presentation/params", null), PresentationSharedStateContext = createContext("sanity/_singletons/context/presentation/shared-state", null), PreviewCardContext = createContext("sanity/_singletons/context/preview-card", {
selected: !1
}), ReferenceInputOptionsContext = createContext("sanity/_singletons/context/reference-input-options", {}), ReferenceItemRefContext = createContext("sanity/_singletons/context/reference-item-ref", null), ReleasesMetadataContext = createContext("sanity/_singletons/context/releases-metadata", null), TableContext = createContext("sanity/_singletons/context/releases-table", null), ReleasesUpsellContext = createContext("sanity/_singletons/context/releases-upsell", null), ResolvedPanesContext = createContext("sanity/_singletons/context/resolved-panes", null);
function ResolvedPanesProvider(t0) {
const $ = c(3), {
children,
value
} = t0;
let t1;
return $[0] !== children || $[1] !== value ? (t1 = /* @__PURE__ */ jsx(ResolvedPanesContext.Provider, { value, children }), $[0] = children, $[1] = value, $[2] = t1) : t1 = $[2], t1;
}
const ResourceCacheContext = createContext("sanity/_singletons/context/resource-cache", null), ReviewChangesContext = createContext("sanity/_singletons/context/review-changes", {
onOpenReviewChanges: () => {
},
onSetFocus: () => {
},
isReviewChangesOpen: !1,
isInteractive: !0
}), RouterContext = createContext("sanity/_singletons/context/router", null), RouterHistoryContext = createContext("sanity/_singletons/context/router-history", null), SanityCreateConfigContext = createContext("sanity/_singletons/context/start-in-create-enabled", {
startInCreateEnabled: !1
}), DEFAULT$1 = {
enabled: !1,
mode: null,
hasUsedScheduledPublishing: {
used: !1,
loading: !1
}
}, ScheduledPublishingEnabledContext = createContext("sanity/_singletons/context/scheduled-publishing-enabled", DEFAULT$1), SchedulePublishUpsellContext = createContext("sanity/_singletons/context/schedule-publish-upsell", {
upsellData: null,
handleOpenDialog: () => null,
handleClose: () => null,
upsellDialogOpen: !1,
telemetryLogs: {
dialogSecondaryClicked: () => null,
dialogPrimaryClicked: () => null,
panelViewed: () => null,
panelDismissed: () => null,
panelPrimaryClicked: () => null,
panelSecondaryClicked: () => null
}
}), SchedulesContext = createContext("sanity/_singletons/context/schedules", void 0), ScrollContext = createContext("sanity/_singletons/context/scroll", null), SearchContext = createContext("sanity/_singletons/context/search", void 0), SingleDocReleaseContext = createContext("sanity/_singletons/context/single-doc-release-context", null), DEFAULT = {
enabled: !1,
mode: null
}, SingleDocReleaseEnabledContext = createContext("sanity/_singletons/context/single-doc-release-enabled", DEFAULT), SingleDocReleaseUpsellContext = createContext("sanity/_singletons/context/single-doc-release-upsell", {
upsellData: null,
handleOpenDialog: () => null,
handleClose: () => null,
upsellDialogOpen: !1,
telemetryLogs: {
dialogSecondaryClicked: () => null,
dialogPrimaryClicked: () => null,
panelViewed: () => null,
panelDismissed: () => null,
panelPrimaryClicked: () => null,
panelSecondaryClicked: () => null
}
}), SortableItemIdContext = createContext("sanity/_singletons/context/sortable-item-id", null), SourceContext = createContext("sanity/_singletons/context/source", null), StructureToolContext = createContext("sanity/_singletons/context/structure-tool", null), StudioAnnouncementContext = createContext("sanity/_singletons/context/studioAnnouncements", void 0), TasksContext = createContext("sanity/_singletons/context/tasks", null), TasksEnabledContext = createContext("sanity/_singletons/context/tasks-enabled", {
enabled: !1,
mode: null
}), TasksNavigationContext = createContext("sanity/_singletons/context/tasks-navigation", null), TasksUpsellContext = createContext("sanity/_singletons/context/tasks-upsell", null), UserApplicationCacheContext = createContext("sanity/_singletons/context/user-application-cache", null), UserColorManagerContext = createContext("sanity/_singletons/context/user-color-manager", null), ValidationContext = createContext("sanity/_singletons/context/validation", []), VirtualizerScrollInstanceContext = createContext("sanity/_singletons/context/virtualizer-scroll-instance", null), WorkspaceContext = createContext("sanity/_singletons/context/workspace", null), WorkspacesContext = createContext("sanity/_singletons/context/workspaces", null), zIndexContextDefaults = {
navbar: 200,
navbarPopover: 5e5,
navbarDialog: 500001,
// pane
pane: 100,
paneHeader: [110, 15e3],
paneFooter: [120, 2e4],
paneResizer: [130, 25e3],
paneDialog: [140, 5e3],
//
popover: 200,
modal: 200,
movingItem: 1e4,
drawershade: 1e6,
drawer: 1000001,
fullscreen: 12e5,
toast: [100, 11e3],
// NOT IN USE
portal: 200,
dropdown: 200,
navbarFixed: 1010,
fullscreenEdit: 1050,
popoverBackground: 1060,
tooltip: 200,
modalBackground: 2e3,
spinner: 3e3
}, ZIndexContext = createContext("sanity/_singletons/context/z-index", zIndexContextDefaults);
export {
ActiveWorkspaceMatcherContext,
AddonDatasetContext,
AppIdCacheContext,
AssetLimitUpsellContext,
CalendarContext,
ChangeIndicatorTrackerContextGetSnapshot,
ChangeIndicatorTrackerContextStore,
ColorSchemeSetValueContext,
ColorSchemeValueContext,
CommentInputContext,
CommentsAuthoringPathContext,
CommentsContext,
CommentsEnabledContext,
CommentsIntentContext,
CommentsOnboardingContext,
CommentsSelectedPathContext,
CommentsUpsellContext,
CopyPasteContext,
DiffContext,
DocumentActionPropsContext,
DocumentActionsStateContext,
DocumentChangeContext,
DocumentFieldActionsContext,
DocumentIdContext,
DocumentLimitUpsellContext,
DocumentPaneContext,
DocumentSheetListContext,
EnhancedObjectDialogContext,
EventsContext,
FieldActionsContext,
FormBuilderContext,
FormCallbacksContext,
FormFieldPresenceContext,
FormValueContext,
FreeTrialContext,
FullscreenPTEContext,
GetFormValueContext,
HoveredFieldContext,
IsLastPaneContext,
LiveUserApplicationContext,
LocaleContext,
MediaLibraryIdsContext,
MentionUserContext,
NavbarContext,
PackageVersionInfoContext,
PaneContext,
PaneLayoutContext,
PaneRouterContext,
PerspectiveContext,
PortableTextMarkersContext,
PortableTextMemberItemElementRefsContext,
PortableTextMemberItemsContext,
PresenceContext,
PresenceTrackerContextGetSnapshot,
PresenceTrackerContextStore,
PresentationContext,
PresentationDisplayedDocumentContext,
PresentationDocumentContext,
PresentationNavigateContext,
PresentationPanelsContext,
PresentationParamsContext,
PresentationSharedStateContext,
PreviewCardContext,
ReferenceInputOptionsContext,
ReferenceItemRefContext,
ReleasesMetadataContext,
ReleasesUpsellContext,
ResolvedPanesContext,
ResolvedPanesProvider,
ResourceCacheContext,
ReviewChangesContext,
RouterContext,
RouterHistoryContext,
SanityCreateConfigContext,
SchedulePublishUpsellContext,
ScheduledPublishingEnabledContext,
SchedulesContext,
ScrollContext,
SearchContext,
SingleDocReleaseContext,
SingleDocReleaseEnabledContext,
SingleDocReleaseUpsellContext,
SortableItemIdContext,
SourceContext,
StructureToolContext,
StudioAnnouncementContext,
TableContext,
TasksContext,
TasksEnabledContext,
TasksNavigationContext,
TasksUpsellContext,
UserApplicationCacheContext,
UserColorManagerContext,
ValidationContext,
VirtualizerScrollInstanceContext,
WorkspaceContext,
WorkspacesContext,
ZIndexContext,
zIndexContextDefaults
};
//# sourceMappingURL=_singletons.js.map