@revisium/schema-toolkit 0.21.0 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/{chunk-SBO2UMI3.cjs → chunk-2PIMJSWJ.cjs} +0 -2
  2. package/dist/chunk-3MJP73IJ.js +1 -0
  3. package/dist/{chunk-62A5JJJ3.js → chunk-4U2RZHMX.js} +0 -2
  4. package/dist/{chunk-Q2UOTIMG.js → chunk-5DUMJHCA.js} +0 -2
  5. package/dist/{chunk-Z7M4ZGC6.cjs → chunk-7JWCZZPJ.cjs} +21 -23
  6. package/dist/{chunk-YFWOURZL.js → chunk-7PEC6ZYY.js} +0 -2
  7. package/dist/chunk-AV5EZUMZ.cjs +2 -0
  8. package/dist/{chunk-TMCRV6V5.js → chunk-AWFMSOHM.js} +0 -2
  9. package/dist/{chunk-X2VRR7V7.cjs → chunk-ERW5XVED.cjs} +0 -2
  10. package/dist/{chunk-XNFSFT7T.cjs → chunk-EVD5ZI55.cjs} +0 -2
  11. package/dist/{chunk-ZRNFSUOV.cjs → chunk-FL6PWPVJ.cjs} +0 -2
  12. package/dist/{chunk-TKMR6CQW.js → chunk-FTBRJODD.js} +0 -2
  13. package/dist/{chunk-R3MS2N4A.js → chunk-GJM63Q4K.js} +0 -2
  14. package/dist/{chunk-F4POD7AE.cjs → chunk-HJFM6E5M.cjs} +243 -90
  15. package/dist/{chunk-3DDUT57J.cjs → chunk-ITYABUR5.cjs} +0 -2
  16. package/dist/{chunk-BIBFHULN.js → chunk-IZMBM36H.js} +0 -2
  17. package/dist/chunk-J4RVO37K.cjs +2 -0
  18. package/dist/{chunk-UTSL45Q4.js → chunk-JLXX3SGF.js} +2 -4
  19. package/dist/{chunk-DRPNJ4YP.js → chunk-NO655UI5.js} +0 -2
  20. package/dist/chunk-OAUVP6CU.js +1 -0
  21. package/dist/{chunk-HH2LDPVV.cjs → chunk-ONW2OVNQ.cjs} +0 -2
  22. package/dist/{chunk-32FZHFIO.cjs → chunk-QKA7DJDN.cjs} +0 -2
  23. package/dist/{chunk-JWYYVKRT.cjs → chunk-RCCBUOGY.cjs} +0 -2
  24. package/dist/{chunk-MK3IKVZO.js → chunk-REVQG2NY.js} +176 -23
  25. package/dist/{chunk-IPL2CGVA.cjs → chunk-RQBW7ATZ.cjs} +0 -2
  26. package/dist/{chunk-WSPFHUHU.cjs → chunk-T3QQSHAC.cjs} +0 -2
  27. package/dist/{chunk-CGVYS7EK.cjs → chunk-VMELKZXD.cjs} +0 -2
  28. package/dist/{chunk-5VDDLW7U.js → chunk-WE4OLW5U.js} +0 -2
  29. package/dist/{chunk-JUOGJFTL.js → chunk-XKWWCXGB.js} +0 -2
  30. package/dist/{chunk-ZBPUTF3Q.js → chunk-ZPRBA4AQ.js} +0 -2
  31. package/dist/consts/index.cjs +4 -6
  32. package/dist/consts/index.js +2 -4
  33. package/dist/core/index.cjs +65 -67
  34. package/dist/core/index.js +4 -6
  35. package/dist/formula/index.cjs +7 -9
  36. package/dist/formula/index.js +1 -3
  37. package/dist/index.cjs +245 -247
  38. package/dist/index.d.cts +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +15 -17
  41. package/dist/lib/index.cjs +51 -53
  42. package/dist/lib/index.js +7 -9
  43. package/dist/mocks/index.cjs +21 -23
  44. package/dist/mocks/index.js +2 -4
  45. package/dist/model/index.cjs +76 -78
  46. package/dist/model/index.d.cts +17 -4
  47. package/dist/model/index.d.ts +17 -4
  48. package/dist/model/index.js +4 -6
  49. package/dist/plugins/index.cjs +20 -22
  50. package/dist/plugins/index.js +2 -4
  51. package/dist/{typed-LSaUJayS.d.cts → typed-DjSH_5Vh.d.cts} +50 -3
  52. package/dist/{typed-BinPIf3R.d.ts → typed-KUia-LYN.d.ts} +50 -3
  53. package/dist/types/index.cjs +4 -6
  54. package/dist/types/index.d.cts +1 -1
  55. package/dist/types/index.d.ts +1 -1
  56. package/dist/types/index.js +2 -4
  57. package/dist/validation-schemas/index.cjs +18 -20
  58. package/dist/validation-schemas/index.js +1 -3
  59. package/package.json +1 -1
  60. package/dist/chunk-2NARA22J.js +0 -3
  61. package/dist/chunk-2NARA22J.js.map +0 -1
  62. package/dist/chunk-32FZHFIO.cjs.map +0 -1
  63. package/dist/chunk-3DDUT57J.cjs.map +0 -1
  64. package/dist/chunk-3FJZMVWA.js +0 -3
  65. package/dist/chunk-3FJZMVWA.js.map +0 -1
  66. package/dist/chunk-5VDDLW7U.js.map +0 -1
  67. package/dist/chunk-62A5JJJ3.js.map +0 -1
  68. package/dist/chunk-BIBFHULN.js.map +0 -1
  69. package/dist/chunk-BZWL424W.cjs +0 -4
  70. package/dist/chunk-BZWL424W.cjs.map +0 -1
  71. package/dist/chunk-CGVYS7EK.cjs.map +0 -1
  72. package/dist/chunk-DRPNJ4YP.js.map +0 -1
  73. package/dist/chunk-F4POD7AE.cjs.map +0 -1
  74. package/dist/chunk-HH2LDPVV.cjs.map +0 -1
  75. package/dist/chunk-IPL2CGVA.cjs.map +0 -1
  76. package/dist/chunk-JUOGJFTL.js.map +0 -1
  77. package/dist/chunk-JWYYVKRT.cjs.map +0 -1
  78. package/dist/chunk-L6HE7QPU.cjs +0 -4
  79. package/dist/chunk-L6HE7QPU.cjs.map +0 -1
  80. package/dist/chunk-MK3IKVZO.js.map +0 -1
  81. package/dist/chunk-Q2UOTIMG.js.map +0 -1
  82. package/dist/chunk-R3MS2N4A.js.map +0 -1
  83. package/dist/chunk-SBO2UMI3.cjs.map +0 -1
  84. package/dist/chunk-TKMR6CQW.js.map +0 -1
  85. package/dist/chunk-TMCRV6V5.js.map +0 -1
  86. package/dist/chunk-UTSL45Q4.js.map +0 -1
  87. package/dist/chunk-WSPFHUHU.cjs.map +0 -1
  88. package/dist/chunk-X2VRR7V7.cjs.map +0 -1
  89. package/dist/chunk-XNFSFT7T.cjs.map +0 -1
  90. package/dist/chunk-YFWOURZL.js.map +0 -1
  91. package/dist/chunk-Z7M4ZGC6.cjs.map +0 -1
  92. package/dist/chunk-ZBPUTF3Q.js.map +0 -1
  93. package/dist/chunk-ZRNFSUOV.cjs.map +0 -1
  94. package/dist/consts/index.cjs.map +0 -1
  95. package/dist/consts/index.js.map +0 -1
  96. package/dist/core/index.cjs.map +0 -1
  97. package/dist/core/index.js.map +0 -1
  98. package/dist/formula/index.cjs.map +0 -1
  99. package/dist/formula/index.js.map +0 -1
  100. package/dist/index.cjs.map +0 -1
  101. package/dist/index.js.map +0 -1
  102. package/dist/lib/index.cjs.map +0 -1
  103. package/dist/lib/index.js.map +0 -1
  104. package/dist/mocks/index.cjs.map +0 -1
  105. package/dist/mocks/index.js.map +0 -1
  106. package/dist/model/index.cjs.map +0 -1
  107. package/dist/model/index.js.map +0 -1
  108. package/dist/plugins/index.cjs.map +0 -1
  109. package/dist/plugins/index.js.map +0 -1
  110. package/dist/types/index.cjs.map +0 -1
  111. package/dist/types/index.js.map +0 -1
  112. package/dist/validation-schemas/index.cjs.map +0 -1
  113. package/dist/validation-schemas/index.js.map +0 -1
@@ -107,5 +107,3 @@ exports.obj = obj;
107
107
  exports.ref = ref;
108
108
  exports.str = str;
109
109
  exports.strFormula = strFormula;
110
- //# sourceMappingURL=chunk-SBO2UMI3.cjs.map
111
- //# sourceMappingURL=chunk-SBO2UMI3.cjs.map
@@ -0,0 +1 @@
1
+
@@ -144,5 +144,3 @@ var ajvFileSchema = {
144
144
  };
145
145
 
146
146
  export { ajvFileSchema, ajvRowCreatedAtSchema, ajvRowCreatedIdSchema, ajvRowHashSchema, ajvRowIdSchema, ajvRowPublishedAtSchema, ajvRowSchemaHashSchema, ajvRowUpdatedAtSchema, ajvRowVersionIdSchema, fileSchema, rowCreatedAtSchema, rowCreatedIdSchema, rowHashSchema, rowIdSchema, rowPublishedAtSchema, rowSchemaHashSchema, rowUpdatedAtSchema, rowVersionIdSchema };
147
- //# sourceMappingURL=chunk-62A5JJJ3.js.map
148
- //# sourceMappingURL=chunk-62A5JJJ3.js.map
@@ -13,5 +13,3 @@ var SystemSchemaIds = /* @__PURE__ */ ((SystemSchemaIds2) => {
13
13
  })(SystemSchemaIds || {});
14
14
 
15
15
  export { SystemSchemaIds };
16
- //# sourceMappingURL=chunk-Q2UOTIMG.js.map
17
- //# sourceMappingURL=chunk-Q2UOTIMG.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk3DDUT57J_cjs = require('./chunk-3DDUT57J.cjs');
4
- var chunkHH2LDPVV_cjs = require('./chunk-HH2LDPVV.cjs');
3
+ var chunkITYABUR5_cjs = require('./chunk-ITYABUR5.cjs');
4
+ var chunkONW2OVNQ_cjs = require('./chunk-ONW2OVNQ.cjs');
5
5
 
6
6
  // src/lib/createJsonSchemaStore.ts
7
7
  var createJsonSchemaStore = (schema, refs = {}) => {
@@ -20,7 +20,7 @@ var createJsonSchemaStore = (schema, refs = {}) => {
20
20
  return objectStore;
21
21
  } else if (schema.type === "array") {
22
22
  const itemsStore = createJsonSchemaStore(schema.items, refs);
23
- const arrayStore = new chunkHH2LDPVV_cjs.JsonArrayStore(itemsStore);
23
+ const arrayStore = new chunkONW2OVNQ_cjs.JsonArrayStore(itemsStore);
24
24
  saveSharedFields(arrayStore, schema);
25
25
  return arrayStore;
26
26
  } else {
@@ -31,7 +31,7 @@ var createJsonSchemaStore = (schema, refs = {}) => {
31
31
  }
32
32
  };
33
33
  var createJsonObjectSchemaStore = (value, refs) => {
34
- const store = new chunkHH2LDPVV_cjs.JsonObjectStore();
34
+ const store = new chunkONW2OVNQ_cjs.JsonObjectStore();
35
35
  for (const requiredField of value.required) {
36
36
  if (!value.properties[requiredField]) {
37
37
  throw new Error(
@@ -46,7 +46,7 @@ var createJsonObjectSchemaStore = (value, refs) => {
46
46
  };
47
47
  var createPrimitiveStoreBySchema = (schema) => {
48
48
  if (schema.type === "string") {
49
- const stringStore = new chunkHH2LDPVV_cjs.JsonStringStore();
49
+ const stringStore = new chunkONW2OVNQ_cjs.JsonStringStore();
50
50
  stringStore.foreignKey = schema.foreignKey;
51
51
  stringStore.format = schema.format;
52
52
  stringStore.enum = schema.enum;
@@ -55,11 +55,11 @@ var createPrimitiveStoreBySchema = (schema) => {
55
55
  stringStore["x-formula"] = schema["x-formula"];
56
56
  return stringStore;
57
57
  } else if (schema.type === "number") {
58
- const numberStore = new chunkHH2LDPVV_cjs.JsonNumberStore();
58
+ const numberStore = new chunkONW2OVNQ_cjs.JsonNumberStore();
59
59
  numberStore["x-formula"] = schema["x-formula"];
60
60
  return numberStore;
61
61
  } else if (schema.type === "boolean") {
62
- const booleanStore = new chunkHH2LDPVV_cjs.JsonBooleanStore();
62
+ const booleanStore = new chunkONW2OVNQ_cjs.JsonBooleanStore();
63
63
  booleanStore["x-formula"] = schema["x-formula"];
64
64
  return booleanStore;
65
65
  } else {
@@ -610,13 +610,13 @@ var getJsonValueStoreByPath = (root, path) => {
610
610
  const segments = parsePath(path);
611
611
  let current = root;
612
612
  for (const seg of segments) {
613
- if (current instanceof chunkHH2LDPVV_cjs.JsonObjectValueStore) {
613
+ if (current instanceof chunkONW2OVNQ_cjs.JsonObjectValueStore) {
614
614
  const next = current.value[String(seg)];
615
615
  if (!next) {
616
616
  throw new Error(`Path not found at segment "${seg}"`);
617
617
  }
618
618
  current = next;
619
- } else if (current instanceof chunkHH2LDPVV_cjs.JsonArrayValueStore) {
619
+ } else if (current instanceof chunkONW2OVNQ_cjs.JsonArrayValueStore) {
620
620
  if (typeof seg !== "number") {
621
621
  throw new Error(`Invalid array index "${seg}"`);
622
622
  }
@@ -646,15 +646,15 @@ var replaceForeignKeyValue = (options) => {
646
646
 
647
647
  // src/lib/resolveRefs.ts
648
648
  var pluginRefs = {
649
- ["urn:jsonschema:io:revisium:row-id-schema:1.0.0" /* RowId */]: chunk3DDUT57J_cjs.rowIdSchema,
650
- ["urn:jsonschema:io:revisium:row-version-id-schema:1.0.0" /* RowVersionId */]: chunk3DDUT57J_cjs.rowVersionIdSchema,
651
- ["urn:jsonschema:io:revisium:row-created-id-schema:1.0.0" /* RowCreatedId */]: chunk3DDUT57J_cjs.rowCreatedIdSchema,
652
- ["urn:jsonschema:io:revisium:row-created-at-schema:1.0.0" /* RowCreatedAt */]: chunk3DDUT57J_cjs.rowCreatedAtSchema,
653
- ["urn:jsonschema:io:revisium:row-published-at-schema:1.0.0" /* RowPublishedAt */]: chunk3DDUT57J_cjs.rowPublishedAtSchema,
654
- ["urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0" /* RowUpdatedAt */]: chunk3DDUT57J_cjs.rowUpdatedAtSchema,
655
- ["urn:jsonschema:io:revisium:row-hash-schema:1.0.0" /* RowHash */]: chunk3DDUT57J_cjs.rowHashSchema,
656
- ["urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0" /* RowSchemaHash */]: chunk3DDUT57J_cjs.rowSchemaHashSchema,
657
- ["urn:jsonschema:io:revisium:file-schema:1.0.0" /* File */]: chunk3DDUT57J_cjs.fileSchema
649
+ ["urn:jsonschema:io:revisium:row-id-schema:1.0.0" /* RowId */]: chunkITYABUR5_cjs.rowIdSchema,
650
+ ["urn:jsonschema:io:revisium:row-version-id-schema:1.0.0" /* RowVersionId */]: chunkITYABUR5_cjs.rowVersionIdSchema,
651
+ ["urn:jsonschema:io:revisium:row-created-id-schema:1.0.0" /* RowCreatedId */]: chunkITYABUR5_cjs.rowCreatedIdSchema,
652
+ ["urn:jsonschema:io:revisium:row-created-at-schema:1.0.0" /* RowCreatedAt */]: chunkITYABUR5_cjs.rowCreatedAtSchema,
653
+ ["urn:jsonschema:io:revisium:row-published-at-schema:1.0.0" /* RowPublishedAt */]: chunkITYABUR5_cjs.rowPublishedAtSchema,
654
+ ["urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0" /* RowUpdatedAt */]: chunkITYABUR5_cjs.rowUpdatedAtSchema,
655
+ ["urn:jsonschema:io:revisium:row-hash-schema:1.0.0" /* RowHash */]: chunkITYABUR5_cjs.rowHashSchema,
656
+ ["urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0" /* RowSchemaHash */]: chunkITYABUR5_cjs.rowSchemaHashSchema,
657
+ ["urn:jsonschema:io:revisium:file-schema:1.0.0" /* File */]: chunkITYABUR5_cjs.fileSchema
658
658
  };
659
659
  var resolveRefs = (schema) => {
660
660
  const store = createJsonSchemaStore(schema, pluginRefs);
@@ -700,7 +700,7 @@ var SchemaTable = class {
700
700
  return this.store.getPlainSchema();
701
701
  }
702
702
  addRow(rowId, data) {
703
- const row = chunkHH2LDPVV_cjs.createJsonValueStore(this.store, rowId, data);
703
+ const row = chunkONW2OVNQ_cjs.createJsonValueStore(this.store, rowId, data);
704
704
  this.rows.set(rowId, row);
705
705
  }
706
706
  getRow(id) {
@@ -717,14 +717,14 @@ var SchemaTable = class {
717
717
  }));
718
718
  }
719
719
  migrateRows(nextStore) {
720
- const transformation = chunkHH2LDPVV_cjs.getTransformation(this.store, nextStore);
720
+ const transformation = chunkONW2OVNQ_cjs.getTransformation(this.store, nextStore);
721
721
  if (transformation) {
722
722
  for (const [rowId, row] of this.rows) {
723
723
  const rawNextValue = transformation(
724
724
  row.getPlainValue(),
725
725
  nextStore.default
726
726
  );
727
- const nextRow = chunkHH2LDPVV_cjs.createJsonValueStore(nextStore, rowId, rawNextValue);
727
+ const nextRow = chunkONW2OVNQ_cjs.createJsonValueStore(nextStore, rowId, rawNextValue);
728
728
  this.rows.set(rowId, nextRow);
729
729
  }
730
730
  }
@@ -764,5 +764,3 @@ exports.setValueByPath = setValueByPath;
764
764
  exports.traverseStore = traverseStore;
765
765
  exports.traverseValue = traverseValue;
766
766
  exports.validateJsonFieldName = validateJsonFieldName;
767
- //# sourceMappingURL=chunk-Z7M4ZGC6.cjs.map
768
- //# sourceMappingURL=chunk-Z7M4ZGC6.cjs.map
@@ -124,5 +124,3 @@ function deepEqual(a, b) {
124
124
  }
125
125
 
126
126
  export { computeValueDiff };
127
- //# sourceMappingURL=chunk-YFWOURZL.js.map
128
- //# sourceMappingURL=chunk-YFWOURZL.js.map
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -2679,5 +2679,3 @@ function buildArrayItemsPath(parentPath) {
2679
2679
  }
2680
2680
 
2681
2681
  export { AbstractBasePath, ChangeCoalescer, ChangeCollector, CompositeRule, EMPTY_METADATA, EMPTY_PATH, EnumValidator, FIELD_NAME_ERROR_MESSAGE, ForeignKeyValidator, FormulaError, FormulaPathBuilder, FormulaSerializer, ItemsSegment, MaxLengthValidator, MaximumValidator, MinLengthValidator, MinimumValidator, NULL_NODE, NodePathIndex, PatchBuilder, PatchEnricher, PatchGenerator, PatternValidator, PropertySegment, RequiredValidator, ResolvedDependency, SchemaDiff, SchemaPropertyRule, SchemaSerializer, SchemaTruthyRule, ValidationEngine, ValidatorRegistry, ValidatorResolver, areNodesContentEqual, areNodesEqual, coalesceChanges, collectChanges, createArrayNode, createBooleanNode, createDefaultValidatorRegistry, createMobxProvider, createNumberNode, createObjectNode, createPath, createRefNode, createSchemaTree, createStringNode, createValidationEngine, isValidFieldName, jsonPointerToPath, jsonPointerToSegments, jsonPointerToSimplePath, makeAutoObservable, makeObservable, observable, reaction, resetReactivityProvider, runInAction, setReactivityProvider, validateFormulas, validateSchema };
2682
- //# sourceMappingURL=chunk-TMCRV6V5.js.map
2683
- //# sourceMappingURL=chunk-TMCRV6V5.js.map
@@ -678,5 +678,3 @@ exports.evaluateFormulas = evaluateFormulas;
678
678
  exports.extractSchemaFormulas = extractSchemaFormulas;
679
679
  exports.validateFormulaAgainstSchema = validateFormulaAgainstSchema;
680
680
  exports.validateSchemaFormulas = validateSchemaFormulas;
681
- //# sourceMappingURL=chunk-X2VRR7V7.cjs.map
682
- //# sourceMappingURL=chunk-X2VRR7V7.cjs.map
@@ -15,5 +15,3 @@ var SystemSchemaIds = /* @__PURE__ */ ((SystemSchemaIds2) => {
15
15
  })(SystemSchemaIds || {});
16
16
 
17
17
  exports.SystemSchemaIds = SystemSchemaIds;
18
- //# sourceMappingURL=chunk-XNFSFT7T.cjs.map
19
- //# sourceMappingURL=chunk-XNFSFT7T.cjs.map
@@ -9,5 +9,3 @@ var FieldChangeType = /* @__PURE__ */ ((FieldChangeType2) => {
9
9
  })(FieldChangeType || {});
10
10
 
11
11
  exports.FieldChangeType = FieldChangeType;
12
- //# sourceMappingURL=chunk-ZRNFSUOV.cjs.map
13
- //# sourceMappingURL=chunk-ZRNFSUOV.cjs.map
@@ -759,5 +759,3 @@ var JsonArrayValueStore = class {
759
759
  };
760
760
 
761
761
  export { JsonArrayStore, JsonArrayValueStore, JsonBooleanStore, JsonBooleanValueStore, JsonNumberStore, JsonNumberValueStore, JsonObjectStore, JsonObjectValueStore, JsonStringStore, JsonStringValueStore, addSharedFieldsFromState, createJsonArrayValueStore, createJsonObjectValueStore, createJsonValueStore, createPrimitiveValueStore, equal, fromArrayToObject, fromArrayTransformation, fromBooleanToNumber, fromBooleanToString, fromNumberToBoolean, fromNumberToString, fromObjectToArray, fromObjectToPrimitive, fromPrimitiveToObject, fromStringToBoolean, fromStringToNumber, getTransformation, toArrayTransformation };
762
- //# sourceMappingURL=chunk-TKMR6CQW.js.map
763
- //# sourceMappingURL=chunk-TKMR6CQW.js.map
@@ -668,5 +668,3 @@ function setValueByPath(obj, path, value) {
668
668
  }
669
669
 
670
670
  export { collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, validateFormulaAgainstSchema, validateSchemaFormulas };
671
- //# sourceMappingURL=chunk-R3MS2N4A.js.map
672
- //# sourceMappingURL=chunk-R3MS2N4A.js.map