@sanity/desk-tool
Version:
Tool for managing all sorts of content in a structured manner
37 lines (35 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PaneRouterContext = void 0;
var _react = require("react");
function missingContext() {
throw new Error('Pane is missing router context');
}
/**
* @public
*/
var PaneRouterContext = /*#__PURE__*/(0, _react.createContext)({
index: 0,
groupIndex: 0,
siblingIndex: 0,
payload: undefined,
params: {},
hasGroupSiblings: false,
groupLength: 0,
routerPanesState: [],
BackLink: () => missingContext(),
ChildLink: () => missingContext(),
ReferenceChildLink: () => missingContext(),
handleEditReference: () => missingContext(),
ParameterizedLink: () => missingContext(),
replaceCurrent: () => missingContext(),
closeCurrent: () => missingContext(),
duplicateCurrent: () => missingContext(),
setView: () => missingContext(),
setParams: () => missingContext(),
setPayload: () => missingContext(),
navigateIntent: () => missingContext()
});
exports.PaneRouterContext = PaneRouterContext;