@onvo-ai/react
Version:
The react SDK for Onvo AI dashboard builder
57 lines (50 loc) • 1.59 kB
TypeScript
import React, { RefObject } from 'react';
import { Onvo, Team, Account, EmbedUser } from '@onvo-ai/js';
import * as zustand from 'zustand';
type OnvoWrapperContext = {
backend: Onvo | undefined;
team: Team | undefined;
adminMode: boolean;
account: Account | undefined;
embedUser: EmbedUser | undefined;
containerRef: RefObject<HTMLDivElement> | null;
setContainerRef: (ref: RefObject<HTMLDivElement> | null) => void;
googleMapsLoaded: boolean;
};
declare const Wrapper: React.FC<{
token: string;
baseUrl?: string;
children: any;
adminMode?: boolean;
googleMapsApiKey?: string;
}>;
declare const useBackend: () => OnvoWrapperContext;
declare const DashboardList: React.FC<{
onClickItem?: (dashboard: any) => void;
variant?: "list" | "grid";
title?: string;
theme?: "light" | "dark" | "system";
layout?: "default" | "sidebar" | "tabs";
}>;
declare const DashboardWrapper: React.FC<{
id: string;
children: React.ReactNode;
}>;
declare const Dashboard: React.FC<{
id: string;
className?: string;
variant?: "default" | "pdf" | "pptx";
}>;
declare const useCopilot: zustand.UseBoundStore<zustand.StoreApi<{
open: boolean;
variant?: "default" | "modal";
setOpen: (open: boolean) => void;
setVariant: (variant: "default" | "modal") => void;
}>>;
declare const Copilot: React.FC<{
coupled?: boolean;
}>;
declare const CopilotButton: React.FC<{
styles?: any;
}>;
export { Copilot, CopilotButton, Dashboard, DashboardList, DashboardWrapper, Wrapper, useBackend, useCopilot };