@unyt/datex 0.0.13 → 0.0.14
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/esm/datex-web/datex_web.internal.d.ts +15 -0
- package/esm/datex-web/datex_web.internal.d.ts.map +1 -1
- package/esm/datex-web/datex_web.internal.js +73 -35
- package/esm/datex-web/datex_web.wasm +0 -0
- package/esm/deno.json +4 -4
- package/esm/dif/core.d.ts +1 -0
- package/esm/dif/core.d.ts.map +1 -1
- package/esm/dif/core.js +1 -0
- package/esm/dif/dif-handler.d.ts.map +1 -1
- package/esm/dif/dif-handler.js +26 -0
- package/esm/lib/special-core-types/endpoint.d.ts.map +1 -1
- package/esm/lib/special-core-types/range.d.ts +26 -0
- package/esm/lib/special-core-types/range.d.ts.map +1 -0
- package/esm/lib/special-core-types/range.js +46 -0
- package/esm/mod.d.ts +3 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +3 -0
- package/esm/repl/mod.d.ts +8 -0
- package/esm/repl/mod.d.ts.map +1 -0
- package/esm/repl/mod.js +31 -0
- package/esm/runtime/runtime.js +1 -1
- package/esm/utils/devtools-formatter.js +22 -0
- package/package.json +1 -1
|
@@ -305,6 +305,21 @@ export class JSRuntime {
|
|
|
305
305
|
*/
|
|
306
306
|
get version(): string;
|
|
307
307
|
}
|
|
308
|
+
export class Repl {
|
|
309
|
+
/**
|
|
310
|
+
* @param {JSRuntime} runtime
|
|
311
|
+
* @param {boolean} verbose
|
|
312
|
+
*/
|
|
313
|
+
constructor(runtime: JSRuntime, verbose: boolean);
|
|
314
|
+
__destroy_into_raw(): number;
|
|
315
|
+
__wbg_ptr: number;
|
|
316
|
+
free(): void;
|
|
317
|
+
/**
|
|
318
|
+
* @param {string} script
|
|
319
|
+
* @returns {Promise<any>}
|
|
320
|
+
*/
|
|
321
|
+
execute(script: string): Promise<any>;
|
|
322
|
+
}
|
|
308
323
|
export class RuntimeDIFHandle {
|
|
309
324
|
static __wrap(ptr: any): any;
|
|
310
325
|
__destroy_into_raw(): number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datex_web.internal.d.ts","sourceRoot":"","sources":["../../src/datex-web/datex_web.internal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datex_web.internal.d.ts","sourceRoot":"","sources":["../../src/datex-web/datex_web.internal.js"],"names":[],"mappings":"AAofA;;;;GAIG;AACH,uCAJW,GAAG,gBACH,GAAG,GACD,OAAO,CAAC,SAAS,CAAC,CAK9B;AACD,0EAGC;AACD,iEAGC;AACD,0EAMC;AACD,gGAKC;AACD,2FAIC;AACD,2FAMC;AACD,oFAGC;AACD,uFAGC;AACD,kFAGC;AACD,8EAGC;AACD,gFAIC;AACD,uFAGC;AACD,mFAGC;AACD,0FAGC;AACD,gGAGC;AACD,yFAKC;AACD,yFAOC;AACD,oFAEC;AACD,sEAEC;AACD,8DAGC;AACD,kEAGC;AACD,iEAGgB;AAChB,iEAGgB;AAChB,iEAGgB;AAChB,iEAGgB;AAChB,8DAGC;AACD,oEAGC;AACD,kEAEgB;AAChB,mEAGgB;AAChB,4DAGC;AACD,+FAEC;AACD,oEAGgB;AAChB,uEAGgB;AAChB,mEAGgB;AAChB,4DAGC;AACD,oEAGgB;AAChB,2EAGC;AACD,+FAEC;AACD,yEAUC;AACD,8DAEC;AACD,sEAGgB;AAChB,wEAGgB;AAChB,4EAGgB;AAChB,iEAGC;AACD,sEAGgB;AAChB,sEAGC;AACD,gEAGgB;AAChB,6EAGC;AACD,gEAGgB;AAChB,uEAGC;AACD,sEAGC;AACD,gFAGC;AACD,iEAGC;AACD,mFAGC;AACD,sEAGgB;AAChB,8FAEC;AACD,kFASC;AACD,gFASC;AACD,4EASC;AACD,0EASC;AACD,6EASC;AACD,kGASC;AACD,iFASC;AACD,6EASC;AACD,yEAGC;AACD,yEAGC;AACD,0DAGC;AACD,oDAGC;AACD,8DAGC;AACD,8DAGC;AACD,6FAEC;AACD,+DAGC;AAC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AFa,MAAM,CAalB;CASJ;AAGD;IAqBI;;;OAGG;IACH,qBAHW,SAAS,WACT,OAAO,EAQjB;IA9BD,6BAKC;IAHG,kBAAkB;IAItB,aAGC;IACD;;;OAGG;IACH,gBAHW,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAOxB;CAYJ;AAGD;IACI,6BAMC;IACD,yCAKC;IAHG,8BAAkB;IAItB,aAGC;IACD;;;;OAIG;IACH,cAJW,GAAG,SACH,GAAG,GACD,GAAG,CAQf;IACD;;;;;OAKG;IACH,sBALW,GAAG,gBACH,GAAG,cACH,MAAM,GACJ,MAAM,CAmBlB;IACD;;;;;;OAMG;IACH,gCANW,MAAM,WACN,MAAM,mBACN,GAAG,uBAED,MAAM,CAUlB;IACD;;;;;;OAMG;IACH,iCAHW,MAAM,GACJ,GAAG,CAUf;IACD;;;;OAIG;IACH,sCAHW,MAAM,GACJ,GAAG,CAUf;IACD;;;OAGG;IACH,2BAHW,MAAM,eACN,MAAM,QAShB;IACD;;;;OAIG;IACH,uBAJW,MAAM,WACN,MAAM,UACN,GAAG,QASb;IACD;;;;OAIG;IACH,iCAJW,MAAM,eACN,MAAM,mBACN,GAAG,QASb;CACJ"}
|
|
@@ -327,6 +327,41 @@ export class JSRuntime {
|
|
|
327
327
|
}
|
|
328
328
|
if (Symbol.dispose)
|
|
329
329
|
JSRuntime.prototype[Symbol.dispose] = JSRuntime.prototype.free;
|
|
330
|
+
export class Repl {
|
|
331
|
+
__destroy_into_raw() {
|
|
332
|
+
const ptr = this.__wbg_ptr;
|
|
333
|
+
this.__wbg_ptr = 0;
|
|
334
|
+
ReplFinalization.unregister(this);
|
|
335
|
+
return ptr;
|
|
336
|
+
}
|
|
337
|
+
free() {
|
|
338
|
+
const ptr = this.__destroy_into_raw();
|
|
339
|
+
wasm.__wbg_repl_free(ptr, 0);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* @param {string} script
|
|
343
|
+
* @returns {Promise<any>}
|
|
344
|
+
*/
|
|
345
|
+
execute(script) {
|
|
346
|
+
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
347
|
+
const len0 = WASM_VECTOR_LEN;
|
|
348
|
+
const ret = wasm.repl_execute(this.__wbg_ptr, ptr0, len0);
|
|
349
|
+
return ret;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* @param {JSRuntime} runtime
|
|
353
|
+
* @param {boolean} verbose
|
|
354
|
+
*/
|
|
355
|
+
constructor(runtime, verbose) {
|
|
356
|
+
_assertClass(runtime, JSRuntime);
|
|
357
|
+
const ret = wasm.repl_new(runtime.__wbg_ptr, verbose);
|
|
358
|
+
this.__wbg_ptr = ret >>> 0;
|
|
359
|
+
ReplFinalization.register(this, this.__wbg_ptr, this);
|
|
360
|
+
return this;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
if (Symbol.dispose)
|
|
364
|
+
Repl.prototype[Symbol.dispose] = Repl.prototype.free;
|
|
330
365
|
export class RuntimeDIFHandle {
|
|
331
366
|
static __wrap(ptr) {
|
|
332
367
|
ptr = ptr >>> 0;
|
|
@@ -918,7 +953,7 @@ export function __wbg_new_typed_f79896f0ea5f7de8(arg0, arg1) {
|
|
|
918
953
|
const a = state0.a;
|
|
919
954
|
state0.a = 0;
|
|
920
955
|
try {
|
|
921
|
-
return
|
|
956
|
+
return wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Function_fn_wasm_bindgen_cb3f4c460819bddd___JsValue_____wasm_bindgen_cb3f4c460819bddd___sys__Undefined___js_sys_f2c01423afcdca44___Function_fn_wasm_bindgen_cb3f4c460819bddd___JsValue_____wasm_bindgen_cb3f4c460819bddd___sys__Undefined______(a, state0.b, arg0, arg1);
|
|
922
957
|
}
|
|
923
958
|
finally {
|
|
924
959
|
state0.a = a;
|
|
@@ -1139,43 +1174,43 @@ export function __wbg_write_537b90f946efe5cf(arg0, arg1) {
|
|
|
1139
1174
|
return ret;
|
|
1140
1175
|
}
|
|
1141
1176
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1142
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1143
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1177
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1075, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1076, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1178
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__js_sys_f2c01423afcdca44___Uint8Array____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array_____);
|
|
1144
1179
|
return ret;
|
|
1145
1180
|
}
|
|
1146
1181
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1147
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1148
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1182
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1075, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1076, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1183
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__js_sys_f2c01423afcdca44___Uint8Array____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______1);
|
|
1149
1184
|
return ret;
|
|
1150
1185
|
}
|
|
1151
1186
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1152
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1153
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1187
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1075, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1076, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1188
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__js_sys_f2c01423afcdca44___Uint8Array____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______2);
|
|
1154
1189
|
return ret;
|
|
1155
1190
|
}
|
|
1156
1191
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1157
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1158
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1192
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1075, function: Function { arguments: [NamedExternref("SerialPort")], shim_idx: 1078, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1193
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__js_sys_f2c01423afcdca44___Uint8Array____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___sys__Undefined__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError__);
|
|
1159
1194
|
return ret;
|
|
1160
1195
|
}
|
|
1161
1196
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
1162
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1163
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1197
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1075, function: Function { arguments: [NamedExternref("Uint8Array")], shim_idx: 1076, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1198
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__js_sys_f2c01423afcdca44___Uint8Array____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______4);
|
|
1164
1199
|
return ret;
|
|
1165
1200
|
}
|
|
1166
1201
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
1167
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1168
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1202
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1075, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 1078, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1203
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__js_sys_f2c01423afcdca44___Uint8Array____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___sys__Undefined__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError___5);
|
|
1169
1204
|
return ret;
|
|
1170
1205
|
}
|
|
1171
1206
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1172
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1173
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1207
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1890, function: Function { arguments: [], shim_idx: 1891, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1208
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut_____Output_______, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke______);
|
|
1174
1209
|
return ret;
|
|
1175
1210
|
}
|
|
1176
1211
|
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
1177
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1178
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1212
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1924, function: Function { arguments: [Externref], shim_idx: 1925, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1213
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_cb3f4c460819bddd___closure__destroy___dyn_core_1d8485f859230fcb___ops__function__FnMut__wasm_bindgen_cb3f4c460819bddd___JsValue____Output___core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError___, wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___JsValue__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError__);
|
|
1179
1214
|
return ret;
|
|
1180
1215
|
}
|
|
1181
1216
|
export function __wbindgen_cast_0000000000000009(arg0) {
|
|
@@ -1214,41 +1249,41 @@ export function __wbindgen_init_externref_table() {
|
|
|
1214
1249
|
table.set(offset + 2, true);
|
|
1215
1250
|
table.set(offset + 3, false);
|
|
1216
1251
|
}
|
|
1217
|
-
function
|
|
1218
|
-
wasm.
|
|
1252
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke______(arg0, arg1) {
|
|
1253
|
+
wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke______(arg0, arg1);
|
|
1219
1254
|
}
|
|
1220
|
-
function
|
|
1221
|
-
wasm.
|
|
1255
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array_____(arg0, arg1, arg2) {
|
|
1256
|
+
wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array_____(arg0, arg1, arg2);
|
|
1222
1257
|
}
|
|
1223
|
-
function
|
|
1224
|
-
wasm.
|
|
1258
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______1(arg0, arg1, arg2) {
|
|
1259
|
+
wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______1(arg0, arg1, arg2);
|
|
1225
1260
|
}
|
|
1226
|
-
function
|
|
1227
|
-
wasm.
|
|
1261
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______2(arg0, arg1, arg2) {
|
|
1262
|
+
wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______2(arg0, arg1, arg2);
|
|
1228
1263
|
}
|
|
1229
|
-
function
|
|
1230
|
-
wasm.
|
|
1264
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______4(arg0, arg1, arg2) {
|
|
1265
|
+
wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Uint8Array______4(arg0, arg1, arg2);
|
|
1231
1266
|
}
|
|
1232
|
-
function
|
|
1233
|
-
const ret = wasm.
|
|
1267
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___sys__Undefined__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError__(arg0, arg1, arg2) {
|
|
1268
|
+
const ret = wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___sys__Undefined__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError__(arg0, arg1, arg2);
|
|
1234
1269
|
if (ret[1]) {
|
|
1235
1270
|
throw takeFromExternrefTable0(ret[0]);
|
|
1236
1271
|
}
|
|
1237
1272
|
}
|
|
1238
|
-
function
|
|
1239
|
-
const ret = wasm.
|
|
1273
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___sys__Undefined__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError___5(arg0, arg1, arg2) {
|
|
1274
|
+
const ret = wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___sys__Undefined__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError___5(arg0, arg1, arg2);
|
|
1240
1275
|
if (ret[1]) {
|
|
1241
1276
|
throw takeFromExternrefTable0(ret[0]);
|
|
1242
1277
|
}
|
|
1243
1278
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const ret = wasm.
|
|
1279
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___JsValue__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError__(arg0, arg1, arg2) {
|
|
1280
|
+
const ret = wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___wasm_bindgen_cb3f4c460819bddd___JsValue__core_1d8485f859230fcb___result__Result_____wasm_bindgen_cb3f4c460819bddd___JsError__(arg0, arg1, arg2);
|
|
1246
1281
|
if (ret[1]) {
|
|
1247
1282
|
throw takeFromExternrefTable0(ret[0]);
|
|
1248
1283
|
}
|
|
1249
1284
|
}
|
|
1250
|
-
function
|
|
1251
|
-
wasm.
|
|
1285
|
+
function wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Function_fn_wasm_bindgen_cb3f4c460819bddd___JsValue_____wasm_bindgen_cb3f4c460819bddd___sys__Undefined___js_sys_f2c01423afcdca44___Function_fn_wasm_bindgen_cb3f4c460819bddd___JsValue_____wasm_bindgen_cb3f4c460819bddd___sys__Undefined______(arg0, arg1, arg2, arg3) {
|
|
1286
|
+
wasm.wasm_bindgen_cb3f4c460819bddd___convert__closures_____invoke___js_sys_f2c01423afcdca44___Function_fn_wasm_bindgen_cb3f4c460819bddd___JsValue_____wasm_bindgen_cb3f4c460819bddd___sys__Undefined___js_sys_f2c01423afcdca44___Function_fn_wasm_bindgen_cb3f4c460819bddd___JsValue_____wasm_bindgen_cb3f4c460819bddd___sys__Undefined______(arg0, arg1, arg2, arg3);
|
|
1252
1287
|
}
|
|
1253
1288
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
1254
1289
|
const JSComHubFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1257,6 +1292,9 @@ const JSComHubFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1257
1292
|
const JSRuntimeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1258
1293
|
? { register: () => { }, unregister: () => { } }
|
|
1259
1294
|
: new FinalizationRegistry(ptr => wasm.__wbg_jsruntime_free(ptr >>> 0, 1));
|
|
1295
|
+
const ReplFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1296
|
+
? { register: () => { }, unregister: () => { } }
|
|
1297
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_repl_free(ptr >>> 0, 1));
|
|
1260
1298
|
const RuntimeDIFHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1261
1299
|
? { register: () => { }, unregister: () => { } }
|
|
1262
1300
|
: new FinalizationRegistry(ptr => wasm.__wbg_runtimedifhandle_free(ptr >>> 0, 1));
|
|
Binary file
|
package/esm/deno.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unyt/datex",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/mod.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"tasks": {
|
|
19
|
-
"debug": "deno run -A scripts/build-wasm.ts --profile debug
|
|
19
|
+
"debug": "deno run -A scripts/build-wasm.ts --profile debug",
|
|
20
20
|
"release": "deno run -A scripts/build-wasm.ts --profile release",
|
|
21
|
-
"debug-unsecure": "deno run -A scripts/build-wasm.ts --profile debug --features
|
|
21
|
+
"debug-unsecure": "deno run -A scripts/build-wasm.ts --profile debug --features allow_unsigned_blocks",
|
|
22
22
|
|
|
23
23
|
"debug-no-opt": "deno task debug --no-opt",
|
|
24
24
|
"test": "deno task debug-no-opt && deno test -A",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"browser-demo-no-build": "deno task build-npm && cd datex-browser-demo && npm install && npm run dev",
|
|
32
32
|
|
|
33
33
|
"fmt": "deno fmt && cargo fmt",
|
|
34
|
-
"lint": "deno lint --fix && cargo clippy --fix
|
|
34
|
+
"lint": "deno lint --fix && cargo clippy --fix"
|
|
35
35
|
},
|
|
36
36
|
"fmt": {
|
|
37
37
|
"indentWidth": 4,
|
package/esm/dif/core.d.ts
CHANGED
package/esm/dif/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/dif/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/dif/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;CAsBxB,CAAC"}
|
package/esm/dif/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dif-handler.d.ts","sourceRoot":"","sources":["../../src/dif/dif-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"dif-handler.d.ts","sourceRoot":"","sources":["../../src/dif/dif-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAGrC,OAAO,EAIH,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEhB,wBAAwB,EACxB,KAAK,iBAAiB,EAEtB,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIpE,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG;IACrE,CAAC,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,uBAAuB,IAAI;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,CAAC,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,UAAU;;IA0CnB;;;OAGG;IACH,IAAI,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC,CAAC,CAEzE;IAED;;;OAGG;IACH,IAAI,OAAO,IAAI,gBAAgB,CAE9B;IAED;;;OA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OAAO,wBAAwB,CAAC,WAAW,CAAC,GAAG,CAAC,GACpD,YAAY,CAAC,CAAC,CAAC,CACxB,GACH,CAAC,CAAC"}
|
package/esm/dif/dif-handler.js
CHANGED
|
@@ -12,6 +12,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
12
12
|
var _DIFHandler_runtime, _DIFHandler_handle, _DIFHandler_transceiver_id, _DIFHandler_cache, _DIFHandler_proxyMapping, _DIFHandler_referenceMetadata, _DIFHandler_observers, _DIFHandler_type_registry;
|
|
13
13
|
import { Ref } from "../refs/ref.js";
|
|
14
14
|
import { Endpoint } from "../lib/special-core-types/endpoint.js";
|
|
15
|
+
import { Range } from "../lib/special-core-types/range.js";
|
|
15
16
|
import { DIFSharedValueMutability, DIFTypeDefinitionKind, DIFUpdateKind, } from "./definitions.js";
|
|
16
17
|
import { CoreTypeAddress, CoreTypeAddressRanges } from "./core.js";
|
|
17
18
|
import { TypeRegistry } from "./type-registry.js";
|
|
@@ -277,6 +278,22 @@ export class DIFHandler {
|
|
|
277
278
|
else if (type === CoreTypeAddress.endpoint) {
|
|
278
279
|
return Endpoint.get(value.value);
|
|
279
280
|
}
|
|
281
|
+
else if (type === CoreTypeAddress.range) {
|
|
282
|
+
const [start, end] = value.value;
|
|
283
|
+
const result = this.promiseAllOrSync([
|
|
284
|
+
this.resolveDIFValueContainer(start),
|
|
285
|
+
this.resolveDIFValueContainer(end),
|
|
286
|
+
]);
|
|
287
|
+
if (result instanceof Promise) {
|
|
288
|
+
return result.then(([start, end]) => {
|
|
289
|
+
return new Range(start, end);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
const [start, end] = result;
|
|
294
|
+
return new Range(start, end);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
280
297
|
else if (type === CoreTypeAddress.list) {
|
|
281
298
|
return this.promiseAllOrSync(value.value.map((v) => this.resolveDIFValueContainer(v)));
|
|
282
299
|
} // map types are resolved from a DIFObject (aka JS Map) or Array of key-value pairs to a JS object
|
|
@@ -794,6 +811,15 @@ export class DIFHandler {
|
|
|
794
811
|
value: value.toString(),
|
|
795
812
|
};
|
|
796
813
|
}
|
|
814
|
+
else if (value instanceof Range) {
|
|
815
|
+
return {
|
|
816
|
+
type: CoreTypeAddress.range,
|
|
817
|
+
value: [
|
|
818
|
+
this.convertJSValueToDIFValueContainer(value.start),
|
|
819
|
+
this.convertJSValueToDIFValueContainer(value.end),
|
|
820
|
+
],
|
|
821
|
+
};
|
|
822
|
+
}
|
|
797
823
|
else if (Array.isArray(value)) {
|
|
798
824
|
return {
|
|
799
825
|
value: value.map((v) => this.convertJSValueToDIFValueContainer(v)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../../src/lib/special-core-types/endpoint.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAQ;;IAIjB,oFAAoF;IACpF,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAa;IAE7D,OAAO;IAKP;;;OAGG;WACW,gBAAgB,CAAC,QAAQ,EAAE,QAAQ;IASjD;;;;OAIG;WACW,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ;IAa7C;;;OAGG;IACI,QAAQ,IAAI,MAAM;IAIzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../../src/lib/special-core-types/endpoint.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAQ;;IAIjB,oFAAoF;IACpF,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAa;IAE7D,OAAO;IAKP;;;OAGG;WACW,gBAAgB,CAAC,QAAQ,EAAE,QAAQ;IASjD;;;;OAIG;WACW,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ;IAa7C;;;OAGG;IACI,QAAQ,IAAI,MAAM;IAIzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAED,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;CACJ"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a range of numbers with a start and end.
|
|
3
|
+
*/
|
|
4
|
+
export declare class Range {
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
constructor(start: number, end: number);
|
|
8
|
+
/**
|
|
9
|
+
* Gets the length of the range (end - start).
|
|
10
|
+
*/
|
|
11
|
+
get length(): number;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if a given value is within the range (inclusive of start, exclusive of end).
|
|
14
|
+
* @param value The number to check.
|
|
15
|
+
* @returns True if the value is within the range, false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
contains(value: number): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Turns a string representation of the range in the format
|
|
20
|
+
* @returns The string representation of the range.
|
|
21
|
+
*/
|
|
22
|
+
toString(): string;
|
|
23
|
+
get [Symbol.toStringTag](): string;
|
|
24
|
+
get [Symbol.toPrimitive](): string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/lib/special-core-types/range.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,KAAK;IACK,KAAK,EAAE,MAAM;IAAS,GAAG,EAAE,MAAM;gBAAjC,KAAK,EAAE,MAAM,EAAS,GAAG,EAAE,MAAM;IAEpD;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIvC;;;OAGG;IACI,QAAQ,IAAI,MAAM;IAIzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IACD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;CACJ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a range of numbers with a start and end.
|
|
3
|
+
*/
|
|
4
|
+
export class Range {
|
|
5
|
+
constructor(start, end) {
|
|
6
|
+
Object.defineProperty(this, "start", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: start
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "end", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: end
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the length of the range (end - start).
|
|
21
|
+
*/
|
|
22
|
+
get length() {
|
|
23
|
+
return this.end - this.start;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Checks if a given value is within the range (inclusive of start, exclusive of end).
|
|
27
|
+
* @param value The number to check.
|
|
28
|
+
* @returns True if the value is within the range, false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
contains(value) {
|
|
31
|
+
return value >= this.start && value < this.end;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Turns a string representation of the range in the format
|
|
35
|
+
* @returns The string representation of the range.
|
|
36
|
+
*/
|
|
37
|
+
toString() {
|
|
38
|
+
return `${this.start}..${this.end}`;
|
|
39
|
+
}
|
|
40
|
+
get [Symbol.toStringTag]() {
|
|
41
|
+
return this.toString();
|
|
42
|
+
}
|
|
43
|
+
get [Symbol.toPrimitive]() {
|
|
44
|
+
return this.toString();
|
|
45
|
+
}
|
|
46
|
+
}
|
package/esm/mod.d.ts
CHANGED
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
export * from "./runtime/runtime.js";
|
|
23
23
|
export * as DIF from "./dif/mod.js";
|
|
24
24
|
export * as Network from "./network/mod.js";
|
|
25
|
+
export * from "./lib/special-core-types/endpoint.js";
|
|
26
|
+
export * from "./lib/special-core-types/range.js";
|
|
25
27
|
export * from "./refs/ref.js";
|
|
28
|
+
export * from "./repl/mod.js";
|
|
26
29
|
import "./utils/devtools-formatter.js";
|
|
27
30
|
//# sourceMappingURL=mod.d.ts.map
|
package/esm/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,qBAAqB,CAAC;AAG7B,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,OAAO,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,qBAAqB,CAAC;AAG7B,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,OAAO,+BAA+B,CAAC"}
|
package/esm/mod.js
CHANGED
|
@@ -22,5 +22,8 @@
|
|
|
22
22
|
export * from "./runtime/runtime.js";
|
|
23
23
|
export * as DIF from "./dif/mod.js";
|
|
24
24
|
export * as Network from "./network/mod.js";
|
|
25
|
+
export * from "./lib/special-core-types/endpoint.js";
|
|
26
|
+
export * from "./lib/special-core-types/range.js";
|
|
25
27
|
export * from "./refs/ref.js";
|
|
28
|
+
export * from "./repl/mod.js";
|
|
26
29
|
import "./utils/devtools-formatter.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/repl/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAAa,IAAI;;IAED,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,OAAO,EAAE,OAAO,UAAQ;IAIxC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAKxD"}
|
package/esm/repl/mod.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _Repl_repl;
|
|
13
|
+
import { Repl as ReplInternal } from "../datex.js";
|
|
14
|
+
export class Repl {
|
|
15
|
+
constructor(runtime, verbose = false) {
|
|
16
|
+
Object.defineProperty(this, "runtime", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: runtime
|
|
21
|
+
});
|
|
22
|
+
_Repl_repl.set(this, void 0);
|
|
23
|
+
__classPrivateFieldSet(this, _Repl_repl, new ReplInternal(runtime._runtime, verbose), "f");
|
|
24
|
+
}
|
|
25
|
+
async execute(script) {
|
|
26
|
+
const result = await __classPrivateFieldGet(this, _Repl_repl, "f").execute(script);
|
|
27
|
+
const jsValue = this.runtime.dif.resolveDIFValueContainerSync(result);
|
|
28
|
+
return this.runtime.valueToString(jsValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
_Repl_repl = new WeakMap();
|
package/esm/runtime/runtime.js
CHANGED
|
@@ -16,7 +16,7 @@ import { DIFHandler } from "../dif/dif-handler.js";
|
|
|
16
16
|
import { unimplemented } from "../utils/exceptions.js";
|
|
17
17
|
// TODO: move to global.ts
|
|
18
18
|
/** auto-generated version - do not edit: */
|
|
19
|
-
const VERSION = "0.0.
|
|
19
|
+
const VERSION = "0.0.14";
|
|
20
20
|
/**
|
|
21
21
|
* The main Runtime class for executing Datex scripts and managing communication interfaces.
|
|
22
22
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Endpoint } from "../lib/special-core-types/endpoint.js";
|
|
2
|
+
import { Range } from "../lib/special-core-types/range.js";
|
|
2
3
|
import { Ref } from "../refs/ref.js";
|
|
3
4
|
// @ts-ignore devtoolsFormatters
|
|
4
5
|
globalThis.devtoolsFormatters = [
|
|
@@ -28,6 +29,27 @@ globalThis.devtoolsFormatters = [
|
|
|
28
29
|
],
|
|
29
30
|
];
|
|
30
31
|
}
|
|
32
|
+
else if (obj instanceof Range) {
|
|
33
|
+
return [
|
|
34
|
+
"span",
|
|
35
|
+
{},
|
|
36
|
+
[
|
|
37
|
+
"span",
|
|
38
|
+
{},
|
|
39
|
+
["span", { style: "color: #d57258" }, `${obj.start}`],
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"span",
|
|
43
|
+
{},
|
|
44
|
+
["span", {}, `..`],
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"span",
|
|
48
|
+
{},
|
|
49
|
+
["span", { style: "color: #d57258" }, `${obj.end}`],
|
|
50
|
+
],
|
|
51
|
+
];
|
|
52
|
+
}
|
|
31
53
|
return null; // fall back to default
|
|
32
54
|
},
|
|
33
55
|
hasBody(_) {
|