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.
- package/docs/dist/min.js +15 -10
- package/docs/dist/v20/min.js +15 -10
- package/package.json +2 -2
- package/samples/form1/input/structure.json +277 -277
- package/src/v20/walk/iterate/v4/createChildren.js +0 -1
- package/src/v20/walk/loopArray/v2/index.js +0 -2
- package/src/v20/walk/replaceWithArray/v1/replaceCommon.js +0 -1
- package/src/v20/walk/replaceWithArray/v1/replaceTextContent.js +0 -1
- package/src/v20/walk/replaceWithData/v2/index.js +0 -43
- package/src/v20/walk/replaceWithData/v2/replaceCommon.js +0 -1
- package/src/v20/walk/replaceWithData/v3/replaceCommon.js +0 -1
- package/src/v20/walk/replaceWithObject/v1/replaceCommon.js +0 -1
- package/src/v20/walk/walk.js +0 -4
- package/src/v10/index.js +0 -96
- package/src/v10/instructionEngine/compile/compileTree.js +0 -191
- package/src/v10/instructionEngine/compileTree.js +0 -1
- package/src/v10/instructionEngine/expandIteration.js +0 -1
- package/src/v10/instructionEngine/index.js +0 -29
- package/src/v10/instructionEngine/interpolate.js +0 -2
- package/src/v10/instructionEngine/iteration/expandIteration.js +0 -95
- package/src/v10/instructionEngine/operation/operation.js +0 -237
- package/src/v10/instructionEngine/other/other.js +0 -150
- package/src/v10/instructionEngine/pipeline/pipeline.js +0 -47
- package/src/v10/instructionEngine/replace/replace.js +0 -173
- package/src/v10/instructionEngine/resolve/resolvePath.js +0 -18
- package/src/v10/instructionEngine/resolve/resolveTokenValue.js +0 -22
- package/src/v10/instructionEngine/resolvePath.js +0 -1
- package/src/v10/instructionEngine/resolveTokenValue.js +0 -1
- package/src/v10/instructionEngine/story/storyInjector.js +0 -50
- package/src/v10/instructionEngine/storyInjector.js +0 -1
- package/src/v10/instructionEngine/value/interpolate.js +0 -38
- package/src/v11/index.js +0 -116
- package/src/v11/iterate.js +0 -270
- package/src/v11/replace.js +0 -169
- package/src/v11/resolvePath.js +0 -29
- package/src/v12/index.js +0 -122
- package/src/v12/iterate/bindFormValues.js +0 -74
- package/src/v12/iterate/expandIteration.js +0 -181
- package/src/v12/iterate/index.js +0 -10
- package/src/v12/iterate/iterate.js +0 -56
- package/src/v12/iterate/iterateNode.js +0 -86
- package/src/v12/iterate/resolveCollection.js +0 -37
- package/src/v12/iterate.js +0 -270
- package/src/v12/replace.js +0 -169
- package/src/v12/resolvePath.js +0 -29
- package/src/v13/index.js +0 -110
- package/src/v13/iterate/bindFormValues.js +0 -74
- package/src/v13/iterate/expandIteration.js +0 -188
- package/src/v13/iterate/index.js +0 -9
- package/src/v13/iterate/iterate.js +0 -32
- package/src/v13/iterate/iterateNode.js +0 -86
- package/src/v13/iterate/resolveCollection.js +0 -37
- package/src/v13/iterate/walk.js +0 -90
- package/src/v13/iterate.js +0 -270
- package/src/v13/replace.js +0 -169
- package/src/v13/resolvePath.js +0 -29
- package/src/v14/index.js +0 -112
- package/src/v14/iterate/bindFormValues.js +0 -74
- package/src/v14/iterate/expandIteration.js +0 -188
- package/src/v14/iterate/index.js +0 -9
- package/src/v14/iterate/iterate.js +0 -32
- package/src/v14/iterate/resolveCollection.js +0 -37
- package/src/v14/iterate/walk/walk copy 2.js +0 -114
- package/src/v14/iterate/walk/walk copy.js +0 -90
- package/src/v14/iterate/walk/walk.js +0 -98
- package/src/v14/iterate.js +0 -270
- package/src/v14/replace/index.js +0 -16
- package/src/v14/replace/walk.js +0 -90
- package/src/v14/replace.js +0 -153
- package/src/v14/resolvePath.js +0 -29
- package/src/v15/index.js +0 -123
- package/src/v15/iterate/bindFormValues.js +0 -74
- package/src/v15/iterate/expandIteration.js +0 -188
- package/src/v15/iterate/index.js +0 -9
- package/src/v15/iterate/iterate.js +0 -32
- package/src/v15/iterate/resolveCollection.js +0 -37
- package/src/v15/iterate/walk/walk copy 2.js +0 -114
- package/src/v15/iterate/walk/walk copy.js +0 -90
- package/src/v15/iterate/walk/walk.js +0 -195
- package/src/v15/iterate.js +0 -270
- package/src/v15/replace/index.js +0 -16
- package/src/v15/replace/walk.js +0 -90
- package/src/v15/replace.js +0 -155
- package/src/v15/resolvePath.js +0 -29
- package/src/v16/index.js +0 -129
- package/src/v16/iterate/bindFormValues.js +0 -74
- package/src/v16/iterate/expandIteration.js +0 -188
- package/src/v16/iterate/index.js +0 -9
- package/src/v16/iterate/iterate.js +0 -32
- package/src/v16/iterate/resolveCollection.js +0 -37
- package/src/v16/iterate/walk/walk copy 2.js +0 -114
- package/src/v16/iterate/walk/walk copy.js +0 -90
- package/src/v16/iterate/walk/walk.js +0 -196
- package/src/v16/iterate.js +0 -270
- package/src/v16/replace/index.js +0 -16
- package/src/v16/replace/walk.js +0 -90
- package/src/v16/replace.js +0 -155
- package/src/v16/resolvePath.js +0 -29
- package/src/v17/index.js +0 -119
- package/src/v17/iterate/bindFormValues.js +0 -74
- package/src/v17/iterate/expandIteration.js +0 -188
- package/src/v17/iterate/index.js +0 -9
- package/src/v17/iterate/iterate.js +0 -32
- package/src/v17/iterate/resolveCollection.js +0 -37
- package/src/v17/iterate/walk/iterateDo.js +0 -42
- package/src/v17/iterate/walk/replaceWithData.js +0 -60
- package/src/v17/iterate/walk/walk.js +0 -94
- package/src/v17/iterate.js +0 -270
- package/src/v17/replace/index.js +0 -16
- package/src/v17/replace/walk.js +0 -90
- package/src/v17/replace.js +0 -160
- package/src/v17/resolvePath.js +0 -29
- package/src/v18/index.js +0 -66
- package/src/v18/meta.js +0 -7
- package/src/v18/registerGlobal.js +0 -17
- package/src/v18/replace.js +0 -18
- package/src/v18/resolvePath.js +0 -29
- package/src/v18/walk/iterate/v1/index.js +0 -42
- package/src/v18/walk/iterate/v2/index.js +0 -32
- package/src/v18/walk/iterate/v3/index.js +0 -46
- package/src/v18/walk/iterate/v4/createChildren.js +0 -24
- package/src/v18/walk/iterate/v4/index.js +0 -25
- package/src/v18/walk/replaceWithData/v1/index.js +0 -42
- package/src/v18/walk/replaceWithData/v1/replaceCommon.js +0 -21
- package/src/v18/walk/replaceWithData/v2/index.js +0 -105
- package/src/v18/walk/replaceWithData/v2/replaceCommon.js +0 -21
- package/src/v18/walk/replaceWithData/v3/index.js +0 -15
- package/src/v18/walk/replaceWithData/v3/replaceAttributes.js +0 -29
- package/src/v18/walk/replaceWithData/v3/replaceCommon.js +0 -23
- package/src/v18/walk/replaceWithData/v3/replaceNodeValue.js +0 -27
- package/src/v18/walk/walk.js +0 -94
- package/src/v20/walk/iterate/v1/index.js +0 -42
- package/src/v20/walk/iterate/v2/index.js +0 -32
- package/src/v20/walk/loopArray/v1/createChildren.js +0 -42
- package/src/v20/walk/loopArray/v1/index.js +0 -33
- package/src/v20/walk/loopObject/v1/createChildren.js +0 -27
- package/src/v20/walk/loopObject/v1/index.js +0 -25
- package/src/v20/walk/replaceWithData/v1/index.js +0 -42
- package/src/v20/walk/replaceWithData/v1/replaceCommon.js +0 -21
- package/src/v8/index.js +0 -69
- package/src/v8/instructionEngine/compile/compileTree.js +0 -191
- package/src/v8/instructionEngine/compileTree.js +0 -1
- package/src/v8/instructionEngine/expandIteration.js +0 -1
- package/src/v8/instructionEngine/index.js +0 -16
- package/src/v8/instructionEngine/interpolate.js +0 -2
- package/src/v8/instructionEngine/iteration/expandIteration.js +0 -95
- package/src/v8/instructionEngine/resolve/resolvePath.js +0 -18
- package/src/v8/instructionEngine/resolve/resolveTokenValue.js +0 -22
- package/src/v8/instructionEngine/resolvePath.js +0 -1
- package/src/v8/instructionEngine/resolveTokenValue.js +0 -1
- package/src/v8/instructionEngine/story/storyInjector.js +0 -50
- package/src/v8/instructionEngine/storyInjector.js +0 -1
- package/src/v8/instructionEngine/value/interpolate.js +0 -38
- package/src/v9/index.js +0 -96
- package/src/v9/instructionEngine/compile/compileTree.js +0 -191
- package/src/v9/instructionEngine/compileTree.js +0 -1
- package/src/v9/instructionEngine/expandIteration.js +0 -1
- package/src/v9/instructionEngine/index.js +0 -29
- package/src/v9/instructionEngine/interpolate.js +0 -2
- package/src/v9/instructionEngine/iteration/expandIteration.js +0 -95
- package/src/v9/instructionEngine/operation/operation.js +0 -237
- package/src/v9/instructionEngine/other/other.js +0 -150
- package/src/v9/instructionEngine/pipeline/pipeline.js +0 -47
- package/src/v9/instructionEngine/replace/replace.js +0 -173
- package/src/v9/instructionEngine/resolve/resolvePath.js +0 -18
- package/src/v9/instructionEngine/resolve/resolveTokenValue.js +0 -22
- package/src/v9/instructionEngine/resolvePath.js +0 -1
- package/src/v9/instructionEngine/resolveTokenValue.js +0 -1
- package/src/v9/instructionEngine/story/storyInjector.js +0 -50
- package/src/v9/instructionEngine/storyInjector.js +0 -1
- 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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
|
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 (
|
|
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) ?
|
|
161
|
-
},
|
|
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 }),
|
|
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
|
-
|
|
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 (
|
|
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/docs/dist/v20/min.js
CHANGED
|
@@ -76,7 +76,7 @@ const f = {
|
|
|
76
76
|
inSourceValues: s
|
|
77
77
|
});
|
|
78
78
|
e.children = c;
|
|
79
|
-
},
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
|
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 (
|
|
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) ?
|
|
161
|
-
},
|
|
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 }),
|
|
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
|
-
|
|
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 (
|
|
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.
|
|
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
|
+
}
|