@rerun-io/web-viewer 0.17.0-alpha.8 → 0.17.0-rc.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.
package/re_viewer.d.ts CHANGED
@@ -1,145 +1,229 @@
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`.
9
- * @param {string} email
10
- */
11
- export function set_email(email: string): void;
12
- /**
13
- */
14
- export class IntoUnderlyingByteSource {
15
- free(): void;
16
- /**
17
- * @param {ReadableByteStreamController} controller
18
- */
19
- start(controller: ReadableByteStreamController): void;
20
- /**
21
- * @param {ReadableByteStreamController} controller
22
- * @returns {Promise<any>}
23
- */
24
- pull(controller: ReadableByteStreamController): Promise<any>;
25
- /**
26
- */
27
- cancel(): void;
28
- /**
29
- */
30
- readonly autoAllocateChunkSize: number;
31
- /**
32
- */
33
- readonly type: string;
1
+
2
+ declare namespace wasm_bindgen {
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Used to set the "email" property in the analytics config,
7
+ * in the same way as `rerun analytics email YOURNAME@rerun.io`.
8
+ *
9
+ * This one just panics when it fails, as it's only ever really run
10
+ * by rerun employees manually in `app.rerun.io`.
11
+ * @param {string} email
12
+ */
13
+ export function set_email(email: string): void;
14
+ /**
15
+ */
16
+ export class IntoUnderlyingByteSource {
17
+ free(): void;
18
+ /**
19
+ * @param {ReadableByteStreamController} controller
20
+ */
21
+ start(controller: ReadableByteStreamController): void;
22
+ /**
23
+ * @param {ReadableByteStreamController} controller
24
+ * @returns {Promise<any>}
25
+ */
26
+ pull(controller: ReadableByteStreamController): Promise<any>;
27
+ /**
28
+ */
29
+ cancel(): void;
30
+ /**
31
+ */
32
+ readonly autoAllocateChunkSize: number;
33
+ /**
34
+ */
35
+ readonly type: string;
36
+ }
37
+ /**
38
+ */
39
+ export class IntoUnderlyingSink {
40
+ free(): void;
41
+ /**
42
+ * @param {any} chunk
43
+ * @returns {Promise<any>}
44
+ */
45
+ write(chunk: any): Promise<any>;
46
+ /**
47
+ * @returns {Promise<any>}
48
+ */
49
+ close(): Promise<any>;
50
+ /**
51
+ * @param {any} reason
52
+ * @returns {Promise<any>}
53
+ */
54
+ abort(reason: any): Promise<any>;
55
+ }
56
+ /**
57
+ */
58
+ export class IntoUnderlyingSource {
59
+ free(): void;
60
+ /**
61
+ * @param {ReadableStreamDefaultController} controller
62
+ * @returns {Promise<any>}
63
+ */
64
+ pull(controller: ReadableStreamDefaultController): Promise<any>;
65
+ /**
66
+ */
67
+ cancel(): void;
68
+ }
69
+ /**
70
+ */
71
+ export class WebHandle {
72
+ free(): void;
73
+ /**
74
+ * @param {any} app_options
75
+ */
76
+ constructor(app_options: any);
77
+ /**
78
+ * - `url` is an optional URL to either an .rrd file over http, or a Rerun WebSocket server.
79
+ * - `manifest_url` is an optional URL to an `examples_manifest.json` file over http.
80
+ * - `force_wgpu_backend` is an optional string to force a specific backend, either `webgl` or `webgpu`.
81
+ * @param {string} canvas_id
82
+ * @returns {Promise<void>}
83
+ */
84
+ start(canvas_id: string): Promise<void>;
85
+ /**
86
+ * @param {boolean | undefined} [value]
87
+ */
88
+ toggle_panel_overrides(value?: boolean): void;
89
+ /**
90
+ * @param {string} panel
91
+ * @param {string | undefined} [state]
92
+ */
93
+ override_panel_state(panel: string, state?: string): void;
94
+ /**
95
+ */
96
+ destroy(): void;
97
+ /**
98
+ * @returns {boolean}
99
+ */
100
+ has_panicked(): boolean;
101
+ /**
102
+ * @returns {string | undefined}
103
+ */
104
+ panic_message(): string | undefined;
105
+ /**
106
+ * @returns {string | undefined}
107
+ */
108
+ panic_callstack(): string | undefined;
109
+ /**
110
+ * Add a new receiver streaming data from the given url.
111
+ *
112
+ * If `follow_if_http` is `true`, and the url is an HTTP source, the viewer will open the stream
113
+ * in `Following` mode rather than `Playing` mode.
114
+ *
115
+ * Websocket streams are always opened in `Following` mode.
116
+ *
117
+ * It is an error to open a channel twice with the same id.
118
+ * @param {string} url
119
+ * @param {boolean | undefined} [follow_if_http]
120
+ */
121
+ add_receiver(url: string, follow_if_http?: boolean): void;
122
+ /**
123
+ * @param {string} url
124
+ */
125
+ remove_receiver(url: string): void;
126
+ /**
127
+ * Open a new channel for streaming data.
128
+ *
129
+ * It is an error to open a channel twice with the same id.
130
+ * @param {string} id
131
+ * @param {string} channel_name
132
+ */
133
+ open_channel(id: string, channel_name: string): void;
134
+ /**
135
+ * Close an existing channel for streaming data.
136
+ *
137
+ * No-op if the channel is already closed.
138
+ * @param {string} id
139
+ */
140
+ close_channel(id: string): void;
141
+ /**
142
+ * Add an rrd to the viewer directly from a byte array.
143
+ * @param {string} id
144
+ * @param {Uint8Array} data
145
+ */
146
+ send_rrd_to_channel(id: string, data: Uint8Array): void;
147
+ }
148
+
34
149
  }
35
- /**
36
- */
37
- export class IntoUnderlyingSink {
38
- free(): void;
39
- /**
40
- * @param {any} chunk
41
- * @returns {Promise<any>}
42
- */
43
- write(chunk: any): Promise<any>;
44
- /**
45
- * @returns {Promise<any>}
46
- */
47
- close(): Promise<any>;
48
- /**
49
- * @param {any} reason
50
- * @returns {Promise<any>}
51
- */
52
- abort(reason: any): Promise<any>;
53
- }
54
- /**
55
- */
56
- export class IntoUnderlyingSource {
57
- free(): void;
58
- /**
59
- * @param {ReadableStreamDefaultController} controller
60
- * @returns {Promise<any>}
61
- */
62
- pull(controller: ReadableStreamDefaultController): Promise<any>;
63
- /**
64
- */
65
- cancel(): void;
150
+
151
+ declare type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
152
+
153
+ declare interface InitOutput {
154
+ readonly memory: WebAssembly.Memory;
155
+ readonly __wbg_webhandle_free: (a: number) => void;
156
+ readonly webhandle_new: (a: number, b: number) => void;
157
+ readonly webhandle_start: (a: number, b: number, c: number) => number;
158
+ readonly webhandle_toggle_panel_overrides: (a: number, b: number) => void;
159
+ readonly webhandle_override_panel_state: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
160
+ readonly webhandle_destroy: (a: number) => void;
161
+ readonly webhandle_has_panicked: (a: number) => number;
162
+ readonly webhandle_panic_message: (a: number, b: number) => void;
163
+ readonly webhandle_panic_callstack: (a: number, b: number) => void;
164
+ readonly webhandle_add_receiver: (a: number, b: number, c: number, d: number) => void;
165
+ readonly webhandle_remove_receiver: (a: number, b: number, c: number) => void;
166
+ readonly webhandle_open_channel: (a: number, b: number, c: number, d: number, e: number) => void;
167
+ readonly webhandle_close_channel: (a: number, b: number, c: number) => void;
168
+ readonly webhandle_send_rrd_to_channel: (a: number, b: number, c: number, d: number, e: number) => void;
169
+ readonly set_email: (a: number, b: number) => void;
170
+ readonly wgpu_render_bundle_set_pipeline: (a: number, b: number) => void;
171
+ readonly wgpu_render_bundle_set_bind_group: (a: number, b: number, c: number, d: number, e: number) => void;
172
+ readonly wgpu_render_bundle_set_vertex_buffer: (a: number, b: number, c: number, d: number, e: number) => void;
173
+ readonly wgpu_render_bundle_set_push_constants: (a: number, b: number, c: number, d: number, e: number) => void;
174
+ readonly wgpu_render_bundle_draw: (a: number, b: number, c: number, d: number, e: number) => void;
175
+ readonly wgpu_render_bundle_draw_indexed: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
176
+ readonly wgpu_render_bundle_draw_indirect: (a: number, b: number, c: number) => void;
177
+ readonly wgpu_render_bundle_draw_indexed_indirect: (a: number, b: number, c: number) => void;
178
+ readonly wgpu_render_bundle_set_index_buffer: (a: number, b: number, c: number, d: number, e: number) => void;
179
+ readonly wgpu_render_bundle_pop_debug_group: (a: number) => void;
180
+ readonly wgpu_render_bundle_insert_debug_marker: (a: number, b: number) => void;
181
+ readonly wgpu_render_bundle_push_debug_group: (a: number, b: number) => void;
182
+ readonly __wbg_intounderlyingsink_free: (a: number) => void;
183
+ readonly intounderlyingsink_write: (a: number, b: number) => number;
184
+ readonly intounderlyingsink_close: (a: number) => number;
185
+ readonly intounderlyingsink_abort: (a: number, b: number) => number;
186
+ readonly __wbg_intounderlyingbytesource_free: (a: number) => void;
187
+ readonly intounderlyingbytesource_type: (a: number, b: number) => void;
188
+ readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
189
+ readonly intounderlyingbytesource_start: (a: number, b: number) => void;
190
+ readonly intounderlyingbytesource_pull: (a: number, b: number) => number;
191
+ readonly intounderlyingbytesource_cancel: (a: number) => void;
192
+ readonly __wbg_intounderlyingsource_free: (a: number) => void;
193
+ readonly intounderlyingsource_pull: (a: number, b: number) => number;
194
+ readonly intounderlyingsource_cancel: (a: number) => void;
195
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
196
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
197
+ readonly __wbindgen_export_2: WebAssembly.Table;
198
+ readonly __wbindgen_export_3: WebAssembly.Table;
199
+ readonly wasm_bindgen__convert__closures__invoke0_mut__h39ebdf83e5d405ac: (a: number, b: number) => void;
200
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
201
+ readonly closure160_externref_shim: (a: number, b: number, c: number, d: number) => void;
202
+ readonly __externref_table_dealloc: (a: number) => void;
203
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h481a4c2bb2473fc6: (a: number, b: number) => void;
204
+ readonly closure5299_externref_shim: (a: number, b: number, c: number) => void;
205
+ readonly wasm_bindgen__convert__closures__invoke0_mut__h1bc64302f4af9824: (a: number, b: number, c: number) => void;
206
+ readonly closure8026_externref_shim: (a: number, b: number, c: number) => void;
207
+ readonly closure11622_externref_shim: (a: number, b: number, c: number) => void;
208
+ readonly closure14102_externref_shim: (a: number, b: number, c: number) => void;
209
+ readonly closure14828_externref_shim: (a: number, b: number, c: number) => void;
210
+ readonly closure14841_externref_shim: (a: number, b: number, c: number) => void;
211
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
212
+ readonly __wbindgen_exn_store: (a: number) => void;
213
+ readonly __externref_table_alloc: () => number;
214
+ readonly closure17225_externref_shim: (a: number, b: number, c: number, d: number) => void;
215
+ readonly __wbindgen_start: () => void;
66
216
  }
217
+
67
218
  /**
68
- */
69
- export class WebHandle {
70
- free(): void;
71
- /**
72
- * @param {any} app_options
73
- */
74
- constructor(app_options: any);
75
- /**
76
- * - `url` is an optional URL to either an .rrd file over http, or a Rerun WebSocket server.
77
- * - `manifest_url` is an optional URL to an `examples_manifest.json` file over http.
78
- * - `force_wgpu_backend` is an optional string to force a specific backend, either `webgl` or `webgpu`.
79
- * @param {string} canvas_id
80
- * @returns {Promise<void>}
81
- */
82
- start(canvas_id: string): Promise<void>;
83
- /**
84
- * @param {boolean | undefined} [value]
85
- */
86
- toggle_panel_overrides(value?: boolean): void;
87
- /**
88
- * @param {string} panel
89
- * @param {string | undefined} [state]
90
- */
91
- override_panel_state(panel: string, state?: string): void;
92
- /**
93
- */
94
- destroy(): void;
95
- /**
96
- * @returns {boolean}
97
- */
98
- has_panicked(): boolean;
99
- /**
100
- * @returns {string | undefined}
101
- */
102
- panic_message(): string | undefined;
103
- /**
104
- * @returns {string | undefined}
105
- */
106
- panic_callstack(): string | undefined;
107
- /**
108
- * Add a new receiver streaming data from the given url.
109
- *
110
- * If `follow_if_http` is `true`, and the url is an HTTP source, the viewer will open the stream
111
- * in `Following` mode rather than `Playing` mode.
219
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
220
+ * for everything else, calls `WebAssembly.instantiate` directly.
112
221
  *
113
- * Websocket streams are always opened in `Following` mode.
222
+ * @param {InitInput | Promise<InitInput>} module_or_path
114
223
  *
115
- * It is an error to open a channel twice with the same id.
116
- * @param {string} url
117
- * @param {boolean | undefined} [follow_if_http]
224
+ * @returns {Promise<InitOutput>}
118
225
  */
119
- add_receiver(url: string, follow_if_http?: boolean): void;
120
- /**
121
- * @param {string} url
122
- */
123
- remove_receiver(url: string): void;
124
- /**
125
- * Open a new channel for streaming data.
126
- *
127
- * It is an error to open a channel twice with the same id.
128
- * @param {string} id
129
- * @param {string} channel_name
130
- */
131
- open_channel(id: string, channel_name: string): void;
132
- /**
133
- * Close an existing channel for streaming data.
134
- *
135
- * No-op if the channel is already closed.
136
- * @param {string} id
137
- */
138
- close_channel(id: string): void;
139
- /**
140
- * Add an rrd to the viewer directly from a byte array.
141
- * @param {string} id
142
- * @param {Uint8Array} data
143
- */
144
- send_rrd_to_channel(id: string, data: Uint8Array): void;
145
- }
226
+ declare function wasm_bindgen (module_or_path: InitInput | Promise<InitInput>): Promise<InitOutput>;
227
+
228
+ export type WebHandle = wasm_bindgen.WebHandle;
229
+ export default function(): wasm_bindgen;