@signalsandsorcery/plugin-sdk 2.35.3 → 2.35.4

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/dist/index.mjs CHANGED
@@ -820,12 +820,12 @@ function useTrackExternalFx(host, trackId) {
820
820
  void reload();
821
821
  }, [reload]);
822
822
  const loadFxList = useCallback2(
823
- async (force) => {
823
+ async (opts) => {
824
824
  if (!supported || !host.getAvailableFx) return;
825
- if (fxLoadedRef.current && !force) return;
825
+ if (fxLoadedRef.current && !opts.force && !opts.rescan) return;
826
826
  setFxLoading(true);
827
827
  try {
828
- const list = await host.getAvailableFx();
828
+ const list = opts.rescan && host.rescanAvailableFx ? await host.rescanAvailableFx() : await host.getAvailableFx();
829
829
  setAvailableFx(list);
830
830
  fxLoadedRef.current = true;
831
831
  } catch {
@@ -838,7 +838,7 @@ function useTrackExternalFx(host, trackId) {
838
838
  const openPicker = useCallback2(
839
839
  (open) => {
840
840
  setPickerOpen(open);
841
- if (open) void loadFxList(false);
841
+ if (open) void loadFxList({});
842
842
  },
843
843
  [loadFxList]
844
844
  );
@@ -862,7 +862,7 @@ function useTrackExternalFx(host, trackId) {
862
862
  fxLoading,
863
863
  pickerOpen,
864
864
  setPickerOpen: openPicker,
865
- refreshFx: () => void loadFxList(true),
865
+ refreshFx: () => void loadFxList({ rescan: true }),
866
866
  reload,
867
867
  onAddFx: (pluginId) => mutate(host.loadTrackExternalFx && (async () => {
868
868
  await host.loadTrackExternalFx(trackId, pluginId);
@@ -999,7 +999,7 @@ function TrackExternalFxSection({
999
999
  onClick: () => refreshFx(),
1000
1000
  disabled: fxLoading,
1001
1001
  className: "px-2 py-1 text-xs rounded-sm border border-sas-border text-sas-muted hover:text-sas-accent hover:border-sas-accent transition-colors disabled:opacity-50",
1002
- title: "Re-scan plugins",
1002
+ title: "Re-scan plugins \u2014 picks up newly installed FX and retries any that failed a previous scan",
1003
1003
  children: fxLoading ? "..." : "Refresh"
1004
1004
  }
1005
1005
  )
@@ -4543,7 +4543,7 @@ function PanelMasterStrip({
4543
4543
  onClick: () => onRefreshFx(),
4544
4544
  disabled: fxLoading,
4545
4545
  className: "px-2 py-1 text-xs rounded-sm border border-sas-border text-sas-muted hover:text-sas-accent hover:border-sas-accent transition-colors disabled:opacity-50",
4546
- title: "Re-scan plugins",
4546
+ title: "Re-scan plugins \u2014 picks up newly installed FX and retries any that failed a previous scan",
4547
4547
  children: fxLoading ? "..." : "Refresh"
4548
4548
  }
4549
4549
  )
@@ -4623,12 +4623,12 @@ function usePanelBus(host, activeSceneId) {
4623
4623
  };
4624
4624
  }, [supported, activeSceneId, bus?.engaged, host]);
4625
4625
  const loadFxList = useCallback10(
4626
- async (force) => {
4626
+ async (opts) => {
4627
4627
  if (!supported || !host.getAvailableFx) return;
4628
- if (fxLoadedRef.current && !force) return;
4628
+ if (fxLoadedRef.current && !opts.force && !opts.rescan) return;
4629
4629
  setFxLoading(true);
4630
4630
  try {
4631
- const list = await host.getAvailableFx();
4631
+ const list = opts.rescan && host.rescanAvailableFx ? await host.rescanAvailableFx() : await host.getAvailableFx();
4632
4632
  setAvailableFx(list);
4633
4633
  fxLoadedRef.current = true;
4634
4634
  } catch {
@@ -4641,7 +4641,7 @@ function usePanelBus(host, activeSceneId) {
4641
4641
  const openPicker = useCallback10(
4642
4642
  (open) => {
4643
4643
  setFxPickerOpen(open);
4644
- if (open) void loadFxList(false);
4644
+ if (open) void loadFxList({});
4645
4645
  },
4646
4646
  [loadFxList]
4647
4647
  );
@@ -4666,7 +4666,7 @@ function usePanelBus(host, activeSceneId) {
4666
4666
  fxLoading,
4667
4667
  fxPickerOpen,
4668
4668
  setFxPickerOpen: openPicker,
4669
- refreshFx: () => void loadFxList(true),
4669
+ refreshFx: () => void loadFxList({ rescan: true }),
4670
4670
  reload,
4671
4671
  onVolumeChange: (volumeDb) => mutate(host.setPanelBusVolume && (() => host.setPanelBusVolume(activeSceneId, volumeDb))),
4672
4672
  onMuteToggle: () => mutate(
@@ -7820,7 +7820,7 @@ function createSurgeSoundAdapter(host, overrides = {}) {
7820
7820
  }
7821
7821
 
7822
7822
  // src/constants/sdk-version.ts
7823
- var PLUGIN_SDK_VERSION = "2.39.0";
7823
+ var PLUGIN_SDK_VERSION = "2.40.0";
7824
7824
 
7825
7825
  // src/utils/format-concurrent-tracks.ts
7826
7826
  function formatConcurrentTracks(ctx) {