UNPKG

tinacms

Version:

[![GitHub license](https://img.shields.io/github/license/tinacms/tinacms?color=blue)](https://github.com/tinacms/tinacms/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/tinacms.svg?style=flat)](https://www.npmjs.com/package/tinacms) [![Bui

33 lines (32 loc) 1.48 kB
import React from 'react'; import { useDocumentCreatorPlugin } from './hooks/use-content-creator'; import type { TinaCMSProviderDefaultProps } from './types/cms'; /** * @deprecated since version 1.0. * Tina no longer requires wrapping your site in the TinaProvider * See https://tina.io/blog/upgrading-to-iframe/ for full migration details */ export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, schema, ...props }: TinaCMSProviderDefaultProps) => React.JSX.Element; export type DocumentCreatorCallback = Parameters<typeof useDocumentCreatorPlugin>[0]; /** * @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/features/data-fetching/#querying-tina-content-in-nextjs for more details * * A convenience function which makes a GraphQL request * to a local GraphQL server and ensures the response fits * the shape expected by Tina context in your application */ export declare const getStaticPropsForTina: ({ query, variables, }: { query: string; variables?: object; }) => Promise<any>; /** * A convenience function which makes a GraphQL request * to a local GraphQL server. Only recommended for functions * which run at build-time like `getStaticProps` or `getStaticPaths` */ export declare const staticRequest: ({ query, variables, }: { /** A GraphQL request string */ query: string; /** GraphQL variables */ variables?: object; }) => Promise<unknown>;