@beff/aula 0.6.0 → 0.6.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.
Binary file
Binary file
Binary file
@@ -4060,8 +4060,12 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4060
4060
  let memory0;
4061
4061
  let realloc0;
4062
4062
  let memory1;
4063
- let _trampoline14 = function(arg0, arg1, arg2) {
4064
- _debugLog("[iface=\"aula:engine/host\", function=\"call-rate\"] [Instruction::CallInterface] (sync, @ enter)");
4063
+ let _trampoline14 = function(arg0, arg1) {
4064
+ var ptr0 = arg0 >>> 0 >>> 0;
4065
+ var len0 = arg1 >>> 0;
4066
+ if (ptr0 > memory0.buffer.byteLength || len0 > Math.floor((memory0.buffer.byteLength - ptr0) / 1)) throw new WebAssemblyRuntimeError("string pointer/length out of bounds of memory");
4067
+ var result0 = _decodeUtf8(WebAssemblyRuntimeError, TEXT_DECODER_UTF8, new Uint8Array(memory0.buffer, ptr0, len0));
4068
+ _debugLog("[iface=\"aula:engine/host\", function=\"report-panic\"] [Instruction::CallInterface] (sync, @ enter)");
4065
4069
  let parentTask;
4066
4070
  let task;
4067
4071
  let threadID;
@@ -4070,7 +4074,7 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4070
4074
  ({task, threadID} = createNewCurrentImplicitThread(_jcoTaskCreateContext, {
4071
4075
  componentIdx: -1,
4072
4076
  isAsync: !1,
4073
- entryFnName: "callRate",
4077
+ entryFnName: "reportPanic",
4074
4078
  getCallbackFn: () => null,
4075
4079
  callbackFnName: null,
4076
4080
  errHandling: "none",
@@ -4091,11 +4095,11 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4091
4095
  task.enterSync();
4092
4096
  let ret;
4093
4097
  try {
4094
- ret = _withGlobalCurrentThreadMeta(CURRENT_TASK_META, {
4098
+ _withGlobalCurrentThreadMeta(CURRENT_TASK_META, {
4095
4099
  componentIdx: task.componentIdx(),
4096
4100
  taskID: task.id(),
4097
4101
  threadID,
4098
- fn: () => _trackHostOperation(_jcoComponentHostOperationContext, () => callRate(arg0 >>> 0, arg1))
4102
+ fn: () => _trackHostOperation(_jcoComponentHostOperationContext, () => reportPanic(result0))
4099
4103
  });
4100
4104
  } catch (err) {
4101
4105
  _debugLog("[Instruction::CallInterface] error during sync call", {
@@ -4110,15 +4114,8 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4110
4114
  throw err;
4111
4115
  }
4112
4116
  getOrCreateAsyncState(_jcoComponentStateLookupContext, 3).throwIfInterrupted();
4113
- var variant0 = ret;
4114
- if (variant0 == null) dataView(_jcoDataViewCacheContext, memory0).setInt8((arg2 >>> 0) + 0, 0, !0);
4115
- else {
4116
- let e = variant0;
4117
- dataView(_jcoDataViewCacheContext, memory0).setInt8((arg2 >>> 0) + 0, 1, !0);
4118
- dataView(_jcoDataViewCacheContext, memory0).setFloat64((arg2 >>> 0) + 8, +e, !0);
4119
- }
4120
- _debugLog("[iface=\"aula:engine/host\", function=\"call-rate\"][Instruction::Return]", {
4121
- funcName: "call-rate",
4117
+ _debugLog("[iface=\"aula:engine/host\", function=\"report-panic\"][Instruction::Return]", {
4118
+ funcName: "report-panic",
4122
4119
  paramCount: 0,
4123
4120
  async: !1,
4124
4121
  postReturn: !1
@@ -4126,7 +4123,7 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4126
4123
  task.resolve([ret]);
4127
4124
  task.exit();
4128
4125
  };
4129
- _trampoline14.fnName = "aula:engine/host#callRate";
4126
+ _trampoline14.fnName = "aula:engine/host#reportPanic";
4130
4127
  let _trampoline15 = function(arg0, arg1, arg2, arg3) {
4131
4128
  _debugLog("[iface=\"aula:engine/host\", function=\"call-point\"] [Instruction::CallInterface] (sync, @ enter)");
4132
4129
  let parentTask;
@@ -4196,71 +4193,7 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4196
4193
  task.exit();
4197
4194
  };
4198
4195
  _trampoline15.fnName = "aula:engine/host#callPoint";
4199
- let _trampoline16 = function(arg0, arg1) {
4200
- var ptr0 = arg0 >>> 0 >>> 0;
4201
- var len0 = arg1 >>> 0;
4202
- if (ptr0 > memory0.buffer.byteLength || len0 > Math.floor((memory0.buffer.byteLength - ptr0) / 1)) throw new WebAssemblyRuntimeError("string pointer/length out of bounds of memory");
4203
- var result0 = _decodeUtf8(WebAssemblyRuntimeError, TEXT_DECODER_UTF8, new Uint8Array(memory0.buffer, ptr0, len0));
4204
- _debugLog("[iface=\"aula:engine/host\", function=\"report-panic\"] [Instruction::CallInterface] (sync, @ enter)");
4205
- let parentTask;
4206
- let task;
4207
- let threadID;
4208
- let subtask;
4209
- let createTask = () => {
4210
- ({task, threadID} = createNewCurrentImplicitThread(_jcoTaskCreateContext, {
4211
- componentIdx: -1,
4212
- isAsync: !1,
4213
- entryFnName: "reportPanic",
4214
- getCallbackFn: () => null,
4215
- callbackFnName: null,
4216
- errHandling: "none",
4217
- callingWasmExport: !1
4218
- }));
4219
- };
4220
- taskCreation: {
4221
- parentTask = getCurrentTask(_jcoTaskLookupContext, 3, _getGlobalCurrentThreadMeta(CURRENT_TASK_META, 3)?.taskID)?.task;
4222
- if (!parentTask) {
4223
- createTask();
4224
- break taskCreation;
4225
- }
4226
- createTask();
4227
- subtask = parentTask.getLatestSubtask();
4228
- if (!subtask) throw Error(`Missing subtask (in parent task [${parentTask.id()}]) for host import, has the import been lowered? (ensure asyncImports are set properly)`);
4229
- task.setParentSubtask(subtask);
4230
- }
4231
- task.enterSync();
4232
- let ret;
4233
- try {
4234
- _withGlobalCurrentThreadMeta(CURRENT_TASK_META, {
4235
- componentIdx: task.componentIdx(),
4236
- taskID: task.id(),
4237
- threadID,
4238
- fn: () => _trackHostOperation(_jcoComponentHostOperationContext, () => reportPanic(result0))
4239
- });
4240
- } catch (err) {
4241
- _debugLog("[Instruction::CallInterface] error during sync call", {
4242
- taskID: task.id(),
4243
- subtaskID: task.getParentSubtask()?.id(),
4244
- err
4245
- });
4246
- getOrCreateAsyncState(_jcoComponentStateLookupContext, 3).markTrapped(err);
4247
- task.setErrored(err);
4248
- task.reject(err);
4249
- task.exit();
4250
- throw err;
4251
- }
4252
- getOrCreateAsyncState(_jcoComponentStateLookupContext, 3).throwIfInterrupted();
4253
- _debugLog("[iface=\"aula:engine/host\", function=\"report-panic\"][Instruction::Return]", {
4254
- funcName: "report-panic",
4255
- paramCount: 0,
4256
- async: !1,
4257
- postReturn: !1
4258
- });
4259
- task.resolve([ret]);
4260
- task.exit();
4261
- };
4262
- _trampoline16.fnName = "aula:engine/host#reportPanic";
4263
- let _trampoline17 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
4196
+ let _trampoline16 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
4264
4197
  var len0 = arg2;
4265
4198
  var base0 = arg1 >>> 0 >>> 0;
4266
4199
  if (base0 < 0 || len0 < 0 || len0 > 16777215 || base0 > memory0.buffer.byteLength || len0 > Math.floor((memory0.buffer.byteLength - base0) / 16)) throw new WebAssemblyRuntimeError("wasm trap: out of bounds memory access");
@@ -4381,7 +4314,74 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
4381
4314
  task.resolve([ret]);
4382
4315
  task.exit();
4383
4316
  };
4384
- _trampoline17.fnName = "aula:engine/host#callPath";
4317
+ _trampoline16.fnName = "aula:engine/host#callPath";
4318
+ let _trampoline17 = function(arg0, arg1, arg2) {
4319
+ _debugLog("[iface=\"aula:engine/host\", function=\"call-rate\"] [Instruction::CallInterface] (sync, @ enter)");
4320
+ let parentTask;
4321
+ let task;
4322
+ let threadID;
4323
+ let subtask;
4324
+ let createTask = () => {
4325
+ ({task, threadID} = createNewCurrentImplicitThread(_jcoTaskCreateContext, {
4326
+ componentIdx: -1,
4327
+ isAsync: !1,
4328
+ entryFnName: "callRate",
4329
+ getCallbackFn: () => null,
4330
+ callbackFnName: null,
4331
+ errHandling: "none",
4332
+ callingWasmExport: !1
4333
+ }));
4334
+ };
4335
+ taskCreation: {
4336
+ parentTask = getCurrentTask(_jcoTaskLookupContext, 3, _getGlobalCurrentThreadMeta(CURRENT_TASK_META, 3)?.taskID)?.task;
4337
+ if (!parentTask) {
4338
+ createTask();
4339
+ break taskCreation;
4340
+ }
4341
+ createTask();
4342
+ subtask = parentTask.getLatestSubtask();
4343
+ if (!subtask) throw Error(`Missing subtask (in parent task [${parentTask.id()}]) for host import, has the import been lowered? (ensure asyncImports are set properly)`);
4344
+ task.setParentSubtask(subtask);
4345
+ }
4346
+ task.enterSync();
4347
+ let ret;
4348
+ try {
4349
+ ret = _withGlobalCurrentThreadMeta(CURRENT_TASK_META, {
4350
+ componentIdx: task.componentIdx(),
4351
+ taskID: task.id(),
4352
+ threadID,
4353
+ fn: () => _trackHostOperation(_jcoComponentHostOperationContext, () => callRate(arg0 >>> 0, arg1))
4354
+ });
4355
+ } catch (err) {
4356
+ _debugLog("[Instruction::CallInterface] error during sync call", {
4357
+ taskID: task.id(),
4358
+ subtaskID: task.getParentSubtask()?.id(),
4359
+ err
4360
+ });
4361
+ getOrCreateAsyncState(_jcoComponentStateLookupContext, 3).markTrapped(err);
4362
+ task.setErrored(err);
4363
+ task.reject(err);
4364
+ task.exit();
4365
+ throw err;
4366
+ }
4367
+ getOrCreateAsyncState(_jcoComponentStateLookupContext, 3).throwIfInterrupted();
4368
+ var variant0 = ret;
4369
+ if (variant0 == null) dataView(_jcoDataViewCacheContext, memory0).setInt8((arg2 >>> 0) + 0, 0, !0);
4370
+ else {
4371
+ let e = variant0;
4372
+ dataView(_jcoDataViewCacheContext, memory0).setInt8((arg2 >>> 0) + 0, 1, !0);
4373
+ dataView(_jcoDataViewCacheContext, memory0).setFloat64((arg2 >>> 0) + 8, +e, !0);
4374
+ }
4375
+ _debugLog("[iface=\"aula:engine/host\", function=\"call-rate\"][Instruction::Return]", {
4376
+ funcName: "call-rate",
4377
+ paramCount: 0,
4378
+ async: !1,
4379
+ postReturn: !1
4380
+ });
4381
+ task.resolve([ret]);
4382
+ task.exit();
4383
+ };
4384
+ _trampoline17.fnName = "aula:engine/host#callRate";
4385
4385
  let exports6;
4386
4386
  let exports7;
4387
4387
  let postReturn0;
@@ -57870,28 +57870,9 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
57870
57870
  componentIdx: 3,
57871
57871
  isAsync: !1,
57872
57872
  isManualAsync: _trampoline14.manuallyAsync,
57873
- paramLiftFns: [_liftFlatU32, _liftFlatFloat64],
57874
- resultLowerFns: [_lowerFlatOption(_jcoStrictNumericContext, {
57875
- caseMetas: [[
57876
- "none",
57877
- null,
57878
- 0,
57879
- 0,
57880
- 0
57881
- ], [
57882
- "some",
57883
- _lowerFlatFloat64.bind(void 0, _jcoStrictNumericContext),
57884
- 8,
57885
- 8,
57886
- 1
57887
- ]],
57888
- variantSize32: 16,
57889
- variantAlign32: 8,
57890
- variantPayloadOffset32: 8,
57891
- variantFlatCount: 2,
57892
- payloadMaybeNull: !1
57893
- })],
57894
- hasResultPointer: !0,
57873
+ paramLiftFns: [_liftFlatStringAny.bind(void 0, _jcoLiftStringContext)],
57874
+ resultLowerFns: [],
57875
+ hasResultPointer: !1,
57895
57876
  funcTypeIsAsync: !1,
57896
57877
  getCallbackFn: () => null,
57897
57878
  getPostReturnFn: () => null,
@@ -57968,24 +57949,6 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
57968
57949
  componentIdx: 3,
57969
57950
  isAsync: !1,
57970
57951
  isManualAsync: _trampoline16.manuallyAsync,
57971
- paramLiftFns: [_liftFlatStringAny.bind(void 0, _jcoLiftStringContext)],
57972
- resultLowerFns: [],
57973
- hasResultPointer: !1,
57974
- funcTypeIsAsync: !1,
57975
- getCallbackFn: () => null,
57976
- getPostReturnFn: () => null,
57977
- isCancellable: !1,
57978
- memoryIdx: 0,
57979
- stringEncoding: "utf8",
57980
- getMemoryFn: () => memory0,
57981
- getReallocFn: void 0,
57982
- importFn: _trampoline16
57983
- });
57984
- let trampoline17 = _lowerImportBackwardsCompat.bind(null, _jcoTaskCompatImportContext, {
57985
- trampolineIdx: 17,
57986
- componentIdx: 3,
57987
- isAsync: !1,
57988
- isManualAsync: _trampoline17.manuallyAsync,
57989
57952
  paramLiftFns: [
57990
57953
  _liftFlatU32,
57991
57954
  _liftFlatList(_jcoLiftListContext, {
@@ -58072,6 +58035,43 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
58072
58035
  stringEncoding: "utf8",
58073
58036
  getMemoryFn: () => memory0,
58074
58037
  getReallocFn: () => realloc0,
58038
+ importFn: _trampoline16
58039
+ });
58040
+ let trampoline17 = _lowerImportBackwardsCompat.bind(null, _jcoTaskCompatImportContext, {
58041
+ trampolineIdx: 17,
58042
+ componentIdx: 3,
58043
+ isAsync: !1,
58044
+ isManualAsync: _trampoline17.manuallyAsync,
58045
+ paramLiftFns: [_liftFlatU32, _liftFlatFloat64],
58046
+ resultLowerFns: [_lowerFlatOption(_jcoStrictNumericContext, {
58047
+ caseMetas: [[
58048
+ "none",
58049
+ null,
58050
+ 0,
58051
+ 0,
58052
+ 0
58053
+ ], [
58054
+ "some",
58055
+ _lowerFlatFloat64.bind(void 0, _jcoStrictNumericContext),
58056
+ 8,
58057
+ 8,
58058
+ 1
58059
+ ]],
58060
+ variantSize32: 16,
58061
+ variantAlign32: 8,
58062
+ variantPayloadOffset32: 8,
58063
+ variantFlatCount: 2,
58064
+ payloadMaybeNull: !1
58065
+ })],
58066
+ hasResultPointer: !0,
58067
+ funcTypeIsAsync: !1,
58068
+ getCallbackFn: () => null,
58069
+ getPostReturnFn: () => null,
58070
+ isCancellable: !1,
58071
+ memoryIdx: 0,
58072
+ stringEncoding: "utf8",
58073
+ getMemoryFn: () => memory0,
58074
+ getReallocFn: void 0,
58075
58075
  importFn: _trampoline17
58076
58076
  });
58077
58077
  let trampoline19 = _symmetricSyncGuestCallEnter.bind(void 0, _jcoTaskSymmetricEnterContext);
@@ -58127,13 +58127,13 @@ export function instantiate(getCoreModule, imports, instantiateCore, options) {
58127
58127
  },
58128
58128
  "aula:engine/host": {
58129
58129
  "call-alpha": Object.assign(_guardTrap(_jcoComponentRecordTrapContext, 3, trampoline11, !1), { _jcoMaySuspend: !1 }),
58130
- "call-path": Object.assign(exports4[3], { _jcoMaySuspend: !1 }),
58130
+ "call-path": Object.assign(exports4[2], { _jcoMaySuspend: !1 }),
58131
58131
  "call-point": Object.assign(exports4[1], { _jcoMaySuspend: !1 }),
58132
- "call-rate": Object.assign(exports4[0], { _jcoMaySuspend: !1 }),
58132
+ "call-rate": Object.assign(exports4[3], { _jcoMaySuspend: !1 }),
58133
58133
  "call-redraw": Object.assign(_guardTrap(_jcoComponentRecordTrapContext, 3, trampoline12, !1), { _jcoMaySuspend: !1 }),
58134
58134
  "call-updater": Object.assign(_guardTrap(_jcoComponentRecordTrapContext, 3, trampoline13, !1), { _jcoMaySuspend: !1 }),
58135
58135
  "drop-callback": Object.assign(_guardTrap(_jcoComponentRecordTrapContext, 3, trampoline8, !1), { _jcoMaySuspend: !1 }),
58136
- "report-panic": Object.assign(exports4[2], { _jcoMaySuspend: !1 })
58136
+ "report-panic": Object.assign(exports4[0], { _jcoMaySuspend: !1 })
58137
58137
  },
58138
58138
  "aula:espeak/espeak": { "text-to-phonemes": Object.assign(exports4[4], { _jcoMaySuspend: !1 }) }
58139
58139
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beff/aula",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "The aula engine for narrated explainer videos: the Manim CE API, defineChapter, its rows, readChapter and renderChapter over a Rust WebAssembly component. Chapters and kits import it; the aula command is @beff/aula-cli.",
6
6
  "license": "MIT AND GPL-3.0-or-later",