@lapis-notes/api 0.2.7 → 0.3.1

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.
@@ -729,7 +729,7 @@ export declare const pluginCatalogEntrySchema: z.ZodEffects<z.ZodUnknown, {
729
729
  url: string;
730
730
  sourceUrl: string;
731
731
  sha256: string;
732
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
732
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
733
733
  } | undefined;
734
734
  dark?: {
735
735
  size: number;
@@ -738,7 +738,7 @@ export declare const pluginCatalogEntrySchema: z.ZodEffects<z.ZodUnknown, {
738
738
  url: string;
739
739
  sourceUrl: string;
740
740
  sha256: string;
741
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
741
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
742
742
  } | undefined;
743
743
  light?: {
744
744
  size: number;
@@ -747,7 +747,7 @@ export declare const pluginCatalogEntrySchema: z.ZodEffects<z.ZodUnknown, {
747
747
  url: string;
748
748
  sourceUrl: string;
749
749
  sha256: string;
750
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
750
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
751
751
  } | undefined;
752
752
  full?: {
753
753
  size: number;
@@ -756,7 +756,7 @@ export declare const pluginCatalogEntrySchema: z.ZodEffects<z.ZodUnknown, {
756
756
  url: string;
757
757
  sourceUrl: string;
758
758
  sha256: string;
759
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
759
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
760
760
  } | undefined;
761
761
  };
762
762
  alt: string;
@@ -827,7 +827,7 @@ export declare const pluginCatalogIndexSchema: z.ZodEffects<z.ZodUnknown, {
827
827
  url: string;
828
828
  sourceUrl: string;
829
829
  sha256: string;
830
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
830
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
831
831
  } | undefined;
832
832
  dark?: {
833
833
  size: number;
@@ -836,7 +836,7 @@ export declare const pluginCatalogIndexSchema: z.ZodEffects<z.ZodUnknown, {
836
836
  url: string;
837
837
  sourceUrl: string;
838
838
  sha256: string;
839
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
839
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
840
840
  } | undefined;
841
841
  light?: {
842
842
  size: number;
@@ -845,7 +845,7 @@ export declare const pluginCatalogIndexSchema: z.ZodEffects<z.ZodUnknown, {
845
845
  url: string;
846
846
  sourceUrl: string;
847
847
  sha256: string;
848
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
848
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
849
849
  } | undefined;
850
850
  full?: {
851
851
  size: number;
@@ -854,7 +854,7 @@ export declare const pluginCatalogIndexSchema: z.ZodEffects<z.ZodUnknown, {
854
854
  url: string;
855
855
  sourceUrl: string;
856
856
  sha256: string;
857
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
857
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
858
858
  } | undefined;
859
859
  };
860
860
  alt: string;
@@ -2677,7 +2677,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2677
2677
  url: string;
2678
2678
  sourceUrl: string;
2679
2679
  sha256: string;
2680
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2680
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2681
2681
  } | undefined;
2682
2682
  dark?: {
2683
2683
  size: number;
@@ -2686,7 +2686,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2686
2686
  url: string;
2687
2687
  sourceUrl: string;
2688
2688
  sha256: string;
2689
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2689
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2690
2690
  } | undefined;
2691
2691
  light?: {
2692
2692
  size: number;
@@ -2695,7 +2695,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2695
2695
  url: string;
2696
2696
  sourceUrl: string;
2697
2697
  sha256: string;
2698
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2698
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2699
2699
  } | undefined;
2700
2700
  full?: {
2701
2701
  size: number;
@@ -2704,7 +2704,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2704
2704
  url: string;
2705
2705
  sourceUrl: string;
2706
2706
  sha256: string;
2707
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2707
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2708
2708
  } | undefined;
2709
2709
  };
2710
2710
  alt: string;
@@ -2719,7 +2719,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2719
2719
  url: string;
2720
2720
  sourceUrl: string;
2721
2721
  sha256: string;
2722
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2722
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2723
2723
  } | undefined;
2724
2724
  dark?: {
2725
2725
  size: number;
@@ -2728,7 +2728,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2728
2728
  url: string;
2729
2729
  sourceUrl: string;
2730
2730
  sha256: string;
2731
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2731
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2732
2732
  } | undefined;
2733
2733
  light?: {
2734
2734
  size: number;
@@ -2737,7 +2737,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2737
2737
  url: string;
2738
2738
  sourceUrl: string;
2739
2739
  sha256: string;
2740
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2740
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2741
2741
  } | undefined;
2742
2742
  full?: {
2743
2743
  size: number;
@@ -2746,7 +2746,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2746
2746
  url: string;
2747
2747
  sourceUrl: string;
2748
2748
  sha256: string;
2749
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2749
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2750
2750
  } | undefined;
2751
2751
  };
2752
2752
  alt: string;
@@ -2760,7 +2760,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2760
2760
  url: string;
2761
2761
  sourceUrl: string;
2762
2762
  sha256: string;
2763
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2763
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2764
2764
  } | undefined;
2765
2765
  dark?: {
2766
2766
  size: number;
@@ -2769,7 +2769,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2769
2769
  url: string;
2770
2770
  sourceUrl: string;
2771
2771
  sha256: string;
2772
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2772
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2773
2773
  } | undefined;
2774
2774
  light?: {
2775
2775
  size: number;
@@ -2778,7 +2778,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2778
2778
  url: string;
2779
2779
  sourceUrl: string;
2780
2780
  sha256: string;
2781
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2781
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2782
2782
  } | undefined;
2783
2783
  full?: {
2784
2784
  size: number;
@@ -2787,7 +2787,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2787
2787
  url: string;
2788
2788
  sourceUrl: string;
2789
2789
  sha256: string;
2790
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2790
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2791
2791
  } | undefined;
2792
2792
  };
2793
2793
  alt: string;
@@ -2806,7 +2806,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2806
2806
  url: string;
2807
2807
  sourceUrl: string;
2808
2808
  sha256: string;
2809
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2809
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2810
2810
  } | undefined;
2811
2811
  dark?: {
2812
2812
  size: number;
@@ -2815,7 +2815,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2815
2815
  url: string;
2816
2816
  sourceUrl: string;
2817
2817
  sha256: string;
2818
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2818
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2819
2819
  } | undefined;
2820
2820
  light?: {
2821
2821
  size: number;
@@ -2824,7 +2824,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2824
2824
  url: string;
2825
2825
  sourceUrl: string;
2826
2826
  sha256: string;
2827
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2827
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2828
2828
  } | undefined;
2829
2829
  full?: {
2830
2830
  size: number;
@@ -2833,7 +2833,7 @@ export declare const pluginCatalogDetailSchema: z.ZodEffects<z.ZodUnknown, {
2833
2833
  url: string;
2834
2834
  sourceUrl: string;
2835
2835
  sha256: string;
2836
- mediaType: "image/png" | "image/webp" | "image/svg+xml";
2836
+ mediaType: "image/svg+xml" | "image/png" | "image/webp";
2837
2837
  } | undefined;
2838
2838
  };
2839
2839
  alt: string;
@@ -294,6 +294,7 @@ export declare class PluginManager extends EventDispatcher<PluginEvents> {
294
294
  activateForPath(path: string): Promise<boolean>;
295
295
  private activateIndexedExtensionsForWorkspace;
296
296
  private activateDeferredIndexedExtension;
297
+ private performDeferredIndexedExtensionActivation;
297
298
  private shouldDeferManifestActivation;
298
299
  private shouldDeferIndexedExtensionActivation;
299
300
  private collectIndexedExtensionActivationEvents;
@@ -412,6 +412,7 @@ export class PluginManager extends EventDispatcher {
412
412
  #systemExtensionServiceProviders = new Map();
413
413
  #indexedActivationRegistry = new Map();
414
414
  #deferredIndexedExtensions = new Map();
415
+ #indexedActivationFlights = new Map();
415
416
  #communityPluginHost;
416
417
  #pluginAssetServer;
417
418
  #unavailablePlugins;
@@ -439,7 +440,8 @@ export class PluginManager extends EventDispatcher {
439
440
  })
440
441
  : commonJsHost;
441
442
  this.app.configuration.on("plugin-data-updated", (event) => {
442
- if (event.origin === "plugin-save") {
443
+ if (event.origin === "plugin-save" ||
444
+ event.origin === "external-reload") {
443
445
  return;
444
446
  }
445
447
  void this.syncLegacyPluginData(event.pluginId, event.value === undefined && event.prev !== undefined);
@@ -2546,7 +2548,21 @@ export class PluginManager extends EventDispatcher {
2546
2548
  }
2547
2549
  }
2548
2550
  }
2549
- async activateDeferredIndexedExtension(pluginId, trigger) {
2551
+ activateDeferredIndexedExtension(pluginId, trigger) {
2552
+ const pending = this.#indexedActivationFlights.get(pluginId);
2553
+ if (pending)
2554
+ return pending;
2555
+ // Publish the flight before evaluating code, including reentrant triggers.
2556
+ const flight = Promise.resolve().then(() => this.performDeferredIndexedExtensionActivation(pluginId, trigger));
2557
+ this.#indexedActivationFlights.set(pluginId, flight);
2558
+ const release = () => {
2559
+ if (this.#indexedActivationFlights.get(pluginId) === flight)
2560
+ this.#indexedActivationFlights.delete(pluginId);
2561
+ };
2562
+ void flight.then(release, release);
2563
+ return flight;
2564
+ }
2565
+ async performDeferredIndexedExtensionActivation(pluginId, trigger) {
2550
2566
  const deferred = this.#deferredIndexedExtensions.get(pluginId);
2551
2567
  if (!deferred) {
2552
2568
  return false;