mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-27 11:56:20 +00:00
- Add host-rendered native IDE primitives (PluginCodeEditor/Monaco, PluginDataGrid/@tanstack/react-virtual, PluginSplitPane, PluginErCanvas) with Shadow DOM slot projection (zero iframes, zero plugin JS in renderer) - Expand Remote DOM budgets, expose full 22 Netcatty semantic CSS tokens, add dblclick/contextmenu/scroll/selection events, cursor-anchored PluginPopover, database theme icon, and full-bleed chrome flag - Add dynamic user-approved TCP/TLS byte streams (incl. localhost opt-in blocking internal control ports), in-band STARTTLS upgrade with cert fingerprint confirmation, durable revocable Vault SSH host bindings, plugin-owned encrypted secrets, native ui.openFile/saveFile streaming handles, 4 MiB clipboard, and prefix-filtered storage.keys - Optimize plugin view image pipeline with pooled sandboxed rasterizer window (auto-destroyed on idle/error/dispose), LRU version+hash cache in PluginViewResources, transient failure eviction in HostDrawnViewHost, renderer-side session deduplication, and RemoteImageElement cache + retry - Temporarily enable plugin host by default in hostBootstrap.cjs (marked TODO(revert), opt-out via NETCATTY_PLUGIN_DEV=0)
35 lines
827 B
TypeScript
35 lines
827 B
TypeScript
export const PLUGIN_THEME_TOKEN_NAMES = Object.freeze([
|
|
'--background',
|
|
'--foreground',
|
|
'--card',
|
|
'--card-foreground',
|
|
'--popover',
|
|
'--popover-foreground',
|
|
'--primary',
|
|
'--primary-foreground',
|
|
'--secondary',
|
|
'--secondary-foreground',
|
|
'--muted',
|
|
'--muted-foreground',
|
|
'--accent',
|
|
'--accent-foreground',
|
|
'--destructive',
|
|
'--destructive-foreground',
|
|
'--border',
|
|
'--input',
|
|
'--ring',
|
|
'--radius',
|
|
'--font-sans',
|
|
'--font-mono',
|
|
] as const);
|
|
|
|
export function selectPluginThemeTokens(
|
|
source: Readonly<Record<string, unknown>> | undefined,
|
|
): Record<string, string> {
|
|
if (!source) return {};
|
|
return Object.fromEntries(PLUGIN_THEME_TOKEN_NAMES.flatMap((name) => {
|
|
const value = source[name];
|
|
return typeof value === 'string' && value.length > 0 ? [[name, value]] : [];
|
|
}));
|
|
}
|