@termix-ssh/plugin-sdk 1.0.10 → 1.0.12
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.
- package/CHANGELOG.md +30 -0
- package/PLUGIN-GUIDE.md +151 -36
- package/cli/commands/build.mjs +36 -22
- package/cli/commands/pack.mjs +12 -2
- package/cli/commands/validate.mjs +63 -3
- package/cli/lib/plugin-dir.mjs +11 -0
- package/cli/lib/tmxplug.mjs +9 -0
- package/dist/backend.d.ts +37 -3
- package/dist/capabilities.js +2 -0
- package/dist/frontend.d.ts +152 -0
- package/dist/frontend.js +7 -0
- package/dist/host/PluginsTab-EV4MSGY6.js +2933 -0
- package/dist/host/{chunk-G346FUE4.js → chunk-AWR6FYDO.js} +8877 -11159
- package/dist/host/{chunk-NZG6HNQH.js → chunk-RUPLD6RF.js} +1504 -15
- package/dist/host/{chunk-DIOJ3KW2.js → chunk-VEWOYAMZ.js} +6 -1
- package/dist/host/chunk-X4QZKO5G.js +3120 -0
- package/dist/host/chunk-XKA3DBB2.js +10375 -0
- package/dist/host/chunk-YGYBM7SQ.js +58 -0
- package/dist/host/core-classes.json +1 -1
- package/dist/host/{linked-server-QAKKDBFM.js → linked-server-B4NEG4MA.js} +2 -2
- package/dist/host/{rbac-api-5267EMX7.js → rbac-api-OUO3LUOC.js} +2 -2
- package/dist/host/testing-host.js +123 -57
- package/dist/host/types/src/types/ui-types.d.ts +2 -1
- package/dist/host/types/src/ui/api/audit-log-api.d.ts +46 -0
- package/dist/host/types/src/ui/api/host-defaults-api.d.ts +42 -0
- package/dist/host/types/src/ui/api/host-tags-api.d.ts +2 -0
- package/dist/host/types/src/ui/api/look-api.d.ts +40 -0
- package/dist/host/types/src/ui/api/open-tabs-api.d.ts +4 -0
- package/dist/host/types/src/ui/api/plugins-api.d.ts +26 -0
- package/dist/host/types/src/ui/api/private-endpoints-api.d.ts +6 -0
- package/dist/host/types/src/ui/api/tls-api.d.ts +25 -0
- package/dist/host/types/src/ui/auth/ElectronLoginForm.d.ts +9 -0
- package/dist/host/types/src/ui/components/command.d.ts +78 -0
- package/dist/host/types/src/ui/components/folder-style.d.ts +16 -0
- package/dist/host/types/src/ui/components/theme-provider.d.ts +2 -1
- package/dist/host/types/src/ui/components/version-badge.d.ts +7 -0
- package/dist/host/types/src/ui/hooks/use-page-visible-interval.d.ts +10 -0
- package/dist/host/types/src/ui/lib/activity-types.d.ts +15 -0
- package/dist/host/types/src/ui/lib/app-version.d.ts +2 -0
- package/dist/host/types/src/ui/lib/apply-ui-preset.d.ts +19 -0
- package/dist/host/types/src/ui/lib/connection-origin.d.ts +4 -5
- package/dist/host/types/src/ui/lib/create-id.d.ts +2 -0
- package/dist/host/types/src/ui/lib/database-transfer-url.d.ts +8 -0
- package/dist/host/types/src/ui/lib/desktop-updates.d.ts +29 -0
- package/dist/host/types/src/ui/lib/electron.d.ts +5 -0
- package/dist/host/types/src/ui/lib/host-connection-tabs.d.ts +14 -0
- package/dist/host/types/src/ui/lib/host-to-ssh-host.d.ts +4 -0
- package/dist/host/types/src/ui/lib/issue-url.d.ts +21 -0
- package/dist/host/types/src/ui/lib/local-adaptive-preferences.d.ts +9 -0
- package/dist/host/types/src/ui/lib/pane-nav-hotkey.d.ts +7 -0
- package/dist/host/types/src/ui/lib/plugin-i18n.d.ts +16 -0
- package/dist/host/types/src/ui/lib/role-label.d.ts +3 -0
- package/dist/host/types/src/ui/look/LookSettings.d.ts +8 -0
- package/dist/host/types/src/ui/look/layout-registry.d.ts +34 -0
- package/dist/host/types/src/ui/look/look-store.d.ts +29 -0
- package/dist/host/types/src/ui/look/resolve-look.d.ts +18 -0
- package/dist/host/types/src/ui/look/theme-css.d.ts +7 -0
- package/dist/host/types/src/ui/look/theme-registry.d.ts +41 -0
- package/dist/host/types/src/ui/look/use-look-theme.d.ts +12 -0
- package/dist/host/types/src/ui/manage/manage-requests.d.ts +34 -0
- package/dist/host/types/src/ui/plugin-host/loader.d.ts +2 -0
- package/dist/host/types/src/ui/plugin-host/scope.d.ts +6 -0
- package/dist/host/types/src/ui/plugin-host/sdk-ui.d.ts +102 -0
- package/dist/host/types/src/ui/plugin-host/view-ownership.d.ts +1 -1
- package/dist/host/types/src/ui/plugins/PluginConsentPrompt.d.ts +20 -0
- package/dist/host/types/src/ui/plugins/PluginDetail.d.ts +7 -0
- package/dist/host/types/src/ui/plugins/PluginReleaseNotes.d.ts +14 -0
- package/dist/host/types/src/ui/plugins/PluginsTab.d.ts +1 -0
- package/dist/host/types/src/ui/plugins/RegistriesSection.d.ts +4 -0
- package/dist/host/types/src/ui/plugins/plugin-bits.d.ts +23 -0
- package/dist/host/types/src/ui/plugins/plugin-model.d.ts +116 -0
- package/dist/host/types/src/ui/plugins/use-plugins-manager.d.ts +75 -0
- package/dist/host/types/src/ui/settings/appearance/appearance-controls.d.ts +53 -0
- package/dist/host/types/src/ui/settings/sync/LinkServerDialog.d.ts +12 -0
- package/dist/host/types/src/ui/settings/sync/ProxySettingsFields.d.ts +15 -0
- package/dist/host/types/src/ui/settings/sync/saved-servers.d.ts +3 -0
- package/dist/host/types/src/ui/shell/controller/ShellControllerProvider.d.ts +20 -0
- package/dist/host/types/src/ui/shell/controller/plugin-shell.d.ts +7 -0
- package/dist/host/types/src/ui/shell/controller/shell-store.d.ts +4 -0
- package/dist/host/types/src/ui/shell/controller/types.d.ts +156 -0
- package/dist/host/types/src/ui/shell/controller/use-hosts.d.ts +10 -0
- package/dist/host/types/src/ui/shell/controller/use-regions.d.ts +5 -0
- package/dist/host/types/src/ui/shell/controller/use-shell-keybindings.d.ts +12 -0
- package/dist/host/types/src/ui/shell/controller/use-shell-lifecycle.d.ts +17 -0
- package/dist/host/types/src/ui/shell/controller/use-split.d.ts +21 -0
- package/dist/host/types/src/ui/shell/controller/use-tabs.d.ts +70 -0
- package/dist/host/types/src/ui/shell/controller/use-workspace-layout.d.ts +4 -0
- package/dist/host/types/src/ui/shell/reconnect-tabs.d.ts +6 -0
- package/dist/host/types/src/ui/shell/shell-layout.d.ts +46 -0
- package/dist/host/types/src/ui/shell/split/EmptyPanePicker.d.ts +32 -0
- package/dist/host/types/src/ui/shell/split/SplitDropOverlay.d.ts +9 -0
- package/dist/host/types/src/ui/shell/split/SplitLayoutMenu.d.ts +16 -0
- package/dist/host/types/src/ui/shell/split/SplitView.d.ts +31 -0
- package/dist/host/types/src/ui/shell/split/split-drag.d.ts +58 -0
- package/dist/host/types/src/ui/shell/split/split-presets.d.ts +28 -0
- package/dist/host/types/src/ui/shell/split/split-tabs.d.ts +95 -0
- package/dist/host/types/src/ui/shell/split/split-targets.d.ts +30 -0
- package/dist/host/types/src/ui/shell/split/split-tree.d.ts +89 -0
- package/dist/host/types/src/ui/shell/stage/TabStage.d.ts +9 -0
- package/dist/host/types/src/ui/shell/stage/tab-stage-store.d.ts +24 -0
- package/dist/host/types/src/ui/shell/tab-close-guards.d.ts +9 -0
- package/dist/host/types/src/ui/shell/tab-handles.d.ts +8 -0
- package/dist/host/types/src/ui/shell/tabUtils.d.ts +15 -0
- package/dist/host/types/src/ui/sidebar/AuthEnrollmentSections.d.ts +5 -0
- package/dist/host/types/src/ui/sidebar/HostManagerData.d.ts +4 -0
- package/dist/host/types/src/ui/sidebar/HostManagerTabs.d.ts +10 -4
- package/dist/host/types/src/ui/sidebar/build-host-tree.d.ts +25 -0
- package/dist/host/types/src/ui/sidebar/host-export-payload.d.ts +30 -0
- package/dist/host/ui.js +6238 -4054
- package/dist/host/{use-permissions-2P2TP6GY.js → use-permissions-6VSHHUMB.js} +2 -2
- package/dist/manifest.d.ts +41 -1
- package/dist/manifest.js +89 -1
- package/dist/testing/setup.js +1 -0
- package/dist/testing.d.ts +12 -1
- package/dist/testing.js +25 -1
- package/dist/theme-css.d.ts +11 -0
- package/dist/theme-css.js +142 -0
- package/dist/vitest-preset.d.ts +18 -0
- package/dist/vitest-preset.js +14 -3
- package/package.json +1 -1
- package/schema/manifest.schema.json +111 -8
- package/tsconfig.plugin.json +1 -0
- package/dist/host/chunk-YC2MAKSP.js +0 -14
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { TFunction } from "i18next";
|
|
2
|
+
/** Follows the OS between the light and dark theme. Not a real theme. */
|
|
3
|
+
export declare const SYSTEM_THEME = "system";
|
|
4
|
+
export interface ThemeSwatch {
|
|
5
|
+
background: string;
|
|
6
|
+
panel: string;
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ThemeDef {
|
|
10
|
+
/** Also the class put on <html> while the theme is active. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** i18n key: core's for built-ins, the plugin namespace's for plugins. */
|
|
13
|
+
label: string;
|
|
14
|
+
mode: "light" | "dark";
|
|
15
|
+
swatch: ThemeSwatch;
|
|
16
|
+
/** Set for a plugin theme. */
|
|
17
|
+
pluginId?: string;
|
|
18
|
+
/** Where a plugin theme's CSS is served. Built-ins live in index.css. */
|
|
19
|
+
cssHref?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The two themes core keeps as a fallback, with their tokens in index.css.
|
|
23
|
+
* The rest come from theme plugins. A plugin theme with the same id takes
|
|
24
|
+
* the built-in's place while it is installed.
|
|
25
|
+
*/
|
|
26
|
+
export declare const BUILTIN_THEMES: readonly ThemeDef[];
|
|
27
|
+
/** Built-ins in their order, a plugin theme in a built-in's place, then the rest as declared. */
|
|
28
|
+
export declare function listThemes(): ThemeDef[];
|
|
29
|
+
export declare function getTheme(id: string): ThemeDef | undefined;
|
|
30
|
+
/** Replaces every plugin theme at once, from the plugin list. */
|
|
31
|
+
export declare function setPluginThemes(themes: ThemeDef[]): void;
|
|
32
|
+
export declare function subscribeThemes(listener: () => void): () => void;
|
|
33
|
+
export declare function useThemes(): ThemeDef[];
|
|
34
|
+
/** The light or dark mode a theme id stands for, following the OS for system. */
|
|
35
|
+
export declare function themeMode(id: string): "light" | "dark";
|
|
36
|
+
/** The theme to show for a saved id: itself, or System when it is gone. */
|
|
37
|
+
export declare function effectiveThemeId(id: string): string;
|
|
38
|
+
export declare function themeLabel(theme: ThemeDef, t: TFunction): string;
|
|
39
|
+
export declare function arePluginThemesKnown(): boolean;
|
|
40
|
+
/** On logout, and a test seam. */
|
|
41
|
+
export declare function resetPluginThemes(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shows the theme the look settles on once it is known. A theme someone
|
|
3
|
+
* picked themselves is kept in this browser too; a default is only shown,
|
|
4
|
+
* so a later default change still reaches them.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useLookTheme(layoutId: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Picks a theme for this user: shown now and kept in this browser. Unless
|
|
9
|
+
* they keep settings on this device only, it is saved to their account too,
|
|
10
|
+
* which is what other devices follow.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useChooseTheme(): (themeId: string) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HostDraft } from "@termix-ssh/plugin-sdk/frontend";
|
|
2
|
+
import type { HostDefaultsLevel } from "../../types/host-defaults";
|
|
3
|
+
export type ManageMode = "hosts" | "credentials" | "defaults";
|
|
4
|
+
/** What to open in the Manage tab. */
|
|
5
|
+
export type ManageRequest = {
|
|
6
|
+
kind: "host";
|
|
7
|
+
hostId: string | null;
|
|
8
|
+
draft?: HostDraft;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "credential";
|
|
11
|
+
credentialId: string | null;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "defaults";
|
|
14
|
+
level: HostDefaultsLevel;
|
|
15
|
+
folderName?: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "browse";
|
|
18
|
+
mode: ManageMode;
|
|
19
|
+
};
|
|
20
|
+
export declare const MANAGE_REQUEST_EVENT = "manage:request";
|
|
21
|
+
/**
|
|
22
|
+
* Parks a request for the Manage tab and pokes it. The shell opens the tab on
|
|
23
|
+
* the same event, and the tab claims the parked request once it mounts.
|
|
24
|
+
*/
|
|
25
|
+
export declare function requestManage(request: ManageRequest): void;
|
|
26
|
+
/** Takes the parked request, leaving none behind. */
|
|
27
|
+
export declare function takePendingManageRequest(): ManageRequest | null;
|
|
28
|
+
/**
|
|
29
|
+
* The window events older callers fire (the dashboard, folder menus, the
|
|
30
|
+
* palette), turned into a request. Null for anything else.
|
|
31
|
+
*/
|
|
32
|
+
export declare function requestFromLegacyEvent(name: string, detail?: unknown): ManageRequest | null;
|
|
33
|
+
/** Test seam. */
|
|
34
|
+
export declare function resetManageRequests(): void;
|
|
@@ -23,6 +23,8 @@ export declare function orderForActivation(summaries: PluginSummary[]): {
|
|
|
23
23
|
* to call as often as needed; calls run one after another.
|
|
24
24
|
*/
|
|
25
25
|
export declare function syncPlugins(summaries?: PluginSummary[]): Promise<void>;
|
|
26
|
+
/** Tries a plugin's frontend again even though this bundle failed before. */
|
|
27
|
+
export declare function retryPluginFrontend(pluginId: string): Promise<void>;
|
|
26
28
|
/**
|
|
27
29
|
* The `?view=` names enabled guest plugins serve to anonymous pages, so the
|
|
28
30
|
* entry point can tell a guest link from a signed-in full-screen view
|
|
@@ -7,6 +7,12 @@ export declare function usePluginScope(): string | null;
|
|
|
7
7
|
* without each call site having to remember.
|
|
8
8
|
*/
|
|
9
9
|
export declare function withPluginScope<P extends object>(pluginId: string, Inner: ComponentType<P>): ComponentType<P>;
|
|
10
|
+
/**
|
|
11
|
+
* The plugin id for the hooks without the error boundary, for a component
|
|
12
|
+
* whose caller handles a crash itself (a layout, which the repair view takes
|
|
13
|
+
* over from).
|
|
14
|
+
*/
|
|
15
|
+
export declare function withPluginContext<P extends object>(pluginId: string, Inner: ComponentType<P>): ComponentType<P>;
|
|
10
16
|
/**
|
|
11
17
|
* A plugin icon the shell renders inline (rail, tab strip, host row). Small
|
|
12
18
|
* enough that a broken one should just disappear, not take the row with it.
|
|
@@ -47,6 +47,8 @@ export { BrowserSignInDialog } from "../ssh/dialogs/BrowserSignInDialog";
|
|
|
47
47
|
export { FOLDER_COLORS } from "../lib/theme";
|
|
48
48
|
export { useTabs, useTabsSafe } from "../shell/TabContext";
|
|
49
49
|
export { ActionSlot, ComponentSlot } from "../shell/ActionSlot";
|
|
50
|
+
export { TabStage } from "../shell/stage/TabStage";
|
|
51
|
+
export { ShellConfirmCapture } from "../shell/controller/ShellControllerProvider";
|
|
50
52
|
export { HostFeatureFields, type HostFeatureFieldsProps, } from "../settings/HostPluginSections";
|
|
51
53
|
export { HostDefaultBadge, DefaultsOnly as HostDefaultField, useIsDefaultsEditor, } from "../lib/host-defaults-context";
|
|
52
54
|
export { PluginComponent } from "./component-registry";
|
|
@@ -99,3 +101,103 @@ export { InlineView, PanePrompt, SurfaceScope, useConfirm, useSurfaceKind, type
|
|
|
99
101
|
export { PROMPT_BUTTON, PROMPT_DESTRUCTIVE_BUTTON, PROMPT_PRIMARY_BUTTON, } from "../components/surface/prompt-styles";
|
|
100
102
|
export { ConnectionGate, useConnectionGate, type ConnectionGateController, type ConnectionGateProps, } from "../components/connection/ConnectionGate";
|
|
101
103
|
export { type ConnectionUnavailable } from "../components/connection/ConnectionScreen";
|
|
104
|
+
export { APP_VERSION } from "../lib/app-version";
|
|
105
|
+
export { Command as CommandPrimitive } from "cmdk";
|
|
106
|
+
export { buildExportPayload, hostKey, maskSecrets, pluginSecretKeys, type ExportPayload, type FieldGroup, } from "../sidebar/host-export-payload";
|
|
107
|
+
export { type AuthOverrideProtocol, SSH_AUTH_PROTOCOL, } from "../../types/auth-protocols";
|
|
108
|
+
export { CREDENTIAL_ROW_FIELD_KEYS, type CredentialDensity, type CredentialRowFields, type CredentialSidebarFilterState, type CredentialSidebarPreferences, type CredentialSortKey, type CredentialTrayTrigger, defaultCredentialRowFields, defaultCredentialSidebarPreferences, sanitizeCredentialSidebarPreferences, } from "../../types/credential-sidebar-preferences";
|
|
109
|
+
export { CORE_HOST_DEFAULTS, CORE_NAMESPACE, type DefaultOverrides, defaultValuesEqual, findCoreHostDefault, type HostDefaultsLevel, type ResolvedHostDefault, splitDefaultKey, } from "../../types/host-defaults";
|
|
110
|
+
export { defaultHostRowFields, defaultHostSidebarPreferences, type HostClickBehavior, type HostDensity, type HostGroupKey, type HostRowFields, type HostSidebarFilterState, type HostSidebarPreferences, type HostTrayTrigger, sanitizeHostSidebarPreferences, type SortKey, } from "../../types/host-sidebar-preferences";
|
|
111
|
+
export type { HostData, HostProtocolAuthInput, ProxyNode, SSHHost, SSHHostData, } from "../../types";
|
|
112
|
+
export { UI_AREA_KEYS, type UiAreaKey, type UiPreset, } from "../../types/ui-preferences";
|
|
113
|
+
export type { AdminSection, Credential, DashboardCardId, FontSizeId, Host, HostFolder, SharePermissionLevel, Tab, TabType, ThemeId, ToolsTab, UiFontId, } from "../../types/ui-types";
|
|
114
|
+
export { type AuditLog, type AuditLogFilters, getAuditForwarding, getAuditLogActions, getAuditLogs, updateAuditForwarding, } from "../api/audit-log-api";
|
|
115
|
+
export { getUserSecondFactors, resetUserSecondFactors, type UserSecondFactorSummary, } from "../api/auth-methods-api";
|
|
116
|
+
export { getCredentials } from "../api/credentials-api";
|
|
117
|
+
export { getFolderDefaultsId, getHostDefaultsLevel, type HostDefaultsChange, type HostDefaultsTarget, previewHostDefaultsLevel, resetHostToDefaults, resolveHostDefaults, saveHostDefaultsLevel, waitForDefaultsJob, } from "../api/host-defaults-api";
|
|
118
|
+
export { getHostTags, saveHostTags } from "../api/host-tags-api";
|
|
119
|
+
export { getSessionTimeoutMinutes, getUserPreferences, parseCustomKeybindings, saveUserPreferences, } from "../api/open-tabs-api";
|
|
120
|
+
export { getDeveloperMode, getPluginAdminSettings, getPluginHostSettings, getPlugins, getPluginUserSettings, type PluginSettingsErrors, type PluginSettingsField, PluginSettingsValidationError, type PluginSummary, setAllPluginChannels, setDeveloperMode, setPluginOptions, updatePluginAdminSettings, updatePluginHostSettings, updatePluginUserSettings, } from "../api/plugins-api";
|
|
121
|
+
export { getNotificationPrivateEndpoints, setNotificationPrivateEndpoints, } from "../api/private-endpoints-api";
|
|
122
|
+
export { type CredentialPermissionLevel, type FolderAccessRule, getCredentialAccess, getFolderAccess, getRoles, revokeCredentialAccess, revokeFolderAccess, shareCredential, type ShareTarget, } from "../api/rbac-api";
|
|
123
|
+
export { type BrandingSettings, getBranding, updateBranding, } from "../api/settings-api";
|
|
124
|
+
export { getSyncConflicts, getSyncErrors, retrySyncErrors, settleSyncConflict, type SyncBasicAuth, type SyncConflictItem, type SyncEntityInfo, type SyncErrorItem, syncNow, type SyncProxyHeader, type SyncStatus, unlinkServer, updateSyncSettings, } from "../api/sync-api";
|
|
125
|
+
export { getChannelReleases, getUpdateChannel, type ReleaseInfo, setUpdateChannel, type UpdateChannelState, } from "../api/system-status-api";
|
|
126
|
+
export { getTlsStatus, type TlsStatus, uploadTlsCertificate, } from "../api/tls-api";
|
|
127
|
+
export { Command, CommandEmpty, CommandGroup, CommandItem, CommandList, } from "../components/command";
|
|
128
|
+
export { usePluginDocsUrl } from "../components/docs-link";
|
|
129
|
+
export { DEFAULT_FOLDER_COLOR, DEFAULT_FOLDER_ICON, FolderIconEl, HexColorPicker, IconPicker, } from "../components/folder-style";
|
|
130
|
+
export { useTheme } from "../components/theme-provider";
|
|
131
|
+
export { VersionBadge } from "../components/version-badge";
|
|
132
|
+
export { useBranding } from "../contexts/BrandingContext";
|
|
133
|
+
export { useAreaPreferences, useUiPreference, useUiPreferencesContext, } from "../contexts/UiPreferencesContext";
|
|
134
|
+
export { getRegisteredDashboardCard, useRegisteredDashboardCards, } from "../dashboard/dashboard-cards-registry";
|
|
135
|
+
export { useActionSlot } from "../hooks/use-action-slot";
|
|
136
|
+
export { useInstalledPlugins } from "../hooks/use-installed-plugins";
|
|
137
|
+
export { usePageVisibleInterval } from "../hooks/use-page-visible-interval";
|
|
138
|
+
export { usePermissions } from "../hooks/use-permissions";
|
|
139
|
+
export { getStatusClasses, useStatusColorScheme, } from "../hooks/use-status-color-scheme";
|
|
140
|
+
export { useSyncStatus } from "../hooks/use-sync-status";
|
|
141
|
+
export { useSshAuthProviders } from "../hooks/useSshAuthProviders";
|
|
142
|
+
export { changeAppLanguage, normalizeLanguageCode } from "../i18n/i18n";
|
|
143
|
+
export { LANGUAGES } from "../i18n/languages";
|
|
144
|
+
export { getLiveHostStatus, useHostStatus, useServerStatus, useServerStatusMeta, } from "../lib/ServerStatusContext";
|
|
145
|
+
export { activityTarget } from "../lib/activity-types";
|
|
146
|
+
export { applyPresetSideEffects } from "../lib/apply-ui-preset";
|
|
147
|
+
export { getDatabaseTransferUrl } from "../lib/database-transfer-url";
|
|
148
|
+
export { canConfigureUpdates, type DesktopUpdateMode, desktopUpdates, type DesktopUpdateState, useDesktopUpdate, } from "../lib/desktop-updates";
|
|
149
|
+
export { type DocsPage, docsUrl } from "../lib/docs";
|
|
150
|
+
export { getErrorMessage } from "../lib/error-message";
|
|
151
|
+
export { getDefaultConnectionTab, resolveHostTabType, } from "../lib/host-connection-tabs";
|
|
152
|
+
export { DefaultsOnly, HostDefaultsContext, type HostDefaultsContextValue, HostOnly, } from "../lib/host-defaults-context";
|
|
153
|
+
export { invalidateHostsAndStatusCaches, invalidateServerStatusCache, } from "../lib/hosts-request-cache";
|
|
154
|
+
export { reportBetaFeedbackUrl, reportCoreIssueUrl } from "../lib/issue-url";
|
|
155
|
+
export { notifySyncChanged } from "../lib/linked-server";
|
|
156
|
+
export { clearLocalAdaptivePreferences, getPreferredHostAction, recordHostActionPreference, } from "../lib/local-adaptive-preferences";
|
|
157
|
+
export { pluginKey, pluginName } from "../lib/plugin-i18n";
|
|
158
|
+
export { PluginIcon } from "../lib/plugin-icon";
|
|
159
|
+
export { rem } from "../lib/rem";
|
|
160
|
+
export { getConnectedRemoteApi } from "../lib/remote-server-api";
|
|
161
|
+
export { roleLabel } from "../lib/role-label";
|
|
162
|
+
export type { StatusValue } from "../lib/server-status-store";
|
|
163
|
+
export { parseServerTime } from "../lib/server-time";
|
|
164
|
+
export { refreshSyncStatus, setSyncStatus } from "../lib/sync-status";
|
|
165
|
+
export { tabJumpHotkeyKeys } from "../lib/tab-jump-hotkey";
|
|
166
|
+
export { ACCENT_PRESET_COLORS, applyAccentColor, applyFontSize, applyUiFont, DASHBOARD_CARDS, FONT_SIZES, UI_FONTS, } from "../lib/theme";
|
|
167
|
+
export { registerLayout } from "../look/layout-registry";
|
|
168
|
+
export { useChooseTheme } from "../look/use-look-theme";
|
|
169
|
+
export { type AccessRecord, type ActiveSessionInfo, adminCreateUser, adminCreateUserCredential, adminCreateUserHost, adminDeleteUserCredential, adminDeleteUserHost, adminExportUserData, adminGetHostPassword, adminGetUserCredentials, adminGetUserHosts, adminResetUserPassword, adminUpdateUserCredential, adminUpdateUserHost, type ApiKey, assignRoleToUser, bulkImportSSHHosts, bulkUpdateSSHHosts, changePassword, createApiKey, createCredential, type CreatedApiKey, createRole, createSSHHost, deleteAccount, deleteAllHostsInFolder, deleteApiKey, deleteCredential, deleteOpenTab, deleteRole, deleteSSHHost, deleteUser, deployCredentialToHost, duplicateCredential, exportAllSSHHosts, generateKeyPair, generatePublicKeyFromPrivate, getActiveSessions, getApiKeys, getCredentialDetails, getCredentialSidebarPreferences, getExternalAutoProvision, getHostAccess, getHostAuthOverride, getHostPassword, getHostSidebarPreferences, getLogLevel, getPasswordLoginAllowed, getPasswordResetAllowed, getPermissionsCatalog, getRegistrationAllowed, getSecondFactorAfterExternalLogin, getSessions, getSessionTimeout, getSSHFolders, getSSHHosts, getStatusCheckSettings, getUserInfo, getUserList, getUserRoles, importSSHConfigHosts, type LinkedAccountInfo, linkExternalToPasswordAccount, logoutUser, makeUserAdmin, type OpenTabRecord, type PermissionCatalogEntry, releaseUrlFrom, removeAdminStatus, removeRoleFromUser, renameCredentialFolder, renameFolder, reorderCredentials, reorderFolders, reorderSSHHosts, resetRecentActivity, revokeAllUserSessions, revokeHostAccess, revokeSession, type Role, saveCredentialSidebarPreferences, saveHostSidebarPreferences, setHostAuthOverride, shareFolder, shareHost, type SSHHostWithStatus, unlinkExternalFromPasswordAccount, updateCredential, updateExternalAutoProvision, updateFolderMetadata, updateHostAccess, updateLogLevel, updatePasswordLoginAllowed, updatePasswordResetAllowed, updateRegistrationAllowed, updateRole, updateSecondFactorAfterExternalLogin, updateSessionTimeout, updateSSHHost, updateStatusCheckSettings, type UserPreferences, type UserRole, } from "../main-axios";
|
|
170
|
+
export { MANAGE_REQUEST_EVENT, type ManageMode, type ManageRequest, requestFromLegacyEvent, requestManage, takePendingManageRequest, } from "../manage/manage-requests";
|
|
171
|
+
export { useSshAuthEditors } from "./auth-registry";
|
|
172
|
+
export { usePluginStore } from "./plugin-store";
|
|
173
|
+
export { shell } from "./shell-bridge";
|
|
174
|
+
export { OPEN_PLUGINS_EVENT } from "../plugins/open-plugins";
|
|
175
|
+
export { isPrerelease } from "../plugins/plugin-model";
|
|
176
|
+
export { usePluginHostSections } from "../settings/HostPluginSections";
|
|
177
|
+
export { SettingsFieldRow } from "../settings/SettingsFields";
|
|
178
|
+
export { LookSettings } from "../look/LookSettings";
|
|
179
|
+
export { useThemeOptions } from "../settings/appearance/appearance-controls";
|
|
180
|
+
export { hasVisibleFields, isFieldShown, } from "../settings/settings-fields-util";
|
|
181
|
+
export { LinkServerDialog } from "../settings/sync/LinkServerDialog";
|
|
182
|
+
export { ProxySettingsFields } from "../settings/sync/ProxySettingsFields";
|
|
183
|
+
export { useShellController } from "../shell/controller/ShellControllerProvider";
|
|
184
|
+
export { type KeybindingActionDef, useKeybindingActions, useKeybindingDefaults, } from "../shell/keybinding-registry";
|
|
185
|
+
export { filterPaletteItems, loadPaletteGroup, paletteEntriesFor, type PaletteItemDef, usePaletteEntries, usePaletteGroups, } from "../shell/palette-registry";
|
|
186
|
+
export { getPanel, usePanels } from "../shell/panel-registry";
|
|
187
|
+
export { SplitLayoutMenu } from "../shell/split/SplitLayoutMenu";
|
|
188
|
+
export { beginSplitDrag, endSplitDrag, isSplitDragging, moveSplitDrag, } from "../shell/split/split-drag";
|
|
189
|
+
export { canJoinSplit, isSplitTab, type SplitSummary, type TabSplitAction, } from "../shell/split/split-tabs";
|
|
190
|
+
export { openInSplit, type SplitOpenTarget, useSplitTargets, } from "../shell/split/split-targets";
|
|
191
|
+
export { MAX_PANES } from "../shell/split/split-tree";
|
|
192
|
+
export { registerTabCloseGuard } from "../shell/tab-close-guards";
|
|
193
|
+
export { useTabHandlesVersion } from "../shell/tab-handles";
|
|
194
|
+
export { getTabType, isPersistentTabType, isSessionTabType, type TabShellCallbacks, } from "../shell/tab-registry";
|
|
195
|
+
export { markTabSurfaceUsed, preloadTabSurface, tabIcon, } from "../shell/tabUtils";
|
|
196
|
+
export { AuthEnrollmentSections } from "../sidebar/AuthEnrollmentSections";
|
|
197
|
+
export { mapCredentials, sshHostToHost } from "../sidebar/HostManagerData";
|
|
198
|
+
export { getHostEditorSection, makeHostSshSubTabs, makeHostTabs, useHostEditorSections, } from "../sidebar/HostManagerTabs";
|
|
199
|
+
export { actionOrder, defaultConnectAction, type HostActionDef, hostActionsFor, hostBadgesFor, hostMenuItemsFor, listHostActions, runHostAction, useHostActions, useHostBadges, useHostContextMenuItems, } from "../sidebar/host-contributions";
|
|
200
|
+
export { useEditorDefaultKeys } from "../sidebar/host-defaults/catalog";
|
|
201
|
+
export { enabledHostProtocols, type HostProtocolDef, hostProtocolFlags, type HostProtocols, listHostProtocols, protocolEnabled, protocolPort, useHostProtocols, withProtocolSettings, } from "../sidebar/host-protocols";
|
|
202
|
+
export { quickConnectTargets } from "../sidebar/quick-connect-host";
|
|
203
|
+
export { groupRailItems, isCoreRailView, moveRailItem, promotableIds, type RailGroup, type RailItemDef, railItemLabel, rightDockableIds, useRailItems, } from "../sidebar/rail-items";
|
|
@@ -6,7 +6,7 @@ import { type PluginRecord } from "./plugin-store";
|
|
|
6
6
|
* because a disabled plugin never runs its frontend and so never registers
|
|
7
7
|
* anything, yet a saved tab or card of its still has to say whose it is.
|
|
8
8
|
*/
|
|
9
|
-
export type ViewKind = "tab" | "panel" | "card";
|
|
9
|
+
export type ViewKind = "tab" | "panel" | "card" | "layout";
|
|
10
10
|
export type ViewStatus =
|
|
11
11
|
/** Registered by a running plugin. */
|
|
12
12
|
"ready"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type PluginEntry } from "./plugin-model";
|
|
2
|
+
export interface ConsentRequest {
|
|
3
|
+
plugin: PluginEntry;
|
|
4
|
+
mode: "install" | "update" | "upload" | "enable";
|
|
5
|
+
version: string;
|
|
6
|
+
/** What the prompt lists: all of them to install, only the new ones to update. */
|
|
7
|
+
capabilities: string[];
|
|
8
|
+
/** Set for a file uploaded in developer mode. */
|
|
9
|
+
uploadToken?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Install and update consent. Capabilities read as consequences, worst first;
|
|
13
|
+
* the low risk ones fold into one line so the list stays short enough to read.
|
|
14
|
+
*/
|
|
15
|
+
export declare function PluginConsentPrompt({ request, busy, onCancel, onConfirm, }: {
|
|
16
|
+
request: ConsentRequest | null;
|
|
17
|
+
busy?: boolean;
|
|
18
|
+
onCancel: () => void;
|
|
19
|
+
onConfirm: () => void;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PluginEntry } from "./plugin-model";
|
|
2
|
+
import type { PluginsManager } from "./use-plugins-manager";
|
|
3
|
+
export declare function PluginDetail({ plugin, manager, onUninstalled, }: {
|
|
4
|
+
plugin: PluginEntry;
|
|
5
|
+
manager: PluginsManager;
|
|
6
|
+
onUninstalled: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type PluginEntry } from "./plugin-model";
|
|
2
|
+
/**
|
|
3
|
+
* The newest version's notes, from the registry and the installed
|
|
4
|
+
* CHANGELOG.md, with older versions behind a toggle in a capped scroll area.
|
|
5
|
+
* Renders nothing when there are no versions to list.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PluginReleaseNotes({ plugin }: {
|
|
8
|
+
plugin: PluginEntry;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/** The plugin's YouTube video. Nothing is loaded when it has none. */
|
|
11
|
+
export declare function PluginVideo({ videoId, name, }: {
|
|
12
|
+
videoId?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PluginsTab(): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function PluginIconBox({ name, size, muted, }: {
|
|
2
|
+
name?: string;
|
|
3
|
+
size?: "sm" | "md" | "lg";
|
|
4
|
+
muted?: boolean;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
/** One capability as its consequence, with a mark only on the severe ones. */
|
|
7
|
+
export declare function CapabilityRow({ capability, showId, className, }: {
|
|
8
|
+
capability: string;
|
|
9
|
+
showId?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** Permanent mark on anything installed without a registry signature. */
|
|
13
|
+
export declare function UnverifiedBadge(): import("react").JSX.Element;
|
|
14
|
+
/** Marks a plugin from the community registry or a custom one. */
|
|
15
|
+
export declare function SourceBadge({ source, registryName, }: {
|
|
16
|
+
source: string;
|
|
17
|
+
registryName?: string | null;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function BetaBadge(): import("react").JSX.Element;
|
|
20
|
+
/** How often the plugin's release files were downloaded. */
|
|
21
|
+
export declare function DownloadCount({ count }: {
|
|
22
|
+
count: number | null;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type CapabilityRisk } from "@termix-ssh/plugin-sdk/capabilities";
|
|
2
|
+
import type { PluginEnvVar } from "@termix-ssh/plugin-sdk/docs";
|
|
3
|
+
import { type ChangeType, type ChangelogChange, type ChangelogRelease } from "@termix-ssh/plugin-sdk/changelog";
|
|
4
|
+
import type { PluginChannel, PluginSummary, PluginUploadPreview, RegistryPluginEntry, RegistryPluginVersion } from "../api/plugins-api";
|
|
5
|
+
export type PluginStatus = "running" | "disabled" | "failed" | "blocked" | "server";
|
|
6
|
+
/** One row of the Plugins tab: what is installed merged with the registry. */
|
|
7
|
+
export interface PluginEntry {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
author: string;
|
|
12
|
+
category: string;
|
|
13
|
+
icon?: string;
|
|
14
|
+
repository?: string;
|
|
15
|
+
videoId?: string;
|
|
16
|
+
features: string[];
|
|
17
|
+
/** Docs link: the installed manifest's, else the registry's. */
|
|
18
|
+
docs?: string;
|
|
19
|
+
env: PluginEnvVar[];
|
|
20
|
+
installed: boolean;
|
|
21
|
+
version: string | null;
|
|
22
|
+
latestVersion: string | null;
|
|
23
|
+
/** Newest beta, when one is newer than stable. */
|
|
24
|
+
latestBeta: string | null;
|
|
25
|
+
channel: PluginChannel;
|
|
26
|
+
/** The installed copy is a beta. */
|
|
27
|
+
isBeta: boolean;
|
|
28
|
+
updateAvailable: boolean;
|
|
29
|
+
addedCapabilities: string[];
|
|
30
|
+
versions: RegistryPluginVersion[];
|
|
31
|
+
capabilities: string[];
|
|
32
|
+
status: PluginStatus | null;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
lastError: string | null;
|
|
35
|
+
autoUpdate: boolean;
|
|
36
|
+
pinnedVersion: string | null;
|
|
37
|
+
bundled: boolean;
|
|
38
|
+
inRegistry: boolean;
|
|
39
|
+
contributes: Record<string, unknown> | null;
|
|
40
|
+
publishedAt: string | null;
|
|
41
|
+
downloads: number | null;
|
|
42
|
+
source: PluginSource;
|
|
43
|
+
/** Installed from a file or folder with no registry signature behind it. */
|
|
44
|
+
unverified: boolean;
|
|
45
|
+
/** The registry it is listed in or was installed from. */
|
|
46
|
+
registryId: string | null;
|
|
47
|
+
registryName: string | null;
|
|
48
|
+
/** A linked server decides whether it runs here. */
|
|
49
|
+
managedByServer: boolean;
|
|
50
|
+
/** The app is drawn with it by default, so it can be swapped but not uninstalled. */
|
|
51
|
+
defaultLook: boolean;
|
|
52
|
+
}
|
|
53
|
+
export type PluginSource = "bundled" | "official" | "community" | "custom" | "unverified";
|
|
54
|
+
export declare function isPrerelease(version: string | null | undefined): boolean;
|
|
55
|
+
/** A beta newer than what is installed, worth offering with "Try beta". */
|
|
56
|
+
export declare function betaToTry(plugin: Pick<PluginEntry, "installed" | "version" | "latestBeta" | "channel">): string | null;
|
|
57
|
+
/** Where an installed copy came from, as the issue report names it. */
|
|
58
|
+
export declare function pluginSource(summary: PluginSummary): PluginSource;
|
|
59
|
+
export declare function pluginStatus(summary: PluginSummary): PluginStatus;
|
|
60
|
+
export declare function mergePlugins(installed: PluginSummary[], registry: RegistryPluginEntry[] | null): PluginEntry[];
|
|
61
|
+
/** A row for a file that was uploaded but not installed yet. */
|
|
62
|
+
export declare function uploadEntry(preview: PluginUploadPreview): PluginEntry;
|
|
63
|
+
export type SortKey = "popular" | "name" | "updated" | "category";
|
|
64
|
+
export declare function sortPlugins(rows: PluginEntry[], key: SortKey): PluginEntry[];
|
|
65
|
+
export declare function matchesQuery(row: PluginEntry, query: string): boolean;
|
|
66
|
+
export declare function categoriesOf(rows: PluginEntry[]): string[];
|
|
67
|
+
export declare function capabilityRisk(capability: string): CapabilityRisk;
|
|
68
|
+
/** Worst first, the order the consent copy is read in. */
|
|
69
|
+
export declare function orderByRisk(capabilities: string[]): string[];
|
|
70
|
+
export declare function isSevere(capability: string): boolean;
|
|
71
|
+
/** Contribution kinds worth naming in "Adds to Termix", with a count each. */
|
|
72
|
+
declare const CONTRIBUTION_KINDS: readonly ["tabs", "panels", "dashboardCards", "actions", "protocols", "auth", "settings", "hostCapability", "permissions", "keybindingActions", "syncEntities"];
|
|
73
|
+
export type ContributionKind = (typeof CONTRIBUTION_KINDS)[number];
|
|
74
|
+
export declare function describeContributions(contributes: Record<string, unknown> | null): Array<{
|
|
75
|
+
kind: ContributionKind;
|
|
76
|
+
count: number;
|
|
77
|
+
}>;
|
|
78
|
+
export declare function formatBytes(bytes: number): string;
|
|
79
|
+
/** 1234 reads as 1.2k, so the number stays a rough ranking. */
|
|
80
|
+
export declare function formatCount(count: number): string;
|
|
81
|
+
/**
|
|
82
|
+
* A new bug report on the plugin's own repo with what a maintainer asks first
|
|
83
|
+
* already filled in. Official plugins use the org bug form and the plugin
|
|
84
|
+
* template ships the same one. Null when the repository is not on GitHub.
|
|
85
|
+
*/
|
|
86
|
+
export declare function reportIssueUrl(plugin: Pick<PluginEntry, "id" | "repository" | "version" | "latestVersion" | "status" | "source" | "lastError">, termixVersion?: string): string | null;
|
|
87
|
+
/**
|
|
88
|
+
* Beta feedback on the plugin's own repo, through the org beta form. Null when
|
|
89
|
+
* the repository is not on GitHub.
|
|
90
|
+
*/
|
|
91
|
+
export declare function betaFeedbackUrl(plugin: Pick<PluginEntry, "id" | "repository" | "version" | "lastError">, termixVersion?: string): string | null;
|
|
92
|
+
/** A new feature request on the plugin's own repo, or null when not on GitHub. */
|
|
93
|
+
export declare function requestFeatureUrl(plugin: Pick<PluginEntry, "repository">): string | null;
|
|
94
|
+
/** One version in a plugin's release notes. */
|
|
95
|
+
export interface ReleaseRow {
|
|
96
|
+
version: string;
|
|
97
|
+
date: string | null;
|
|
98
|
+
summary?: string;
|
|
99
|
+
changes: ChangelogChange[];
|
|
100
|
+
/** False only for a registry version this build cannot run. */
|
|
101
|
+
compatible: boolean;
|
|
102
|
+
releaseNotesUrl?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The registry's versions and the installed copy's CHANGELOG.md as one list,
|
|
106
|
+
* newest first. The installed copy's notes win for a version in both.
|
|
107
|
+
*/
|
|
108
|
+
export declare function mergeReleaseNotes(versions: RegistryPluginVersion[], local: ChangelogRelease[]): ReleaseRow[];
|
|
109
|
+
/** The changes of one release grouped by type, in the changelog's order. */
|
|
110
|
+
export declare function groupChanges(changes: ChangelogChange[]): Array<{
|
|
111
|
+
type: ChangeType;
|
|
112
|
+
items: string[];
|
|
113
|
+
}>;
|
|
114
|
+
/** The embed address for a video id, or null for anything that is not one. */
|
|
115
|
+
export declare function youtubeEmbedUrl(videoId: string | undefined): string | null;
|
|
116
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type PluginChannel } from "../api/plugins-api";
|
|
2
|
+
import { type PluginEntry } from "./plugin-model";
|
|
3
|
+
import type { ConsentRequest } from "./PluginConsentPrompt";
|
|
4
|
+
export declare function usePluginsManager(): {
|
|
5
|
+
plugins: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
id: string;
|
|
9
|
+
author: string;
|
|
10
|
+
category: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
repository?: string;
|
|
13
|
+
videoId?: string;
|
|
14
|
+
features: string[];
|
|
15
|
+
docs?: string;
|
|
16
|
+
env: import("@termix-ssh/plugin-sdk/docs").PluginEnvVar[];
|
|
17
|
+
installed: boolean;
|
|
18
|
+
version: string | null;
|
|
19
|
+
latestVersion: string | null;
|
|
20
|
+
latestBeta: string | null;
|
|
21
|
+
channel: PluginChannel;
|
|
22
|
+
isBeta: boolean;
|
|
23
|
+
updateAvailable: boolean;
|
|
24
|
+
addedCapabilities: string[];
|
|
25
|
+
versions: import("../api/plugins-api").RegistryPluginVersion[];
|
|
26
|
+
capabilities: string[];
|
|
27
|
+
status: import("./plugin-model").PluginStatus | null;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
lastError: string | null;
|
|
30
|
+
autoUpdate: boolean;
|
|
31
|
+
pinnedVersion: string | null;
|
|
32
|
+
bundled: boolean;
|
|
33
|
+
inRegistry: boolean;
|
|
34
|
+
contributes: Record<string, unknown> | null;
|
|
35
|
+
publishedAt: string | null;
|
|
36
|
+
downloads: number | null;
|
|
37
|
+
source: import("./plugin-model").PluginSource;
|
|
38
|
+
unverified: boolean;
|
|
39
|
+
registryId: string | null;
|
|
40
|
+
registryName: string | null;
|
|
41
|
+
managedByServer: boolean;
|
|
42
|
+
defaultLook: boolean;
|
|
43
|
+
}[];
|
|
44
|
+
loading: boolean;
|
|
45
|
+
refreshing: boolean;
|
|
46
|
+
registryError: string;
|
|
47
|
+
managedByServer: boolean;
|
|
48
|
+
lastCheckedAt: string;
|
|
49
|
+
registries: import("../api/plugins-api").RegistryListingSource[];
|
|
50
|
+
reload: () => Promise<void>;
|
|
51
|
+
busy: Set<string>;
|
|
52
|
+
consent: ConsentRequest;
|
|
53
|
+
setConsent: import("react").Dispatch<import("react").SetStateAction<ConsentRequest>>;
|
|
54
|
+
developerMode: boolean;
|
|
55
|
+
signedOnly: boolean;
|
|
56
|
+
requestUpload: (file: File) => Promise<void>;
|
|
57
|
+
refresh: () => Promise<void>;
|
|
58
|
+
requestInstall: (plugin: PluginEntry, version?: string) => void;
|
|
59
|
+
requestUpdate: (plugin: PluginEntry, version?: string) => Promise<void>;
|
|
60
|
+
confirmConsent: () => Promise<void>;
|
|
61
|
+
toggle: (plugin: PluginEntry) => Promise<void>;
|
|
62
|
+
retry: (plugin: PluginEntry) => Promise<void>;
|
|
63
|
+
uninstall: (plugin: PluginEntry) => Promise<boolean>;
|
|
64
|
+
removeData: (plugin: PluginEntry) => Promise<boolean>;
|
|
65
|
+
setOptions: (plugin: PluginEntry, options: {
|
|
66
|
+
autoUpdate?: boolean;
|
|
67
|
+
pinned?: boolean;
|
|
68
|
+
channel?: PluginChannel;
|
|
69
|
+
}) => Promise<void>;
|
|
70
|
+
tryBeta: (plugin: PluginEntry) => Promise<void>;
|
|
71
|
+
leaveBeta: (plugin: PluginEntry) => Promise<void>;
|
|
72
|
+
setAllChannels: (channel: PluginChannel) => Promise<void>;
|
|
73
|
+
updateAll: () => Promise<void>;
|
|
74
|
+
};
|
|
75
|
+
export type PluginsManager = ReturnType<typeof usePluginsManager>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { FontSizeId, ThemeId, UiFontId } from "../../../types/ui-types";
|
|
2
|
+
import { type ThemeSwatch } from "../../look/theme-registry";
|
|
3
|
+
export declare const DEFAULT_ACCENT = "#f59145";
|
|
4
|
+
/** The built-in themes, with System first. Plugin themes come from useThemeOptions. */
|
|
5
|
+
export declare const THEMES: {
|
|
6
|
+
id: ThemeId;
|
|
7
|
+
preview: string;
|
|
8
|
+
}[];
|
|
9
|
+
export interface ThemeOption {
|
|
10
|
+
id: ThemeId;
|
|
11
|
+
label: string;
|
|
12
|
+
/** Null for System, which previews light and dark side by side. */
|
|
13
|
+
swatch: ThemeSwatch | null;
|
|
14
|
+
}
|
|
15
|
+
/** Every theme to pick from, System first, plugin themes included. */
|
|
16
|
+
export declare function useThemeOptions(): ThemeOption[];
|
|
17
|
+
export declare function isHexColor(value: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Theme, accent, font and language, applied right away and stored the same
|
|
20
|
+
* way the profile settings store them.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useAppearanceSettings(): {
|
|
23
|
+
theme: string;
|
|
24
|
+
accent: string;
|
|
25
|
+
fontSize: FontSizeId;
|
|
26
|
+
uiFont: UiFontId;
|
|
27
|
+
language: string;
|
|
28
|
+
setTheme(id: ThemeId): void;
|
|
29
|
+
setAccent(value: string): void;
|
|
30
|
+
setFontSize(id: FontSizeId): void;
|
|
31
|
+
setUiFont(id: UiFontId): void;
|
|
32
|
+
setLanguage(code: string): void;
|
|
33
|
+
};
|
|
34
|
+
export declare function ThemeGrid({ value, onChange, }: {
|
|
35
|
+
value: ThemeId;
|
|
36
|
+
onChange: (id: ThemeId) => void;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
export declare function AccentPicker({ value, onChange, }: {
|
|
39
|
+
value: string;
|
|
40
|
+
onChange: (value: string) => void;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
export declare function FontSizePicker({ value, onChange, }: {
|
|
43
|
+
value: FontSizeId;
|
|
44
|
+
onChange: (id: FontSizeId) => void;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
export declare function UiFontSelect({ value, onChange, }: {
|
|
47
|
+
value: UiFontId;
|
|
48
|
+
onChange: (id: UiFontId) => void;
|
|
49
|
+
}): import("react").JSX.Element;
|
|
50
|
+
export declare function LanguageSelect({ value, onChange, }: {
|
|
51
|
+
value: string;
|
|
52
|
+
onChange: (code: string) => void;
|
|
53
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SyncStatus } from "../../api/sync-api";
|
|
2
|
+
interface LinkServerDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
onLinked: (status: SyncStatus) => void;
|
|
6
|
+
/** Sign back in to the server this desktop is already linked to. */
|
|
7
|
+
relogin?: {
|
|
8
|
+
serverUrl: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare function LinkServerDialog({ open, onOpenChange, onLinked, relogin, }: LinkServerDialogProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SyncBasicAuth, SyncProxyHeader } from "../../api/sync-api";
|
|
2
|
+
interface ProxySettingsFieldsProps {
|
|
3
|
+
customHeaders: SyncProxyHeader[];
|
|
4
|
+
basicAuth: SyncBasicAuth | null;
|
|
5
|
+
onChange: (next: {
|
|
6
|
+
customHeaders?: SyncProxyHeader[];
|
|
7
|
+
basicAuth?: SyncBasicAuth | null;
|
|
8
|
+
}) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* What a reverse proxy in front of the server wants: extra headers (a
|
|
12
|
+
* Cloudflare Access service token, a gateway key) and basic auth.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ProxySettingsFields({ customHeaders, basicAuth, onChange, }: ProxySettingsFieldsProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type TabStageStore } from "../stage/tab-stage-store";
|
|
2
|
+
import type { ShellController } from "./types";
|
|
3
|
+
/** The live shell, for core layout code. Throws outside the shell. */
|
|
4
|
+
export declare function useShellController(): ShellController;
|
|
5
|
+
/** The live shell, or null outside it. */
|
|
6
|
+
export declare function useOptionalShellController(): ShellController | null;
|
|
7
|
+
export declare function useTabStageStore(): TabStageStore;
|
|
8
|
+
/**
|
|
9
|
+
* Hands the main area's confirm to code outside it, like closeTab. A layout
|
|
10
|
+
* renders it inside the scope its tab-close questions should show in.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ShellConfirmCapture(): null;
|
|
13
|
+
/** Owns every bit of shell state and behaviour a layout draws. */
|
|
14
|
+
export declare function ShellControllerProvider({ username, onLogout, children, }: {
|
|
15
|
+
username: string;
|
|
16
|
+
onLogout: (options?: {
|
|
17
|
+
manual?: boolean;
|
|
18
|
+
}) => void;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ShellController as PluginShellController } from "@termix-ssh/plugin-sdk/frontend";
|
|
2
|
+
/**
|
|
3
|
+
* The shell as a plugin layout sees it, through useShell() in the SDK. Inside
|
|
4
|
+
* the shell this reads the controller's context; outside (an overlay a
|
|
5
|
+
* plugin mounted elsewhere) the last published one.
|
|
6
|
+
*/
|
|
7
|
+
export declare function usePluginShell(pluginId: string): PluginShellController | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShellController } from "./types";
|
|
2
|
+
export declare function publishShellController(next: ShellController | null): void;
|
|
3
|
+
export declare function getShellController(): ShellController | null;
|
|
4
|
+
export declare function useShellSnapshot(): ShellController | null;
|