@revisium/schema-toolkit 0.14.3 → 0.16.0

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 (90) hide show
  1. package/README.md +1 -1
  2. package/dist/FormulaValidator-CKE2kT4C.d.cts +10 -0
  3. package/dist/FormulaValidator-DGGmwqDQ.d.ts +10 -0
  4. package/dist/{chunk-DJ4JPKI4.js → chunk-2NRQPOQY.js} +126 -218
  5. package/dist/chunk-2NRQPOQY.js.map +1 -0
  6. package/dist/chunk-3IKI64T2.js +3 -0
  7. package/dist/{chunk-H7W4QNMA.js.map → chunk-3IKI64T2.js.map} +1 -1
  8. package/dist/{chunk-L5MLJEC7.js → chunk-CYTPQYVM.js} +2 -2
  9. package/dist/chunk-CYTPQYVM.js.map +1 -0
  10. package/dist/{chunk-B22UU3JK.cjs → chunk-GAPLSVZN.cjs} +2 -2
  11. package/dist/chunk-GAPLSVZN.cjs.map +1 -0
  12. package/dist/chunk-IWRV6QAD.cjs +2621 -0
  13. package/dist/chunk-IWRV6QAD.cjs.map +1 -0
  14. package/dist/chunk-LF6CGXRQ.js +2289 -0
  15. package/dist/chunk-LF6CGXRQ.js.map +1 -0
  16. package/dist/chunk-OR2I3XOQ.cjs +2320 -0
  17. package/dist/chunk-OR2I3XOQ.cjs.map +1 -0
  18. package/dist/chunk-S7GEDTSL.js +2569 -0
  19. package/dist/chunk-S7GEDTSL.js.map +1 -0
  20. package/dist/chunk-TBFTADML.cjs +4 -0
  21. package/dist/{chunk-ODCH3PP2.cjs.map → chunk-TBFTADML.cjs.map} +1 -1
  22. package/dist/chunk-WSPFHUHU.cjs +130 -0
  23. package/dist/chunk-WSPFHUHU.cjs.map +1 -0
  24. package/dist/{chunk-VX5C5YMF.cjs → chunk-XS47N22X.cjs} +125 -218
  25. package/dist/chunk-XS47N22X.cjs.map +1 -0
  26. package/dist/chunk-YFWOURZL.js +128 -0
  27. package/dist/chunk-YFWOURZL.js.map +1 -0
  28. package/dist/{chunk-KJCURW4D.js → chunk-ZBPUTF3Q.js} +3 -3
  29. package/dist/chunk-ZBPUTF3Q.js.map +1 -0
  30. package/dist/{chunk-GF3XXYOS.cjs → chunk-ZRNFSUOV.cjs} +3 -3
  31. package/dist/chunk-ZRNFSUOV.cjs.map +1 -0
  32. package/dist/computeValueDiff-CDwbNw8F.d.ts +5 -0
  33. package/dist/computeValueDiff-CNT84rwK.d.cts +5 -0
  34. package/dist/core/index.cjs +231 -0
  35. package/dist/core/index.cjs.map +1 -0
  36. package/dist/core/index.d.cts +314 -0
  37. package/dist/core/index.d.ts +314 -0
  38. package/dist/core/index.js +29 -0
  39. package/dist/core/index.js.map +1 -0
  40. package/dist/formula/index.d.cts +1 -1
  41. package/dist/formula/index.d.ts +1 -1
  42. package/dist/index.cjs +182 -44
  43. package/dist/index.d.cts +13 -8
  44. package/dist/index.d.ts +13 -8
  45. package/dist/index.js +7 -5
  46. package/dist/{json-patch.types-CYt9TCu3.d.ts → json-patch.types-DTUHS9SV.d.ts} +1 -1
  47. package/dist/{json-patch.types-DUcWbQRY.d.cts → json-patch.types-eltVqnWC.d.cts} +1 -1
  48. package/dist/{json-string.store-CcZ197KO.d.cts → json-string.store-DKlkc1u_.d.cts} +1 -1
  49. package/dist/{json-string.store-DckDcMVN.d.ts → json-string.store-DMrHPJ3v.d.ts} +1 -1
  50. package/dist/json-value-patch.types-CjBpq5VF.d.cts +24 -0
  51. package/dist/json-value-patch.types-U2y_ugm1.d.ts +24 -0
  52. package/dist/lib/index.cjs +40 -39
  53. package/dist/lib/index.d.cts +6 -7
  54. package/dist/lib/index.d.ts +6 -7
  55. package/dist/lib/index.js +4 -3
  56. package/dist/mocks/index.cjs +1 -1
  57. package/dist/mocks/index.d.cts +2 -2
  58. package/dist/mocks/index.d.ts +2 -2
  59. package/dist/mocks/index.js +1 -1
  60. package/dist/model/index.cjs +125 -2
  61. package/dist/model/index.d.cts +596 -4
  62. package/dist/model/index.d.ts +596 -4
  63. package/dist/model/index.js +5 -2
  64. package/dist/plugins/index.cjs +1 -1
  65. package/dist/plugins/index.d.cts +25 -1
  66. package/dist/plugins/index.d.ts +25 -1
  67. package/dist/plugins/index.js +1 -1
  68. package/dist/{schema.types-CLHMJmkJ.d.cts → schema.types-ZX5fUW1X.d.cts} +6 -0
  69. package/dist/{schema.types-CLHMJmkJ.d.ts → schema.types-ZX5fUW1X.d.ts} +6 -0
  70. package/dist/types/index.cjs +5 -5
  71. package/dist/types/index.d.cts +8 -29
  72. package/dist/types/index.d.ts +8 -29
  73. package/dist/types/index.js +3 -3
  74. package/dist/{value-diff.types-BRoI_kGE.d.cts → types-C_GxaUve.d.cts} +4 -4
  75. package/dist/{value-diff.types-BRoI_kGE.d.ts → types-C_GxaUve.d.ts} +4 -4
  76. package/dist/types-Cnfj5nLO.d.ts +198 -0
  77. package/dist/types-DMzUCve0.d.cts +198 -0
  78. package/package.json +14 -1
  79. package/dist/chunk-B22UU3JK.cjs.map +0 -1
  80. package/dist/chunk-DJ4JPKI4.js.map +0 -1
  81. package/dist/chunk-GF3XXYOS.cjs.map +0 -1
  82. package/dist/chunk-H7W4QNMA.js +0 -3
  83. package/dist/chunk-KJCURW4D.js.map +0 -1
  84. package/dist/chunk-L5MLJEC7.js.map +0 -1
  85. package/dist/chunk-ODCH3PP2.cjs +0 -4
  86. package/dist/chunk-SBJFTOWW.js +0 -3
  87. package/dist/chunk-SBJFTOWW.js.map +0 -1
  88. package/dist/chunk-VX5C5YMF.cjs.map +0 -1
  89. package/dist/chunk-XAFOMEOK.cjs +0 -4
  90. package/dist/chunk-XAFOMEOK.cjs.map +0 -1
@@ -1,146 +1,143 @@
1
1
  'use strict';
2
2
 
3
- var chunkVX5C5YMF_cjs = require('../chunk-VX5C5YMF.cjs');
3
+ var chunkXS47N22X_cjs = require('../chunk-XS47N22X.cjs');
4
4
  var chunkX2VRR7V7_cjs = require('../chunk-X2VRR7V7.cjs');
5
- require('../chunk-GF3XXYOS.cjs');
5
+ var chunkWSPFHUHU_cjs = require('../chunk-WSPFHUHU.cjs');
6
6
  require('../chunk-EGC32GPY.cjs');
7
7
  require('../chunk-XNFSFT7T.cjs');
8
8
  var chunkTMWPWGUN_cjs = require('../chunk-TMWPWGUN.cjs');
9
- require('../chunk-B22UU3JK.cjs');
9
+ require('../chunk-ZRNFSUOV.cjs');
10
+ require('../chunk-GAPLSVZN.cjs');
10
11
 
11
12
 
12
13
 
13
14
  Object.defineProperty(exports, "SchemaTable", {
14
15
  enumerable: true,
15
- get: function () { return chunkVX5C5YMF_cjs.SchemaTable; }
16
+ get: function () { return chunkXS47N22X_cjs.SchemaTable; }
16
17
  });
17
18
  Object.defineProperty(exports, "VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE", {
18
19
  enumerable: true,
19
- get: function () { return chunkVX5C5YMF_cjs.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE; }
20
+ get: function () { return chunkXS47N22X_cjs.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE; }
20
21
  });
21
22
  Object.defineProperty(exports, "applyAddPatch", {
22
23
  enumerable: true,
23
- get: function () { return chunkVX5C5YMF_cjs.applyAddPatch; }
24
+ get: function () { return chunkXS47N22X_cjs.applyAddPatch; }
24
25
  });
25
26
  Object.defineProperty(exports, "applyMovePatch", {
26
27
  enumerable: true,
27
- get: function () { return chunkVX5C5YMF_cjs.applyMovePatch; }
28
+ get: function () { return chunkXS47N22X_cjs.applyMovePatch; }
28
29
  });
29
30
  Object.defineProperty(exports, "applyRemovePatch", {
30
31
  enumerable: true,
31
- get: function () { return chunkVX5C5YMF_cjs.applyRemovePatch; }
32
+ get: function () { return chunkXS47N22X_cjs.applyRemovePatch; }
32
33
  });
33
34
  Object.defineProperty(exports, "applyReplacePatch", {
34
35
  enumerable: true,
35
- get: function () { return chunkVX5C5YMF_cjs.applyReplacePatch; }
36
- });
37
- Object.defineProperty(exports, "computeValueDiff", {
38
- enumerable: true,
39
- get: function () { return chunkVX5C5YMF_cjs.computeValueDiff; }
36
+ get: function () { return chunkXS47N22X_cjs.applyReplacePatch; }
40
37
  });
41
38
  Object.defineProperty(exports, "convertJsonPathToSchemaPath", {
42
39
  enumerable: true,
43
- get: function () { return chunkVX5C5YMF_cjs.convertJsonPathToSchemaPath; }
40
+ get: function () { return chunkXS47N22X_cjs.convertJsonPathToSchemaPath; }
44
41
  });
45
42
  Object.defineProperty(exports, "convertSchemaPathToJsonPath", {
46
43
  enumerable: true,
47
- get: function () { return chunkVX5C5YMF_cjs.convertSchemaPathToJsonPath; }
44
+ get: function () { return chunkXS47N22X_cjs.convertSchemaPathToJsonPath; }
48
45
  });
49
46
  Object.defineProperty(exports, "createJsonObjectSchemaStore", {
50
47
  enumerable: true,
51
- get: function () { return chunkVX5C5YMF_cjs.createJsonObjectSchemaStore; }
48
+ get: function () { return chunkXS47N22X_cjs.createJsonObjectSchemaStore; }
52
49
  });
53
50
  Object.defineProperty(exports, "createJsonSchemaStore", {
54
51
  enumerable: true,
55
- get: function () { return chunkVX5C5YMF_cjs.createJsonSchemaStore; }
52
+ get: function () { return chunkXS47N22X_cjs.createJsonSchemaStore; }
56
53
  });
57
54
  Object.defineProperty(exports, "createPrimitiveStoreBySchema", {
58
55
  enumerable: true,
59
- get: function () { return chunkVX5C5YMF_cjs.createPrimitiveStoreBySchema; }
56
+ get: function () { return chunkXS47N22X_cjs.createPrimitiveStoreBySchema; }
60
57
  });
61
58
  Object.defineProperty(exports, "deepEqual", {
62
59
  enumerable: true,
63
- get: function () { return chunkVX5C5YMF_cjs.deepEqual; }
60
+ get: function () { return chunkXS47N22X_cjs.deepEqual; }
64
61
  });
65
62
  Object.defineProperty(exports, "getDBJsonPathByJsonSchemaStore", {
66
63
  enumerable: true,
67
- get: function () { return chunkVX5C5YMF_cjs.getDBJsonPathByJsonSchemaStore; }
64
+ get: function () { return chunkXS47N22X_cjs.getDBJsonPathByJsonSchemaStore; }
68
65
  });
69
66
  Object.defineProperty(exports, "getForeignKeyPatchesFromSchema", {
70
67
  enumerable: true,
71
- get: function () { return chunkVX5C5YMF_cjs.getForeignKeyPatchesFromSchema; }
68
+ get: function () { return chunkXS47N22X_cjs.getForeignKeyPatchesFromSchema; }
72
69
  });
73
70
  Object.defineProperty(exports, "getForeignKeysFromSchema", {
74
71
  enumerable: true,
75
- get: function () { return chunkVX5C5YMF_cjs.getForeignKeysFromSchema; }
72
+ get: function () { return chunkXS47N22X_cjs.getForeignKeysFromSchema; }
76
73
  });
77
74
  Object.defineProperty(exports, "getForeignKeysFromValue", {
78
75
  enumerable: true,
79
- get: function () { return chunkVX5C5YMF_cjs.getForeignKeysFromValue; }
76
+ get: function () { return chunkXS47N22X_cjs.getForeignKeysFromValue; }
80
77
  });
81
78
  Object.defineProperty(exports, "getInvalidFieldNamesInSchema", {
82
79
  enumerable: true,
83
- get: function () { return chunkVX5C5YMF_cjs.getInvalidFieldNamesInSchema; }
80
+ get: function () { return chunkXS47N22X_cjs.getInvalidFieldNamesInSchema; }
84
81
  });
85
82
  Object.defineProperty(exports, "getJsonSchemaStoreByPath", {
86
83
  enumerable: true,
87
- get: function () { return chunkVX5C5YMF_cjs.getJsonSchemaStoreByPath; }
84
+ get: function () { return chunkXS47N22X_cjs.getJsonSchemaStoreByPath; }
88
85
  });
89
86
  Object.defineProperty(exports, "getJsonValueStoreByPath", {
90
87
  enumerable: true,
91
- get: function () { return chunkVX5C5YMF_cjs.getJsonValueStoreByPath; }
88
+ get: function () { return chunkXS47N22X_cjs.getJsonValueStoreByPath; }
92
89
  });
93
90
  Object.defineProperty(exports, "getParentForPath", {
94
91
  enumerable: true,
95
- get: function () { return chunkVX5C5YMF_cjs.getParentForPath; }
92
+ get: function () { return chunkXS47N22X_cjs.getParentForPath; }
96
93
  });
97
94
  Object.defineProperty(exports, "getPathByStore", {
98
95
  enumerable: true,
99
- get: function () { return chunkVX5C5YMF_cjs.getPathByStore; }
96
+ get: function () { return chunkXS47N22X_cjs.getPathByStore; }
100
97
  });
101
98
  Object.defineProperty(exports, "getValueByPath", {
102
99
  enumerable: true,
103
- get: function () { return chunkVX5C5YMF_cjs.getValueByPath; }
100
+ get: function () { return chunkXS47N22X_cjs.getValueByPath; }
104
101
  });
105
102
  Object.defineProperty(exports, "hasPath", {
106
103
  enumerable: true,
107
- get: function () { return chunkVX5C5YMF_cjs.hasPath; }
104
+ get: function () { return chunkXS47N22X_cjs.hasPath; }
108
105
  });
109
106
  Object.defineProperty(exports, "parsePath", {
110
107
  enumerable: true,
111
- get: function () { return chunkVX5C5YMF_cjs.parsePath; }
108
+ get: function () { return chunkXS47N22X_cjs.parsePath; }
112
109
  });
113
110
  Object.defineProperty(exports, "pluginRefs", {
114
111
  enumerable: true,
115
- get: function () { return chunkVX5C5YMF_cjs.pluginRefs; }
112
+ get: function () { return chunkXS47N22X_cjs.pluginRefs; }
116
113
  });
117
114
  Object.defineProperty(exports, "replaceForeignKeyValue", {
118
115
  enumerable: true,
119
- get: function () { return chunkVX5C5YMF_cjs.replaceForeignKeyValue; }
116
+ get: function () { return chunkXS47N22X_cjs.replaceForeignKeyValue; }
120
117
  });
121
118
  Object.defineProperty(exports, "resolveRefs", {
122
119
  enumerable: true,
123
- get: function () { return chunkVX5C5YMF_cjs.resolveRefs; }
120
+ get: function () { return chunkXS47N22X_cjs.resolveRefs; }
124
121
  });
125
122
  Object.defineProperty(exports, "saveSharedFields", {
126
123
  enumerable: true,
127
- get: function () { return chunkVX5C5YMF_cjs.saveSharedFields; }
124
+ get: function () { return chunkXS47N22X_cjs.saveSharedFields; }
128
125
  });
129
126
  Object.defineProperty(exports, "setValueByPath", {
130
127
  enumerable: true,
131
- get: function () { return chunkVX5C5YMF_cjs.setValueByPath; }
128
+ get: function () { return chunkXS47N22X_cjs.setValueByPath; }
132
129
  });
133
130
  Object.defineProperty(exports, "traverseStore", {
134
131
  enumerable: true,
135
- get: function () { return chunkVX5C5YMF_cjs.traverseStore; }
132
+ get: function () { return chunkXS47N22X_cjs.traverseStore; }
136
133
  });
137
134
  Object.defineProperty(exports, "traverseValue", {
138
135
  enumerable: true,
139
- get: function () { return chunkVX5C5YMF_cjs.traverseValue; }
136
+ get: function () { return chunkXS47N22X_cjs.traverseValue; }
140
137
  });
141
138
  Object.defineProperty(exports, "validateJsonFieldName", {
142
139
  enumerable: true,
143
- get: function () { return chunkVX5C5YMF_cjs.validateJsonFieldName; }
140
+ get: function () { return chunkXS47N22X_cjs.validateJsonFieldName; }
144
141
  });
145
142
  Object.defineProperty(exports, "collectFormulaNodes", {
146
143
  enumerable: true,
@@ -166,6 +163,10 @@ Object.defineProperty(exports, "validateSchemaFormulas", {
166
163
  enumerable: true,
167
164
  get: function () { return chunkX2VRR7V7_cjs.validateSchemaFormulas; }
168
165
  });
166
+ Object.defineProperty(exports, "computeValueDiff", {
167
+ enumerable: true,
168
+ get: function () { return chunkWSPFHUHU_cjs.computeValueDiff; }
169
+ });
169
170
  Object.defineProperty(exports, "addSharedFieldsFromState", {
170
171
  enumerable: true,
171
172
  get: function () { return chunkTMWPWGUN_cjs.addSharedFieldsFromState; }
@@ -1,11 +1,12 @@
1
- import { i as JsonSchema, f as JsonObjectSchema, e as JsonSchemaPrimitives, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-CLHMJmkJ.cjs';
2
- import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove, h as JsonPatch } from '../json-patch.types-DUcWbQRY.cjs';
3
- import { h as JsonSchemaStore, c as JsonObjectStore, g as JsonSchemaStorePrimitives, p as JsonValueStore, l as JsonObjectValueStore, f as JsonArrayStore, m as JsonArrayValueStore, n as JsonValueStorePrimitives } from '../json-string.store-CcZ197KO.cjs';
4
- import { a as FieldChange } from '../value-diff.types-BRoI_kGE.cjs';
1
+ import { i as JsonSchema, f as JsonObjectSchema, e as JsonSchemaPrimitives, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-ZX5fUW1X.cjs';
2
+ import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove, h as JsonPatch } from '../json-patch.types-eltVqnWC.cjs';
3
+ import { h as JsonSchemaStore, c as JsonObjectStore, g as JsonSchemaStorePrimitives, p as JsonValueStore, l as JsonObjectValueStore, f as JsonArrayStore, m as JsonArrayValueStore, n as JsonValueStorePrimitives } from '../json-string.store-DKlkc1u_.cjs';
4
+ export { c as computeValueDiff } from '../computeValueDiff-CNT84rwK.cjs';
5
5
  import { c as JsonValue, J as JsonObject, b as JsonArray, a as JsonPrimitives } from '../json.types-46Cq-WxU.cjs';
6
6
  export { EvaluateFormulasOptions, EvaluateFormulasResult, ExtractedFormula, FormulaError, FormulaNode, FormulaValidationError, SchemaValidationResult, collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, validateFormulaAgainstSchema, validateSchemaFormulas } from '../formula/index.cjs';
7
7
  export { formulaSpec } from '@revisium/formula/spec';
8
8
  import 'node:events';
9
+ import '../types-C_GxaUve.cjs';
9
10
 
10
11
  declare const addSharedFieldsFromState: <T extends JsonSchema = JsonSchema>(schema: T, state: {
11
12
  title?: string;
@@ -18,8 +19,6 @@ declare const applyRemovePatch: (rootStore: JsonSchemaStore, patch: JsonPatchRem
18
19
  declare const applyAddPatch: (rootStore: JsonSchemaStore, patch: JsonPatchAdd, refs?: Record<string, JsonSchema>) => void;
19
20
  declare const applyMovePatch: (store: JsonSchemaStore, patch: JsonPatchMove) => void;
20
21
 
21
- declare function computeValueDiff(fromValue: unknown | null, toValue: unknown | null): FieldChange[];
22
-
23
22
  type RefsType = Record<string, JsonSchema>;
24
23
  declare const createJsonSchemaStore: (schema: JsonSchema, refs?: RefsType) => JsonSchemaStore;
25
24
  declare const createJsonObjectSchemaStore: (value: JsonObjectSchema, refs: RefsType) => JsonObjectStore;
@@ -101,4 +100,4 @@ declare const traverseValue: (store: JsonValueStore, callback: (node: JsonValueS
101
100
  declare const VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = "It must contain between 1 and 64 characters, start with a letter or underscore (_), cannot start with two underscores (__), and can only include letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_).";
102
101
  declare const validateJsonFieldName: (id: string) => boolean;
103
102
 
104
- export { type GetForeignKeysFromValueType, type RefsType, type ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, computeValueDiff, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName };
103
+ export { type GetForeignKeysFromValueType, type RefsType, type ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName };
@@ -1,11 +1,12 @@
1
- import { i as JsonSchema, f as JsonObjectSchema, e as JsonSchemaPrimitives, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-CLHMJmkJ.js';
2
- import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove, h as JsonPatch } from '../json-patch.types-CYt9TCu3.js';
3
- import { h as JsonSchemaStore, c as JsonObjectStore, g as JsonSchemaStorePrimitives, p as JsonValueStore, l as JsonObjectValueStore, f as JsonArrayStore, m as JsonArrayValueStore, n as JsonValueStorePrimitives } from '../json-string.store-DckDcMVN.js';
4
- import { a as FieldChange } from '../value-diff.types-BRoI_kGE.js';
1
+ import { i as JsonSchema, f as JsonObjectSchema, e as JsonSchemaPrimitives, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-ZX5fUW1X.js';
2
+ import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove, h as JsonPatch } from '../json-patch.types-DTUHS9SV.js';
3
+ import { h as JsonSchemaStore, c as JsonObjectStore, g as JsonSchemaStorePrimitives, p as JsonValueStore, l as JsonObjectValueStore, f as JsonArrayStore, m as JsonArrayValueStore, n as JsonValueStorePrimitives } from '../json-string.store-DMrHPJ3v.js';
4
+ export { c as computeValueDiff } from '../computeValueDiff-CDwbNw8F.js';
5
5
  import { c as JsonValue, J as JsonObject, b as JsonArray, a as JsonPrimitives } from '../json.types-46Cq-WxU.js';
6
6
  export { EvaluateFormulasOptions, EvaluateFormulasResult, ExtractedFormula, FormulaError, FormulaNode, FormulaValidationError, SchemaValidationResult, collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, validateFormulaAgainstSchema, validateSchemaFormulas } from '../formula/index.js';
7
7
  export { formulaSpec } from '@revisium/formula/spec';
8
8
  import 'node:events';
9
+ import '../types-C_GxaUve.js';
9
10
 
10
11
  declare const addSharedFieldsFromState: <T extends JsonSchema = JsonSchema>(schema: T, state: {
11
12
  title?: string;
@@ -18,8 +19,6 @@ declare const applyRemovePatch: (rootStore: JsonSchemaStore, patch: JsonPatchRem
18
19
  declare const applyAddPatch: (rootStore: JsonSchemaStore, patch: JsonPatchAdd, refs?: Record<string, JsonSchema>) => void;
19
20
  declare const applyMovePatch: (store: JsonSchemaStore, patch: JsonPatchMove) => void;
20
21
 
21
- declare function computeValueDiff(fromValue: unknown | null, toValue: unknown | null): FieldChange[];
22
-
23
22
  type RefsType = Record<string, JsonSchema>;
24
23
  declare const createJsonSchemaStore: (schema: JsonSchema, refs?: RefsType) => JsonSchemaStore;
25
24
  declare const createJsonObjectSchemaStore: (value: JsonObjectSchema, refs: RefsType) => JsonObjectStore;
@@ -101,4 +100,4 @@ declare const traverseValue: (store: JsonValueStore, callback: (node: JsonValueS
101
100
  declare const VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = "It must contain between 1 and 64 characters, start with a letter or underscore (_), cannot start with two underscores (__), and can only include letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_).";
102
101
  declare const validateJsonFieldName: (id: string) => boolean;
103
102
 
104
- export { type GetForeignKeysFromValueType, type RefsType, type ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, computeValueDiff, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName };
103
+ export { type GetForeignKeysFromValueType, type RefsType, type ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName };
package/dist/lib/index.js CHANGED
@@ -1,9 +1,10 @@
1
- export { SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, computeValueDiff, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName } from '../chunk-DJ4JPKI4.js';
1
+ export { SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName } from '../chunk-2NRQPOQY.js';
2
2
  export { collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, formulaSpec, validateFormulaAgainstSchema, validateSchemaFormulas } from '../chunk-R3MS2N4A.js';
3
- import '../chunk-KJCURW4D.js';
3
+ export { computeValueDiff } from '../chunk-YFWOURZL.js';
4
4
  import '../chunk-LLHQWDAR.js';
5
5
  import '../chunk-Q2UOTIMG.js';
6
6
  export { addSharedFieldsFromState, createJsonArrayValueStore, createJsonObjectValueStore, createJsonValueStore, createPrimitiveValueStore } from '../chunk-HY4VE7H2.js';
7
- import '../chunk-L5MLJEC7.js';
7
+ import '../chunk-ZBPUTF3Q.js';
8
+ import '../chunk-CYTPQYVM.js';
8
9
  //# sourceMappingURL=index.js.map
9
10
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkEJYILFAK_cjs = require('../chunk-EJYILFAK.cjs');
4
- require('../chunk-B22UU3JK.cjs');
4
+ require('../chunk-GAPLSVZN.cjs');
5
5
 
6
6
 
7
7
 
@@ -1,5 +1,5 @@
1
- import { i as JsonSchema, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, f as JsonObjectSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-CLHMJmkJ.cjs';
2
- import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove } from '../json-patch.types-DUcWbQRY.cjs';
1
+ import { i as JsonSchema, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, f as JsonObjectSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-ZX5fUW1X.cjs';
2
+ import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove } from '../json-patch.types-eltVqnWC.cjs';
3
3
 
4
4
  declare const getReplacePatch: ({ path, value, }: {
5
5
  path: string;
@@ -1,5 +1,5 @@
1
- import { i as JsonSchema, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, f as JsonObjectSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-CLHMJmkJ.js';
2
- import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove } from '../json-patch.types-CYt9TCu3.js';
1
+ import { i as JsonSchema, b as JsonStringSchema, c as JsonNumberSchema, d as JsonBooleanSchema, f as JsonObjectSchema, g as JsonArraySchema, h as JsonRefSchema } from '../schema.types-ZX5fUW1X.js';
2
+ import { e as JsonPatchReplace, f as JsonPatchRemove, g as JsonPatchAdd, d as JsonPatchMove } from '../json-patch.types-DTUHS9SV.js';
3
3
 
4
4
  declare const getReplacePatch: ({ path, value, }: {
5
5
  path: string;
@@ -1,4 +1,4 @@
1
1
  export { getAddPatch, getArraySchema, getBooleanSchema, getMovePatch, getNumberSchema, getObjectSchema, getRefSchema, getRemovePatch, getReplacePatch, getStringSchema } from '../chunk-AORPUIKD.js';
2
- import '../chunk-L5MLJEC7.js';
2
+ import '../chunk-CYTPQYVM.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,134 @@
1
1
  'use strict';
2
2
 
3
- require('../chunk-ODCH3PP2.cjs');
3
+ var chunkOR2I3XOQ_cjs = require('../chunk-OR2I3XOQ.cjs');
4
+ require('../chunk-IWRV6QAD.cjs');
5
+ require('../chunk-TBFTADML.cjs');
4
6
  var chunkTMWPWGUN_cjs = require('../chunk-TMWPWGUN.cjs');
5
- require('../chunk-B22UU3JK.cjs');
7
+ require('../chunk-ZRNFSUOV.cjs');
8
+ require('../chunk-GAPLSVZN.cjs');
6
9
 
7
10
 
8
11
 
12
+ Object.defineProperty(exports, "ArrayValueNode", {
13
+ enumerable: true,
14
+ get: function () { return chunkOR2I3XOQ_cjs.ArrayValueNode; }
15
+ });
16
+ Object.defineProperty(exports, "BasePrimitiveValueNode", {
17
+ enumerable: true,
18
+ get: function () { return chunkOR2I3XOQ_cjs.BasePrimitiveValueNode; }
19
+ });
20
+ Object.defineProperty(exports, "BaseValueNode", {
21
+ enumerable: true,
22
+ get: function () { return chunkOR2I3XOQ_cjs.BaseValueNode; }
23
+ });
24
+ Object.defineProperty(exports, "BooleanValueNode", {
25
+ enumerable: true,
26
+ get: function () { return chunkOR2I3XOQ_cjs.BooleanValueNode; }
27
+ });
28
+ Object.defineProperty(exports, "DataModelImpl", {
29
+ enumerable: true,
30
+ get: function () { return chunkOR2I3XOQ_cjs.DataModelImpl; }
31
+ });
32
+ Object.defineProperty(exports, "ForeignKeyNotFoundError", {
33
+ enumerable: true,
34
+ get: function () { return chunkOR2I3XOQ_cjs.ForeignKeyNotFoundError; }
35
+ });
36
+ Object.defineProperty(exports, "ForeignKeyResolverImpl", {
37
+ enumerable: true,
38
+ get: function () { return chunkOR2I3XOQ_cjs.ForeignKeyResolverImpl; }
39
+ });
40
+ Object.defineProperty(exports, "ForeignKeyResolverNotConfiguredError", {
41
+ enumerable: true,
42
+ get: function () { return chunkOR2I3XOQ_cjs.ForeignKeyResolverNotConfiguredError; }
43
+ });
44
+ Object.defineProperty(exports, "ForeignKeyValueNodeImpl", {
45
+ enumerable: true,
46
+ get: function () { return chunkOR2I3XOQ_cjs.ForeignKeyValueNodeImpl; }
47
+ });
48
+ Object.defineProperty(exports, "NodeFactory", {
49
+ enumerable: true,
50
+ get: function () { return chunkOR2I3XOQ_cjs.NodeFactory; }
51
+ });
52
+ Object.defineProperty(exports, "NodeFactoryRegistry", {
53
+ enumerable: true,
54
+ get: function () { return chunkOR2I3XOQ_cjs.NodeFactoryRegistry; }
55
+ });
56
+ Object.defineProperty(exports, "NumberValueNode", {
57
+ enumerable: true,
58
+ get: function () { return chunkOR2I3XOQ_cjs.NumberValueNode; }
59
+ });
60
+ Object.defineProperty(exports, "ObjectValueNode", {
61
+ enumerable: true,
62
+ get: function () { return chunkOR2I3XOQ_cjs.ObjectValueNode; }
63
+ });
64
+ Object.defineProperty(exports, "RowModelImpl", {
65
+ enumerable: true,
66
+ get: function () { return chunkOR2I3XOQ_cjs.RowModelImpl; }
67
+ });
68
+ Object.defineProperty(exports, "SchemaParser", {
69
+ enumerable: true,
70
+ get: function () { return chunkOR2I3XOQ_cjs.SchemaParser; }
71
+ });
72
+ Object.defineProperty(exports, "StringValueNode", {
73
+ enumerable: true,
74
+ get: function () { return chunkOR2I3XOQ_cjs.StringValueNode; }
75
+ });
76
+ Object.defineProperty(exports, "TableModelImpl", {
77
+ enumerable: true,
78
+ get: function () { return chunkOR2I3XOQ_cjs.TableModelImpl; }
79
+ });
80
+ Object.defineProperty(exports, "ValueNodeFactory", {
81
+ enumerable: true,
82
+ get: function () { return chunkOR2I3XOQ_cjs.NodeFactory2; }
83
+ });
84
+ Object.defineProperty(exports, "ValueType", {
85
+ enumerable: true,
86
+ get: function () { return chunkOR2I3XOQ_cjs.ValueType; }
87
+ });
88
+ Object.defineProperty(exports, "createDataModel", {
89
+ enumerable: true,
90
+ get: function () { return chunkOR2I3XOQ_cjs.createDataModel; }
91
+ });
92
+ Object.defineProperty(exports, "createDefaultRegistry", {
93
+ enumerable: true,
94
+ get: function () { return chunkOR2I3XOQ_cjs.createDefaultRegistry; }
95
+ });
96
+ Object.defineProperty(exports, "createForeignKeyResolver", {
97
+ enumerable: true,
98
+ get: function () { return chunkOR2I3XOQ_cjs.createForeignKeyResolver; }
99
+ });
100
+ Object.defineProperty(exports, "createNodeFactory", {
101
+ enumerable: true,
102
+ get: function () { return chunkOR2I3XOQ_cjs.createNodeFactory; }
103
+ });
104
+ Object.defineProperty(exports, "createSchemaModel", {
105
+ enumerable: true,
106
+ get: function () { return chunkOR2I3XOQ_cjs.createSchemaModel; }
107
+ });
108
+ Object.defineProperty(exports, "createTableModel", {
109
+ enumerable: true,
110
+ get: function () { return chunkOR2I3XOQ_cjs.createTableModel; }
111
+ });
112
+ Object.defineProperty(exports, "extractFormulaDefinition", {
113
+ enumerable: true,
114
+ get: function () { return chunkOR2I3XOQ_cjs.extractFormulaDefinition; }
115
+ });
116
+ Object.defineProperty(exports, "generateDefaultValue", {
117
+ enumerable: true,
118
+ get: function () { return chunkOR2I3XOQ_cjs.generateDefaultValue; }
119
+ });
120
+ Object.defineProperty(exports, "generateNodeId", {
121
+ enumerable: true,
122
+ get: function () { return chunkOR2I3XOQ_cjs.generateNodeId; }
123
+ });
124
+ Object.defineProperty(exports, "isForeignKeyValueNode", {
125
+ enumerable: true,
126
+ get: function () { return chunkOR2I3XOQ_cjs.isForeignKeyValueNode; }
127
+ });
128
+ Object.defineProperty(exports, "resetNodeIdCounter", {
129
+ enumerable: true,
130
+ get: function () { return chunkOR2I3XOQ_cjs.resetNodeIdCounter; }
131
+ });
9
132
  Object.defineProperty(exports, "JsonArrayStore", {
10
133
  enumerable: true,
11
134
  get: function () { return chunkTMWPWGUN_cjs.JsonArrayStore; }