UNPKG

react-view-router

Version:
122 lines (107 loc) 3.62 kB
export let HistoryType = /*#__PURE__*/function (HistoryType) { // eslint-disable-next-line no-unused-vars HistoryType["hash"] = "hash"; // eslint-disable-next-line no-unused-vars HistoryType["browser"] = "browser"; // eslint-disable-next-line no-unused-vars HistoryType["memory"] = "memory"; return HistoryType; }({}); /** * Actions represent the type of change to a location value. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#action */ export let Action = /*#__PURE__*/function (Action) { /** * A POP indicates a change to an arbitrary index in the history stack, such * as a back or forward navigation. It does not describe the direction of the * navigation, only that the current index changed. * * Note: This is the default action for newly created history objects. */ // eslint-disable-next-line no-unused-vars Action["Pop"] = "POP"; /** * A PUSH indicates a new entry being added to the history stack, such as when * a link is clicked and a new page loads. When this happens, all subsequent * entries in the stack are lost. */ // eslint-disable-next-line no-unused-vars Action["Push"] = "PUSH"; /** * A REPLACE indicates the entry at the current index in the history stack * being replaced by a new one. */ // eslint-disable-next-line no-unused-vars Action["Replace"] = "REPLACE"; return Action; }({}); /** * A URL pathname, beginning with a /. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.pathname */ /** * A URL search string, beginning with a ?. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.search */ /** * A URL fragment identifier, beginning with a #. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.hash */ /** * An object that is used to associate some arbitrary data with a location, but * that does not appear in the URL path. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.state */ /** * A unique string associated with a location. May be used to safely store * and retrieve data in some other storage API, like `localStorage`. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location.key */ /** * The pathname, search, and hash values of a URL. */ /** * An entry in a history stack. A location contains information about the * URL path, as well as possibly some arbitrary state and a key. * * @see https://github.com/ReactTraining/history/tree/master/docs/api-reference.md#location */ /** * A partial Path object that may be missing some properties. */ /** * A partial Location object that may be missing some properties. */ /** * A change to the current location. */ /** * A function that receives notifications about location changes. */ /** * A change to the current location that was blocked. May be retried * after obtaining user confirmation. */ /** * A function that receives transitions when navigation is blocked. */ /** * Describes a location that is the destination of some navigation, either via * `history.push` or `history.replace`. May be either a URL or the pieces of a * URL path. */ /** * A history is an interface to the navigation stack. The history serves as the * source of truth for the current location, as well as provides a set of * methods that may be used to change it. * * It is similar to the DOM's `window.history` object, but with a smaller, more * focused API. */