UNPKG

@craftercms/studio-ui

Version:

Services, components, models & utils to build CrafterCMS authoring extensions.

51 lines (49 loc) 3.18 kB
/* * Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import LookupTable from '../models/LookupTable'; import PluginDescriptor from '../models/PluginDescriptor'; import PluginFileBuilder from '../models/PluginFileBuilder'; import { WidgetRecord } from '../models/WidgetRecord'; export declare function buildFileUrl(fileBuilder: PluginFileBuilder): string; export declare function buildFileUrl(site: string, type: string, name: string): string; export declare function buildFileUrl(site: string, type: string, name: string, file: string): string; export declare function buildFileUrl(site: string, type: string, name: string, file: string, id: string): string; export declare function createFileBuilder(site: string, type: string, name: string): PluginFileBuilder; export declare function createFileBuilder(site: string, type: string, name: string, file: string): PluginFileBuilder; export declare function createFileBuilder( site: string, type: string, name: string, file: string, id: string ): PluginFileBuilder; export declare function importFile(fileBuilder: PluginFileBuilder): Promise<any>; export declare function importFile(site: string, type: string, name: string): Promise<any>; export declare function importFile(site: string, type: string, name: string, file: string): Promise<any>; export declare function importFile(site: string, type: string, name: string, file: string, id: string): Promise<any>; export declare function importPlugin(fileBuilder: PluginFileBuilder): Promise<any>; export declare function importPlugin(site: string, type: string, name: string): Promise<any>; export declare function importPlugin(site: string, type: string, name: string, file: string): Promise<any>; export declare function importPlugin(site: string, type: string, name: string, file: string, id: string): Promise<any>; export declare function isPluginRegistered(plugin: PluginDescriptor): boolean; export declare function registerPlugin(plugin: PluginDescriptor, source?: PluginFileBuilder): boolean; export declare function registerComponents(widgets: LookupTable<WidgetRecord>): void; export declare function appendStylesheet(href: string): Promise<Event>; export declare function appendStylesheet(attributes: object): Promise<Event>; export declare function appendStylesheet(href: string | object): Promise<Event>; export declare function appendScript(src: string): Promise<Event>; export declare function appendScript(attributes: object): Promise<Event>; export declare function appendScript(src: string | object): Promise<Event>;