@tinacms/toolkit
Version:
Tina is a lightweight but powerful toolkit for creating a site editing ui with javascript components. Tina surfaces superpowers for dev’s to create, expand on and customize a simple yet intuitive ui for editing content.
36 lines (34 loc) • 1.23 kB
TypeScript
/**
*/
/// <reference types="react" />
import { CMS, CMSConfig, PluginType } from './packages/core';
import { FieldPlugin } from './packages/form-builder';
import { ScreenPlugin } from './packages/react-screens';
import { Form } from './packages/forms';
import { Alerts, EventsToAlerts } from './packages/alerts';
import { SidebarState, SidebarStateOptions } from './packages/react-sidebar';
import { TinaAction, TinaState } from './tina-state';
export interface TinaCMSConfig extends CMSConfig {
sidebar?: SidebarStateOptions | boolean;
alerts?: EventsToAlerts;
isLocalClient?: boolean;
clientId?: string;
}
export declare class TinaCMS extends CMS {
sidebar?: SidebarState;
_alerts?: Alerts;
state: TinaState;
dispatch: React.Dispatch<TinaAction>;
constructor({ sidebar, alerts, isLocalClient, clientId, ...config }?: TinaCMSConfig);
get alerts(): Alerts;
registerApi(name: string, api: any): void;
get forms(): PluginType<Form>;
get fields(): PluginType<FieldPlugin>;
get screens(): PluginType<ScreenPlugin>;
removeAllForms(): void;
/**
* When a form is associated with any queries
* it's considered orphaned.
*/
removeOrphanedForms(): void;
}