@rerun-io/web-viewer 0.0.8-alpha.1 → 0.0.8-alpha.2

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/index.d.ts.map CHANGED
@@ -10,5 +10,5 @@
10
10
  "sourcesContent": [
11
11
  null
12
12
  ],
13
- "mappings": ";cAqBaA,SAASA"
13
+ "mappings": ";cAuBaA,SAASA"
14
14
  }
package/index.js CHANGED
@@ -1,12 +1,14 @@
1
- /** @type {(typeof import("./re_viewer").WebHandle) | null} */
1
+ // @ts-check
2
+
3
+ /** @type {(typeof import("./re_viewer.js").WebHandle) | null} */
2
4
  let WebHandle = null;
3
5
 
4
- /** @returns {Promise<(typeof import("./re_viewer").WebHandle)>} */
6
+ /** @returns {Promise<(typeof import("./re_viewer.js").WebHandle)>} */
5
7
  async function load() {
6
8
  if (WebHandle) {
7
9
  return WebHandle;
8
10
  }
9
- WebHandle = (await import("./re_viewer")).WebHandle;
11
+ WebHandle = (await import("./re_viewer.js")).WebHandle;
10
12
  return WebHandle;
11
13
  }
12
14
 
@@ -20,7 +22,7 @@ function randomId() {
20
22
  }
21
23
 
22
24
  export class WebViewer {
23
- /** @type {(import("./re_viewer").WebHandle) | null} */
25
+ /** @type {(import("./re_viewer.js").WebHandle) | null} */
24
26
  #handle = null;
25
27
 
26
28
  /** @type {HTMLCanvasElement | null} */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rerun-io/web-viewer",
3
- "version": "0.0.8-alpha.1",
3
+ "version": "0.0.8-alpha.2",
4
4
  "description": "Embed the Rerun web viewer in your app",
5
5
  "private": false,
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "build:wasm:debug": "cargo run -p re_build_web_viewer -- --debug --module -o rerun_js/web-viewer",
9
9
  "build:types": "dts-buddy",
10
10
  "build": "npm run build:wasm && npm run build:types",
11
- "prepublishOnly": "dts-buddy"
11
+ "prepublishOnly": "tsc --noEmit && dts-buddy"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -39,6 +39,7 @@
39
39
  "tsconfig.json"
40
40
  ],
41
41
  "devDependencies": {
42
- "dts-buddy": "^0.3.0"
42
+ "dts-buddy": "^0.3.0",
43
+ "typescript": "^5.2.2"
43
44
  }
44
45
  }
package/re_viewer.d.ts ADDED
@@ -0,0 +1,135 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Used to set the "email" property in the analytics config,
5
+ * in the same way as `rerun analytics email YOURNAME@rerun.io`.
6
+ *
7
+ * This one just panics when it fails, as it's only ever really run
8
+ * by rerun employees manually in `app.rerun.io` and `demo.rerun.io`.
9
+ * @param {string} email
10
+ */
11
+ export function set_email(email: string): void;
12
+ /**
13
+ * @returns {boolean}
14
+ */
15
+ export function is_webgpu_build(): boolean;
16
+ /**
17
+ */
18
+ export class IntoUnderlyingByteSource {
19
+ free(): void;
20
+ /**
21
+ * @param {any} controller
22
+ */
23
+ start(controller: any): void;
24
+ /**
25
+ * @param {any} controller
26
+ * @returns {Promise<any>}
27
+ */
28
+ pull(controller: any): Promise<any>;
29
+ /**
30
+ */
31
+ cancel(): void;
32
+ /**
33
+ */
34
+ readonly autoAllocateChunkSize: number;
35
+ /**
36
+ */
37
+ readonly type: string;
38
+ }
39
+ /**
40
+ */
41
+ export class IntoUnderlyingSink {
42
+ free(): void;
43
+ /**
44
+ * @param {any} chunk
45
+ * @returns {Promise<any>}
46
+ */
47
+ write(chunk: any): Promise<any>;
48
+ /**
49
+ * @returns {Promise<any>}
50
+ */
51
+ close(): Promise<any>;
52
+ /**
53
+ * @param {any} reason
54
+ * @returns {Promise<any>}
55
+ */
56
+ abort(reason: any): Promise<any>;
57
+ }
58
+ /**
59
+ */
60
+ export class IntoUnderlyingSource {
61
+ free(): void;
62
+ /**
63
+ * @param {any} controller
64
+ * @returns {Promise<any>}
65
+ */
66
+ pull(controller: any): Promise<any>;
67
+ /**
68
+ */
69
+ cancel(): void;
70
+ }
71
+ /**
72
+ * Raw options for [`pipeTo()`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo).
73
+ */
74
+ export class PipeOptions {
75
+ free(): void;
76
+ /**
77
+ */
78
+ readonly preventAbort: boolean;
79
+ /**
80
+ */
81
+ readonly preventCancel: boolean;
82
+ /**
83
+ */
84
+ readonly preventClose: boolean;
85
+ /**
86
+ */
87
+ readonly signal: AbortSignal | undefined;
88
+ }
89
+ /**
90
+ */
91
+ export class QueuingStrategy {
92
+ free(): void;
93
+ /**
94
+ */
95
+ readonly highWaterMark: number;
96
+ }
97
+ /**
98
+ * Raw options for [`getReader()`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader).
99
+ */
100
+ export class ReadableStreamGetReaderOptions {
101
+ free(): void;
102
+ /**
103
+ */
104
+ readonly mode: any;
105
+ }
106
+ /**
107
+ */
108
+ export class WebHandle {
109
+ free(): void;
110
+ /**
111
+ */
112
+ constructor();
113
+ /**
114
+ * The `url` is an optional URL to either an .rrd file over http, or a Rerun WebSocket server.
115
+ * @param {string} canvas_id
116
+ * @param {string | undefined} url
117
+ * @returns {Promise<void>}
118
+ */
119
+ start(canvas_id: string, url?: string): Promise<void>;
120
+ /**
121
+ */
122
+ destroy(): void;
123
+ /**
124
+ * @returns {boolean}
125
+ */
126
+ has_panicked(): boolean;
127
+ /**
128
+ * @returns {string | undefined}
129
+ */
130
+ panic_message(): string | undefined;
131
+ /**
132
+ * @returns {string | undefined}
133
+ */
134
+ panic_callstack(): string | undefined;
135
+ }
package/re_viewer.js ADDED
@@ -0,0 +1,4 @@
1
+ import * as wasm from "./re_viewer_bg.wasm";
2
+ import { __wbg_set_wasm } from "./re_viewer_bg.js";
3
+ __wbg_set_wasm(wasm);
4
+ export * from "./re_viewer_bg.js";