/** @internal */
export type ReactModule = typeof import('react');
/** @internal */
export type ReactDOMRoot = import('react-dom/client').Root;
/**
* Reference to StudioMUI module.
*
* @see
* [StudioMUI Module Documentation](https://api.sheetxl.com/modules/_sheetxl_studio-mui.html)
*/
export type StudioMUIModule = typeof import('@sheetxl/studio-mui');
/**
* Reference to StudioProps.
*
* @see
* [StudioProps](https://api.sheetxl.com/interfaces/_sheetxl_studio-mui.StudioProps.html)
*/
export type StudioProps = import('@sheetxl/studio-mui').StudioProps;
/**
* Reference to IWorkbookElement.
*
* @see
* [IStudioElement](https://api.sheetxl.com/interfaces/_sheetxl_studio-mui.IStudioElement.html)
*/
export type IStudioElement = import('@sheetxl/studio-mui').IStudioElement;
/**
* Dependencies that are resolved. These are defaulted
* but can be overwritten with either URLs or actual instances.
*/
export interface Dependencies {
reactUrl?: string;
reactDomUrl?: string;
reactDomUrlClient?: string;
reactJsxTransform?: string;
}
/**
* All elements attached to a DOM element will have the additional methods
* from Attached.
*/
export interface Attached
{
/**
* Updates the properties of the attached SheetXL instance.
* @param props The new properties to apply.
* @returns A promise that resolves when the update is complete.
*/
update: (props: P) => Promise;
/**
* Detaches the SheetXL React component from its DOM element.
*
* @remarks
* This will clean up any React roots or event listeners.
*/
detach: () => Promise;
}
/**
* Configuration for panels that appear during loading or error states.
*/
export interface PanelConfig {
/** Custom message to display */
message?: string;
/** Custom icon (HTML string or element) */
icon?: string | HTMLElement;
/** Custom HTML element to replace the entire panel */
customElement?: HTMLElement;
/**
* Whether to hide the panel. Defaults to `false`.
*
* @remarks
* This maybe set to `true` if a custom loading or error panel is provided.`
*/
hide?: boolean;
/** Additional CSS class to apply to panel */
className?: string;
/** CSS custom properties for styling the panel */
cssVars?: {
/** Text color (--sheetxl-panel-color) */
color?: string;
/** Background color (--sheetxl-panel-background) */
background?: string;
/** Icon color (--sheetxl-panel-icon-color) */
iconColor?: string;
};
}
/**
* Options for the one-time initialization of the SheetXL library.
*/
export interface InitializationOptions {
/**
* If provided, this will be used to attach the SheetXL React component or to
* provide a loading error panel.
*/
selector?: string | HTMLElement;
/**
* The string identifier for the SheetXL license key.
*
* @see
* {@link https://my.sheetxl.com} to generate a license key.
*/
licenseKey?: string;
/**
* Configuration for the loading panel that appears while SheetXL is loading.
*/
loading?: PanelConfig;
/**
* Configuration for the error panel that appears if there is an error loading SheetXL.
*/
error?: PanelConfig;
/**
* By default, the runtime dependencies are resolved automatically but
* you can provide your own URLs or instances if needed.
*/
dependencies?: Dependencies;
}
/**
* Interface for the SheetXL module that allows for simple javascript integration.
*/
export interface ISheetXL {
/**
* Creates a SheetXL workbook component and attaches it to a DOM element.
*
* @param selector | InitializationOptions. The CSS selector of the DOM element to attach to (e.g., "#sheetxl").
* @param props Optional properties to pass to the SheetXL React component.
* @returns A promise that resolves to a function that, when called, will detach the SheetXL React component from the DOM element.
*/
attachStudio(selector: string | InitializationOptions, props?: StudioProps): Promise>;
/**
* Initializes the SheetXL runtime with the provided options.
*
* @param options The initialization options.
*
* @remarks
* This does not need to be explicity called as `create` methods can also accept this.
* If this is called more than once all subsequent calls will be ignored.
*/
initialize(options: InitializationOptions): Promise;
}
//# sourceMappingURL=Types.d.ts.map