json-to-spec 20.1.0 → 20.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/docs/dist/min.js +15 -10
  2. package/docs/dist/v20/min.js +15 -10
  3. package/package.json +2 -2
  4. package/samples/form1/input/structure.json +277 -277
  5. package/src/v20/walk/iterate/v4/createChildren.js +0 -1
  6. package/src/v20/walk/loopArray/v2/index.js +0 -2
  7. package/src/v20/walk/replaceWithArray/v1/replaceCommon.js +0 -1
  8. package/src/v20/walk/replaceWithArray/v1/replaceTextContent.js +0 -1
  9. package/src/v20/walk/replaceWithData/v2/index.js +0 -43
  10. package/src/v20/walk/replaceWithData/v2/replaceCommon.js +0 -1
  11. package/src/v20/walk/replaceWithData/v3/replaceCommon.js +0 -1
  12. package/src/v20/walk/replaceWithObject/v1/replaceCommon.js +0 -1
  13. package/src/v20/walk/walk.js +0 -4
  14. package/src/v10/index.js +0 -96
  15. package/src/v10/instructionEngine/compile/compileTree.js +0 -191
  16. package/src/v10/instructionEngine/compileTree.js +0 -1
  17. package/src/v10/instructionEngine/expandIteration.js +0 -1
  18. package/src/v10/instructionEngine/index.js +0 -29
  19. package/src/v10/instructionEngine/interpolate.js +0 -2
  20. package/src/v10/instructionEngine/iteration/expandIteration.js +0 -95
  21. package/src/v10/instructionEngine/operation/operation.js +0 -237
  22. package/src/v10/instructionEngine/other/other.js +0 -150
  23. package/src/v10/instructionEngine/pipeline/pipeline.js +0 -47
  24. package/src/v10/instructionEngine/replace/replace.js +0 -173
  25. package/src/v10/instructionEngine/resolve/resolvePath.js +0 -18
  26. package/src/v10/instructionEngine/resolve/resolveTokenValue.js +0 -22
  27. package/src/v10/instructionEngine/resolvePath.js +0 -1
  28. package/src/v10/instructionEngine/resolveTokenValue.js +0 -1
  29. package/src/v10/instructionEngine/story/storyInjector.js +0 -50
  30. package/src/v10/instructionEngine/storyInjector.js +0 -1
  31. package/src/v10/instructionEngine/value/interpolate.js +0 -38
  32. package/src/v11/index.js +0 -116
  33. package/src/v11/iterate.js +0 -270
  34. package/src/v11/replace.js +0 -169
  35. package/src/v11/resolvePath.js +0 -29
  36. package/src/v12/index.js +0 -122
  37. package/src/v12/iterate/bindFormValues.js +0 -74
  38. package/src/v12/iterate/expandIteration.js +0 -181
  39. package/src/v12/iterate/index.js +0 -10
  40. package/src/v12/iterate/iterate.js +0 -56
  41. package/src/v12/iterate/iterateNode.js +0 -86
  42. package/src/v12/iterate/resolveCollection.js +0 -37
  43. package/src/v12/iterate.js +0 -270
  44. package/src/v12/replace.js +0 -169
  45. package/src/v12/resolvePath.js +0 -29
  46. package/src/v13/index.js +0 -110
  47. package/src/v13/iterate/bindFormValues.js +0 -74
  48. package/src/v13/iterate/expandIteration.js +0 -188
  49. package/src/v13/iterate/index.js +0 -9
  50. package/src/v13/iterate/iterate.js +0 -32
  51. package/src/v13/iterate/iterateNode.js +0 -86
  52. package/src/v13/iterate/resolveCollection.js +0 -37
  53. package/src/v13/iterate/walk.js +0 -90
  54. package/src/v13/iterate.js +0 -270
  55. package/src/v13/replace.js +0 -169
  56. package/src/v13/resolvePath.js +0 -29
  57. package/src/v14/index.js +0 -112
  58. package/src/v14/iterate/bindFormValues.js +0 -74
  59. package/src/v14/iterate/expandIteration.js +0 -188
  60. package/src/v14/iterate/index.js +0 -9
  61. package/src/v14/iterate/iterate.js +0 -32
  62. package/src/v14/iterate/resolveCollection.js +0 -37
  63. package/src/v14/iterate/walk/walk copy 2.js +0 -114
  64. package/src/v14/iterate/walk/walk copy.js +0 -90
  65. package/src/v14/iterate/walk/walk.js +0 -98
  66. package/src/v14/iterate.js +0 -270
  67. package/src/v14/replace/index.js +0 -16
  68. package/src/v14/replace/walk.js +0 -90
  69. package/src/v14/replace.js +0 -153
  70. package/src/v14/resolvePath.js +0 -29
  71. package/src/v15/index.js +0 -123
  72. package/src/v15/iterate/bindFormValues.js +0 -74
  73. package/src/v15/iterate/expandIteration.js +0 -188
  74. package/src/v15/iterate/index.js +0 -9
  75. package/src/v15/iterate/iterate.js +0 -32
  76. package/src/v15/iterate/resolveCollection.js +0 -37
  77. package/src/v15/iterate/walk/walk copy 2.js +0 -114
  78. package/src/v15/iterate/walk/walk copy.js +0 -90
  79. package/src/v15/iterate/walk/walk.js +0 -195
  80. package/src/v15/iterate.js +0 -270
  81. package/src/v15/replace/index.js +0 -16
  82. package/src/v15/replace/walk.js +0 -90
  83. package/src/v15/replace.js +0 -155
  84. package/src/v15/resolvePath.js +0 -29
  85. package/src/v16/index.js +0 -129
  86. package/src/v16/iterate/bindFormValues.js +0 -74
  87. package/src/v16/iterate/expandIteration.js +0 -188
  88. package/src/v16/iterate/index.js +0 -9
  89. package/src/v16/iterate/iterate.js +0 -32
  90. package/src/v16/iterate/resolveCollection.js +0 -37
  91. package/src/v16/iterate/walk/walk copy 2.js +0 -114
  92. package/src/v16/iterate/walk/walk copy.js +0 -90
  93. package/src/v16/iterate/walk/walk.js +0 -196
  94. package/src/v16/iterate.js +0 -270
  95. package/src/v16/replace/index.js +0 -16
  96. package/src/v16/replace/walk.js +0 -90
  97. package/src/v16/replace.js +0 -155
  98. package/src/v16/resolvePath.js +0 -29
  99. package/src/v17/index.js +0 -119
  100. package/src/v17/iterate/bindFormValues.js +0 -74
  101. package/src/v17/iterate/expandIteration.js +0 -188
  102. package/src/v17/iterate/index.js +0 -9
  103. package/src/v17/iterate/iterate.js +0 -32
  104. package/src/v17/iterate/resolveCollection.js +0 -37
  105. package/src/v17/iterate/walk/iterateDo.js +0 -42
  106. package/src/v17/iterate/walk/replaceWithData.js +0 -60
  107. package/src/v17/iterate/walk/walk.js +0 -94
  108. package/src/v17/iterate.js +0 -270
  109. package/src/v17/replace/index.js +0 -16
  110. package/src/v17/replace/walk.js +0 -90
  111. package/src/v17/replace.js +0 -160
  112. package/src/v17/resolvePath.js +0 -29
  113. package/src/v18/index.js +0 -66
  114. package/src/v18/meta.js +0 -7
  115. package/src/v18/registerGlobal.js +0 -17
  116. package/src/v18/replace.js +0 -18
  117. package/src/v18/resolvePath.js +0 -29
  118. package/src/v18/walk/iterate/v1/index.js +0 -42
  119. package/src/v18/walk/iterate/v2/index.js +0 -32
  120. package/src/v18/walk/iterate/v3/index.js +0 -46
  121. package/src/v18/walk/iterate/v4/createChildren.js +0 -24
  122. package/src/v18/walk/iterate/v4/index.js +0 -25
  123. package/src/v18/walk/replaceWithData/v1/index.js +0 -42
  124. package/src/v18/walk/replaceWithData/v1/replaceCommon.js +0 -21
  125. package/src/v18/walk/replaceWithData/v2/index.js +0 -105
  126. package/src/v18/walk/replaceWithData/v2/replaceCommon.js +0 -21
  127. package/src/v18/walk/replaceWithData/v3/index.js +0 -15
  128. package/src/v18/walk/replaceWithData/v3/replaceAttributes.js +0 -29
  129. package/src/v18/walk/replaceWithData/v3/replaceCommon.js +0 -23
  130. package/src/v18/walk/replaceWithData/v3/replaceNodeValue.js +0 -27
  131. package/src/v18/walk/walk.js +0 -94
  132. package/src/v20/walk/iterate/v1/index.js +0 -42
  133. package/src/v20/walk/iterate/v2/index.js +0 -32
  134. package/src/v20/walk/loopArray/v1/createChildren.js +0 -42
  135. package/src/v20/walk/loopArray/v1/index.js +0 -33
  136. package/src/v20/walk/loopObject/v1/createChildren.js +0 -27
  137. package/src/v20/walk/loopObject/v1/index.js +0 -25
  138. package/src/v20/walk/replaceWithData/v1/index.js +0 -42
  139. package/src/v20/walk/replaceWithData/v1/replaceCommon.js +0 -21
  140. package/src/v8/index.js +0 -69
  141. package/src/v8/instructionEngine/compile/compileTree.js +0 -191
  142. package/src/v8/instructionEngine/compileTree.js +0 -1
  143. package/src/v8/instructionEngine/expandIteration.js +0 -1
  144. package/src/v8/instructionEngine/index.js +0 -16
  145. package/src/v8/instructionEngine/interpolate.js +0 -2
  146. package/src/v8/instructionEngine/iteration/expandIteration.js +0 -95
  147. package/src/v8/instructionEngine/resolve/resolvePath.js +0 -18
  148. package/src/v8/instructionEngine/resolve/resolveTokenValue.js +0 -22
  149. package/src/v8/instructionEngine/resolvePath.js +0 -1
  150. package/src/v8/instructionEngine/resolveTokenValue.js +0 -1
  151. package/src/v8/instructionEngine/story/storyInjector.js +0 -50
  152. package/src/v8/instructionEngine/storyInjector.js +0 -1
  153. package/src/v8/instructionEngine/value/interpolate.js +0 -38
  154. package/src/v9/index.js +0 -96
  155. package/src/v9/instructionEngine/compile/compileTree.js +0 -191
  156. package/src/v9/instructionEngine/compileTree.js +0 -1
  157. package/src/v9/instructionEngine/expandIteration.js +0 -1
  158. package/src/v9/instructionEngine/index.js +0 -29
  159. package/src/v9/instructionEngine/interpolate.js +0 -2
  160. package/src/v9/instructionEngine/iteration/expandIteration.js +0 -95
  161. package/src/v9/instructionEngine/operation/operation.js +0 -237
  162. package/src/v9/instructionEngine/other/other.js +0 -150
  163. package/src/v9/instructionEngine/pipeline/pipeline.js +0 -47
  164. package/src/v9/instructionEngine/replace/replace.js +0 -173
  165. package/src/v9/instructionEngine/resolve/resolvePath.js +0 -18
  166. package/src/v9/instructionEngine/resolve/resolveTokenValue.js +0 -22
  167. package/src/v9/instructionEngine/resolvePath.js +0 -1
  168. package/src/v9/instructionEngine/resolveTokenValue.js +0 -1
  169. package/src/v9/instructionEngine/story/storyInjector.js +0 -50
  170. package/src/v9/instructionEngine/storyInjector.js +0 -1
  171. package/src/v9/instructionEngine/value/interpolate.js +0 -38
package/docs/dist/min.js CHANGED
@@ -76,7 +76,7 @@ const f = {
76
76
  inSourceValues: s
77
77
  });
78
78
  e.children = c;
79
- }, A = ({
79
+ }, x = ({
80
80
  inNode: n,
81
81
  inData: r
82
82
  } = {}) => {
@@ -85,7 +85,7 @@ const f = {
85
85
  if (typeof t.textContent != "string") return "not-a-string";
86
86
  if (!t.textContent.includes("${")) return "no-template-token";
87
87
  t.textContent === "${key}" && (t.textContent = r.key), t.textContent === "${value}" && (t.textContent = r.value);
88
- }, x = ({
88
+ }, A = ({
89
89
  inNode: n,
90
90
  inData: r
91
91
  } = {}) => {
@@ -104,7 +104,7 @@ const f = {
104
104
  inData: r
105
105
  } = {}) => {
106
106
  const t = n, e = r;
107
- A({ inNode: t, inData: e }), x({ inNode: t, inData: e });
107
+ x({ inNode: t, inData: e }), A({ inNode: t, inData: e });
108
108
  };
109
109
  function m(n) {
110
110
  return n !== null && typeof n == "object" && Object.getPrototypeOf(n) === Object.prototype;
@@ -141,7 +141,7 @@ const h = ({
141
141
  function S(n) {
142
142
  return n !== null && typeof n == "object" && Object.getPrototypeOf(n) === Object.prototype;
143
143
  }
144
- const g = ({
144
+ const N = ({
145
145
  inNode: n,
146
146
  inData: r
147
147
  } = {}) => {
@@ -154,11 +154,11 @@ const g = ({
154
154
  inData: r
155
155
  } = {}) => {
156
156
  const t = n, e = r;
157
- if (console.log("localData------- : ", e), !(t != null && t.textContent)) return "no-textContent";
157
+ if (!(t != null && t.textContent)) return "no-textContent";
158
158
  if (typeof t.textContent != "string") return "not-a-string";
159
159
  if (!t.textContent.includes("${")) return "no-template-token";
160
- S(e) ? g({ inNode: n, inData: r }) : t.textContent === "${}" && (t.textContent = e);
161
- }, N = ({
160
+ S(e) ? N({ inNode: n, inData: r }) : t.textContent === "${}" && (t.textContent = e);
161
+ }, g = ({
162
162
  inNode: n,
163
163
  inData: r
164
164
  } = {}) => {
@@ -177,7 +177,7 @@ const g = ({
177
177
  inData: r
178
178
  } = {}) => {
179
179
  const t = n, e = r;
180
- F({ inNode: t, inData: e }), N({ inNode: t, inData: e });
180
+ F({ inNode: t, inData: e }), g({ inNode: t, inData: e });
181
181
  }, w = ({
182
182
  inTemplate: n,
183
183
  inSourceValuesAsArray: r,
@@ -200,7 +200,12 @@ const g = ({
200
200
  inShowLog: t
201
201
  });
202
202
  }
203
- V({ inNode: c, inData: s }), o.push(c);
203
+ l({
204
+ inNode: c,
205
+ inData: s,
206
+ inOperation: "replace",
207
+ inShowLog: t
208
+ }), V({ inNode: c, inData: s }), o.push(c);
204
209
  }), o;
205
210
  }, K = ({
206
211
  inNode: n,
@@ -208,7 +213,7 @@ const g = ({
208
213
  inShowLog: t
209
214
  } = {}) => {
210
215
  const e = n, o = r;
211
- if (console.log("loopArray:1 ", n, r), t && console.log("loopObject:1 ", n, r), !("jsonToSpec" in e) || !("operation" in e.jsonToSpec) || e.jsonToSpec.operation !== "loopArray" || !("source" in e.jsonToSpec)) return;
216
+ if (t && console.log("loopObject:1 ", n, r), !("jsonToSpec" in e) || !("operation" in e.jsonToSpec) || e.jsonToSpec.operation !== "loopArray" || !("source" in e.jsonToSpec)) return;
212
217
  const s = o[e.jsonToSpec.source];
213
218
  if (!Array.isArray(s)) return;
214
219
  t && console.log("loopObject:2 ", n, r);
@@ -76,7 +76,7 @@ const f = {
76
76
  inSourceValues: s
77
77
  });
78
78
  e.children = c;
79
- }, A = ({
79
+ }, x = ({
80
80
  inNode: n,
81
81
  inData: r
82
82
  } = {}) => {
@@ -85,7 +85,7 @@ const f = {
85
85
  if (typeof t.textContent != "string") return "not-a-string";
86
86
  if (!t.textContent.includes("${")) return "no-template-token";
87
87
  t.textContent === "${key}" && (t.textContent = r.key), t.textContent === "${value}" && (t.textContent = r.value);
88
- }, x = ({
88
+ }, A = ({
89
89
  inNode: n,
90
90
  inData: r
91
91
  } = {}) => {
@@ -104,7 +104,7 @@ const f = {
104
104
  inData: r
105
105
  } = {}) => {
106
106
  const t = n, e = r;
107
- A({ inNode: t, inData: e }), x({ inNode: t, inData: e });
107
+ x({ inNode: t, inData: e }), A({ inNode: t, inData: e });
108
108
  };
109
109
  function m(n) {
110
110
  return n !== null && typeof n == "object" && Object.getPrototypeOf(n) === Object.prototype;
@@ -141,7 +141,7 @@ const h = ({
141
141
  function S(n) {
142
142
  return n !== null && typeof n == "object" && Object.getPrototypeOf(n) === Object.prototype;
143
143
  }
144
- const g = ({
144
+ const N = ({
145
145
  inNode: n,
146
146
  inData: r
147
147
  } = {}) => {
@@ -154,11 +154,11 @@ const g = ({
154
154
  inData: r
155
155
  } = {}) => {
156
156
  const t = n, e = r;
157
- if (console.log("localData------- : ", e), !(t != null && t.textContent)) return "no-textContent";
157
+ if (!(t != null && t.textContent)) return "no-textContent";
158
158
  if (typeof t.textContent != "string") return "not-a-string";
159
159
  if (!t.textContent.includes("${")) return "no-template-token";
160
- S(e) ? g({ inNode: n, inData: r }) : t.textContent === "${}" && (t.textContent = e);
161
- }, N = ({
160
+ S(e) ? N({ inNode: n, inData: r }) : t.textContent === "${}" && (t.textContent = e);
161
+ }, g = ({
162
162
  inNode: n,
163
163
  inData: r
164
164
  } = {}) => {
@@ -177,7 +177,7 @@ const g = ({
177
177
  inData: r
178
178
  } = {}) => {
179
179
  const t = n, e = r;
180
- F({ inNode: t, inData: e }), N({ inNode: t, inData: e });
180
+ F({ inNode: t, inData: e }), g({ inNode: t, inData: e });
181
181
  }, w = ({
182
182
  inTemplate: n,
183
183
  inSourceValuesAsArray: r,
@@ -200,7 +200,12 @@ const g = ({
200
200
  inShowLog: t
201
201
  });
202
202
  }
203
- V({ inNode: c, inData: s }), o.push(c);
203
+ l({
204
+ inNode: c,
205
+ inData: s,
206
+ inOperation: "replace",
207
+ inShowLog: t
208
+ }), V({ inNode: c, inData: s }), o.push(c);
204
209
  }), o;
205
210
  }, K = ({
206
211
  inNode: n,
@@ -208,7 +213,7 @@ const g = ({
208
213
  inShowLog: t
209
214
  } = {}) => {
210
215
  const e = n, o = r;
211
- if (console.log("loopArray:1 ", n, r), t && console.log("loopObject:1 ", n, r), !("jsonToSpec" in e) || !("operation" in e.jsonToSpec) || e.jsonToSpec.operation !== "loopArray" || !("source" in e.jsonToSpec)) return;
216
+ if (t && console.log("loopObject:1 ", n, r), !("jsonToSpec" in e) || !("operation" in e.jsonToSpec) || e.jsonToSpec.operation !== "loopArray" || !("source" in e.jsonToSpec)) return;
212
217
  const s = o[e.jsonToSpec.source];
213
218
  if (!Array.isArray(s)) return;
214
219
  t && console.log("loopObject:2 ", n, r);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-to-spec",
3
- "version": "20.1.0",
3
+ "version": "20.1.1",
4
4
  "description": "Pure JSON Specification Compiler with jsonToSpec namespace: (structure, data) -> Spec JSON",
5
5
  "main": "src/v19/index.js",
6
6
  "module": "./src/v19/index.js",
@@ -47,4 +47,4 @@
47
47
  "devDependencies": {
48
48
  "vite": "^6.2.0"
49
49
  }
50
- }
50
+ }