diff --git a/package.json b/package.json index 7c26682..56a2d9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "figma-ai-plugin", - "version": "0.1.1", + "version": "0.1.2", "private": true, "dependencies": { "@create-figma-plugin/ui": "^4.0.3", diff --git a/src/ui.tsx b/src/ui.tsx index a9841ea..f2ac46a 100644 --- a/src/ui.tsx +++ b/src/ui.tsx @@ -29,7 +29,7 @@ const MIN_WINDOW_SIZE = { width: 320, height: 200 } // very high — actual clamp is done by main via clampWindowSize (bounds*zoom). // Full plugin version shown in the footer status bar. Keep in sync with package.json "version". -const PLUGIN_VERSION = '0.1.1' +const PLUGIN_VERSION = '0.1.2' const fieldStyle = { display: 'flex', @@ -99,7 +99,8 @@ function SettingsPanel (props: { settings: Settings, setSettings: (s: Settings) function addProvider () { const p = createApinexProvider() - setSettings({ ...settings, providers: [...settings.providers, p], activeProviderId: p.id }) + const prev = settingsRef.current + setSettings({ ...prev, providers: [...prev.providers, p], activeProviderId: p.id }) } function deleteActive () { @@ -518,7 +519,7 @@ function Plugin () { const isMaximized = isMaxToggled return ( -