Files
paseo/packages/plugin/src/client/index.ts
T
Mohamed Boudra b6dde61a7f feat(plugins): accept inline SVG and component icons (#7368)
Every contribution `icon` now takes a Lucide name, `{ svg }`, or a
component. Attachment sources take only the first two because composer
drafts persist the source icon.

The daemon's provider-icon check and the app's inline-SVG check are the
same function in the shared SDK root, so a plugin sees the same reasons
in both places. The app parses each icon once at registration and fails
the plugin with that reason. Rendering goes through one module that
turns any form into a component, so surfaces never branch on the form.
2026-10-19 15:36:04 +07:00

71 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export type {
PluginHostProps,
PluginSurfaceProps,
PluginScreenProps,
PluginPopoverProps,
PluginScreenParams,
PluginOpenScreenInput,
PluginScreenLocation,
PluginSidebarItemProps,
PluginSidebarItemContribution,
PluginIcon,
PluginPanelLocation,
PluginOpenPanelOptions,
PluginWorkspacePanelProps,
PluginAgentPanelProps,
PluginClientOpenPanelOptions,
PluginClientContext,
PluginClientContribution,
PluginWorkspacePanelContribution,
PluginSettingsScreenContribution,
PluginSurfaceContribution,
PluginScreenContribution,
PluginScreenTitle,
PluginSidebarContribution,
PluginTimelineTransformerContribution,
PluginTimelineItemProps,
PluginTimelineRendererContribution,
PluginCommandCapabilities,
PluginGlobalCommandContext,
PluginWorkspaceCommandContext,
PluginAgentCommandContext,
PluginCommandCenterItemContribution,
PluginClientSlashCommandContribution,
SettingsState,
} from "./contracts.js";
export type {
PluginButton,
PluginButtonBehavior,
PluginButtonContentProps,
PluginButtonContext,
PluginButtonIcon,
PluginButtonIconProps,
PluginButtonMenuEntry,
PluginButtonRegistration,
PluginComposerPillContribution,
PluginHeaderButtonContribution,
} from "./buttons.js";
export type { PluginIconProps, PluginSerializableIcon, PluginSvgIcon } from "../icons.js";
export { usePaseo } from "./paseo-context.js";
export { useAgent, useWorkspace } from "./client-state.js";
export { useRpc } from "./rpc-context.js";
import type { SettingsDefinition } from "../settings.js";
import type { SettingsState } from "./contracts.js";
import type { ZodType } from "zod";
export declare function useSettings<Schema extends ZodType>(
definition: SettingsDefinition<Schema>,
): SettingsState<Schema>;
/** Configured app host, including hosts that are currently disconnected. */
export interface PluginHostSummary {
readonly serverId: string;
readonly label: string;
readonly status: "idle" | "connecting" | "online" | "offline" | "error";
}
/** Live configured hosts. Supplied by the app's client bundle loader. */
export declare function useHosts(): readonly PluginHostSummary[];
/** Borrow an online host's API under this installation's lifetime. */
export declare function getPaseoClient(serverId: string): import("@getpaseo/client").PaseoApi;
/** Open an absolute HTTP(S) URL using the client platform’s external opener. */
export declare function openExternalUrl(url: string): Promise<void>;