@json-eval-rs/bundler 0.0.29 → 0.0.32

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.
@@ -208,15 +208,22 @@ function isLikeNone(x) {
208
208
  return x === undefined || x === null;
209
209
  }
210
210
 
211
- function getArrayJsValueFromWasm0(ptr, len) {
212
- ptr = ptr >>> 0;
211
+ function passArrayJsValueToWasm0(array, malloc) {
212
+ const ptr = malloc(array.length * 4, 4) >>> 0;
213
213
  const mem = getDataViewMemory0();
214
- const result = [];
215
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
216
- result.push(takeObject(mem.getUint32(i, true)));
214
+ for (let i = 0; i < array.length; i++) {
215
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
217
216
  }
218
- return result;
217
+ WASM_VECTOR_LEN = array.length;
218
+ return ptr;
219
+ }
220
+ /**
221
+ * Initialize the library (sets up panic hook)
222
+ */
223
+ export function init() {
224
+ wasm.init();
219
225
  }
226
+
220
227
  /**
221
228
  * Get the library version
222
229
  * @returns {string}
@@ -259,13 +266,6 @@ export function version() {
259
266
  }
260
267
  }
261
268
 
262
- /**
263
- * Initialize the library (sets up panic hook)
264
- */
265
- export function init() {
266
- wasm.init();
267
- }
268
-
269
269
  function passArray8ToWasm0(arg, malloc) {
270
270
  const ptr = malloc(arg.length * 1, 1) >>> 0;
271
271
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -273,14 +273,14 @@ function passArray8ToWasm0(arg, malloc) {
273
273
  return ptr;
274
274
  }
275
275
 
276
- function passArrayJsValueToWasm0(array, malloc) {
277
- const ptr = malloc(array.length * 4, 4) >>> 0;
276
+ function getArrayJsValueFromWasm0(ptr, len) {
277
+ ptr = ptr >>> 0;
278
278
  const mem = getDataViewMemory0();
279
- for (let i = 0; i < array.length; i++) {
280
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
279
+ const result = [];
280
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
281
+ result.push(takeObject(mem.getUint32(i, true)));
281
282
  }
282
- WASM_VECTOR_LEN = array.length;
283
- return ptr;
283
+ return result;
284
284
  }
285
285
 
286
286
  const JSONEvalWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -311,98 +311,163 @@ export class JSONEvalWasm {
311
311
  wasm.__wbg_jsonevalwasm_free(ptr, 0);
312
312
  }
313
313
  /**
314
- * Create a new JSONEval instance
314
+ * Evaluate and return as JsValue for direct JavaScript object access
315
315
  *
316
- * @param schema - JSON schema string
316
+ * @param data - JSON data string
317
317
  * @param context - Optional context data JSON string
318
- * @param data - Optional initial data JSON string
319
- * @param {string} schema
318
+ * @returns Evaluated schema as JavaScript object
319
+ * @param {string} data
320
320
  * @param {string | null} [context]
321
- * @param {string | null} [data]
321
+ * @returns {any}
322
322
  */
323
- constructor(schema, context, data) {
323
+ evaluateJS(data, context) {
324
324
  try {
325
325
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
326
- const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
326
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
327
327
  const len0 = WASM_VECTOR_LEN;
328
328
  var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
329
329
  var len1 = WASM_VECTOR_LEN;
330
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
331
- var len2 = WASM_VECTOR_LEN;
332
- wasm.jsonevalwasm_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
330
+ wasm.jsonevalwasm_evaluateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
333
331
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
334
332
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
335
333
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
336
334
  if (r2) {
337
335
  throw takeObject(r1);
338
336
  }
339
- this.__wbg_ptr = r0 >>> 0;
340
- JSONEvalWasmFinalization.register(this, this.__wbg_ptr, this);
341
- return this;
337
+ return takeObject(r0);
342
338
  } finally {
343
339
  wasm.__wbindgen_add_to_stack_pointer(16);
344
340
  }
345
341
  }
346
342
  /**
347
- * Create a new JSONEval instance from MessagePack-encoded schema
343
+ * Compile JSON logic and return a global ID
344
+ * @param logic_str - JSON logic expression as a string
345
+ * @returns Compiled logic ID as number (u64)
346
+ * @param {string} logic_str
347
+ * @returns {number}
348
+ */
349
+ compileLogic(logic_str) {
350
+ try {
351
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
352
+ const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
353
+ const len0 = WASM_VECTOR_LEN;
354
+ wasm.jsonevalwasm_compileLogic(retptr, this.__wbg_ptr, ptr0, len0);
355
+ var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
356
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
357
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
358
+ if (r3) {
359
+ throw takeObject(r2);
360
+ }
361
+ return r0;
362
+ } finally {
363
+ wasm.__wbindgen_add_to_stack_pointer(16);
364
+ }
365
+ }
366
+ /**
367
+ * Evaluate dependents when a field changes (returns array of changes as JSON string)
348
368
  *
349
- * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
369
+ * @param changedPath - Path of the field that changed
370
+ * @param data - Optional updated JSON data string
350
371
  * @param context - Optional context data JSON string
351
- * @param data - Optional initial data JSON string
352
- * @param {Uint8Array} schema_msgpack
372
+ * @returns Array of dependent change objects as JSON string
373
+ * @param {string} changed_path
374
+ * @param {string | null} [data]
353
375
  * @param {string | null} [context]
376
+ * @returns {string}
377
+ */
378
+ evaluateDependents(changed_path, data, context) {
379
+ let deferred5_0;
380
+ let deferred5_1;
381
+ try {
382
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
383
+ const ptr0 = passStringToWasm0(changed_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
384
+ const len0 = WASM_VECTOR_LEN;
385
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
386
+ var len1 = WASM_VECTOR_LEN;
387
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
388
+ var len2 = WASM_VECTOR_LEN;
389
+ wasm.jsonevalwasm_evaluateDependents(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
390
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
391
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
392
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
393
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
394
+ var ptr4 = r0;
395
+ var len4 = r1;
396
+ if (r3) {
397
+ ptr4 = 0; len4 = 0;
398
+ throw takeObject(r2);
399
+ }
400
+ deferred5_0 = ptr4;
401
+ deferred5_1 = len4;
402
+ return getStringFromWasm0(ptr4, len4);
403
+ } finally {
404
+ wasm.__wbindgen_add_to_stack_pointer(16);
405
+ wasm.__wbindgen_export_2(deferred5_0, deferred5_1, 1);
406
+ }
407
+ }
408
+ /**
409
+ * Compile and run JSON logic from a JSON logic string
410
+ * @param logic_str - JSON logic expression as a string
411
+ * @param data - Optional JSON data string
412
+ * @param context - Optional JSON context string
413
+ * @returns Result as JavaScript object
414
+ * @param {string} logic_str
354
415
  * @param {string | null} [data]
355
- * @returns {JSONEvalWasm}
416
+ * @param {string | null} [context]
417
+ * @returns {any}
356
418
  */
357
- static newFromMsgpack(schema_msgpack, context, data) {
419
+ compileAndRunLogic(logic_str, data, context) {
358
420
  try {
359
421
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
360
- const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export_0);
422
+ const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
361
423
  const len0 = WASM_VECTOR_LEN;
362
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
424
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
363
425
  var len1 = WASM_VECTOR_LEN;
364
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
426
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
365
427
  var len2 = WASM_VECTOR_LEN;
366
- wasm.jsonevalwasm_newFromMsgpack(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
428
+ wasm.jsonevalwasm_compileAndRunLogic(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
367
429
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
368
430
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
369
431
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
370
432
  if (r2) {
371
433
  throw takeObject(r1);
372
434
  }
373
- return JSONEvalWasm.__wrap(r0);
435
+ return takeObject(r0);
374
436
  } finally {
375
437
  wasm.__wbindgen_add_to_stack_pointer(16);
376
438
  }
377
439
  }
378
440
  /**
379
- * Create a new JSONEval instance from a cached ParsedSchema
441
+ * Evaluate dependents and return as JavaScript object
380
442
  *
381
- * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
443
+ * @param changedPathsJson - JSON array of field paths that changed
444
+ * @param data - Optional updated JSON data string
382
445
  * @param context - Optional context data JSON string
383
- * @param data - Optional initial data JSON string
384
- * @param {string} cache_key
385
- * @param {string | null} [context]
386
- * @param {string | null} [data]
387
- * @returns {JSONEvalWasm}
446
+ * @param reEvaluate - If true, performs full evaluation after processing dependents
447
+ * @returns Array of dependent change objects as JavaScript object
448
+ * @param {string} changed_paths_json
449
+ * @param {string | null | undefined} data
450
+ * @param {string | null | undefined} context
451
+ * @param {boolean} re_evaluate
452
+ * @returns {any}
388
453
  */
389
- static newFromCache(cache_key, context, data) {
454
+ evaluateDependentsJS(changed_paths_json, data, context, re_evaluate) {
390
455
  try {
391
456
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
392
- const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
457
+ const ptr0 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
393
458
  const len0 = WASM_VECTOR_LEN;
394
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
459
+ var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
395
460
  var len1 = WASM_VECTOR_LEN;
396
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
461
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
397
462
  var len2 = WASM_VECTOR_LEN;
398
- wasm.jsonevalwasm_newFromCache(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
463
+ wasm.jsonevalwasm_evaluateDependentsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, re_evaluate);
399
464
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
400
465
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
401
466
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
402
467
  if (r2) {
403
468
  throw takeObject(r1);
404
469
  }
405
- return JSONEvalWasm.__wrap(r0);
470
+ return takeObject(r0);
406
471
  } finally {
407
472
  wasm.__wbindgen_add_to_stack_pointer(16);
408
473
  }
@@ -434,23 +499,53 @@ export class JSONEvalWasm {
434
499
  }
435
500
  }
436
501
  /**
437
- * Evaluate and return as JsValue for direct JavaScript object access
502
+ * Run pre-compiled logic by ID
503
+ * @param logic_id - Compiled logic ID from compileLogic
504
+ * @param data - Optional JSON data string
505
+ * @param context - Optional JSON context string
506
+ * @returns Result as JavaScript object
507
+ * @param {number} logic_id
508
+ * @param {string | null} [data]
509
+ * @param {string | null} [context]
510
+ * @returns {any}
511
+ */
512
+ runLogic(logic_id, data, context) {
513
+ try {
514
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
515
+ var ptr0 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
516
+ var len0 = WASM_VECTOR_LEN;
517
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
518
+ var len1 = WASM_VECTOR_LEN;
519
+ wasm.jsonevalwasm_runLogic(retptr, this.__wbg_ptr, logic_id, ptr0, len0, ptr1, len1);
520
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
521
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
522
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
523
+ if (r2) {
524
+ throw takeObject(r1);
525
+ }
526
+ return takeObject(r0);
527
+ } finally {
528
+ wasm.__wbindgen_add_to_stack_pointer(16);
529
+ }
530
+ }
531
+ /**
532
+ * Validate data and return as plain JavaScript object (Worker-safe)
438
533
  *
439
534
  * @param data - JSON data string
440
535
  * @param context - Optional context data JSON string
441
- * @returns Evaluated schema as JavaScript object
536
+ * @returns Plain JavaScript object with validation result
442
537
  * @param {string} data
443
538
  * @param {string | null} [context]
444
539
  * @returns {any}
445
540
  */
446
- evaluateJS(data, context) {
541
+ validateJS(data, context) {
447
542
  try {
448
543
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
449
544
  const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
450
545
  const len0 = WASM_VECTOR_LEN;
451
546
  var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
452
547
  var len1 = WASM_VECTOR_LEN;
453
- wasm.jsonevalwasm_evaluateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
548
+ wasm.jsonevalwasm_validateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
454
549
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
455
550
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
456
551
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -463,71 +558,60 @@ export class JSONEvalWasm {
463
558
  }
464
559
  }
465
560
  /**
466
- * Evaluate dependents when a field changes (returns array of changes as JSON string)
561
+ * Validate data against schema rules with optional path filtering
467
562
  *
468
- * @param changedPath - Path of the field that changed
469
- * @param data - Optional updated JSON data string
563
+ * @param data - JSON data string
470
564
  * @param context - Optional context data JSON string
471
- * @returns Array of dependent change objects as JSON string
472
- * @param {string} changed_path
473
- * @param {string | null} [data]
565
+ * @param paths - Optional array of paths to validate (null for all)
566
+ * @returns ValidationResult
567
+ * @param {string} data
474
568
  * @param {string | null} [context]
475
- * @returns {string}
569
+ * @param {string[] | null} [paths]
570
+ * @returns {ValidationResult}
476
571
  */
477
- evaluateDependents(changed_path, data, context) {
478
- let deferred5_0;
479
- let deferred5_1;
572
+ validatePaths(data, context, paths) {
480
573
  try {
481
574
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
482
- const ptr0 = passStringToWasm0(changed_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
575
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
483
576
  const len0 = WASM_VECTOR_LEN;
484
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
577
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
485
578
  var len1 = WASM_VECTOR_LEN;
486
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
579
+ var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
487
580
  var len2 = WASM_VECTOR_LEN;
488
- wasm.jsonevalwasm_evaluateDependents(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
581
+ wasm.jsonevalwasm_validatePaths(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
489
582
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
490
583
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
491
584
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
492
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
493
- var ptr4 = r0;
494
- var len4 = r1;
495
- if (r3) {
496
- ptr4 = 0; len4 = 0;
497
- throw takeObject(r2);
585
+ if (r2) {
586
+ throw takeObject(r1);
498
587
  }
499
- deferred5_0 = ptr4;
500
- deferred5_1 = len4;
501
- return getStringFromWasm0(ptr4, len4);
588
+ return ValidationResult.__wrap(r0);
502
589
  } finally {
503
590
  wasm.__wbindgen_add_to_stack_pointer(16);
504
- wasm.__wbindgen_export_2(deferred5_0, deferred5_1, 1);
505
591
  }
506
592
  }
507
593
  /**
508
- * Evaluate dependents and return as JavaScript object
594
+ * Validate with path filtering and return as plain JavaScript object (Worker-safe)
509
595
  *
510
- * @param changedPathsJson - JSON array of field paths that changed
511
- * @param data - Optional updated JSON data string
596
+ * @param data - JSON data string
512
597
  * @param context - Optional context data JSON string
513
- * @param reEvaluate - If true, performs full evaluation after processing dependents
514
- * @returns Array of dependent change objects as JavaScript object
515
- * @param {string} changed_paths_json
516
- * @param {string | null | undefined} data
517
- * @param {string | null | undefined} context
518
- * @param {boolean} re_evaluate
598
+ * @param paths - Optional array of paths to validate (null for all)
599
+ * @returns Plain JavaScript object with validation result
600
+ * @param {string} data
601
+ * @param {string | null} [context]
602
+ * @param {string[] | null} [paths]
519
603
  * @returns {any}
520
604
  */
521
- evaluateDependentsJS(changed_paths_json, data, context, re_evaluate) {
605
+ validatePathsJS(data, context, paths) {
522
606
  try {
523
607
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
- const ptr0 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
608
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
525
609
  const len0 = WASM_VECTOR_LEN;
526
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
610
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
527
611
  var len1 = WASM_VECTOR_LEN;
528
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
612
+ var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
529
613
  var len2 = WASM_VECTOR_LEN;
530
- wasm.jsonevalwasm_evaluateDependentsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, re_evaluate);
614
+ wasm.jsonevalwasm_validatePathsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
531
615
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
532
616
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
533
617
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -540,251 +624,253 @@ export class JSONEvalWasm {
540
624
  }
541
625
  }
542
626
  /**
543
- * Compile and run JSON logic from a JSON logic string
544
- * @param logic_str - JSON logic expression as a string
545
- * @param data - Optional JSON data string
546
- * @param context - Optional JSON context string
547
- * @returns Result as JavaScript object
548
- * @param {string} logic_str
549
- * @param {string | null} [data]
627
+ * Validate data against schema rules
628
+ *
629
+ * @param data - JSON data string
630
+ * @param context - Optional context data JSON string
631
+ * @returns ValidationResult
632
+ * @param {string} data
550
633
  * @param {string | null} [context]
551
- * @returns {any}
634
+ * @returns {ValidationResult}
552
635
  */
553
- compileAndRunLogic(logic_str, data, context) {
636
+ validate(data, context) {
554
637
  try {
555
638
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
556
- const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
639
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
557
640
  const len0 = WASM_VECTOR_LEN;
558
- var ptr1 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
641
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
559
642
  var len1 = WASM_VECTOR_LEN;
560
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
561
- var len2 = WASM_VECTOR_LEN;
562
- wasm.jsonevalwasm_compileAndRunLogic(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
643
+ wasm.jsonevalwasm_validate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
563
644
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
564
645
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
565
646
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
566
647
  if (r2) {
567
648
  throw takeObject(r1);
568
649
  }
569
- return takeObject(r0);
570
- } finally {
571
- wasm.__wbindgen_add_to_stack_pointer(16);
572
- }
573
- }
574
- /**
575
- * Compile JSON logic and return a global ID
576
- * @param logic_str - JSON logic expression as a string
577
- * @returns Compiled logic ID as number (u64)
578
- * @param {string} logic_str
579
- * @returns {number}
580
- */
581
- compileLogic(logic_str) {
582
- try {
583
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
584
- const ptr0 = passStringToWasm0(logic_str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
585
- const len0 = WASM_VECTOR_LEN;
586
- wasm.jsonevalwasm_compileLogic(retptr, this.__wbg_ptr, ptr0, len0);
587
- var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
588
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
589
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
590
- if (r3) {
591
- throw takeObject(r2);
592
- }
593
- return r0;
650
+ return ValidationResult.__wrap(r0);
594
651
  } finally {
595
652
  wasm.__wbindgen_add_to_stack_pointer(16);
596
653
  }
597
654
  }
598
655
  /**
599
- * Run pre-compiled logic by ID
600
- * @param logic_id - Compiled logic ID from compileLogic
601
- * @param data - Optional JSON data string
602
- * @param context - Optional JSON context string
603
- * @returns Result as JavaScript object
604
- * @param {number} logic_id
605
- * @param {string | null} [data]
656
+ * Create a new JSONEval instance from a cached ParsedSchema
657
+ *
658
+ * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
659
+ * @param context - Optional context data JSON string
660
+ * @param data - Optional initial data JSON string
661
+ * @param {string} cache_key
606
662
  * @param {string | null} [context]
607
- * @returns {any}
663
+ * @param {string | null} [data]
664
+ * @returns {JSONEvalWasm}
608
665
  */
609
- runLogic(logic_id, data, context) {
666
+ static newFromCache(cache_key, context, data) {
610
667
  try {
611
668
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
612
- var ptr0 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
613
- var len0 = WASM_VECTOR_LEN;
669
+ const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
670
+ const len0 = WASM_VECTOR_LEN;
614
671
  var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
615
672
  var len1 = WASM_VECTOR_LEN;
616
- wasm.jsonevalwasm_runLogic(retptr, this.__wbg_ptr, logic_id, ptr0, len0, ptr1, len1);
673
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
674
+ var len2 = WASM_VECTOR_LEN;
675
+ wasm.jsonevalwasm_newFromCache(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
617
676
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
618
677
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
619
678
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
620
679
  if (r2) {
621
680
  throw takeObject(r1);
622
681
  }
623
- return takeObject(r0);
682
+ return JSONEvalWasm.__wrap(r0);
624
683
  } finally {
625
684
  wasm.__wbindgen_add_to_stack_pointer(16);
626
685
  }
627
686
  }
628
687
  /**
629
- * Validate data against schema rules
688
+ * Create a new JSONEval instance from MessagePack-encoded schema
630
689
  *
631
- * @param data - JSON data string
690
+ * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
632
691
  * @param context - Optional context data JSON string
633
- * @returns ValidationResult
634
- * @param {string} data
692
+ * @param data - Optional initial data JSON string
693
+ * @param {Uint8Array} schema_msgpack
635
694
  * @param {string | null} [context]
636
- * @returns {ValidationResult}
695
+ * @param {string | null} [data]
696
+ * @returns {JSONEvalWasm}
637
697
  */
638
- validate(data, context) {
698
+ static newFromMsgpack(schema_msgpack, context, data) {
639
699
  try {
640
700
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
641
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
701
+ const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export_0);
642
702
  const len0 = WASM_VECTOR_LEN;
643
703
  var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
644
704
  var len1 = WASM_VECTOR_LEN;
645
- wasm.jsonevalwasm_validate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
705
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
706
+ var len2 = WASM_VECTOR_LEN;
707
+ wasm.jsonevalwasm_newFromMsgpack(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
646
708
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
647
709
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
648
710
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
649
711
  if (r2) {
650
712
  throw takeObject(r1);
651
713
  }
652
- return ValidationResult.__wrap(r0);
714
+ return JSONEvalWasm.__wrap(r0);
653
715
  } finally {
654
716
  wasm.__wbindgen_add_to_stack_pointer(16);
655
717
  }
656
718
  }
657
719
  /**
658
- * Validate data and return as plain JavaScript object (Worker-safe)
720
+ * Create a new JSONEval instance
659
721
  *
660
- * @param data - JSON data string
722
+ * @param schema - JSON schema string
661
723
  * @param context - Optional context data JSON string
662
- * @returns Plain JavaScript object with validation result
663
- * @param {string} data
724
+ * @param data - Optional initial data JSON string
725
+ * @param {string} schema
664
726
  * @param {string | null} [context]
665
- * @returns {any}
727
+ * @param {string | null} [data]
666
728
  */
667
- validateJS(data, context) {
729
+ constructor(schema, context, data) {
668
730
  try {
669
731
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
670
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
732
+ const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
671
733
  const len0 = WASM_VECTOR_LEN;
672
734
  var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
673
735
  var len1 = WASM_VECTOR_LEN;
674
- wasm.jsonevalwasm_validateJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
736
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
737
+ var len2 = WASM_VECTOR_LEN;
738
+ wasm.jsonevalwasm_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
675
739
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
676
740
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
677
741
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
678
742
  if (r2) {
679
743
  throw takeObject(r1);
680
744
  }
681
- return takeObject(r0);
745
+ this.__wbg_ptr = r0 >>> 0;
746
+ JSONEvalWasmFinalization.register(this, this.__wbg_ptr, this);
747
+ return this;
682
748
  } finally {
683
749
  wasm.__wbindgen_add_to_stack_pointer(16);
684
750
  }
685
751
  }
686
752
  /**
687
- * Validate data against schema rules with optional path filtering
753
+ * Get cache statistics
688
754
  *
689
- * @param data - JSON data string
690
- * @param context - Optional context data JSON string
691
- * @param paths - Optional array of paths to validate (null for all)
692
- * @returns ValidationResult
693
- * @param {string} data
694
- * @param {string | null} [context]
695
- * @param {string[] | null} [paths]
696
- * @returns {ValidationResult}
755
+ * @returns Cache statistics as JavaScript object with hits, misses, and entries
756
+ * @returns {any}
697
757
  */
698
- validatePaths(data, context, paths) {
758
+ cacheStats() {
699
759
  try {
700
760
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
701
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
702
- const len0 = WASM_VECTOR_LEN;
703
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
704
- var len1 = WASM_VECTOR_LEN;
705
- var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
706
- var len2 = WASM_VECTOR_LEN;
707
- wasm.jsonevalwasm_validatePaths(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
761
+ wasm.jsonevalwasm_cacheStats(retptr, this.__wbg_ptr);
708
762
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
709
763
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
710
764
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
711
765
  if (r2) {
712
766
  throw takeObject(r1);
713
767
  }
714
- return ValidationResult.__wrap(r0);
768
+ return takeObject(r0);
715
769
  } finally {
716
770
  wasm.__wbindgen_add_to_stack_pointer(16);
717
771
  }
718
772
  }
719
773
  /**
720
- * Validate with path filtering and return as plain JavaScript object (Worker-safe)
774
+ * Clear the evaluation cache
775
+ */
776
+ clearCache() {
777
+ wasm.jsonevalwasm_clearCache(this.__wbg_ptr);
778
+ }
779
+ /**
780
+ * Enable evaluation caching
781
+ * Useful for reusing JSONEval instances with different data
782
+ */
783
+ enableCache() {
784
+ wasm.jsonevalwasm_enableCache(this.__wbg_ptr);
785
+ }
786
+ /**
787
+ * Disable evaluation caching
788
+ * Useful for web API usage where each request creates a new JSONEval instance
789
+ * Improves performance by skipping cache operations that have no benefit for single-use instances
790
+ */
791
+ disableCache() {
792
+ wasm.jsonevalwasm_disableCache(this.__wbg_ptr);
793
+ }
794
+ /**
795
+ * Check if evaluation caching is enabled
721
796
  *
722
- * @param data - JSON data string
723
- * @param context - Optional context data JSON string
724
- * @param paths - Optional array of paths to validate (null for all)
725
- * @returns Plain JavaScript object with validation result
726
- * @param {string} data
727
- * @param {string | null} [context]
728
- * @param {string[] | null} [paths]
729
- * @returns {any}
797
+ * @returns true if caching is enabled, false otherwise
798
+ * @returns {boolean}
730
799
  */
731
- validatePathsJS(data, context, paths) {
800
+ isCacheEnabled() {
801
+ const ret = wasm.jsonevalwasm_isCacheEnabled(this.__wbg_ptr);
802
+ return ret !== 0;
803
+ }
804
+ /**
805
+ * Get the number of cached entries
806
+ *
807
+ * @returns Number of cached entries
808
+ * @returns {number}
809
+ */
810
+ cacheLen() {
811
+ const ret = wasm.jsonevalwasm_cacheLen(this.__wbg_ptr);
812
+ return ret >>> 0;
813
+ }
814
+ /**
815
+ * Resolve layout with optional evaluation
816
+ *
817
+ * @param evaluate - If true, runs evaluation before resolving layout
818
+ * @throws Error if resolve fails
819
+ * @param {boolean} evaluate
820
+ */
821
+ resolveLayout(evaluate) {
732
822
  try {
733
823
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
734
- const ptr0 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
735
- const len0 = WASM_VECTOR_LEN;
736
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
737
- var len1 = WASM_VECTOR_LEN;
738
- var ptr2 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
739
- var len2 = WASM_VECTOR_LEN;
740
- wasm.jsonevalwasm_validatePathsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
824
+ wasm.jsonevalwasm_resolveLayout(retptr, this.__wbg_ptr, evaluate);
741
825
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
742
826
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
743
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
744
- if (r2) {
745
- throw takeObject(r1);
827
+ if (r1) {
828
+ throw takeObject(r0);
746
829
  }
747
- return takeObject(r0);
748
830
  } finally {
749
831
  wasm.__wbindgen_add_to_stack_pointer(16);
750
832
  }
751
833
  }
752
834
  /**
753
- * Get the evaluated schema with optional layout resolution
835
+ * Reload schema with new data
754
836
  *
755
- * @param skipLayout - Whether to skip layout resolution
756
- * @returns Evaluated schema as JSON string
757
- * @param {boolean} skip_layout
758
- * @returns {string}
837
+ * @param schema - New JSON schema string
838
+ * @param context - Optional context data JSON string
839
+ * @param data - Optional initial data JSON string
840
+ * @param {string} schema
841
+ * @param {string | null} [context]
842
+ * @param {string | null} [data]
759
843
  */
760
- getEvaluatedSchema(skip_layout) {
761
- let deferred1_0;
762
- let deferred1_1;
844
+ reloadSchema(schema, context, data) {
763
845
  try {
764
846
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
765
- wasm.jsonevalwasm_getEvaluatedSchema(retptr, this.__wbg_ptr, skip_layout);
847
+ const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
848
+ const len0 = WASM_VECTOR_LEN;
849
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
850
+ var len1 = WASM_VECTOR_LEN;
851
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
852
+ var len2 = WASM_VECTOR_LEN;
853
+ wasm.jsonevalwasm_reloadSchema(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
766
854
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
767
855
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
768
- deferred1_0 = r0;
769
- deferred1_1 = r1;
770
- return getStringFromWasm0(r0, r1);
856
+ if (r1) {
857
+ throw takeObject(r0);
858
+ }
771
859
  } finally {
772
860
  wasm.__wbindgen_add_to_stack_pointer(16);
773
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
774
861
  }
775
862
  }
776
863
  /**
777
- * Get the evaluated schema as JavaScript object
864
+ * Get all schema values (evaluations ending with .value)
865
+ * Mutates internal data by overriding with values from value evaluations
778
866
  *
779
- * @param skipLayout - Whether to skip layout resolution
780
- * @returns Evaluated schema as JavaScript object
781
- * @param {boolean} skip_layout
867
+ * @returns Modified data as JavaScript object
782
868
  * @returns {any}
783
869
  */
784
- getEvaluatedSchemaJS(skip_layout) {
870
+ getSchemaValue() {
785
871
  try {
786
872
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
787
- wasm.jsonevalwasm_getEvaluatedSchemaJS(retptr, this.__wbg_ptr, skip_layout);
873
+ wasm.jsonevalwasm_getSchemaValue(retptr, this.__wbg_ptr);
788
874
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
789
875
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
790
876
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -797,76 +883,80 @@ export class JSONEvalWasm {
797
883
  }
798
884
  }
799
885
  /**
800
- * Get the evaluated schema in MessagePack format
801
- *
802
- * @param skipLayout - Whether to skip layout resolution
803
- * @returns Evaluated schema as MessagePack bytes (Uint8Array)
804
- *
805
- * # Zero-Copy Optimization
806
- *
807
- * This method returns MessagePack binary data with minimal copying:
808
- * 1. Serializes schema to Vec<u8> in Rust (unavoidable)
809
- * 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
810
- * 3. Result is a Uint8Array view (minimal overhead)
886
+ * Get a value from the schema using dotted path notation
811
887
  *
812
- * MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
813
- * @param {boolean} skip_layout
814
- * @returns {Uint8Array}
888
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
889
+ * @returns Value as JSON string or null if not found
890
+ * @param {string} path
891
+ * @returns {string | undefined}
815
892
  */
816
- getEvaluatedSchemaMsgpack(skip_layout) {
893
+ getSchemaByPath(path) {
817
894
  try {
818
895
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
819
- wasm.jsonevalwasm_getEvaluatedSchemaMsgpack(retptr, this.__wbg_ptr, skip_layout);
896
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
897
+ const len0 = WASM_VECTOR_LEN;
898
+ wasm.jsonevalwasm_getSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0);
820
899
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
821
900
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
822
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
823
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
824
- if (r3) {
825
- throw takeObject(r2);
901
+ let v2;
902
+ if (r0 !== 0) {
903
+ v2 = getStringFromWasm0(r0, r1).slice();
904
+ wasm.__wbindgen_export_2(r0, r1 * 1, 1);
826
905
  }
827
- var v1 = getArrayU8FromWasm0(r0, r1).slice();
828
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
829
- return v1;
906
+ return v2;
830
907
  } finally {
831
908
  wasm.__wbindgen_add_to_stack_pointer(16);
832
909
  }
833
910
  }
834
911
  /**
835
- * Get all schema values (evaluations ending with .value)
836
- * Mutates internal data by overriding with values from value evaluations
837
- *
838
- * @returns Modified data as JavaScript object
839
- * @returns {any}
912
+ * Get values from schema using multiple dotted paths
913
+ * @param pathsJson - JSON array of dotted paths
914
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
915
+ * @returns Data in specified format as JSON string
916
+ * @param {string} paths_json
917
+ * @param {number} format
918
+ * @returns {string}
840
919
  */
841
- getSchemaValue() {
920
+ getSchemaByPaths(paths_json, format) {
921
+ let deferred3_0;
922
+ let deferred3_1;
842
923
  try {
843
924
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
844
- wasm.jsonevalwasm_getSchemaValue(retptr, this.__wbg_ptr);
925
+ const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
926
+ const len0 = WASM_VECTOR_LEN;
927
+ wasm.jsonevalwasm_getSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, format);
845
928
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
846
929
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
847
930
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
848
- if (r2) {
849
- throw takeObject(r1);
931
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
932
+ var ptr2 = r0;
933
+ var len2 = r1;
934
+ if (r3) {
935
+ ptr2 = 0; len2 = 0;
936
+ throw takeObject(r2);
850
937
  }
851
- return takeObject(r0);
938
+ deferred3_0 = ptr2;
939
+ deferred3_1 = len2;
940
+ return getStringFromWasm0(ptr2, len2);
852
941
  } finally {
853
942
  wasm.__wbindgen_add_to_stack_pointer(16);
943
+ wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
854
944
  }
855
945
  }
856
946
  /**
857
- * Get the evaluated schema without $params field
947
+ * Get the evaluated schema with optional layout resolution
858
948
  *
859
949
  * @param skipLayout - Whether to skip layout resolution
860
950
  * @returns Evaluated schema as JSON string
861
951
  * @param {boolean} skip_layout
862
952
  * @returns {string}
863
953
  */
864
- getEvaluatedSchemaWithoutParams(skip_layout) {
954
+ getEvaluatedSchema(skip_layout) {
865
955
  let deferred1_0;
866
956
  let deferred1_1;
867
957
  try {
868
958
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
869
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParams(retptr, this.__wbg_ptr, skip_layout);
959
+ wasm.jsonevalwasm_getEvaluatedSchema(retptr, this.__wbg_ptr, skip_layout);
870
960
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
871
961
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
872
962
  deferred1_0 = r0;
@@ -878,17 +968,19 @@ export class JSONEvalWasm {
878
968
  }
879
969
  }
880
970
  /**
881
- * Get the evaluated schema without $params as JavaScript object
971
+ * Get a value from the schema using dotted path notation as JavaScript object
882
972
  *
883
- * @param skipLayout - Whether to skip layout resolution
884
- * @returns Evaluated schema as JavaScript object
885
- * @param {boolean} skip_layout
973
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
974
+ * @returns Value as JavaScript object or null if not found
975
+ * @param {string} path
886
976
  * @returns {any}
887
977
  */
888
- getEvaluatedSchemaWithoutParamsJS(skip_layout) {
978
+ getSchemaByPathJS(path) {
889
979
  try {
890
980
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
891
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsJS(retptr, this.__wbg_ptr, skip_layout);
981
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
982
+ const len0 = WASM_VECTOR_LEN;
983
+ wasm.jsonevalwasm_getSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0);
892
984
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
893
985
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
894
986
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -901,49 +993,49 @@ export class JSONEvalWasm {
901
993
  }
902
994
  }
903
995
  /**
904
- * Get a value from the evaluated schema using dotted path notation
996
+ * Reload schema from MessagePack-encoded bytes
905
997
  *
906
- * @param path - Dotted path to the value (e.g., "properties.field.value")
907
- * @param skipLayout - Whether to skip layout resolution
908
- * @returns Value as JSON string or null if not found
909
- * @param {string} path
910
- * @param {boolean} skip_layout
911
- * @returns {string | undefined}
998
+ * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
999
+ * @param context - Optional context data JSON string
1000
+ * @param data - Optional initial data JSON string
1001
+ * @param {Uint8Array} schema_msgpack
1002
+ * @param {string | null} [context]
1003
+ * @param {string | null} [data]
912
1004
  */
913
- getEvaluatedSchemaByPath(path, skip_layout) {
1005
+ reloadSchemaMsgpack(schema_msgpack, context, data) {
914
1006
  try {
915
1007
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
916
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1008
+ const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export_0);
917
1009
  const len0 = WASM_VECTOR_LEN;
918
- wasm.jsonevalwasm_getEvaluatedSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
1010
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1011
+ var len1 = WASM_VECTOR_LEN;
1012
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1013
+ var len2 = WASM_VECTOR_LEN;
1014
+ wasm.jsonevalwasm_reloadSchemaMsgpack(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
919
1015
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
920
1016
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
921
- let v2;
922
- if (r0 !== 0) {
923
- v2 = getStringFromWasm0(r0, r1).slice();
924
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1017
+ if (r1) {
1018
+ throw takeObject(r0);
925
1019
  }
926
- return v2;
927
1020
  } finally {
928
1021
  wasm.__wbindgen_add_to_stack_pointer(16);
929
1022
  }
930
1023
  }
931
1024
  /**
932
- * Get a value from the evaluated schema using dotted path notation as JavaScript object
933
- *
934
- * @param path - Dotted path to the value (e.g., "properties.field.value")
935
- * @param skipLayout - Whether to skip layout resolution
936
- * @returns Value as JavaScript object or null if not found
937
- * @param {string} path
938
- * @param {boolean} skip_layout
1025
+ * Get values from schema using multiple dotted paths (JS object)
1026
+ * @param pathsJson - JSON array of dotted paths
1027
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1028
+ * @returns Data in specified format as JavaScript object
1029
+ * @param {string} paths_json
1030
+ * @param {number} format
939
1031
  * @returns {any}
940
1032
  */
941
- getEvaluatedSchemaByPathJS(path, skip_layout) {
1033
+ getSchemaByPathsJS(paths_json, format) {
942
1034
  try {
943
1035
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
944
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1036
+ const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
945
1037
  const len0 = WASM_VECTOR_LEN;
946
- wasm.jsonevalwasm_getEvaluatedSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
1038
+ wasm.jsonevalwasm_getSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, format);
947
1039
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
948
1040
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
949
1041
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -956,84 +1048,73 @@ export class JSONEvalWasm {
956
1048
  }
957
1049
  }
958
1050
  /**
959
- * Get values from evaluated schema using multiple dotted paths
960
- * @param pathsJson - JSON array of dotted paths
1051
+ * Get the evaluated schema as JavaScript object
1052
+ *
961
1053
  * @param skipLayout - Whether to skip layout resolution
962
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
963
- * @returns Data in specified format as JSON string
964
- * @param {string} paths_json
1054
+ * @returns Evaluated schema as JavaScript object
965
1055
  * @param {boolean} skip_layout
966
- * @param {number} format
967
- * @returns {string}
1056
+ * @returns {any}
968
1057
  */
969
- getEvaluatedSchemaByPaths(paths_json, skip_layout, format) {
970
- let deferred3_0;
971
- let deferred3_1;
1058
+ getEvaluatedSchemaJS(skip_layout) {
972
1059
  try {
973
1060
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
974
- const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
975
- const len0 = WASM_VECTOR_LEN;
976
- wasm.jsonevalwasm_getEvaluatedSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
1061
+ wasm.jsonevalwasm_getEvaluatedSchemaJS(retptr, this.__wbg_ptr, skip_layout);
977
1062
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
978
1063
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
979
1064
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
980
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
981
- var ptr2 = r0;
982
- var len2 = r1;
983
- if (r3) {
984
- ptr2 = 0; len2 = 0;
985
- throw takeObject(r2);
1065
+ if (r2) {
1066
+ throw takeObject(r1);
986
1067
  }
987
- deferred3_0 = ptr2;
988
- deferred3_1 = len2;
989
- return getStringFromWasm0(ptr2, len2);
1068
+ return takeObject(r0);
990
1069
  } finally {
991
1070
  wasm.__wbindgen_add_to_stack_pointer(16);
992
- wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
993
1071
  }
994
1072
  }
995
1073
  /**
996
- * Get values from evaluated schema using multiple dotted paths (JS object)
997
- * @param pathsJson - JSON array of dotted paths
998
- * @param skipLayout - Whether to skip layout resolution
999
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1000
- * @returns Data in specified format as JavaScript object
1001
- * @param {string} paths_json
1002
- * @param {boolean} skip_layout
1003
- * @param {number} format
1004
- * @returns {any}
1074
+ * Reload schema from ParsedSchemaCache using a cache key
1075
+ *
1076
+ * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
1077
+ * @param context - Optional context data JSON string
1078
+ * @param data - Optional initial data JSON string
1079
+ * @param {string} cache_key
1080
+ * @param {string | null} [context]
1081
+ * @param {string | null} [data]
1005
1082
  */
1006
- getEvaluatedSchemaByPathsJS(paths_json, skip_layout, format) {
1083
+ reloadSchemaFromCache(cache_key, context, data) {
1007
1084
  try {
1008
1085
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1009
- const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1086
+ const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1010
1087
  const len0 = WASM_VECTOR_LEN;
1011
- wasm.jsonevalwasm_getEvaluatedSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
1088
+ var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1089
+ var len1 = WASM_VECTOR_LEN;
1090
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1091
+ var len2 = WASM_VECTOR_LEN;
1092
+ wasm.jsonevalwasm_reloadSchemaFromCache(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1012
1093
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1013
1094
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1014
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1015
- if (r2) {
1016
- throw takeObject(r1);
1095
+ if (r1) {
1096
+ throw takeObject(r0);
1017
1097
  }
1018
- return takeObject(r0);
1019
1098
  } finally {
1020
1099
  wasm.__wbindgen_add_to_stack_pointer(16);
1021
1100
  }
1022
1101
  }
1023
1102
  /**
1024
- * Get a value from the schema using dotted path notation
1103
+ * Get a value from the evaluated schema using dotted path notation
1025
1104
  *
1026
1105
  * @param path - Dotted path to the value (e.g., "properties.field.value")
1106
+ * @param skipLayout - Whether to skip layout resolution
1027
1107
  * @returns Value as JSON string or null if not found
1028
1108
  * @param {string} path
1109
+ * @param {boolean} skip_layout
1029
1110
  * @returns {string | undefined}
1030
1111
  */
1031
- getSchemaByPath(path) {
1112
+ getEvaluatedSchemaByPath(path, skip_layout) {
1032
1113
  try {
1033
1114
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1034
1115
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1035
1116
  const len0 = WASM_VECTOR_LEN;
1036
- wasm.jsonevalwasm_getSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0);
1117
+ wasm.jsonevalwasm_getEvaluatedSchemaByPath(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
1037
1118
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1038
1119
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1039
1120
  let v2;
@@ -1047,47 +1128,59 @@ export class JSONEvalWasm {
1047
1128
  }
1048
1129
  }
1049
1130
  /**
1050
- * Get a value from the schema using dotted path notation as JavaScript object
1131
+ * Get the evaluated schema in MessagePack format
1051
1132
  *
1052
- * @param path - Dotted path to the value (e.g., "properties.field.value")
1053
- * @returns Value as JavaScript object or null if not found
1054
- * @param {string} path
1055
- * @returns {any}
1133
+ * @param skipLayout - Whether to skip layout resolution
1134
+ * @returns Evaluated schema as MessagePack bytes (Uint8Array)
1135
+ *
1136
+ * # Zero-Copy Optimization
1137
+ *
1138
+ * This method returns MessagePack binary data with minimal copying:
1139
+ * 1. Serializes schema to Vec<u8> in Rust (unavoidable)
1140
+ * 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
1141
+ * 3. Result is a Uint8Array view (minimal overhead)
1142
+ *
1143
+ * MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
1144
+ * @param {boolean} skip_layout
1145
+ * @returns {Uint8Array}
1056
1146
  */
1057
- getSchemaByPathJS(path) {
1147
+ getEvaluatedSchemaMsgpack(skip_layout) {
1058
1148
  try {
1059
1149
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1060
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1061
- const len0 = WASM_VECTOR_LEN;
1062
- wasm.jsonevalwasm_getSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0);
1150
+ wasm.jsonevalwasm_getEvaluatedSchemaMsgpack(retptr, this.__wbg_ptr, skip_layout);
1063
1151
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1064
1152
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1065
1153
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1066
- if (r2) {
1067
- throw takeObject(r1);
1154
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1155
+ if (r3) {
1156
+ throw takeObject(r2);
1068
1157
  }
1069
- return takeObject(r0);
1158
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1159
+ wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1160
+ return v1;
1070
1161
  } finally {
1071
1162
  wasm.__wbindgen_add_to_stack_pointer(16);
1072
1163
  }
1073
1164
  }
1074
1165
  /**
1075
- * Get values from schema using multiple dotted paths
1166
+ * Get values from evaluated schema using multiple dotted paths
1076
1167
  * @param pathsJson - JSON array of dotted paths
1168
+ * @param skipLayout - Whether to skip layout resolution
1077
1169
  * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1078
1170
  * @returns Data in specified format as JSON string
1079
1171
  * @param {string} paths_json
1172
+ * @param {boolean} skip_layout
1080
1173
  * @param {number} format
1081
1174
  * @returns {string}
1082
1175
  */
1083
- getSchemaByPaths(paths_json, format) {
1176
+ getEvaluatedSchemaByPaths(paths_json, skip_layout, format) {
1084
1177
  let deferred3_0;
1085
1178
  let deferred3_1;
1086
1179
  try {
1087
1180
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1088
1181
  const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1089
1182
  const len0 = WASM_VECTOR_LEN;
1090
- wasm.jsonevalwasm_getSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, format);
1183
+ wasm.jsonevalwasm_getEvaluatedSchemaByPaths(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
1091
1184
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1092
1185
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1093
1186
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1107,20 +1200,49 @@ export class JSONEvalWasm {
1107
1200
  }
1108
1201
  }
1109
1202
  /**
1110
- * Get values from schema using multiple dotted paths (JS object)
1203
+ * Get a value from the evaluated schema using dotted path notation as JavaScript object
1204
+ *
1205
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
1206
+ * @param skipLayout - Whether to skip layout resolution
1207
+ * @returns Value as JavaScript object or null if not found
1208
+ * @param {string} path
1209
+ * @param {boolean} skip_layout
1210
+ * @returns {any}
1211
+ */
1212
+ getEvaluatedSchemaByPathJS(path, skip_layout) {
1213
+ try {
1214
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1215
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1216
+ const len0 = WASM_VECTOR_LEN;
1217
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout);
1218
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1219
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1220
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1221
+ if (r2) {
1222
+ throw takeObject(r1);
1223
+ }
1224
+ return takeObject(r0);
1225
+ } finally {
1226
+ wasm.__wbindgen_add_to_stack_pointer(16);
1227
+ }
1228
+ }
1229
+ /**
1230
+ * Get values from evaluated schema using multiple dotted paths (JS object)
1111
1231
  * @param pathsJson - JSON array of dotted paths
1232
+ * @param skipLayout - Whether to skip layout resolution
1112
1233
  * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1113
1234
  * @returns Data in specified format as JavaScript object
1114
1235
  * @param {string} paths_json
1236
+ * @param {boolean} skip_layout
1115
1237
  * @param {number} format
1116
1238
  * @returns {any}
1117
1239
  */
1118
- getSchemaByPathsJS(paths_json, format) {
1240
+ getEvaluatedSchemaByPathsJS(paths_json, skip_layout, format) {
1119
1241
  try {
1120
1242
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1121
1243
  const ptr0 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1122
1244
  const len0 = WASM_VECTOR_LEN;
1123
- wasm.jsonevalwasm_getSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, format);
1245
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathsJS(retptr, this.__wbg_ptr, ptr0, len0, skip_layout, format);
1124
1246
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1125
1247
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1126
1248
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1133,83 +1255,87 @@ export class JSONEvalWasm {
1133
1255
  }
1134
1256
  }
1135
1257
  /**
1136
- * Reload schema with new data
1258
+ * Get the evaluated schema without $params field
1137
1259
  *
1138
- * @param schema - New JSON schema string
1139
- * @param context - Optional context data JSON string
1140
- * @param data - Optional initial data JSON string
1141
- * @param {string} schema
1142
- * @param {string | null} [context]
1143
- * @param {string | null} [data]
1260
+ * @param skipLayout - Whether to skip layout resolution
1261
+ * @returns Evaluated schema as JSON string
1262
+ * @param {boolean} skip_layout
1263
+ * @returns {string}
1144
1264
  */
1145
- reloadSchema(schema, context, data) {
1265
+ getEvaluatedSchemaWithoutParams(skip_layout) {
1266
+ let deferred1_0;
1267
+ let deferred1_1;
1146
1268
  try {
1147
1269
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1148
- const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1149
- const len0 = WASM_VECTOR_LEN;
1150
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1151
- var len1 = WASM_VECTOR_LEN;
1152
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1153
- var len2 = WASM_VECTOR_LEN;
1154
- wasm.jsonevalwasm_reloadSchema(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1270
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParams(retptr, this.__wbg_ptr, skip_layout);
1155
1271
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1156
1272
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1157
- if (r1) {
1158
- throw takeObject(r0);
1159
- }
1273
+ deferred1_0 = r0;
1274
+ deferred1_1 = r1;
1275
+ return getStringFromWasm0(r0, r1);
1160
1276
  } finally {
1161
1277
  wasm.__wbindgen_add_to_stack_pointer(16);
1278
+ wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1162
1279
  }
1163
1280
  }
1164
1281
  /**
1165
- * Reload schema from MessagePack-encoded bytes
1282
+ * Get the evaluated schema without $params as JavaScript object
1166
1283
  *
1167
- * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
1168
- * @param context - Optional context data JSON string
1169
- * @param data - Optional initial data JSON string
1170
- * @param {Uint8Array} schema_msgpack
1171
- * @param {string | null} [context]
1172
- * @param {string | null} [data]
1284
+ * @param skipLayout - Whether to skip layout resolution
1285
+ * @returns Evaluated schema as JavaScript object
1286
+ * @param {boolean} skip_layout
1287
+ * @returns {any}
1173
1288
  */
1174
- reloadSchemaMsgpack(schema_msgpack, context, data) {
1289
+ getEvaluatedSchemaWithoutParamsJS(skip_layout) {
1175
1290
  try {
1176
1291
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1177
- const ptr0 = passArray8ToWasm0(schema_msgpack, wasm.__wbindgen_export_0);
1178
- const len0 = WASM_VECTOR_LEN;
1179
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1180
- var len1 = WASM_VECTOR_LEN;
1181
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1182
- var len2 = WASM_VECTOR_LEN;
1183
- wasm.jsonevalwasm_reloadSchemaMsgpack(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1292
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsJS(retptr, this.__wbg_ptr, skip_layout);
1184
1293
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1185
1294
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1186
- if (r1) {
1187
- throw takeObject(r0);
1295
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1296
+ if (r2) {
1297
+ throw takeObject(r1);
1188
1298
  }
1299
+ return takeObject(r0);
1189
1300
  } finally {
1190
1301
  wasm.__wbindgen_add_to_stack_pointer(16);
1191
1302
  }
1192
1303
  }
1193
1304
  /**
1194
- * Reload schema from ParsedSchemaCache using a cache key
1305
+ * Check if a subform exists at the given path
1195
1306
  *
1196
- * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
1307
+ * @param subformPath - Path to check
1308
+ * @returns True if subform exists, false otherwise
1309
+ * @param {string} subform_path
1310
+ * @returns {boolean}
1311
+ */
1312
+ hasSubform(subform_path) {
1313
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1314
+ const len0 = WASM_VECTOR_LEN;
1315
+ const ret = wasm.jsonevalwasm_hasSubform(this.__wbg_ptr, ptr0, len0);
1316
+ return ret !== 0;
1317
+ }
1318
+ /**
1319
+ * Evaluate a subform with data
1320
+ *
1321
+ * @param subformPath - Path to the subform (e.g., "#/riders")
1322
+ * @param data - JSON data string for the subform
1197
1323
  * @param context - Optional context data JSON string
1198
- * @param data - Optional initial data JSON string
1199
- * @param {string} cache_key
1324
+ * @throws Error if evaluation fails
1325
+ * @param {string} subform_path
1326
+ * @param {string} data
1200
1327
  * @param {string | null} [context]
1201
- * @param {string | null} [data]
1202
1328
  */
1203
- reloadSchemaFromCache(cache_key, context, data) {
1329
+ evaluateSubform(subform_path, data, context) {
1204
1330
  try {
1205
1331
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1206
- const ptr0 = passStringToWasm0(cache_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1332
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1207
1333
  const len0 = WASM_VECTOR_LEN;
1208
- var ptr1 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1209
- var len1 = WASM_VECTOR_LEN;
1210
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1334
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1335
+ const len1 = WASM_VECTOR_LEN;
1336
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1211
1337
  var len2 = WASM_VECTOR_LEN;
1212
- wasm.jsonevalwasm_reloadSchemaFromCache(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1338
+ wasm.jsonevalwasm_evaluateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1213
1339
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1214
1340
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1215
1341
  if (r1) {
@@ -1220,78 +1346,72 @@ export class JSONEvalWasm {
1220
1346
  }
1221
1347
  }
1222
1348
  /**
1223
- * Get cache statistics
1349
+ * Validate subform data against its schema rules
1224
1350
  *
1225
- * @returns Cache statistics as JavaScript object with hits, misses, and entries
1226
- * @returns {any}
1351
+ * @param subformPath - Path to the subform
1352
+ * @param data - JSON data string for the subform
1353
+ * @param context - Optional context data JSON string
1354
+ * @returns ValidationResult
1355
+ * @param {string} subform_path
1356
+ * @param {string} data
1357
+ * @param {string | null} [context]
1358
+ * @returns {ValidationResult}
1227
1359
  */
1228
- cacheStats() {
1360
+ validateSubform(subform_path, data, context) {
1229
1361
  try {
1230
1362
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1231
- wasm.jsonevalwasm_cacheStats(retptr, this.__wbg_ptr);
1363
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1364
+ const len0 = WASM_VECTOR_LEN;
1365
+ const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1366
+ const len1 = WASM_VECTOR_LEN;
1367
+ var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1368
+ var len2 = WASM_VECTOR_LEN;
1369
+ wasm.jsonevalwasm_validateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1232
1370
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1233
1371
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1234
1372
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1235
1373
  if (r2) {
1236
1374
  throw takeObject(r1);
1237
1375
  }
1238
- return takeObject(r0);
1376
+ return ValidationResult.__wrap(r0);
1239
1377
  } finally {
1240
1378
  wasm.__wbindgen_add_to_stack_pointer(16);
1241
- }
1242
- }
1243
- /**
1244
- * Clear the evaluation cache
1245
- */
1246
- clearCache() {
1247
- wasm.jsonevalwasm_clearCache(this.__wbg_ptr);
1248
- }
1249
- /**
1250
- * Get the number of cached entries
1251
- *
1252
- * @returns Number of cached entries
1253
- * @returns {number}
1254
- */
1255
- cacheLen() {
1256
- const ret = wasm.jsonevalwasm_cacheLen(this.__wbg_ptr);
1257
- return ret >>> 0;
1258
- }
1259
- /**
1260
- * Enable evaluation caching
1261
- * Useful for reusing JSONEval instances with different data
1262
- */
1263
- enableCache() {
1264
- wasm.jsonevalwasm_enableCache(this.__wbg_ptr);
1265
- }
1266
- /**
1267
- * Disable evaluation caching
1268
- * Useful for web API usage where each request creates a new JSONEval instance
1269
- * Improves performance by skipping cache operations that have no benefit for single-use instances
1270
- */
1271
- disableCache() {
1272
- wasm.jsonevalwasm_disableCache(this.__wbg_ptr);
1379
+ }
1273
1380
  }
1274
1381
  /**
1275
- * Check if evaluation caching is enabled
1382
+ * Get list of available subform paths
1276
1383
  *
1277
- * @returns true if caching is enabled, false otherwise
1278
- * @returns {boolean}
1384
+ * @returns Array of subform paths
1385
+ * @returns {string[]}
1279
1386
  */
1280
- isCacheEnabled() {
1281
- const ret = wasm.jsonevalwasm_isCacheEnabled(this.__wbg_ptr);
1282
- return ret !== 0;
1387
+ getSubformPaths() {
1388
+ try {
1389
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1390
+ wasm.jsonevalwasm_getSubformPaths(retptr, this.__wbg_ptr);
1391
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1392
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1393
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1394
+ wasm.__wbindgen_export_2(r0, r1 * 4, 4);
1395
+ return v1;
1396
+ } finally {
1397
+ wasm.__wbindgen_add_to_stack_pointer(16);
1398
+ }
1283
1399
  }
1284
1400
  /**
1285
- * Resolve layout with optional evaluation
1401
+ * Resolve layout for subform
1286
1402
  *
1403
+ * @param subformPath - Path to the subform
1287
1404
  * @param evaluate - If true, runs evaluation before resolving layout
1288
1405
  * @throws Error if resolve fails
1406
+ * @param {string} subform_path
1289
1407
  * @param {boolean} evaluate
1290
1408
  */
1291
- resolveLayout(evaluate) {
1409
+ resolveLayoutSubform(subform_path, evaluate) {
1292
1410
  try {
1293
1411
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1294
- wasm.jsonevalwasm_resolveLayout(retptr, this.__wbg_ptr, evaluate);
1412
+ const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1413
+ const len0 = WASM_VECTOR_LEN;
1414
+ wasm.jsonevalwasm_resolveLayoutSubform(retptr, this.__wbg_ptr, ptr0, len0, evaluate);
1295
1415
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1296
1416
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1297
1417
  if (r1) {
@@ -1302,64 +1422,55 @@ export class JSONEvalWasm {
1302
1422
  }
1303
1423
  }
1304
1424
  /**
1305
- * Evaluate a subform with data
1425
+ * Get schema value from subform (all .value fields)
1306
1426
  *
1307
- * @param subformPath - Path to the subform (e.g., "#/riders")
1308
- * @param data - JSON data string for the subform
1309
- * @param context - Optional context data JSON string
1310
- * @throws Error if evaluation fails
1427
+ * @param subformPath - Path to the subform
1428
+ * @returns Modified data as JavaScript object
1311
1429
  * @param {string} subform_path
1312
- * @param {string} data
1313
- * @param {string | null} [context]
1430
+ * @returns {any}
1314
1431
  */
1315
- evaluateSubform(subform_path, data, context) {
1432
+ getSchemaValueSubform(subform_path) {
1316
1433
  try {
1317
1434
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1318
1435
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1319
1436
  const len0 = WASM_VECTOR_LEN;
1320
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1321
- const len1 = WASM_VECTOR_LEN;
1322
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1323
- var len2 = WASM_VECTOR_LEN;
1324
- wasm.jsonevalwasm_evaluateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1437
+ wasm.jsonevalwasm_getSchemaValueSubform(retptr, this.__wbg_ptr, ptr0, len0);
1325
1438
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1326
1439
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1327
- if (r1) {
1328
- throw takeObject(r0);
1440
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1441
+ if (r2) {
1442
+ throw takeObject(r1);
1329
1443
  }
1444
+ return takeObject(r0);
1330
1445
  } finally {
1331
1446
  wasm.__wbindgen_add_to_stack_pointer(16);
1332
1447
  }
1333
1448
  }
1334
1449
  /**
1335
- * Validate subform data against its schema rules
1336
- *
1450
+ * Get schema by specific path from subform (returns JSON string)
1337
1451
  * @param subformPath - Path to the subform
1338
- * @param data - JSON data string for the subform
1339
- * @param context - Optional context data JSON string
1340
- * @returns ValidationResult
1452
+ * @param schemaPath - Path within the subform
1453
+ * @returns Value as JSON string or null if not found
1341
1454
  * @param {string} subform_path
1342
- * @param {string} data
1343
- * @param {string | null} [context]
1344
- * @returns {ValidationResult}
1455
+ * @param {string} schema_path
1456
+ * @returns {string | undefined}
1345
1457
  */
1346
- validateSubform(subform_path, data, context) {
1458
+ getSchemaByPathSubform(subform_path, schema_path) {
1347
1459
  try {
1348
1460
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1349
1461
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1350
1462
  const len0 = WASM_VECTOR_LEN;
1351
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1463
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1352
1464
  const len1 = WASM_VECTOR_LEN;
1353
- var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1354
- var len2 = WASM_VECTOR_LEN;
1355
- wasm.jsonevalwasm_validateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1465
+ wasm.jsonevalwasm_getSchemaByPathSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1356
1466
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1357
1467
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1358
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1359
- if (r2) {
1360
- throw takeObject(r1);
1468
+ let v3;
1469
+ if (r0 !== 0) {
1470
+ v3 = getStringFromWasm0(r0, r1).slice();
1471
+ wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1361
1472
  }
1362
- return ValidationResult.__wrap(r0);
1473
+ return v3;
1363
1474
  } finally {
1364
1475
  wasm.__wbindgen_add_to_stack_pointer(16);
1365
1476
  }
@@ -1411,64 +1522,42 @@ export class JSONEvalWasm {
1411
1522
  }
1412
1523
  }
1413
1524
  /**
1414
- * Evaluate dependents in subform and return as JavaScript object
1415
- *
1525
+ * Get schema by multiple paths from subform
1416
1526
  * @param subformPath - Path to the subform
1417
- * @param changedPath - Path of the field that changed
1418
- * @param data - Optional updated JSON data string
1419
- * @param context - Optional context data JSON string
1420
- * @returns Array of dependent change objects as JavaScript object
1527
+ * @param pathsJson - JSON array of dotted paths
1528
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1529
+ * @returns Data in specified format as JSON string
1421
1530
  * @param {string} subform_path
1422
- * @param {string} changed_path
1423
- * @param {string | null} [data]
1424
- * @param {string | null} [context]
1425
- * @returns {any}
1531
+ * @param {string} paths_json
1532
+ * @param {number} format
1533
+ * @returns {string}
1426
1534
  */
1427
- evaluateDependentsSubformJS(subform_path, changed_path, data, context) {
1535
+ getSchemaByPathsSubform(subform_path, paths_json, format) {
1536
+ let deferred4_0;
1537
+ let deferred4_1;
1428
1538
  try {
1429
1539
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1430
1540
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1431
1541
  const len0 = WASM_VECTOR_LEN;
1432
- const ptr1 = passStringToWasm0(changed_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1542
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1433
1543
  const len1 = WASM_VECTOR_LEN;
1434
- var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1435
- var len2 = WASM_VECTOR_LEN;
1436
- var ptr3 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1437
- var len3 = WASM_VECTOR_LEN;
1438
- wasm.jsonevalwasm_evaluateDependentsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1544
+ wasm.jsonevalwasm_getSchemaByPathsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1439
1545
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1440
1546
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1441
1547
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1442
- if (r2) {
1443
- throw takeObject(r1);
1444
- }
1445
- return takeObject(r0);
1446
- } finally {
1447
- wasm.__wbindgen_add_to_stack_pointer(16);
1448
- }
1449
- }
1450
- /**
1451
- * Resolve layout for subform
1452
- *
1453
- * @param subformPath - Path to the subform
1454
- * @param evaluate - If true, runs evaluation before resolving layout
1455
- * @throws Error if resolve fails
1456
- * @param {string} subform_path
1457
- * @param {boolean} evaluate
1458
- */
1459
- resolveLayoutSubform(subform_path, evaluate) {
1460
- try {
1461
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1462
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1463
- const len0 = WASM_VECTOR_LEN;
1464
- wasm.jsonevalwasm_resolveLayoutSubform(retptr, this.__wbg_ptr, ptr0, len0, evaluate);
1465
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1466
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1467
- if (r1) {
1468
- throw takeObject(r0);
1548
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1549
+ var ptr3 = r0;
1550
+ var len3 = r1;
1551
+ if (r3) {
1552
+ ptr3 = 0; len3 = 0;
1553
+ throw takeObject(r2);
1469
1554
  }
1555
+ deferred4_0 = ptr3;
1556
+ deferred4_1 = len3;
1557
+ return getStringFromWasm0(ptr3, len3);
1470
1558
  } finally {
1471
1559
  wasm.__wbindgen_add_to_stack_pointer(16);
1560
+ wasm.__wbindgen_export_2(deferred4_0, deferred4_1, 1);
1472
1561
  }
1473
1562
  }
1474
1563
  /**
@@ -1500,21 +1589,22 @@ export class JSONEvalWasm {
1500
1589
  }
1501
1590
  }
1502
1591
  /**
1503
- * Get evaluated schema from subform as JavaScript object
1504
- *
1592
+ * Get schema by specific path from subform (returns JS object)
1505
1593
  * @param subformPath - Path to the subform
1506
- * @param resolveLayout - Whether to resolve layout
1507
- * @returns Evaluated schema as JavaScript object
1594
+ * @param schemaPath - Path within the subform
1595
+ * @returns Value as JavaScript object or null if not found
1508
1596
  * @param {string} subform_path
1509
- * @param {boolean} resolve_layout
1597
+ * @param {string} schema_path
1510
1598
  * @returns {any}
1511
1599
  */
1512
- getEvaluatedSchemaSubformJS(subform_path, resolve_layout) {
1600
+ getSchemaByPathSubformJS(subform_path, schema_path) {
1513
1601
  try {
1514
1602
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1515
1603
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1516
1604
  const len0 = WASM_VECTOR_LEN;
1517
- wasm.jsonevalwasm_getEvaluatedSchemaSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1605
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1606
+ const len1 = WASM_VECTOR_LEN;
1607
+ wasm.jsonevalwasm_getSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1518
1608
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1519
1609
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1520
1610
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1527,19 +1617,31 @@ export class JSONEvalWasm {
1527
1617
  }
1528
1618
  }
1529
1619
  /**
1530
- * Get schema value from subform (all .value fields)
1620
+ * Evaluate dependents in subform and return as JavaScript object
1531
1621
  *
1532
1622
  * @param subformPath - Path to the subform
1533
- * @returns Modified data as JavaScript object
1623
+ * @param changedPath - Path of the field that changed
1624
+ * @param data - Optional updated JSON data string
1625
+ * @param context - Optional context data JSON string
1626
+ * @returns Array of dependent change objects as JavaScript object
1534
1627
  * @param {string} subform_path
1628
+ * @param {string} changed_path
1629
+ * @param {string | null} [data]
1630
+ * @param {string | null} [context]
1535
1631
  * @returns {any}
1536
1632
  */
1537
- getSchemaValueSubform(subform_path) {
1633
+ evaluateDependentsSubformJS(subform_path, changed_path, data, context) {
1538
1634
  try {
1539
1635
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1540
1636
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1541
1637
  const len0 = WASM_VECTOR_LEN;
1542
- wasm.jsonevalwasm_getSchemaValueSubform(retptr, this.__wbg_ptr, ptr0, len0);
1638
+ const ptr1 = passStringToWasm0(changed_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1639
+ const len1 = WASM_VECTOR_LEN;
1640
+ var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1641
+ var len2 = WASM_VECTOR_LEN;
1642
+ var ptr3 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1643
+ var len3 = WASM_VECTOR_LEN;
1644
+ wasm.jsonevalwasm_evaluateDependentsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1543
1645
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1544
1646
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1545
1647
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1552,35 +1654,37 @@ export class JSONEvalWasm {
1552
1654
  }
1553
1655
  }
1554
1656
  /**
1555
- * Get evaluated schema without $params from subform
1556
- *
1657
+ * Get schema by multiple paths from subform (JS object)
1557
1658
  * @param subformPath - Path to the subform
1558
- * @param resolveLayout - Whether to resolve layout
1559
- * @returns Evaluated schema as JSON string
1659
+ * @param pathsJson - JSON array of dotted paths
1660
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1661
+ * @returns Data in specified format as JavaScript object
1560
1662
  * @param {string} subform_path
1561
- * @param {boolean} resolve_layout
1562
- * @returns {string}
1663
+ * @param {string} paths_json
1664
+ * @param {number} format
1665
+ * @returns {any}
1563
1666
  */
1564
- getEvaluatedSchemaWithoutParamsSubform(subform_path, resolve_layout) {
1565
- let deferred2_0;
1566
- let deferred2_1;
1667
+ getSchemaByPathsSubformJS(subform_path, paths_json, format) {
1567
1668
  try {
1568
1669
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1569
1670
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1570
1671
  const len0 = WASM_VECTOR_LEN;
1571
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubform(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1672
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1673
+ const len1 = WASM_VECTOR_LEN;
1674
+ wasm.jsonevalwasm_getSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1572
1675
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1573
1676
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1574
- deferred2_0 = r0;
1575
- deferred2_1 = r1;
1576
- return getStringFromWasm0(r0, r1);
1677
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1678
+ if (r2) {
1679
+ throw takeObject(r1);
1680
+ }
1681
+ return takeObject(r0);
1577
1682
  } finally {
1578
1683
  wasm.__wbindgen_add_to_stack_pointer(16);
1579
- wasm.__wbindgen_export_2(deferred2_0, deferred2_1, 1);
1580
1684
  }
1581
1685
  }
1582
1686
  /**
1583
- * Get evaluated schema without $params from subform as JavaScript object
1687
+ * Get evaluated schema from subform as JavaScript object
1584
1688
  *
1585
1689
  * @param subformPath - Path to the subform
1586
1690
  * @param resolveLayout - Whether to resolve layout
@@ -1589,12 +1693,12 @@ export class JSONEvalWasm {
1589
1693
  * @param {boolean} resolve_layout
1590
1694
  * @returns {any}
1591
1695
  */
1592
- getEvaluatedSchemaWithoutParamsSubformJS(subform_path, resolve_layout) {
1696
+ getEvaluatedSchemaSubformJS(subform_path, resolve_layout) {
1593
1697
  try {
1594
1698
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1595
1699
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1596
1700
  const len0 = WASM_VECTOR_LEN;
1597
- wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1701
+ wasm.jsonevalwasm_getEvaluatedSchemaSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1598
1702
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1599
1703
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1600
1704
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1633,38 +1737,7 @@ export class JSONEvalWasm {
1633
1737
  v3 = getStringFromWasm0(r0, r1).slice();
1634
1738
  wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1635
1739
  }
1636
- return v3;
1637
- } finally {
1638
- wasm.__wbindgen_add_to_stack_pointer(16);
1639
- }
1640
- }
1641
- /**
1642
- * Get evaluated schema by specific path from subform as JavaScript object
1643
- *
1644
- * @param subformPath - Path to the subform
1645
- * @param schemaPath - Dotted path to the value within the subform
1646
- * @param skipLayout - Whether to skip layout resolution
1647
- * @returns Value as JavaScript object or null if not found
1648
- * @param {string} subform_path
1649
- * @param {string} schema_path
1650
- * @param {boolean} skip_layout
1651
- * @returns {any}
1652
- */
1653
- getEvaluatedSchemaByPathSubformJS(subform_path, schema_path, skip_layout) {
1654
- try {
1655
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1656
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1657
- const len0 = WASM_VECTOR_LEN;
1658
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1659
- const len1 = WASM_VECTOR_LEN;
1660
- wasm.jsonevalwasm_getEvaluatedSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout);
1661
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1662
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1663
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1664
- if (r2) {
1665
- throw takeObject(r1);
1666
- }
1667
- return takeObject(r0);
1740
+ return v3;
1668
1741
  } finally {
1669
1742
  wasm.__wbindgen_add_to_stack_pointer(16);
1670
1743
  }
@@ -1711,26 +1784,25 @@ export class JSONEvalWasm {
1711
1784
  }
1712
1785
  }
1713
1786
  /**
1714
- * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
1787
+ * Get evaluated schema by specific path from subform as JavaScript object
1788
+ *
1715
1789
  * @param subformPath - Path to the subform
1716
- * @param pathsJson - JSON array of dotted paths
1790
+ * @param schemaPath - Dotted path to the value within the subform
1717
1791
  * @param skipLayout - Whether to skip layout resolution
1718
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1719
- * @returns Data in specified format as JavaScript object
1792
+ * @returns Value as JavaScript object or null if not found
1720
1793
  * @param {string} subform_path
1721
- * @param {string} paths_json
1794
+ * @param {string} schema_path
1722
1795
  * @param {boolean} skip_layout
1723
- * @param {number} format
1724
1796
  * @returns {any}
1725
1797
  */
1726
- getEvaluatedSchemaByPathsSubformJS(subform_path, paths_json, skip_layout, format) {
1798
+ getEvaluatedSchemaByPathSubformJS(subform_path, schema_path, skip_layout) {
1727
1799
  try {
1728
1800
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1729
1801
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1730
1802
  const len0 = WASM_VECTOR_LEN;
1731
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1803
+ const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1732
1804
  const len1 = WASM_VECTOR_LEN;
1733
- wasm.jsonevalwasm_getEvaluatedSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout, format);
1805
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout);
1734
1806
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1735
1807
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1736
1808
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1743,51 +1815,26 @@ export class JSONEvalWasm {
1743
1815
  }
1744
1816
  }
1745
1817
  /**
1746
- * Get schema by specific path from subform (returns JSON string)
1747
- * @param subformPath - Path to the subform
1748
- * @param schemaPath - Path within the subform
1749
- * @returns Value as JSON string or null if not found
1750
- * @param {string} subform_path
1751
- * @param {string} schema_path
1752
- * @returns {string | undefined}
1753
- */
1754
- getSchemaByPathSubform(subform_path, schema_path) {
1755
- try {
1756
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1757
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1758
- const len0 = WASM_VECTOR_LEN;
1759
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1760
- const len1 = WASM_VECTOR_LEN;
1761
- wasm.jsonevalwasm_getSchemaByPathSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1762
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1763
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1764
- let v3;
1765
- if (r0 !== 0) {
1766
- v3 = getStringFromWasm0(r0, r1).slice();
1767
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1768
- }
1769
- return v3;
1770
- } finally {
1771
- wasm.__wbindgen_add_to_stack_pointer(16);
1772
- }
1773
- }
1774
- /**
1775
- * Get schema by specific path from subform (returns JS object)
1818
+ * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
1776
1819
  * @param subformPath - Path to the subform
1777
- * @param schemaPath - Path within the subform
1778
- * @returns Value as JavaScript object or null if not found
1820
+ * @param pathsJson - JSON array of dotted paths
1821
+ * @param skipLayout - Whether to skip layout resolution
1822
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1823
+ * @returns Data in specified format as JavaScript object
1779
1824
  * @param {string} subform_path
1780
- * @param {string} schema_path
1825
+ * @param {string} paths_json
1826
+ * @param {boolean} skip_layout
1827
+ * @param {number} format
1781
1828
  * @returns {any}
1782
1829
  */
1783
- getSchemaByPathSubformJS(subform_path, schema_path) {
1830
+ getEvaluatedSchemaByPathsSubformJS(subform_path, paths_json, skip_layout, format) {
1784
1831
  try {
1785
1832
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1786
1833
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1787
1834
  const len0 = WASM_VECTOR_LEN;
1788
- const ptr1 = passStringToWasm0(schema_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1835
+ const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1789
1836
  const len1 = WASM_VECTOR_LEN;
1790
- wasm.jsonevalwasm_getSchemaByPathSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1837
+ wasm.jsonevalwasm_getEvaluatedSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, skip_layout, format);
1791
1838
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1792
1839
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1793
1840
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1800,63 +1847,49 @@ export class JSONEvalWasm {
1800
1847
  }
1801
1848
  }
1802
1849
  /**
1803
- * Get schema by multiple paths from subform
1850
+ * Get evaluated schema without $params from subform
1851
+ *
1804
1852
  * @param subformPath - Path to the subform
1805
- * @param pathsJson - JSON array of dotted paths
1806
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1807
- * @returns Data in specified format as JSON string
1853
+ * @param resolveLayout - Whether to resolve layout
1854
+ * @returns Evaluated schema as JSON string
1808
1855
  * @param {string} subform_path
1809
- * @param {string} paths_json
1810
- * @param {number} format
1856
+ * @param {boolean} resolve_layout
1811
1857
  * @returns {string}
1812
1858
  */
1813
- getSchemaByPathsSubform(subform_path, paths_json, format) {
1814
- let deferred4_0;
1815
- let deferred4_1;
1859
+ getEvaluatedSchemaWithoutParamsSubform(subform_path, resolve_layout) {
1860
+ let deferred2_0;
1861
+ let deferred2_1;
1816
1862
  try {
1817
1863
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1818
1864
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1819
1865
  const len0 = WASM_VECTOR_LEN;
1820
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1821
- const len1 = WASM_VECTOR_LEN;
1822
- wasm.jsonevalwasm_getSchemaByPathsSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1866
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubform(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1823
1867
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1824
1868
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1825
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1826
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1827
- var ptr3 = r0;
1828
- var len3 = r1;
1829
- if (r3) {
1830
- ptr3 = 0; len3 = 0;
1831
- throw takeObject(r2);
1832
- }
1833
- deferred4_0 = ptr3;
1834
- deferred4_1 = len3;
1835
- return getStringFromWasm0(ptr3, len3);
1869
+ deferred2_0 = r0;
1870
+ deferred2_1 = r1;
1871
+ return getStringFromWasm0(r0, r1);
1836
1872
  } finally {
1837
1873
  wasm.__wbindgen_add_to_stack_pointer(16);
1838
- wasm.__wbindgen_export_2(deferred4_0, deferred4_1, 1);
1874
+ wasm.__wbindgen_export_2(deferred2_0, deferred2_1, 1);
1839
1875
  }
1840
1876
  }
1841
1877
  /**
1842
- * Get schema by multiple paths from subform (JS object)
1878
+ * Get evaluated schema without $params from subform as JavaScript object
1879
+ *
1843
1880
  * @param subformPath - Path to the subform
1844
- * @param pathsJson - JSON array of dotted paths
1845
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
1846
- * @returns Data in specified format as JavaScript object
1881
+ * @param resolveLayout - Whether to resolve layout
1882
+ * @returns Evaluated schema as JavaScript object
1847
1883
  * @param {string} subform_path
1848
- * @param {string} paths_json
1849
- * @param {number} format
1884
+ * @param {boolean} resolve_layout
1850
1885
  * @returns {any}
1851
1886
  */
1852
- getSchemaByPathsSubformJS(subform_path, paths_json, format) {
1887
+ getEvaluatedSchemaWithoutParamsSubformJS(subform_path, resolve_layout) {
1853
1888
  try {
1854
1889
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1855
1890
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1856
1891
  const len0 = WASM_VECTOR_LEN;
1857
- const ptr1 = passStringToWasm0(paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1858
- const len1 = WASM_VECTOR_LEN;
1859
- wasm.jsonevalwasm_getSchemaByPathsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, format);
1892
+ wasm.jsonevalwasm_getEvaluatedSchemaWithoutParamsSubformJS(retptr, this.__wbg_ptr, ptr0, len0, resolve_layout);
1860
1893
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1861
1894
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1862
1895
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1868,39 +1901,6 @@ export class JSONEvalWasm {
1868
1901
  wasm.__wbindgen_add_to_stack_pointer(16);
1869
1902
  }
1870
1903
  }
1871
- /**
1872
- * Get list of available subform paths
1873
- *
1874
- * @returns Array of subform paths
1875
- * @returns {string[]}
1876
- */
1877
- getSubformPaths() {
1878
- try {
1879
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1880
- wasm.jsonevalwasm_getSubformPaths(retptr, this.__wbg_ptr);
1881
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1882
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1883
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1884
- wasm.__wbindgen_export_2(r0, r1 * 4, 4);
1885
- return v1;
1886
- } finally {
1887
- wasm.__wbindgen_add_to_stack_pointer(16);
1888
- }
1889
- }
1890
- /**
1891
- * Check if a subform exists at the given path
1892
- *
1893
- * @param subformPath - Path to check
1894
- * @returns True if subform exists, false otherwise
1895
- * @param {string} subform_path
1896
- * @returns {boolean}
1897
- */
1898
- hasSubform(subform_path) {
1899
- const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1900
- const len0 = WASM_VECTOR_LEN;
1901
- const ret = wasm.jsonevalwasm_hasSubform(this.__wbg_ptr, ptr0, len0);
1902
- return ret !== 0;
1903
- }
1904
1904
  }
1905
1905
  if (Symbol.dispose) JSONEvalWasm.prototype[Symbol.dispose] = JSONEvalWasm.prototype.free;
1906
1906
 
@@ -1932,52 +1932,59 @@ export class ValidationError {
1932
1932
  wasm.__wbg_validationerror_free(ptr, 0);
1933
1933
  }
1934
1934
  /**
1935
- * @returns {string}
1935
+ * @returns {string | undefined}
1936
1936
  */
1937
- get path() {
1938
- let deferred1_0;
1939
- let deferred1_1;
1937
+ get field_value() {
1940
1938
  try {
1941
1939
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1942
- wasm.validationerror_path(retptr, this.__wbg_ptr);
1940
+ wasm.validationerror_field_value(retptr, this.__wbg_ptr);
1943
1941
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1944
1942
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1945
- deferred1_0 = r0;
1946
- deferred1_1 = r1;
1947
- return getStringFromWasm0(r0, r1);
1943
+ let v1;
1944
+ if (r0 !== 0) {
1945
+ v1 = getStringFromWasm0(r0, r1).slice();
1946
+ wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1947
+ }
1948
+ return v1;
1948
1949
  } finally {
1949
1950
  wasm.__wbindgen_add_to_stack_pointer(16);
1950
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1951
1951
  }
1952
1952
  }
1953
1953
  /**
1954
- * @returns {string}
1954
+ * @returns {string | undefined}
1955
1955
  */
1956
- get rule_type() {
1957
- let deferred1_0;
1958
- let deferred1_1;
1956
+ get code() {
1959
1957
  try {
1960
1958
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1961
- wasm.validationerror_rule_type(retptr, this.__wbg_ptr);
1959
+ wasm.validationerror_code(retptr, this.__wbg_ptr);
1962
1960
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1963
1961
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1964
- deferred1_0 = r0;
1965
- deferred1_1 = r1;
1966
- return getStringFromWasm0(r0, r1);
1962
+ let v1;
1963
+ if (r0 !== 0) {
1964
+ v1 = getStringFromWasm0(r0, r1).slice();
1965
+ wasm.__wbindgen_export_2(r0, r1 * 1, 1);
1966
+ }
1967
+ return v1;
1967
1968
  } finally {
1968
1969
  wasm.__wbindgen_add_to_stack_pointer(16);
1969
- wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
1970
1970
  }
1971
1971
  }
1972
+ /**
1973
+ * @returns {any}
1974
+ */
1975
+ get data() {
1976
+ const ret = wasm.validationerror_data(this.__wbg_ptr);
1977
+ return takeObject(ret);
1978
+ }
1972
1979
  /**
1973
1980
  * @returns {string}
1974
1981
  */
1975
- get message() {
1982
+ get path() {
1976
1983
  let deferred1_0;
1977
1984
  let deferred1_1;
1978
1985
  try {
1979
1986
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1980
- wasm.validationerror_message(retptr, this.__wbg_ptr);
1987
+ wasm.validationerror_path(retptr, this.__wbg_ptr);
1981
1988
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1982
1989
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1983
1990
  deferred1_0 = r0;
@@ -1989,22 +1996,22 @@ export class ValidationError {
1989
1996
  }
1990
1997
  }
1991
1998
  /**
1992
- * @returns {string | undefined}
1999
+ * @returns {string}
1993
2000
  */
1994
- get code() {
2001
+ get message() {
2002
+ let deferred1_0;
2003
+ let deferred1_1;
1995
2004
  try {
1996
2005
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1997
- wasm.validationerror_code(retptr, this.__wbg_ptr);
2006
+ wasm.validationerror_message(retptr, this.__wbg_ptr);
1998
2007
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1999
2008
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2000
- let v1;
2001
- if (r0 !== 0) {
2002
- v1 = getStringFromWasm0(r0, r1).slice();
2003
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
2004
- }
2005
- return v1;
2009
+ deferred1_0 = r0;
2010
+ deferred1_1 = r1;
2011
+ return getStringFromWasm0(r0, r1);
2006
2012
  } finally {
2007
2013
  wasm.__wbindgen_add_to_stack_pointer(16);
2014
+ wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
2008
2015
  }
2009
2016
  }
2010
2017
  /**
@@ -2027,31 +2034,24 @@ export class ValidationError {
2027
2034
  }
2028
2035
  }
2029
2036
  /**
2030
- * @returns {string | undefined}
2037
+ * @returns {string}
2031
2038
  */
2032
- get field_value() {
2039
+ get rule_type() {
2040
+ let deferred1_0;
2041
+ let deferred1_1;
2033
2042
  try {
2034
2043
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2035
- wasm.validationerror_field_value(retptr, this.__wbg_ptr);
2044
+ wasm.validationerror_rule_type(retptr, this.__wbg_ptr);
2036
2045
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2037
2046
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2038
- let v1;
2039
- if (r0 !== 0) {
2040
- v1 = getStringFromWasm0(r0, r1).slice();
2041
- wasm.__wbindgen_export_2(r0, r1 * 1, 1);
2042
- }
2043
- return v1;
2047
+ deferred1_0 = r0;
2048
+ deferred1_1 = r1;
2049
+ return getStringFromWasm0(r0, r1);
2044
2050
  } finally {
2045
2051
  wasm.__wbindgen_add_to_stack_pointer(16);
2052
+ wasm.__wbindgen_export_2(deferred1_0, deferred1_1, 1);
2046
2053
  }
2047
2054
  }
2048
- /**
2049
- * @returns {any}
2050
- */
2051
- get data() {
2052
- const ret = wasm.validationerror_data(this.__wbg_ptr);
2053
- return takeObject(ret);
2054
- }
2055
2055
  }
2056
2056
  if (Symbol.dispose) ValidationError.prototype[Symbol.dispose] = ValidationError.prototype.free;
2057
2057
 
@@ -2082,13 +2082,6 @@ export class ValidationResult {
2082
2082
  const ptr = this.__destroy_into_raw();
2083
2083
  wasm.__wbg_validationresult_free(ptr, 0);
2084
2084
  }
2085
- /**
2086
- * @returns {boolean}
2087
- */
2088
- get has_error() {
2089
- const ret = wasm.validationresult_has_error(this.__wbg_ptr);
2090
- return ret !== 0;
2091
- }
2092
2085
  /**
2093
2086
  * @returns {ValidationError[]}
2094
2087
  */
@@ -2123,6 +2116,13 @@ export class ValidationResult {
2123
2116
  wasm.__wbindgen_add_to_stack_pointer(16);
2124
2117
  }
2125
2118
  }
2119
+ /**
2120
+ * @returns {boolean}
2121
+ */
2122
+ get has_error() {
2123
+ const ret = wasm.validationresult_has_error(this.__wbg_ptr);
2124
+ return ret !== 0;
2125
+ }
2126
2126
  }
2127
2127
  if (Symbol.dispose) ValidationResult.prototype[Symbol.dispose] = ValidationResult.prototype.free;
2128
2128
 
@@ -2160,7 +2160,7 @@ export function __wbg_getTime_6bb3f64e0f18f817(arg0) {
2160
2160
  return ret;
2161
2161
  };
2162
2162
 
2163
- export function __wbg_log_b28c09a93d15bcda(arg0, arg1) {
2163
+ export function __wbg_log_ec39d4fa397181b8(arg0, arg1) {
2164
2164
  console.log(getStringFromWasm0(arg0, arg1));
2165
2165
  };
2166
2166