@voltius/plugin-types 0.17.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/ui.d.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltius/plugin-types",
3
- "version": "0.17.1",
3
+ "version": "0.18.0",
4
4
  "description": "TypeScript definitions for the Voltius plugin API",
5
5
  "types": "index.d.ts",
6
6
  "files": [
package/ui.d.ts CHANGED
@@ -2,10 +2,13 @@
2
2
  // the host's own instances — see the build script in package.json.
3
3
  declare module "@voltius/ui" {
4
4
  import type { ComponentType, ReactNode } from "react";
5
+ import type { PluginAPI, PluginSession } from "@voltius/plugin-types";
5
6
  export const Icon: ComponentType<{ icon: string; width?: number | string; className?: string }>;
6
7
  export const InfoTooltip: ComponentType<{ text: string; children?: ReactNode }>;
7
8
  export const BottomSheet: ComponentType<{ title?: string; onClose: () => void; children?: ReactNode }>;
8
9
  export function useAutosave<T>(value: T, save: (v: T) => void | Promise<void>, delayMs?: number): void;
10
+ export function useT(api: PluginAPI): PluginAPI["i18n"]["t"];
11
+ export function useSessionById(api: PluginAPI, sessionId: string): PluginSession | null;
9
12
  export const ConnectionAvatar: ComponentType<{
10
13
  connection: {
11
14
  connection_type?: "ssh" | "serial" | "ftp";