@dreamlake/dreamdb 0.5.1 → 0.5.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/web/dreamdb.js CHANGED
@@ -28,6 +28,22 @@ export class S3Backend {
28
28
  const ret = wasm.s3backend_get(this.__wbg_ptr, ptr0, len0, _opts);
29
29
  return ret;
30
30
  }
31
+ /**
32
+ * Stream `path` without first aggregating the response in wasm memory.
33
+ *
34
+ * Returning the length beside the browser stream satisfies the optional
35
+ * `Backend.getStream` contract. Older injected backends that implement
36
+ * only [`Self::get`] remain compatible, but cannot claim bounded memory
37
+ * for historical oversized inline Track reads.
38
+ * @param {string} path
39
+ * @returns {Promise<any>}
40
+ */
41
+ getStream(path) {
42
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
43
+ const len0 = WASM_VECTOR_LEN;
44
+ const ret = wasm.s3backend_getStream(this.__wbg_ptr, ptr0, len0);
45
+ return ret;
46
+ }
31
47
  /**
32
48
  * List object paths under `prefix`. Stub (returns empty); the current
33
49
  * consumer read paths don't require listing.
@@ -89,6 +105,36 @@ export class Space {
89
105
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
90
106
  }
91
107
  }
108
+ /**
109
+ * The Space's human-readable description, or `undefined` when none is set.
110
+ *
111
+ * The read half of `Authoring.setDescription` (#129). It lives here rather
112
+ * than on `Authoring` because that type is `write-full` and so exists only
113
+ * in the Node build — a description is metadata a READER wants, and
114
+ * `Space` is the surface all three build targets share.
115
+ *
116
+ * `async` although `Dataset::description` is not: the value comes from the
117
+ * Dataset this Space opens lazily at the Manifest hash already pinned by
118
+ * this Space, so the first call may perform that open without re-resolving
119
+ * a source Ref.
120
+ *
121
+ * Deliberately routed through `Dataset::description` rather than read out
122
+ * of `self.manifest`'s registry, which would be shorter and would also
123
+ * serve the cached decoded Manifest. `Dataset::recover_meta` is not a prefix
124
+ * filter: it accepts the legacy `vortex.*` namespace as well as
125
+ * `dreamdb.*`, canonicalises, and drops structural keys. Matching
126
+ * `dreamdb.description` here would silently return nothing for a legacy
127
+ * Space whose description is on disk and readable from Rust — the exact
128
+ * defect `recover_meta`'s own comment records.
129
+ *
130
+ * `Option<String>` marshals to `string | undefined`, NOT to `""`. An unset
131
+ * description and an empty one stay distinguishable across the boundary.
132
+ * @returns {Promise<string | undefined>}
133
+ */
134
+ description() {
135
+ const ret = wasm.space_description(this.__wbg_ptr);
136
+ return ret;
137
+ }
92
138
  /**
93
139
  * Open a Space from a `.../refs/<name>` or `.../manifests/<hash>` URI,
94
140
  * resolving the ref (if any) and loading the manifest. If `backend` is
@@ -238,6 +284,30 @@ export class Space {
238
284
  const ret = wasm.space_queryVector(this.__wbg_ptr, ptr0, len0, ptr1, len1, opts);
239
285
  return ret;
240
286
  }
287
+ /**
288
+ * Read an Event/Unbucketed or Continuous/TimeBatch typed-array field as
289
+ * `Map<anchorString, {values, shape, ...}>`.
290
+ * @param {string} field
291
+ * @returns {Promise<Map<any, any>>}
292
+ */
293
+ readArrayColumn(field) {
294
+ const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
295
+ const len0 = WASM_VECTOR_LEN;
296
+ const ret = wasm.space_readArrayColumn(this.__wbg_ptr, ptr0, len0);
297
+ return ret;
298
+ }
299
+ /**
300
+ * Read a typed-array Constant and decode it to a JS TypedArray plus its
301
+ * authoritative shape and semantic metadata.
302
+ * @param {string} field
303
+ * @returns {Promise<any>}
304
+ */
305
+ readArrayConstant(field) {
306
+ const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
307
+ const len0 = WASM_VECTOR_LEN;
308
+ const ret = wasm.space_readArrayConstant(this.__wbg_ptr, ptr0, len0);
309
+ return ret;
310
+ }
241
311
  /**
242
312
  * Read a scalar track as a `Map<anchorString, value>`. Single-anchor
243
313
  * entries resolve from the track index; multi-anchor entries fetch (and
@@ -250,6 +320,22 @@ export class Space {
250
320
  const ret = wasm.space_readScalarColumn(this.__wbg_ptr, track, _opts);
251
321
  return ret;
252
322
  }
323
+ /**
324
+ * Fetch verified initialization and complete Fragments overlapping one
325
+ * item-relative half-open range. This materializes the selected bytes; it
326
+ * is not a streaming API.
327
+ * @param {string} field
328
+ * @param {Uint8Array} item_key
329
+ * @param {any} relative_start_ns
330
+ * @param {any} relative_end_ns
331
+ * @returns {Promise<any>}
332
+ */
333
+ readVideoItemRange(field, item_key, relative_start_ns, relative_end_ns) {
334
+ const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
335
+ const len0 = WASM_VECTOR_LEN;
336
+ const ret = wasm.space_readVideoItemRange(this.__wbg_ptr, ptr0, len0, item_key, relative_start_ns, relative_end_ns);
337
+ return ret;
338
+ }
253
339
  /**
254
340
  * Fetch a track object and return its `object_index` (array of CBOR
255
341
  * entries). Inline indexes only — paged indexes are not resolved (matching
@@ -261,6 +347,40 @@ export class Space {
261
347
  const ret = wasm.space_resolveObjectIndex(this.__wbg_ptr, track);
262
348
  return ret;
263
349
  }
350
+ /**
351
+ * Semantic-cache capacity in bytes (spec/0006 §3.6). Default 1 GiB.
352
+ * @returns {Promise<number>}
353
+ */
354
+ semanticCacheCapacity() {
355
+ const ret = wasm.space_semanticCacheCapacity(this.__wbg_ptr);
356
+ return ret;
357
+ }
358
+ /**
359
+ * Semantic-cache occupancy as `{ entries, bytesUsed, maxBytes }`.
360
+ * @returns {Promise<object>}
361
+ */
362
+ semanticCacheStats() {
363
+ const ret = wasm.space_semanticCacheStats(this.__wbg_ptr);
364
+ return ret;
365
+ }
366
+ /**
367
+ * Set the semantic-cache capacity in bytes, evicting down to it before
368
+ * returning. Returns the bytes evicted. `0` disables the cache.
369
+ *
370
+ * An index whose accounted size exceeds the cap is not cached and is
371
+ * re-fetched on every query, reported honestly as a miss. The default is
372
+ * not raised globally to suit one corpus.
373
+ *
374
+ * Sizing is workload- and architecture-dependent, and figures measured on
375
+ * a 64-bit host do NOT carry over here: `usize` is 32 bits on `wasm32`, so
376
+ * every offset and length inside a decoded index accounts differently.
377
+ * @param {number} n_bytes
378
+ * @returns {Promise<number>}
379
+ */
380
+ setSemanticCacheCapacity(n_bytes) {
381
+ const ret = wasm.space_setSemanticCacheCapacity(this.__wbg_ptr, n_bytes);
382
+ return ret;
383
+ }
264
384
  /**
265
385
  * Base32 hash of the manifest's first timeline.
266
386
  * @returns {string}
@@ -292,7 +412,10 @@ export class Space {
292
412
  const ptr0 = passStringToWasm0(key_or_modality, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
293
413
  const len0 = WASM_VECTOR_LEN;
294
414
  const ret = wasm.space_trackFor(this.__wbg_ptr, ptr0, len0);
295
- return ret;
415
+ if (ret[2]) {
416
+ throw takeFromExternrefTable0(ret[1]);
417
+ }
418
+ return takeFromExternrefTable0(ret[0]);
296
419
  }
297
420
  /**
298
421
  * List resolved tracks from this manifest.
@@ -300,6 +423,35 @@ export class Space {
300
423
  */
301
424
  tracks() {
302
425
  const ret = wasm.space_tracks(this.__wbg_ptr);
426
+ if (ret[2]) {
427
+ throw takeFromExternrefTable0(ret[1]);
428
+ }
429
+ return takeFromExternrefTable0(ret[0]);
430
+ }
431
+ /**
432
+ * Look up the logical VideoItem containing one absolute Timeline anchor
433
+ * without fetching media. Exact nanosecond values are returned as bigint.
434
+ * @param {string} field
435
+ * @param {any} anchor_ns
436
+ * @returns {Promise<any>}
437
+ */
438
+ videoItemAt(field, anchor_ns) {
439
+ const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
440
+ const len0 = WASM_VECTOR_LEN;
441
+ const ret = wasm.space_videoItemAt(this.__wbg_ptr, ptr0, len0, anchor_ns);
442
+ return ret;
443
+ }
444
+ /**
445
+ * Look up one logical VideoItem by its stable opaque key without fetching
446
+ * initialization or Fragment bytes.
447
+ * @param {string} field
448
+ * @param {Uint8Array} item_key
449
+ * @returns {Promise<any>}
450
+ */
451
+ videoItemByKey(field, item_key) {
452
+ const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
453
+ const len0 = WASM_VECTOR_LEN;
454
+ const ret = wasm.space_videoItemByKey(this.__wbg_ptr, ptr0, len0, item_key);
303
455
  return ret;
304
456
  }
305
457
  }
@@ -749,6 +901,24 @@ export function timeBucket(t_start, duration) {
749
901
  return BigInt.asUintN(64, ret[0]);
750
902
  }
751
903
 
904
+ /**
905
+ * Decode one spec/0025 item using the same declaration and payload path as
906
+ * `Space.readArrayColumn`, without requiring storage IO. This is the SDK's
907
+ * pure conformance entry point for language-neutral vectors.
908
+ * @param {any} item_type
909
+ * @param {Uint8Array} payload
910
+ * @returns {any}
911
+ */
912
+ export function typedArrayDecode(item_type, payload) {
913
+ const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
914
+ const len0 = WASM_VECTOR_LEN;
915
+ const ret = wasm.typedArrayDecode(item_type, ptr0, len0);
916
+ if (ret[2]) {
917
+ throw takeFromExternrefTable0(ret[1]);
918
+ }
919
+ return takeFromExternrefTable0(ret[0]);
920
+ }
921
+
752
922
  /**
753
923
  * Package version — useful for consumers to confirm which build is loaded.
754
924
  * @returns {string}
@@ -872,6 +1042,10 @@ function __wbg_get_imports() {
872
1042
  const ret = arg0.arrayBuffer();
873
1043
  return ret;
874
1044
  }, arguments); },
1045
+ __wbg_body_acbb5ec9cd18657f: function(arg0) {
1046
+ const ret = arg0.body;
1047
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1048
+ },
875
1049
  __wbg_call_084ee3e860ee9f92: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
876
1050
  const ret = arg0.call(arg1, arg2, arg3, arg4);
877
1051
  return ret;
@@ -899,6 +1073,17 @@ function __wbg_get_imports() {
899
1073
  __wbg_error_f085d7e62279b703: function(arg0) {
900
1074
  console.error(arg0);
901
1075
  },
1076
+ __wbg_getReader_c8a7370df46b86f6: function(arg0) {
1077
+ const ret = arg0.getReader();
1078
+ return ret;
1079
+ },
1080
+ __wbg_get_0b3f3bb74d16b7ad: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1081
+ const ret = arg1.get(getStringFromWasm0(arg2, arg3));
1082
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1083
+ var len1 = WASM_VECTOR_LEN;
1084
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1085
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1086
+ }, arguments); },
902
1087
  __wbg_get_3e9a707ab7d352eb: function() { return handleError(function (arg0, arg1) {
903
1088
  const ret = Reflect.get(arg0, arg1);
904
1089
  return ret;
@@ -915,6 +1100,10 @@ function __wbg_get_imports() {
915
1100
  const ret = arg0[arg1 >>> 0];
916
1101
  return ret;
917
1102
  },
1103
+ __wbg_headers_18f39f24d3837dc1: function(arg0) {
1104
+ const ret = arg0.headers;
1105
+ return ret;
1106
+ },
918
1107
  __wbg_headers_4cfb0c75793d7a8d: function(arg0) {
919
1108
  const ret = arg0.headers;
920
1109
  return ret;
@@ -969,6 +1158,16 @@ function __wbg_get_imports() {
969
1158
  const ret = result;
970
1159
  return ret;
971
1160
  },
1161
+ __wbg_instanceof_ReadableStream_9a3d74fc91aa9c55: function(arg0) {
1162
+ let result;
1163
+ try {
1164
+ result = arg0 instanceof ReadableStream;
1165
+ } catch (_) {
1166
+ result = false;
1167
+ }
1168
+ const ret = result;
1169
+ return ret;
1170
+ },
972
1171
  __wbg_instanceof_Response_ecfc823e8fb354e2: function(arg0) {
973
1172
  let result;
974
1173
  try {
@@ -1001,18 +1200,50 @@ function __wbg_get_imports() {
1001
1200
  const ret = Symbol.iterator;
1002
1201
  return ret;
1003
1202
  },
1203
+ __wbg_length_0adf2f3c5da33087: function(arg0) {
1204
+ const ret = arg0.length;
1205
+ return ret;
1206
+ },
1004
1207
  __wbg_length_13e61aa81636ec86: function(arg0) {
1005
1208
  const ret = arg0.length;
1006
1209
  return ret;
1007
1210
  },
1211
+ __wbg_length_1c094f6c75753f5f: function(arg0) {
1212
+ const ret = arg0.length;
1213
+ return ret;
1214
+ },
1008
1215
  __wbg_length_2591a0f4f659a55c: function(arg0) {
1009
1216
  const ret = arg0.length;
1010
1217
  return ret;
1011
1218
  },
1219
+ __wbg_length_3a1b902b6cde9e2c: function(arg0) {
1220
+ const ret = arg0.length;
1221
+ return ret;
1222
+ },
1012
1223
  __wbg_length_56fcd3e2b7e0299d: function(arg0) {
1013
1224
  const ret = arg0.length;
1014
1225
  return ret;
1015
1226
  },
1227
+ __wbg_length_911750a64e2f4f88: function(arg0) {
1228
+ const ret = arg0.length;
1229
+ return ret;
1230
+ },
1231
+ __wbg_length_a4365e969857a2c9: function(arg0) {
1232
+ const ret = arg0.length;
1233
+ return ret;
1234
+ },
1235
+ __wbg_length_c7ce929623e7a230: function(arg0) {
1236
+ const ret = arg0.length;
1237
+ return ret;
1238
+ },
1239
+ __wbg_length_dc239675ea61db1b: function(arg0) {
1240
+ const ret = arg0.length;
1241
+ return ret;
1242
+ },
1243
+ __wbg_length_efe2271ed86b56cc: function(arg0) {
1244
+ const ret = arg0.length;
1245
+ return ret;
1246
+ },
1016
1247
  __wbg_new_02d162bc6cf02f60: function() {
1017
1248
  const ret = new Object();
1018
1249
  return ret;
@@ -1051,6 +1282,42 @@ function __wbg_get_imports() {
1051
1282
  state0.a = 0;
1052
1283
  }
1053
1284
  },
1285
+ __wbg_new_with_length_1278c16a5c5b497f: function(arg0) {
1286
+ const ret = new Float64Array(arg0 >>> 0);
1287
+ return ret;
1288
+ },
1289
+ __wbg_new_with_length_22e34f6824b87f53: function(arg0) {
1290
+ const ret = new BigUint64Array(arg0 >>> 0);
1291
+ return ret;
1292
+ },
1293
+ __wbg_new_with_length_58dc420af34edb59: function(arg0) {
1294
+ const ret = new Float32Array(arg0 >>> 0);
1295
+ return ret;
1296
+ },
1297
+ __wbg_new_with_length_662ce8fda8456c6c: function(arg0) {
1298
+ const ret = new Uint16Array(arg0 >>> 0);
1299
+ return ret;
1300
+ },
1301
+ __wbg_new_with_length_6ab0b677ba8ffdc4: function(arg0) {
1302
+ const ret = new BigInt64Array(arg0 >>> 0);
1303
+ return ret;
1304
+ },
1305
+ __wbg_new_with_length_78398b95fa59feae: function(arg0) {
1306
+ const ret = new Int32Array(arg0 >>> 0);
1307
+ return ret;
1308
+ },
1309
+ __wbg_new_with_length_96785292f4aab914: function(arg0) {
1310
+ const ret = new Int8Array(arg0 >>> 0);
1311
+ return ret;
1312
+ },
1313
+ __wbg_new_with_length_bab0ddb25b1a2cc7: function(arg0) {
1314
+ const ret = new Int16Array(arg0 >>> 0);
1315
+ return ret;
1316
+ },
1317
+ __wbg_new_with_length_f128f2c16ad4f906: function(arg0) {
1318
+ const ret = new Uint32Array(arg0 >>> 0);
1319
+ return ret;
1320
+ },
1054
1321
  __wbg_new_with_str_and_init_ffe9977c986ea039: function() { return handleError(function (arg0, arg1, arg2) {
1055
1322
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1056
1323
  return ret;
@@ -1092,10 +1359,34 @@ function __wbg_get_imports() {
1092
1359
  const ret = Promise.resolve(arg0);
1093
1360
  return ret;
1094
1361
  },
1362
+ __wbg_set_517261bc500078e6: function(arg0, arg1, arg2) {
1363
+ arg0.set(getArrayI16FromWasm0(arg1, arg2));
1364
+ },
1365
+ __wbg_set_5bffd0c00e65c280: function(arg0, arg1, arg2) {
1366
+ arg0.set(getArrayF64FromWasm0(arg1, arg2));
1367
+ },
1368
+ __wbg_set_5d860a0c0949a838: function(arg0, arg1, arg2) {
1369
+ arg0.set(getArrayF32FromWasm0(arg1, arg2));
1370
+ },
1371
+ __wbg_set_8c4bf3c22a64e1df: function(arg0, arg1, arg2) {
1372
+ arg0.set(getArrayI8FromWasm0(arg1, arg2));
1373
+ },
1374
+ __wbg_set_90474108ec025ba3: function(arg0, arg1, arg2) {
1375
+ arg0.set(getArrayU32FromWasm0(arg1, arg2));
1376
+ },
1377
+ __wbg_set_943e5a384dda27eb: function(arg0, arg1, arg2) {
1378
+ arg0.set(getArrayI32FromWasm0(arg1, arg2));
1379
+ },
1095
1380
  __wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
1096
1381
  const ret = Reflect.set(arg0, arg1, arg2);
1097
1382
  return ret;
1098
1383
  }, arguments); },
1384
+ __wbg_set_c9acd362199fe8b8: function(arg0, arg1, arg2) {
1385
+ arg0.set(getArrayI64FromWasm0(arg1, arg2));
1386
+ },
1387
+ __wbg_set_d4121491cc61da07: function(arg0, arg1, arg2) {
1388
+ arg0.set(getArrayU16FromWasm0(arg1, arg2));
1389
+ },
1099
1390
  __wbg_set_d57e5106f0271787: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1100
1391
  arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1101
1392
  }, arguments); },
@@ -1103,6 +1394,9 @@ function __wbg_get_imports() {
1103
1394
  const ret = arg0.set(arg1, arg2);
1104
1395
  return ret;
1105
1396
  },
1397
+ __wbg_set_fb3115a057014152: function(arg0, arg1, arg2) {
1398
+ arg0.set(getArrayU64FromWasm0(arg1, arg2));
1399
+ },
1106
1400
  __wbg_space_new: function(arg0) {
1107
1401
  const ret = Space.__wrap(arg0);
1108
1402
  return ret;
@@ -1144,7 +1438,7 @@ function __wbg_get_imports() {
1144
1438
  return ret;
1145
1439
  },
1146
1440
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1147
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 488, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1441
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 683, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1148
1442
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_f7c54996eb9137d9___convert__closures_____invoke___wasm_bindgen_f7c54996eb9137d9___JsValue__core_7d5f0a2ba6a62c33___result__Result_____wasm_bindgen_f7c54996eb9137d9___JsError___true_);
1149
1443
  return ret;
1150
1444
  },
@@ -1290,11 +1584,59 @@ function getArrayF32FromWasm0(ptr, len) {
1290
1584
  return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
1291
1585
  }
1292
1586
 
1587
+ function getArrayF64FromWasm0(ptr, len) {
1588
+ ptr = ptr >>> 0;
1589
+ return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
1590
+ }
1591
+
1592
+ function getArrayI16FromWasm0(ptr, len) {
1593
+ ptr = ptr >>> 0;
1594
+ return getInt16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
1595
+ }
1596
+
1597
+ function getArrayI32FromWasm0(ptr, len) {
1598
+ ptr = ptr >>> 0;
1599
+ return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
1600
+ }
1601
+
1602
+ function getArrayI64FromWasm0(ptr, len) {
1603
+ ptr = ptr >>> 0;
1604
+ return getBigInt64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
1605
+ }
1606
+
1607
+ function getArrayI8FromWasm0(ptr, len) {
1608
+ ptr = ptr >>> 0;
1609
+ return getInt8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1610
+ }
1611
+
1612
+ function getArrayU16FromWasm0(ptr, len) {
1613
+ ptr = ptr >>> 0;
1614
+ return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
1615
+ }
1616
+
1617
+ function getArrayU32FromWasm0(ptr, len) {
1618
+ ptr = ptr >>> 0;
1619
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
1620
+ }
1621
+
1622
+ function getArrayU64FromWasm0(ptr, len) {
1623
+ ptr = ptr >>> 0;
1624
+ return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
1625
+ }
1626
+
1293
1627
  function getArrayU8FromWasm0(ptr, len) {
1294
1628
  ptr = ptr >>> 0;
1295
1629
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1296
1630
  }
1297
1631
 
1632
+ let cachedBigInt64ArrayMemory0 = null;
1633
+ function getBigInt64ArrayMemory0() {
1634
+ if (cachedBigInt64ArrayMemory0 === null || cachedBigInt64ArrayMemory0.byteLength === 0) {
1635
+ cachedBigInt64ArrayMemory0 = new BigInt64Array(wasm.memory.buffer);
1636
+ }
1637
+ return cachedBigInt64ArrayMemory0;
1638
+ }
1639
+
1298
1640
  let cachedBigUint64ArrayMemory0 = null;
1299
1641
  function getBigUint64ArrayMemory0() {
1300
1642
  if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) {
@@ -1319,10 +1661,58 @@ function getFloat32ArrayMemory0() {
1319
1661
  return cachedFloat32ArrayMemory0;
1320
1662
  }
1321
1663
 
1664
+ let cachedFloat64ArrayMemory0 = null;
1665
+ function getFloat64ArrayMemory0() {
1666
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
1667
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
1668
+ }
1669
+ return cachedFloat64ArrayMemory0;
1670
+ }
1671
+
1672
+ let cachedInt16ArrayMemory0 = null;
1673
+ function getInt16ArrayMemory0() {
1674
+ if (cachedInt16ArrayMemory0 === null || cachedInt16ArrayMemory0.byteLength === 0) {
1675
+ cachedInt16ArrayMemory0 = new Int16Array(wasm.memory.buffer);
1676
+ }
1677
+ return cachedInt16ArrayMemory0;
1678
+ }
1679
+
1680
+ let cachedInt32ArrayMemory0 = null;
1681
+ function getInt32ArrayMemory0() {
1682
+ if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) {
1683
+ cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer);
1684
+ }
1685
+ return cachedInt32ArrayMemory0;
1686
+ }
1687
+
1688
+ let cachedInt8ArrayMemory0 = null;
1689
+ function getInt8ArrayMemory0() {
1690
+ if (cachedInt8ArrayMemory0 === null || cachedInt8ArrayMemory0.byteLength === 0) {
1691
+ cachedInt8ArrayMemory0 = new Int8Array(wasm.memory.buffer);
1692
+ }
1693
+ return cachedInt8ArrayMemory0;
1694
+ }
1695
+
1322
1696
  function getStringFromWasm0(ptr, len) {
1323
1697
  return decodeText(ptr >>> 0, len);
1324
1698
  }
1325
1699
 
1700
+ let cachedUint16ArrayMemory0 = null;
1701
+ function getUint16ArrayMemory0() {
1702
+ if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
1703
+ cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
1704
+ }
1705
+ return cachedUint16ArrayMemory0;
1706
+ }
1707
+
1708
+ let cachedUint32ArrayMemory0 = null;
1709
+ function getUint32ArrayMemory0() {
1710
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
1711
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
1712
+ }
1713
+ return cachedUint32ArrayMemory0;
1714
+ }
1715
+
1326
1716
  let cachedUint8ArrayMemory0 = null;
1327
1717
  function getUint8ArrayMemory0() {
1328
1718
  if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
@@ -1470,9 +1860,16 @@ function __wbg_finalize_init(instance, module) {
1470
1860
  wasmInstance = instance;
1471
1861
  wasm = instance.exports;
1472
1862
  wasmModule = module;
1863
+ cachedBigInt64ArrayMemory0 = null;
1473
1864
  cachedBigUint64ArrayMemory0 = null;
1474
1865
  cachedDataViewMemory0 = null;
1475
1866
  cachedFloat32ArrayMemory0 = null;
1867
+ cachedFloat64ArrayMemory0 = null;
1868
+ cachedInt16ArrayMemory0 = null;
1869
+ cachedInt32ArrayMemory0 = null;
1870
+ cachedInt8ArrayMemory0 = null;
1871
+ cachedUint16ArrayMemory0 = null;
1872
+ cachedUint32ArrayMemory0 = null;
1476
1873
  cachedUint8ArrayMemory0 = null;
1477
1874
  wasm.__wbindgen_start();
1478
1875
  return wasm;
Binary file
@@ -14,9 +14,11 @@ export const multihashBase32: (a: number, b: number) => [number, number];
14
14
  export const multihashHex: (a: number, b: number) => [number, number];
15
15
  export const rangeHeader: (a: bigint, b: bigint) => [number, number, number, number];
16
16
  export const s3backend_get: (a: number, b: number, c: number, d: any) => any;
17
+ export const s3backend_getStream: (a: number, b: number, c: number) => any;
17
18
  export const s3backend_list: (a: number, b: number, c: number) => any;
18
19
  export const s3backend_new: (a: number, b: number) => number;
19
20
  export const space_connectorBase: (a: number) => [number, number];
21
+ export const space_description: (a: number) => any;
20
22
  export const space_fromUri: (a: number, b: number, c: any) => any;
21
23
  export const space_history: (a: number, b: number) => any;
22
24
  export const space_manifestHash: (a: number) => [number, number];
@@ -24,15 +26,24 @@ export const space_queryHybrid: (a: number, b: number, c: number, d: any) => any
24
26
  export const space_queryScalar: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
25
27
  export const space_queryText: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
26
28
  export const space_queryVector: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
29
+ export const space_readArrayColumn: (a: number, b: number, c: number) => any;
30
+ export const space_readArrayConstant: (a: number, b: number, c: number) => any;
27
31
  export const space_readScalarColumn: (a: number, b: any, c: any) => any;
32
+ export const space_readVideoItemRange: (a: number, b: number, c: number, d: any, e: any, f: any) => any;
28
33
  export const space_resolveObjectIndex: (a: number, b: any) => any;
34
+ export const space_semanticCacheCapacity: (a: number) => any;
35
+ export const space_semanticCacheStats: (a: number) => any;
36
+ export const space_setSemanticCacheCapacity: (a: number, b: number) => any;
29
37
  export const space_timelineId: (a: number) => [number, number, number, number];
30
- export const space_trackFor: (a: number, b: number, c: number) => any;
31
- export const space_tracks: (a: number) => any;
38
+ export const space_trackFor: (a: number, b: number, c: number) => [number, number, number];
39
+ export const space_tracks: (a: number) => [number, number, number];
40
+ export const space_videoItemAt: (a: number, b: number, c: number, d: any) => any;
41
+ export const space_videoItemByKey: (a: number, b: number, c: number, d: any) => any;
32
42
  export const spatialKeyRoundTrip: (a: number, b: number) => [number, number, number, number];
33
43
  export const timeAnchorFromHex: (a: number, b: number) => [bigint, number, number];
34
44
  export const timeAnchorHex: (a: bigint) => [number, number];
35
45
  export const timeBucket: (a: bigint, b: number, c: number) => [bigint, number, number];
46
+ export const typedArrayDecode: (a: any, b: number, c: number) => [number, number, number];
36
47
  export const version: () => [number, number];
37
48
  export const writer_appendMany: (a: number, b: any) => any;
38
49
  export const writer_commit: (a: number) => any;
package/web.mjs CHANGED
@@ -9,6 +9,11 @@ import init from './web/dreamdb.js'
9
9
  export * from './web/dreamdb.js'
10
10
  export { ZERO_SPATIAL_KEY, PresignedBackend, Authoring } from './browser-extras.mjs'
11
11
 
12
+ // See browser.mjs — same `write` feature set, same missing method.
13
+ import { Writer as _W } from './web/dreamdb.js'
14
+ import { installIngestCmafStub as _stub } from './browser-extras.mjs'
15
+ _stub(_W)
16
+
12
17
  let started
13
18
  /** Fetch and instantiate the wasm. Idempotent; await before anything else. */
14
19
  export default function ready(input) {