@foxglove/extension 2.28.0 → 2.29.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxglove/extension",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Foxglove Technologies",
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-namespace */
2
2
 
3
- import { ExtensionContext as BaseExtensionContext } from "./stable";
3
+ import type { ExtensionContext as BaseExtensionContext } from "./stable";
4
4
 
5
5
  /**
6
6
  * The experimental namespace contains experimental APIs that are not yet stable and WILL change or
@@ -13,9 +13,41 @@ import { ExtensionContext as BaseExtensionContext } from "./stable";
13
13
  * @hidden
14
14
  */
15
15
  export namespace Experimental {
16
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
16
+ /**
17
+ * This type represents the arguments you pass to {@link ExtensionContext.registerDataLoader}
18
+ * when you want to register a data loader.
19
+ *
20
+ * @category Data loaders
21
+ */
22
+ export type RegisterLocalFileDataLoaderArgs = {
23
+ /** The type of data loader. Must be "file" for local file data loaders. */
24
+ type: "file";
25
+ /** The URL to the WebAssembly module for this data loader. */
26
+ wasmUrl: string;
27
+ /** The file extension that this data loader should be associated with. */
28
+ supportedFileType: FileExtension;
29
+ };
30
+
31
+ /**
32
+ * Arguments for registering a custom data loader. Currently, only local file data loaders are
33
+ * supported.
34
+ *
35
+ * See: {@link RegisterLocalFileDataLoaderArgs}
36
+ *
37
+ * @category Data loaders
38
+ */
39
+ export type RegisterDataLoaderArgs = RegisterLocalFileDataLoaderArgs;
40
+
17
41
  export interface ExtensionContext extends BaseExtensionContext {
18
- // no-op until we have experimental APIs
42
+ /**
43
+ * Register a data loader to add support for additional file formats.
44
+ *
45
+ * A data loader teaches Foxglove how to read new file formats. The data loader is a WASM layer
46
+ * that bridges the semantics of the custom file format to Foxglove.
47
+ *
48
+ * See: {@link RegisterDataLoaderArgs}
49
+ */
50
+ registerDataLoader(args: RegisterDataLoaderArgs): void;
19
51
  }
20
52
 
21
53
  export interface ExtensionModule {