@arronqzy/blueprint-dsl 1.0.18 → 1.0.19
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/dist/index.cjs +475 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -1
- package/dist/index.d.ts +97 -1
- package/dist/index.js +461 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ var ZH_CN = {
|
|
|
47
47
|
lifecycleSignalMissing: "\u751F\u547D\u5468\u671F\u4FE1\u53F7\u7F3A\u5931",
|
|
48
48
|
blueprintCycle: "\u84DD\u56FE\u5F15\u7528\u5B58\u5728\u6B7B\u5FAA\u73AF\uFF1A{path}",
|
|
49
49
|
debugMustStartFromLifecycle: "\u8C03\u8BD5\u4F1A\u8BDD\u53EA\u80FD\u4ECE\u751F\u547D\u5468\u671F\u8282\u70B9\u5F00\u59CB",
|
|
50
|
+
debugLifecycleDisabled: "\u8BE5\u751F\u547D\u5468\u671F\u8282\u70B9\u5DF2\u505C\u7528\uFF1B\u540C\u9636\u6BB5\u8BF7\u6539\u7528\u5DF2\u542F\u7528\u7684\u751F\u547D\u5468\u671F\u8282\u70B9",
|
|
50
51
|
nodeRemoved: "\u8282\u70B9\u5DF2\u4ECE\u84DD\u56FE\u4E2D\u79FB\u9664",
|
|
51
52
|
clockNeedsTrue: "\u65F6\u949F\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u542F\u52A8",
|
|
52
53
|
blueprintNeedsTrue: "\u84DD\u56FE\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u6267\u884C",
|
|
@@ -57,7 +58,9 @@ var ZH_CN = {
|
|
|
57
58
|
fetchNeedsTrue: "\u6570\u636E\u6E90\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u53D1\u8D77\u8BF7\u6C42",
|
|
58
59
|
jsonNeedsTrue: "JSON \u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u89E3\u6790",
|
|
59
60
|
storageNeedsTrue: "\u5B58\u50A8\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u8BFB\u5199\u7F13\u5B58",
|
|
60
|
-
andNeedsBothTrue: "\u5E76\u8FD0\u7B97\uFF1A\u4E24\u4E2A\u8F93\u5165\u987B\u5747\u4E3A\u771F\u4FE1\u53F7"
|
|
61
|
+
andNeedsBothTrue: "\u5E76\u8FD0\u7B97\uFF1A\u4E24\u4E2A\u8F93\u5165\u987B\u5747\u4E3A\u771F\u4FE1\u53F7",
|
|
62
|
+
branchNeedsTrue: "\u5206\u652F\u8282\u70B9\u9700\u8981\u6536\u5230\u771F\u4FE1\u53F7\u540E\u624D\u4F1A\u5224\u65AD\u6761\u4EF6",
|
|
63
|
+
branchExpressionError: "\u5206\u652F\u6761\u4EF6\u8868\u8FBE\u5F0F\u6C42\u503C\u5931\u8D25\uFF1A{reason}"
|
|
61
64
|
};
|
|
62
65
|
var EN_US = {
|
|
63
66
|
invalidJson: "Invalid JSON: {reason}",
|
|
@@ -107,6 +110,7 @@ var EN_US = {
|
|
|
107
110
|
lifecycleSignalMissing: "Lifecycle signal is missing",
|
|
108
111
|
blueprintCycle: "Blueprint references form a cycle: {path}",
|
|
109
112
|
debugMustStartFromLifecycle: "A debug session can only start from a lifecycle node",
|
|
113
|
+
debugLifecycleDisabled: "This lifecycle node is disabled; use the enabled node of the same phase instead",
|
|
110
114
|
nodeRemoved: "Node was removed from the blueprint",
|
|
111
115
|
clockNeedsTrue: "Clock node starts only after receiving a true signal",
|
|
112
116
|
blueprintNeedsTrue: "Blueprint node runs only after receiving a true signal",
|
|
@@ -117,7 +121,9 @@ var EN_US = {
|
|
|
117
121
|
fetchNeedsTrue: "Data source node sends the request only after receiving a true signal",
|
|
118
122
|
jsonNeedsTrue: "JSON node parses only after receiving a true signal",
|
|
119
123
|
storageNeedsTrue: "Storage node reads/writes only after receiving a true signal",
|
|
120
|
-
andNeedsBothTrue: "AND: both inputs must be true signals"
|
|
124
|
+
andNeedsBothTrue: "AND: both inputs must be true signals",
|
|
125
|
+
branchNeedsTrue: "Branch node evaluates only after receiving a true signal",
|
|
126
|
+
branchExpressionError: "Branch condition evaluation failed: {reason}"
|
|
121
127
|
};
|
|
122
128
|
var CATALOGS = {
|
|
123
129
|
"zh-CN": ZH_CN,
|
|
@@ -171,6 +177,108 @@ function createLifecycleSignal(phase) {
|
|
|
171
177
|
isoTime: new Date(timestamp).toISOString()
|
|
172
178
|
};
|
|
173
179
|
}
|
|
180
|
+
function resolveLifecyclePhase(node) {
|
|
181
|
+
const phase = node.lifecyclePhase;
|
|
182
|
+
if (phase && PAGE_LIFECYCLE_PHASES.includes(phase)) {
|
|
183
|
+
return phase;
|
|
184
|
+
}
|
|
185
|
+
return "mounted";
|
|
186
|
+
}
|
|
187
|
+
function isLifecycleGraphNode(node, lifecycleNodeType = "Lifecycle") {
|
|
188
|
+
return node.nodeType === lifecycleNodeType || node.role === "lifecycle";
|
|
189
|
+
}
|
|
190
|
+
function listLifecyclePeers(nodes, phase, lifecycleNodeType = "Lifecycle") {
|
|
191
|
+
return nodes.filter(
|
|
192
|
+
(node) => isLifecycleGraphNode(node, lifecycleNodeType) && resolveLifecyclePhase(node) === phase
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
function hasDuplicateLifecyclePhase(nodes, phase, lifecycleNodeType = "Lifecycle") {
|
|
196
|
+
return listLifecyclePeers(nodes, phase, lifecycleNodeType).length > 1;
|
|
197
|
+
}
|
|
198
|
+
function shouldEmitLifecycleNode(node, nodes, lifecycleNodeType = "Lifecycle") {
|
|
199
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return false;
|
|
200
|
+
const peers = listLifecyclePeers(
|
|
201
|
+
nodes,
|
|
202
|
+
resolveLifecyclePhase(node),
|
|
203
|
+
lifecycleNodeType
|
|
204
|
+
);
|
|
205
|
+
if (peers.length <= 1) return true;
|
|
206
|
+
return node.lifecycleEnabled !== false;
|
|
207
|
+
}
|
|
208
|
+
function defaultLifecycleEnabledForNewNode(nodes, phase, lifecycleNodeType = "Lifecycle") {
|
|
209
|
+
return listLifecyclePeers(nodes, phase, lifecycleNodeType).length === 0;
|
|
210
|
+
}
|
|
211
|
+
function findEmittableLifecycleNodeId(nodes, preferredId, lifecycleNodeType = "Lifecycle") {
|
|
212
|
+
if (preferredId) {
|
|
213
|
+
const preferred = nodes.find((node) => node.id === preferredId);
|
|
214
|
+
if (preferred && shouldEmitLifecycleNode(preferred, nodes, lifecycleNodeType)) {
|
|
215
|
+
return preferredId;
|
|
216
|
+
}
|
|
217
|
+
if (preferred && isLifecycleGraphNode(preferred, lifecycleNodeType)) {
|
|
218
|
+
const peer = listLifecyclePeers(
|
|
219
|
+
nodes,
|
|
220
|
+
resolveLifecyclePhase(preferred),
|
|
221
|
+
lifecycleNodeType
|
|
222
|
+
).find(
|
|
223
|
+
(candidate) => shouldEmitLifecycleNode(candidate, nodes, lifecycleNodeType)
|
|
224
|
+
);
|
|
225
|
+
if (peer) return peer.id;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
const first = nodes.find(
|
|
229
|
+
(node) => isLifecycleGraphNode(node, lifecycleNodeType) && shouldEmitLifecycleNode(node, nodes, lifecycleNodeType)
|
|
230
|
+
);
|
|
231
|
+
return first?.id ?? null;
|
|
232
|
+
}
|
|
233
|
+
function reconcileLifecycleEnabled(nodes, focusNodeId, enabled, lifecycleNodeType = "Lifecycle") {
|
|
234
|
+
if (focusNodeId && enabled === true) {
|
|
235
|
+
const focus = nodes.find((node) => node.id === focusNodeId);
|
|
236
|
+
if (!focus || !isLifecycleGraphNode(focus, lifecycleNodeType)) {
|
|
237
|
+
return [...nodes];
|
|
238
|
+
}
|
|
239
|
+
const phase = resolveLifecyclePhase(focus);
|
|
240
|
+
return nodes.map((node) => {
|
|
241
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return node;
|
|
242
|
+
if (resolveLifecyclePhase(node) !== phase) return node;
|
|
243
|
+
if (node.id === focusNodeId) {
|
|
244
|
+
return node.lifecycleEnabled === true ? node : { ...node, lifecycleEnabled: true };
|
|
245
|
+
}
|
|
246
|
+
return node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false };
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
if (focusNodeId && enabled === false) {
|
|
250
|
+
return nodes.map(
|
|
251
|
+
(node) => node.id === focusNodeId ? node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false } : node
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
let next = [...nodes];
|
|
255
|
+
const phases = new Set(
|
|
256
|
+
nodes.filter((node) => isLifecycleGraphNode(node, lifecycleNodeType)).map((node) => resolveLifecyclePhase(node))
|
|
257
|
+
);
|
|
258
|
+
for (const phase of phases) {
|
|
259
|
+
const peers = listLifecyclePeers(next, phase, lifecycleNodeType);
|
|
260
|
+
if (peers.length <= 1) continue;
|
|
261
|
+
const enabledPeers = peers.filter((peer) => peer.lifecycleEnabled !== false);
|
|
262
|
+
if (enabledPeers.length === 0) {
|
|
263
|
+
next = next.map((node) => {
|
|
264
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return node;
|
|
265
|
+
if (resolveLifecyclePhase(node) !== phase) return node;
|
|
266
|
+
return node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false };
|
|
267
|
+
});
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
const keepId = enabledPeers[0].id;
|
|
271
|
+
next = next.map((node) => {
|
|
272
|
+
if (!isLifecycleGraphNode(node, lifecycleNodeType)) return node;
|
|
273
|
+
if (resolveLifecyclePhase(node) !== phase) return node;
|
|
274
|
+
if (node.id === keepId) {
|
|
275
|
+
return node.lifecycleEnabled === true ? node : { ...node, lifecycleEnabled: true };
|
|
276
|
+
}
|
|
277
|
+
return node.lifecycleEnabled === false ? node : { ...node, lifecycleEnabled: false };
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
return next;
|
|
281
|
+
}
|
|
174
282
|
|
|
175
283
|
// src/node-signal.ts
|
|
176
284
|
function isTrueSignal(signal) {
|
|
@@ -891,6 +999,16 @@ var SYSTEM_LOCATION_KEYS = [
|
|
|
891
999
|
"replace",
|
|
892
1000
|
"toString"
|
|
893
1001
|
];
|
|
1002
|
+
var SYSTEM_TOOLS_KEYS = [
|
|
1003
|
+
"str",
|
|
1004
|
+
"int",
|
|
1005
|
+
"sum",
|
|
1006
|
+
"len",
|
|
1007
|
+
"pick",
|
|
1008
|
+
"replace",
|
|
1009
|
+
"replaceAll",
|
|
1010
|
+
"exclude"
|
|
1011
|
+
];
|
|
894
1012
|
function createLocationStub() {
|
|
895
1013
|
return {
|
|
896
1014
|
href: "",
|
|
@@ -913,12 +1031,152 @@ function createLocationStub() {
|
|
|
913
1031
|
}
|
|
914
1032
|
};
|
|
915
1033
|
}
|
|
1034
|
+
function flattenToolArgs(values) {
|
|
1035
|
+
const out = [];
|
|
1036
|
+
for (const value of values) {
|
|
1037
|
+
if (Array.isArray(value)) {
|
|
1038
|
+
out.push(...flattenToolArgs(value));
|
|
1039
|
+
} else {
|
|
1040
|
+
out.push(value);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
return out;
|
|
1044
|
+
}
|
|
1045
|
+
function toIndexList(values) {
|
|
1046
|
+
const out = [];
|
|
1047
|
+
for (const value of flattenToolArgs(values)) {
|
|
1048
|
+
const n = typeof value === "number" ? value : Number(value);
|
|
1049
|
+
if (Number.isInteger(n) && n >= 0) {
|
|
1050
|
+
out.push(n);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
return out;
|
|
1054
|
+
}
|
|
1055
|
+
function valuesEqual(a, b) {
|
|
1056
|
+
return Object.is(a, b);
|
|
1057
|
+
}
|
|
1058
|
+
function replaceInArray(list, target, source, all) {
|
|
1059
|
+
if (all) {
|
|
1060
|
+
return list.map((item) => valuesEqual(item, target) ? source : item);
|
|
1061
|
+
}
|
|
1062
|
+
const out = list.slice();
|
|
1063
|
+
const idx = out.findIndex((item) => valuesEqual(item, target));
|
|
1064
|
+
if (idx >= 0) {
|
|
1065
|
+
out[idx] = source;
|
|
1066
|
+
}
|
|
1067
|
+
return out;
|
|
1068
|
+
}
|
|
1069
|
+
function replaceInString(text, target, source, all) {
|
|
1070
|
+
const from = target === void 0 || target === null ? "" : String(target);
|
|
1071
|
+
const to = source === void 0 || source === null ? "" : String(source);
|
|
1072
|
+
if (from.length === 0) {
|
|
1073
|
+
return text;
|
|
1074
|
+
}
|
|
1075
|
+
if (!all) {
|
|
1076
|
+
const at = text.indexOf(from);
|
|
1077
|
+
if (at < 0) return text;
|
|
1078
|
+
return text.slice(0, at) + to + text.slice(at + from.length);
|
|
1079
|
+
}
|
|
1080
|
+
return text.split(from).join(to);
|
|
1081
|
+
}
|
|
1082
|
+
function createSystemTools() {
|
|
1083
|
+
return {
|
|
1084
|
+
str(value) {
|
|
1085
|
+
if (value === void 0 || value === null) return "";
|
|
1086
|
+
if (typeof value === "string") return value;
|
|
1087
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
1088
|
+
return String(value);
|
|
1089
|
+
}
|
|
1090
|
+
if (esm_default.isDayjs(value)) {
|
|
1091
|
+
return value.toISOString();
|
|
1092
|
+
}
|
|
1093
|
+
try {
|
|
1094
|
+
return JSON.stringify(value);
|
|
1095
|
+
} catch {
|
|
1096
|
+
return String(value);
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
int(value) {
|
|
1100
|
+
if (typeof value === "number") return value;
|
|
1101
|
+
if (typeof value === "bigint") return Number(value);
|
|
1102
|
+
if (typeof value === "boolean") return value ? 1 : 0;
|
|
1103
|
+
if (value === void 0 || value === null || value === "") return NaN;
|
|
1104
|
+
return Number(value);
|
|
1105
|
+
},
|
|
1106
|
+
sum(...values) {
|
|
1107
|
+
const flat = flattenToolArgs(values);
|
|
1108
|
+
if (flat.length === 0) return 0;
|
|
1109
|
+
const hasString = flat.some((item) => typeof item === "string");
|
|
1110
|
+
if (hasString) {
|
|
1111
|
+
let result = flat[0];
|
|
1112
|
+
for (let i = 1; i < flat.length; i += 1) {
|
|
1113
|
+
result = result + flat[i];
|
|
1114
|
+
}
|
|
1115
|
+
return result;
|
|
1116
|
+
}
|
|
1117
|
+
return flat.reduce((acc, item) => {
|
|
1118
|
+
const n = typeof item === "number" ? item : Number(item);
|
|
1119
|
+
return acc + (Number.isFinite(n) ? n : 0);
|
|
1120
|
+
}, 0);
|
|
1121
|
+
},
|
|
1122
|
+
len(value) {
|
|
1123
|
+
if (typeof value === "string") return value.length;
|
|
1124
|
+
if (Array.isArray(value)) return value.length;
|
|
1125
|
+
if (value === void 0 || value === null) return 0;
|
|
1126
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
1127
|
+
return String(value).length;
|
|
1128
|
+
}
|
|
1129
|
+
try {
|
|
1130
|
+
return JSON.stringify(value).length;
|
|
1131
|
+
} catch {
|
|
1132
|
+
return String(value).length;
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
pick(value, ...indices) {
|
|
1136
|
+
const idxs = toIndexList(indices);
|
|
1137
|
+
if (Array.isArray(value)) {
|
|
1138
|
+
return idxs.filter((i) => i < value.length).map((i) => value[i]);
|
|
1139
|
+
}
|
|
1140
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1141
|
+
return idxs.filter((i) => i < text.length).map((i) => text[i]).join("");
|
|
1142
|
+
},
|
|
1143
|
+
replace(value, target, source) {
|
|
1144
|
+
if (Array.isArray(value)) {
|
|
1145
|
+
return replaceInArray(value, target, source, false);
|
|
1146
|
+
}
|
|
1147
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1148
|
+
return replaceInString(text, target, source, false);
|
|
1149
|
+
},
|
|
1150
|
+
replaceAll(value, target, source) {
|
|
1151
|
+
if (Array.isArray(value)) {
|
|
1152
|
+
return replaceInArray(value, target, source, true);
|
|
1153
|
+
}
|
|
1154
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1155
|
+
return replaceInString(text, target, source, true);
|
|
1156
|
+
},
|
|
1157
|
+
exclude(value, ...indices) {
|
|
1158
|
+
const remove = new Set(toIndexList(indices));
|
|
1159
|
+
if (Array.isArray(value)) {
|
|
1160
|
+
return value.filter((_, i) => !remove.has(i));
|
|
1161
|
+
}
|
|
1162
|
+
const text = typeof value === "string" ? value : value == null ? "" : String(value);
|
|
1163
|
+
let out = "";
|
|
1164
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
1165
|
+
if (!remove.has(i)) {
|
|
1166
|
+
out += text[i];
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return out;
|
|
1170
|
+
}
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
916
1173
|
function createSystemRoot() {
|
|
917
1174
|
const locationValue = typeof globalThis !== "undefined" && "location" in globalThis && globalThis.location ? globalThis.location : createLocationStub();
|
|
918
1175
|
return {
|
|
919
1176
|
time: esm_default(),
|
|
920
1177
|
math: Math,
|
|
921
|
-
location: locationValue
|
|
1178
|
+
location: locationValue,
|
|
1179
|
+
tools: createSystemTools()
|
|
922
1180
|
};
|
|
923
1181
|
}
|
|
924
1182
|
function getSystemAutocompleteTree() {
|
|
@@ -934,10 +1192,15 @@ function getSystemAutocompleteTree() {
|
|
|
934
1192
|
for (const name of SYSTEM_LOCATION_KEYS) {
|
|
935
1193
|
locationKeys[name] = /* @__PURE__ */ Object.create(null);
|
|
936
1194
|
}
|
|
1195
|
+
const toolsKeys = {};
|
|
1196
|
+
for (const name of SYSTEM_TOOLS_KEYS) {
|
|
1197
|
+
toolsKeys[name] = /* @__PURE__ */ Object.create(null);
|
|
1198
|
+
}
|
|
937
1199
|
return {
|
|
938
1200
|
time: timeMethods,
|
|
939
1201
|
math: mathKeys,
|
|
940
|
-
location: locationKeys
|
|
1202
|
+
location: locationKeys,
|
|
1203
|
+
tools: toolsKeys
|
|
941
1204
|
};
|
|
942
1205
|
}
|
|
943
1206
|
function isDayjsValue(value) {
|
|
@@ -1234,7 +1497,7 @@ var zh = (zhCN, enUS) => ({
|
|
|
1234
1497
|
"en-US": enUS
|
|
1235
1498
|
});
|
|
1236
1499
|
var TEMPLATE_DOC_LINK_RE = /\{(?:scope|system)[^}]*\}|\b(?:scope|system)\?\.[\w$]+(?:\?\.[\w$]+)*/g;
|
|
1237
|
-
var SYSTEM_SECTIONS = /* @__PURE__ */ new Set(["time", "math", "location"]);
|
|
1500
|
+
var SYSTEM_SECTIONS = /* @__PURE__ */ new Set(["time", "math", "location", "tools"]);
|
|
1238
1501
|
var SCOPE_FIELDS = /* @__PURE__ */ new Set(["value", "id", "name", "type"]);
|
|
1239
1502
|
function docText(text, locale) {
|
|
1240
1503
|
return locale === "en-US" ? text["en-US"] : text["zh-CN"];
|
|
@@ -1377,6 +1640,63 @@ var LOCATION_MEMBERS = [
|
|
|
1377
1640
|
{ name: "replace", summary: zh("\u8DF3\u8F6C\u5230\u65B0\u5730\u5740\uFF0C\u5E76\u66FF\u6362\u5F53\u524D\u5386\u53F2\u3002\u4F1A\u79BB\u5F00\u5F53\u524D\u9875\uFF0C\u6A21\u677F\u91CC\u4E00\u822C\u4E0D\u8981\u8C03\u7528\u3002", "Navigate and replace the current history entry. This leaves the page."), usage: "{system?.location?.replace('https://example.com')}" },
|
|
1378
1641
|
{ name: "reload", summary: zh("\u5237\u65B0\u5F53\u524D\u9875\u3002\u6A21\u677F\u91CC\u4E00\u822C\u4E0D\u8981\u8C03\u7528\u3002", "Reload the page. Avoid calling it from a template."), usage: "{system?.location?.reload()}" }
|
|
1379
1642
|
];
|
|
1643
|
+
var TOOLS_MEMBERS = [
|
|
1644
|
+
{
|
|
1645
|
+
name: "str",
|
|
1646
|
+
summary: zh("\u8F6C\u6210\u5B57\u7B26\u4E32\u3002null/undefined \u53D8\u6210\u7A7A\u4E32\uFF1B\u5BF9\u8C61\u5C3D\u91CF JSON.stringify\u3002", "Convert to string. null/undefined become ''. Objects prefer JSON.stringify."),
|
|
1647
|
+
usage: "{system?.tools?.str(123)}"
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
name: "int",
|
|
1651
|
+
summary: zh("\u8F6C\u6210\u6570\u5B57\uFF08Number\uFF09\u3002\u7A7A\u503C\u5F97\u5230 NaN\u3002", "Convert to a number (Number). Empty values become NaN."),
|
|
1652
|
+
usage: "{system?.tools?.int('42')}"
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
name: "sum",
|
|
1656
|
+
summary: zh(
|
|
1657
|
+
"\u6C42\u548C\u6216\u62FC\u63A5\u3002\u53EF\u5199 sum(1,2,3) \u6216 sum([...scope?.arr])\uFF1B\u5D4C\u5957\u6570\u7EC4\u4F1A\u5C55\u5E73\u3002\u5168\u662F\u6570\u5B57\u5219\u6570\u503C\u76F8\u52A0\uFF1B\u53EA\u8981\u6709\u4E00\u9879\u662F\u5B57\u7B26\u4E32\uFF0C\u5C31\u6309 JS \u7684 + \u4ECE\u5DE6\u5230\u53F3\u62FC\u63A5\u6210\u5B57\u7B26\u4E32\u3002",
|
|
1658
|
+
"Sum or concatenate. Use sum(1,2,3) or sum([...scope?.arr]); nested arrays are flattened. All numbers \u2192 numeric sum; any string \u2192 JS + left-to-right string concat."
|
|
1659
|
+
),
|
|
1660
|
+
usage: "{system?.tools?.sum([...scope?.arr||[]])}"
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
name: "len",
|
|
1664
|
+
summary: zh("\u5B57\u7B26\u4E32\u957F\u5EA6\uFF1B\u6570\u7EC4\u8FD4\u56DE length\uFF1B\u5176\u5B83\u503C\u5148\u8F6C\u6210\u5B57\u7B26\u4E32\u518D\u53D6\u957F\u5EA6\u3002\u53EF\u5D4C\u5957\uFF0C\u5982 len(str(123)) \u2192 3\u3002", "String length; arrays return length; other values are stringified first. Nesting works, e.g. len(str(123)) \u2192 3."),
|
|
1665
|
+
usage: "{system?.tools?.len(system?.tools?.str(123))}"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
name: "pick",
|
|
1669
|
+
summary: zh(
|
|
1670
|
+
"\u6309 0 \u57FA\u4E0B\u6807\u53D6\u51FA\u82E5\u5E72\u9879\u3002\u6570\u7EC4\u8FD4\u56DE\u65B0\u6570\u7EC4\uFF0C\u5B57\u7B26\u4E32\u8FD4\u56DE\u65B0\u5B57\u7B26\u4E32\u3002\u540E\u7EED\u4E0B\u6807\u53EF\u5199\u591A\u4E2A\uFF0C\u4E5F\u53EF\u5C55\u5F00 scope \u6570\u7EC4\uFF0C\u5982 pick(scope?.arr, [...scope?.idxs])\u3002",
|
|
1671
|
+
"Pick by 0-based indices. Arrays \u2192 new array; strings \u2192 new string. Extra indices can be listed or spread from scope, e.g. pick(scope?.arr, [...scope?.idxs])."
|
|
1672
|
+
),
|
|
1673
|
+
usage: "{system?.tools?.pick(scope?.arr,1,2)}"
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
name: "replace",
|
|
1677
|
+
summary: zh(
|
|
1678
|
+
"\u53EA\u66FF\u6362\u7B2C\u4E00\u4E2A\u5339\u914D\u9879\u3002\u6570\u7EC4\u6309\u5143\u7D20\u503C\u66FF\u6362\uFF1B\u5B57\u7B26\u4E32\u6309\u5B50\u4E32\u66FF\u6362\u3002\u4F8B\u5982 replace([1,2,3,1],1,2) \u2192 [2,2,3,1]\u3002",
|
|
1679
|
+
"Replace the first match only. Arrays match by element value; strings match by substring. e.g. replace([1,2,3,1],1,2) \u2192 [2,2,3,1]."
|
|
1680
|
+
),
|
|
1681
|
+
usage: "{system?.tools?.replace(scope?.arr,scope?.target,scope?.source)}"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
name: "replaceAll",
|
|
1685
|
+
summary: zh(
|
|
1686
|
+
"\u66FF\u6362\u5168\u90E8\u5339\u914D\u9879\uFF0C\u89C4\u5219\u540C replace\u3002",
|
|
1687
|
+
"Replace every match. Same rules as replace."
|
|
1688
|
+
),
|
|
1689
|
+
usage: "{system?.tools?.replaceAll(scope?.arr,scope?.target,scope?.source)}"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
name: "exclude",
|
|
1693
|
+
summary: zh(
|
|
1694
|
+
"\u6309 0 \u57FA\u4E0B\u6807\u5220\u9664\u82E5\u5E72\u9879\uFF0C\u8FD4\u56DE\u65B0\u6570\u7EC4 / \u65B0\u5B57\u7B26\u4E32\u3002\u540E\u7EED\u4E0B\u6807\u652F\u6301\u5C55\u5F00\uFF0C\u5982 exclude(scope?.arr, [...scope?.idxs])\u3002",
|
|
1695
|
+
"Drop 0-based indices and return a new array/string. Extra indices can be spread, e.g. exclude(scope?.arr, [...scope?.idxs])."
|
|
1696
|
+
),
|
|
1697
|
+
usage: "{system?.tools?.exclude(scope?.arr,0,1)}"
|
|
1698
|
+
}
|
|
1699
|
+
];
|
|
1380
1700
|
var TEMPLATE_DOC_BOOKS = {
|
|
1381
1701
|
system: {
|
|
1382
1702
|
root: "system",
|
|
@@ -1390,10 +1710,15 @@ var TEMPLATE_DOC_BOOKS = {
|
|
|
1390
1710
|
id: "overview",
|
|
1391
1711
|
title: zh("\u662F\u4EC0\u4E48", "What it is"),
|
|
1392
1712
|
body: zh(
|
|
1393
|
-
"\u5199\u5728\u82B1\u62EC\u53F7\u91CC\u624D\u4F1A\u6C42\u503C\uFF0C\u4F8B\u5982 {system?.time}\u3002\
|
|
1394
|
-
"Values are computed only inside braces, for example {system?.time}. There are
|
|
1713
|
+
"\u5199\u5728\u82B1\u62EC\u53F7\u91CC\u624D\u4F1A\u6C42\u503C\uFF0C\u4F8B\u5982 {system?.time}\u3002\u56DB\u4E2A\u5165\u53E3\uFF1Atime \u662F\u5F53\u524D\u65F6\u95F4\uFF08dayjs\uFF09\uFF0Cmath \u662F JavaScript \u7684 Math\uFF0Clocation \u662F\u5F53\u524D\u9875\u7684\u5730\u5740\uFF0Ctools \u662F\u5E38\u7528\u8F6C\u6362\u5DE5\u5177\uFF08str / int / sum / len / pick / replace / replaceAll / exclude\uFF09\u3002\u975E\u6D4F\u89C8\u5668\u73AF\u5883\u91CC location \u662F\u7A7A\u7684\u5360\u4F4D\uFF0C\u4E0D\u4F1A\u629B\u9519\u3002\u51FD\u6570\u53EF\u4EE5\u4E92\u76F8\u5D4C\u5957\uFF0C\u4E5F\u53EF\u4EE5\u548C scope \u4E00\u8D77\u5199\u3002",
|
|
1714
|
+
"Values are computed only inside braces, for example {system?.time}. There are four entries: time is the current dayjs time, math is JavaScript Math, location is the current page URL, and tools covers helpers (str / int / sum / len / pick / replace / replaceAll / exclude). Outside a browser, location is an empty stub and does not throw. Functions can nest and mix with scope."
|
|
1395
1715
|
),
|
|
1396
|
-
examples: [
|
|
1716
|
+
examples: [
|
|
1717
|
+
"{system?.time}",
|
|
1718
|
+
"{system?.math?.PI}",
|
|
1719
|
+
"{system?.location?.origin}",
|
|
1720
|
+
"{system?.tools?.len(system?.tools?.str(123))}"
|
|
1721
|
+
]
|
|
1397
1722
|
},
|
|
1398
1723
|
{
|
|
1399
1724
|
id: "syntax",
|
|
@@ -1455,6 +1780,27 @@ var TEMPLATE_DOC_BOOKS = {
|
|
|
1455
1780
|
"https://api.example.com{system?.location?.pathname}"
|
|
1456
1781
|
],
|
|
1457
1782
|
members: LOCATION_MEMBERS
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
id: "tools",
|
|
1786
|
+
title: zh("tools \u5E38\u7528\u5DE5\u5177", "tools"),
|
|
1787
|
+
body: zh(
|
|
1788
|
+
"system?.tools \u63D0\u4F9B\u8F6C\u6362\u3001\u805A\u5408\u3001\u6309\u4F4D\u9009\u53D6\u4E0E\u66FF\u6362\u3002\u53EF\u5D4C\u5957\u8C03\u7528\u3002sum / pick / exclude \u7684\u540E\u7EED\u53C2\u6570\u90FD\u652F\u6301\u5C55\u5F00\u4E0A\u6E38\u6570\u7EC4\uFF0C\u5982 {system?.tools?.pick(scope?.arr,[...scope?.idxs||[]])}\u3002\u4E0B\u6807\u4E00\u5F8B\u4ECE 0 \u5F00\u59CB\u3002replace \u53EA\u6362\u7B2C\u4E00\u5904\uFF0CreplaceAll \u6362\u5168\u90E8\u3002",
|
|
1789
|
+
"system?.tools converts, aggregates, picks, and replaces. Nest freely. Trailing args of sum / pick / exclude can spread upstream arrays, e.g. {system?.tools?.pick(scope?.arr,[...scope?.idxs||[]])}. Indices are 0-based. replace changes the first match; replaceAll changes every match."
|
|
1790
|
+
),
|
|
1791
|
+
examples: [
|
|
1792
|
+
"{system?.tools?.str(123)}",
|
|
1793
|
+
"{system?.tools?.int('42')}",
|
|
1794
|
+
"{system?.tools?.sum(1,2,3)}",
|
|
1795
|
+
"{system?.tools?.sum([...scope?.arr||[]])}",
|
|
1796
|
+
"{system?.tools?.len(system?.tools?.str(123))}",
|
|
1797
|
+
"{system?.tools?.pick(scope?.arr,1,2)}",
|
|
1798
|
+
"{system?.tools?.pick(scope?.arr,[...scope?.idxs||[]])}",
|
|
1799
|
+
"{system?.tools?.replace(scope?.arr,scope?.target,scope?.source)}",
|
|
1800
|
+
"{system?.tools?.replaceAll(scope?.arr,scope?.target,scope?.source)}",
|
|
1801
|
+
"{system?.tools?.exclude(scope?.arr,0,1)}"
|
|
1802
|
+
],
|
|
1803
|
+
members: TOOLS_MEMBERS
|
|
1458
1804
|
}
|
|
1459
1805
|
]
|
|
1460
1806
|
},
|
|
@@ -2618,6 +2964,30 @@ function executeLogicConfig(config, input) {
|
|
|
2618
2964
|
return run(input);
|
|
2619
2965
|
}
|
|
2620
2966
|
|
|
2967
|
+
// src/branch-config.ts
|
|
2968
|
+
var DEFAULT_BRANCH_NODE_CONFIG = {
|
|
2969
|
+
expression: ""
|
|
2970
|
+
};
|
|
2971
|
+
function normalizeBranchConfig(config) {
|
|
2972
|
+
return {
|
|
2973
|
+
expression: typeof config?.expression === "string" ? config.expression : ""
|
|
2974
|
+
};
|
|
2975
|
+
}
|
|
2976
|
+
function evaluateBranchCondition(expression, scope) {
|
|
2977
|
+
const raw = expression ?? "";
|
|
2978
|
+
const trimmed = raw.trim();
|
|
2979
|
+
if (!trimmed) return false;
|
|
2980
|
+
let value;
|
|
2981
|
+
if (isWholeScopeExpression(trimmed)) {
|
|
2982
|
+
value = evaluateScopeExpression(trimmed.slice(1, -1), scope);
|
|
2983
|
+
} else if (hasScopeTemplate(raw)) {
|
|
2984
|
+
value = evaluateScopeTemplate(raw, scope);
|
|
2985
|
+
} else {
|
|
2986
|
+
value = evaluateScopeExpression(trimmed, scope);
|
|
2987
|
+
}
|
|
2988
|
+
return Boolean(value);
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2621
2991
|
// src/clock-config.ts
|
|
2622
2992
|
var DEFAULT_CLOCK_NODE_CONFIG = {
|
|
2623
2993
|
intervalSeconds: 0,
|
|
@@ -2821,7 +3191,12 @@ function collectArmedViewEventNodeIds(nodes, edges, eventNodeType, lifecycleNode
|
|
|
2821
3191
|
const source = byId.get(edge.source);
|
|
2822
3192
|
if (!source || source.nodeType !== lifecycleNodeType) return false;
|
|
2823
3193
|
const phase = source.lifecyclePhase || "mounted";
|
|
2824
|
-
|
|
3194
|
+
if (!firedPhases.has(phase)) return false;
|
|
3195
|
+
const peers = nodes.filter(
|
|
3196
|
+
(candidate) => candidate.nodeType === lifecycleNodeType && (candidate.lifecyclePhase || "mounted") === phase
|
|
3197
|
+
);
|
|
3198
|
+
if (peers.length > 1 && source.lifecycleEnabled === false) return false;
|
|
3199
|
+
return true;
|
|
2825
3200
|
});
|
|
2826
3201
|
if (registered) armed.add(node.id);
|
|
2827
3202
|
}
|
|
@@ -3337,6 +3712,7 @@ var JSON_NODE_TYPE = "JsonNode";
|
|
|
3337
3712
|
var STORAGE_NODE_TYPE = "StorageNode";
|
|
3338
3713
|
var CLOCK_NODE_TYPE = "Clock";
|
|
3339
3714
|
var AND_NODE_TYPE = "AndLogic";
|
|
3715
|
+
var BRANCH_NODE_TYPE = "Branch";
|
|
3340
3716
|
var VIEW_NODE_TYPE = "ViewBind";
|
|
3341
3717
|
var EVENT_NODE_TYPE = "ViewEvent";
|
|
3342
3718
|
var blueprintNodeDefinition = {
|
|
@@ -3390,6 +3766,15 @@ var andLogicNodeDefinition = {
|
|
|
3390
3766
|
outputs: [{ name: "out", kind: "data" }],
|
|
3391
3767
|
behavior: { kind: "js", ref: "and-run" }
|
|
3392
3768
|
};
|
|
3769
|
+
var branchNodeDefinition = {
|
|
3770
|
+
type: BRANCH_NODE_TYPE,
|
|
3771
|
+
inputs: [{ name: "in", kind: "data" }],
|
|
3772
|
+
outputs: [
|
|
3773
|
+
{ name: "outTrue", kind: "data" },
|
|
3774
|
+
{ name: "outFalse", kind: "data" }
|
|
3775
|
+
],
|
|
3776
|
+
behavior: { kind: "js", ref: "branch-run" }
|
|
3777
|
+
};
|
|
3393
3778
|
var viewBindNodeDefinition = {
|
|
3394
3779
|
type: VIEW_NODE_TYPE,
|
|
3395
3780
|
inputs: [{ name: "in", kind: "data" }],
|
|
@@ -3411,6 +3796,7 @@ var nodeDefinitionRegistry = {
|
|
|
3411
3796
|
[STORAGE_NODE_TYPE]: storageNodeDefinition,
|
|
3412
3797
|
[CLOCK_NODE_TYPE]: clockNodeDefinition,
|
|
3413
3798
|
[AND_NODE_TYPE]: andLogicNodeDefinition,
|
|
3799
|
+
[BRANCH_NODE_TYPE]: branchNodeDefinition,
|
|
3414
3800
|
[VIEW_NODE_TYPE]: viewBindNodeDefinition,
|
|
3415
3801
|
[EVENT_NODE_TYPE]: viewEventNodeDefinition
|
|
3416
3802
|
};
|
|
@@ -3599,6 +3985,7 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3599
3985
|
this.registerLogicBehavior();
|
|
3600
3986
|
this.registerClockBehavior();
|
|
3601
3987
|
this.registerAndBehavior();
|
|
3988
|
+
this.registerBranchBehavior();
|
|
3602
3989
|
this.registerViewBindBehavior();
|
|
3603
3990
|
}
|
|
3604
3991
|
graph;
|
|
@@ -3685,7 +4072,7 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3685
4072
|
await this.ensureNoBlueprintCycle();
|
|
3686
4073
|
const signal = createLifecycleSignal(phase);
|
|
3687
4074
|
const targets = this.graph.nodes.filter(
|
|
3688
|
-
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && node
|
|
4075
|
+
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && resolveLifecyclePhase(node) === phase && shouldEmitLifecycleNode(node, this.graph.nodes, LIFECYCLE_NODE_TYPE)
|
|
3689
4076
|
);
|
|
3690
4077
|
for (const node of targets) {
|
|
3691
4078
|
await this.runFromNode(node.id, signal);
|
|
@@ -3698,7 +4085,7 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3698
4085
|
async emitBlueprintActivated(inputValue, parentScope) {
|
|
3699
4086
|
const signal = createLifecycleSignal("blueprintActivated");
|
|
3700
4087
|
const targets = this.graph.nodes.filter(
|
|
3701
|
-
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && node
|
|
4088
|
+
(node) => node.nodeType === LIFECYCLE_NODE_TYPE && resolveLifecyclePhase(node) === "blueprintActivated" && shouldEmitLifecycleNode(node, this.graph.nodes, LIFECYCLE_NODE_TYPE)
|
|
3702
4089
|
);
|
|
3703
4090
|
for (const node of targets) {
|
|
3704
4091
|
await this.runFromNode(node.id, signal, parentScope, inputValue);
|
|
@@ -3905,6 +4292,9 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
3905
4292
|
if (node.nodeType !== LIFECYCLE_NODE_TYPE) {
|
|
3906
4293
|
throw new Error(dslMessage("debugMustStartFromLifecycle"));
|
|
3907
4294
|
}
|
|
4295
|
+
if (!shouldEmitLifecycleNode(node, this.graph.nodes, LIFECYCLE_NODE_TYPE)) {
|
|
4296
|
+
throw new Error(dslMessage("debugLifecycleDisabled"));
|
|
4297
|
+
}
|
|
3908
4298
|
this.outputs.clear();
|
|
3909
4299
|
this.traceEntries = [];
|
|
3910
4300
|
this.debugQueue = [
|
|
@@ -4216,8 +4606,12 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
4216
4606
|
return this.isFalseOutputNode(targetId);
|
|
4217
4607
|
}
|
|
4218
4608
|
isFalseOutputNode(nodeId) {
|
|
4219
|
-
const
|
|
4220
|
-
|
|
4609
|
+
const ports = this.outputs.get(nodeId);
|
|
4610
|
+
if (!ports || ports.size === 0) return false;
|
|
4611
|
+
for (const value of ports.values()) {
|
|
4612
|
+
if (isFalseSignal(value)) return true;
|
|
4613
|
+
}
|
|
4614
|
+
return false;
|
|
4221
4615
|
}
|
|
4222
4616
|
haltDebugQueueOnFalseOutput(nodeId) {
|
|
4223
4617
|
if (!this.debugQueue || this.graph.allowFalseSignalPropagation) return;
|
|
@@ -4535,6 +4929,59 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
4535
4929
|
io.emitFlow("out");
|
|
4536
4930
|
});
|
|
4537
4931
|
}
|
|
4932
|
+
registerBranchBehavior() {
|
|
4933
|
+
const runner = this;
|
|
4934
|
+
this.behaviors.registerJS("branch-run", async ({ token, io }) => {
|
|
4935
|
+
const node = runner.requireNode(token.nodeId);
|
|
4936
|
+
try {
|
|
4937
|
+
const input = await io.getInput("in");
|
|
4938
|
+
if (isFalseSignal(input)) {
|
|
4939
|
+
io.setOutput("outFalse", input);
|
|
4940
|
+
io.emitFlow("outFalse");
|
|
4941
|
+
return;
|
|
4942
|
+
}
|
|
4943
|
+
if (!isTrueSignal(input)) {
|
|
4944
|
+
io.setOutput(
|
|
4945
|
+
"outFalse",
|
|
4946
|
+
createFalseSignal(dslMessage("branchNeedsTrue"))
|
|
4947
|
+
);
|
|
4948
|
+
io.emitFlow("outFalse");
|
|
4949
|
+
return;
|
|
4950
|
+
}
|
|
4951
|
+
const incomingScope = runner.buildFetchIncomingScope(
|
|
4952
|
+
token.nodeId,
|
|
4953
|
+
"in",
|
|
4954
|
+
input
|
|
4955
|
+
);
|
|
4956
|
+
const config = normalizeBranchConfig({
|
|
4957
|
+
...DEFAULT_BRANCH_NODE_CONFIG,
|
|
4958
|
+
...node.branchConfig
|
|
4959
|
+
});
|
|
4960
|
+
const matched = evaluateBranchCondition(
|
|
4961
|
+
config.expression,
|
|
4962
|
+
incomingScope
|
|
4963
|
+
);
|
|
4964
|
+
const passThrough = createTrueSignal(input.value);
|
|
4965
|
+
if (matched) {
|
|
4966
|
+
io.setOutput("outTrue", passThrough);
|
|
4967
|
+
io.emitFlow("outTrue");
|
|
4968
|
+
} else {
|
|
4969
|
+
io.setOutput("outFalse", passThrough);
|
|
4970
|
+
io.emitFlow("outFalse");
|
|
4971
|
+
}
|
|
4972
|
+
} catch (error) {
|
|
4973
|
+
io.setOutput(
|
|
4974
|
+
"outFalse",
|
|
4975
|
+
createFalseSignal(
|
|
4976
|
+
dslMessage("branchExpressionError", {
|
|
4977
|
+
reason: error instanceof Error ? error.message : String(error)
|
|
4978
|
+
})
|
|
4979
|
+
)
|
|
4980
|
+
);
|
|
4981
|
+
io.emitFlow("outFalse");
|
|
4982
|
+
}
|
|
4983
|
+
});
|
|
4984
|
+
}
|
|
4538
4985
|
registerViewBindBehavior() {
|
|
4539
4986
|
const runner = this;
|
|
4540
4987
|
this.behaviors.registerJS("view-bind-run", async ({ token, io }) => {
|
|
@@ -4728,6 +5175,6 @@ var BlueprintGraphRunner = class _BlueprintGraphRunner {
|
|
|
4728
5175
|
}
|
|
4729
5176
|
};
|
|
4730
5177
|
|
|
4731
|
-
export { AND_NODE_TYPE, API_COLLECTION_DOCUMENT_VERSION, BLUEPRINT_ACTIVATION_INPUT_KEY, BLUEPRINT_CALL_STACK_KEY, BLUEPRINT_NODE_TYPE, BehaviorRegistry, BlueprintCycleError, BlueprintGraphRunner, CLOCK_NODE_TYPE, DEFAULT_CLOCK_NODE_CONFIG, DEFAULT_FETCH_REQUEST_CONFIG, DEFAULT_JSON_NODE_CONFIG, DEFAULT_LOGIC_NODE_CONFIG, DEFAULT_LOGIC_NODE_TYPE, DEFAULT_STORAGE_NODE_CONFIG, DEFAULT_VIEW_EVENT_NODE_CONFIG, EVENT_NODE_TYPE, Executor, FETCH_CACHES, FETCH_CREDENTIALS, FETCH_HTTP_METHODS, FETCH_MODES, FETCH_NODE_TYPE, FETCH_REDIRECTS, FETCH_RESPONSE_TYPES, FETCH_SCOPE_AUTOCOMPLETE_FALLBACK, JSON_NODE_TYPE, LIFECYCLE_NODE_TYPE, LIFECYCLE_SIGNAL_KEY, PAGE_LIFECYCLE_LABELS, PAGE_LIFECYCLE_PHASES, STORAGE_KINDS, STORAGE_NODE_TYPE, SYSTEM_LOCATION_KEYS, SYSTEM_MATH_KEYS, SYSTEM_TIME_METHOD_NAMES, TEMPLATE_DOC_BOOKS, TEMPLATE_DOC_CHROME, TEMPLATE_ROOT_NAMES, UI_EVENT_PAYLOAD_KEY, VIEW_EVENT_SIGNAL_KEY, VIEW_EVENT_TYPES, VIEW_NODE_TYPE, abortClockNode, abortClockSession, andLogicNodeDefinition, apiCollectionToListItem, appStorageKey, applyApiCollectionEndpointToFetchConfig, applyFetchConfigScope, applyScopeAutocompleteSelection, assertNoBlueprintReferenceCycle, blueprintNodeDefinition, buildApiCollectionEndpointUrl, buildApiCollectionSyncPatches, buildClockSessionKey, buildClockSignalValue, buildEndpointFullUrl, buildEndpointSuggestions, buildIncomingNodeScope, buildScopeExpression, clearClockSessionAbort, clockNodeDefinition, closeTemplateDoc, collectArmedViewEventBindings, collectArmedViewEventNodeIds, collectBlueprintLibraryRefs, collectIncomingNodeScopeEntries, collectViewEventBindings, combinePortSignalsOr, createApiCollectionId, createClockOutputValue, createFalseSignal, createIncomingNodeScopeEntry, createLifecycleSignal, createSystemRoot, createTraceEntryId, createTrueSignal, createViewEventSignal, defaultLogicNodeDefinition, deserializeStorageValue, detectBlueprintReferenceCycle, detectRuntimeBlueprintCycle, docText, downloadApiCollectionTemplate, draftFetchHeadersText, dslMessage, evaluateScopeExpression, evaluateScopeTemplate, evaluateScopeTemplateInJson, executeFetch, executeLogicConfig, executeStorageConfig, extractJsonErrorPosition, fetchConfigHasScopeTemplate, fetchNodeDefinition, filterEndpointSuggestions, filterStorageKeySuggestions, findJsonSyntaxErrorOffset, findSuspectCharRanges, formatBlueprintCycleMessage, formatClockTime, getActiveClockNodeIds, getApiCollectionTemplateDocument, getApiCollectionTemplateJson, getBlueprintDslLocale, getClockTickDelayOffsetMs, getClockTickWaitMs, getFetchBodyValidationError, getFetchHeadersValidationError, getNodeDefinition, getScopeAutocompleteSuggestions, getSystemAutocompleteTree, getTemplateDocRequest, hasScopeTemplate, hasTemplateExpression, isClockNodeActive, isClockScheduleActive, isClockSessionAborted, isDayjsValue, isFalseSignal, isStorageReadConfigured, isStorageSetConfigured, isTrueSignal, isViewEventType, isWholeScopeExpression, jsonNodeDefinition, latestTraceOutputsByNode, lifecycleNodeDefinition, lintJsonString, listBrowserStorageKeys, looksLikeJsonText, nodeDefinitionRegistry, normalizeApiCollectionUrlKey, normalizeAppNameSpace, normalizeClockConfig, normalizeFetchRequestConfig, normalizeStorageConfig, normalizeViewEventConfig, openTemplateDoc, parseApiCollectionJson, parseFetchHeadersJson, parseJsonConfig, parseJsonText, parseScopeAutocomplete, parseSwaggerDocument, preserveTemplateTokensInEncode, registerDefaultBehaviors, renderJsonWithErrorHighlights, resolveBlueprintCallStack, resolveFetchBody, resolveFetchHeaders, resolveFetchIncomingScope, resolveFetchRequestUrl, resolveFetchScopeAutocompleteRoot, resolveStorageKey, resolveStorageWriteValue, resolveTemplateDocTarget, scheduleClockOutputs, sectionSearchText, serializeStorageValue, serializeTraceValue, setBlueprintDslLocale, snapshotDomEvent, snapshotViewEventNode, splitTemplateDocLinks, startClockSchedule, stopAllClockSchedules, stopClockSchedule, storageNodeDefinition, stringifyScopeValue, subscribeActiveClockNodes, subscribeTemplateDoc, toApiCollectionSyncResult, uniqueStorageKinds, validateApiCollectionDocument, validateClockScheduleConfig, validateFetchJsonText, validateJsonString, validateJsonStringAllowingScope, validateLogicSourceCode, viewBindNodeDefinition, viewEventNodeDefinition };
|
|
5178
|
+
export { AND_NODE_TYPE, API_COLLECTION_DOCUMENT_VERSION, BLUEPRINT_ACTIVATION_INPUT_KEY, BLUEPRINT_CALL_STACK_KEY, BLUEPRINT_NODE_TYPE, BRANCH_NODE_TYPE, BehaviorRegistry, BlueprintCycleError, BlueprintGraphRunner, CLOCK_NODE_TYPE, DEFAULT_BRANCH_NODE_CONFIG, DEFAULT_CLOCK_NODE_CONFIG, DEFAULT_FETCH_REQUEST_CONFIG, DEFAULT_JSON_NODE_CONFIG, DEFAULT_LOGIC_NODE_CONFIG, DEFAULT_LOGIC_NODE_TYPE, DEFAULT_STORAGE_NODE_CONFIG, DEFAULT_VIEW_EVENT_NODE_CONFIG, EVENT_NODE_TYPE, Executor, FETCH_CACHES, FETCH_CREDENTIALS, FETCH_HTTP_METHODS, FETCH_MODES, FETCH_NODE_TYPE, FETCH_REDIRECTS, FETCH_RESPONSE_TYPES, FETCH_SCOPE_AUTOCOMPLETE_FALLBACK, JSON_NODE_TYPE, LIFECYCLE_NODE_TYPE, LIFECYCLE_SIGNAL_KEY, PAGE_LIFECYCLE_LABELS, PAGE_LIFECYCLE_PHASES, STORAGE_KINDS, STORAGE_NODE_TYPE, SYSTEM_LOCATION_KEYS, SYSTEM_MATH_KEYS, SYSTEM_TIME_METHOD_NAMES, SYSTEM_TOOLS_KEYS, TEMPLATE_DOC_BOOKS, TEMPLATE_DOC_CHROME, TEMPLATE_ROOT_NAMES, UI_EVENT_PAYLOAD_KEY, VIEW_EVENT_SIGNAL_KEY, VIEW_EVENT_TYPES, VIEW_NODE_TYPE, abortClockNode, abortClockSession, andLogicNodeDefinition, apiCollectionToListItem, appStorageKey, applyApiCollectionEndpointToFetchConfig, applyFetchConfigScope, applyScopeAutocompleteSelection, assertNoBlueprintReferenceCycle, blueprintNodeDefinition, branchNodeDefinition, buildApiCollectionEndpointUrl, buildApiCollectionSyncPatches, buildClockSessionKey, buildClockSignalValue, buildEndpointFullUrl, buildEndpointSuggestions, buildIncomingNodeScope, buildScopeExpression, clearClockSessionAbort, clockNodeDefinition, closeTemplateDoc, collectArmedViewEventBindings, collectArmedViewEventNodeIds, collectBlueprintLibraryRefs, collectIncomingNodeScopeEntries, collectViewEventBindings, combinePortSignalsOr, createApiCollectionId, createClockOutputValue, createFalseSignal, createIncomingNodeScopeEntry, createLifecycleSignal, createSystemRoot, createSystemTools, createTraceEntryId, createTrueSignal, createViewEventSignal, defaultLifecycleEnabledForNewNode, defaultLogicNodeDefinition, deserializeStorageValue, detectBlueprintReferenceCycle, detectRuntimeBlueprintCycle, docText, downloadApiCollectionTemplate, draftFetchHeadersText, dslMessage, evaluateBranchCondition, evaluateScopeExpression, evaluateScopeTemplate, evaluateScopeTemplateInJson, executeFetch, executeLogicConfig, executeStorageConfig, extractJsonErrorPosition, fetchConfigHasScopeTemplate, fetchNodeDefinition, filterEndpointSuggestions, filterStorageKeySuggestions, findEmittableLifecycleNodeId, findJsonSyntaxErrorOffset, findSuspectCharRanges, formatBlueprintCycleMessage, formatClockTime, getActiveClockNodeIds, getApiCollectionTemplateDocument, getApiCollectionTemplateJson, getBlueprintDslLocale, getClockTickDelayOffsetMs, getClockTickWaitMs, getFetchBodyValidationError, getFetchHeadersValidationError, getNodeDefinition, getScopeAutocompleteSuggestions, getSystemAutocompleteTree, getTemplateDocRequest, hasDuplicateLifecyclePhase, hasScopeTemplate, hasTemplateExpression, isClockNodeActive, isClockScheduleActive, isClockSessionAborted, isDayjsValue, isFalseSignal, isLifecycleGraphNode, isStorageReadConfigured, isStorageSetConfigured, isTrueSignal, isViewEventType, isWholeScopeExpression, jsonNodeDefinition, latestTraceOutputsByNode, lifecycleNodeDefinition, lintJsonString, listBrowserStorageKeys, listLifecyclePeers, looksLikeJsonText, nodeDefinitionRegistry, normalizeApiCollectionUrlKey, normalizeAppNameSpace, normalizeBranchConfig, normalizeClockConfig, normalizeFetchRequestConfig, normalizeStorageConfig, normalizeViewEventConfig, openTemplateDoc, parseApiCollectionJson, parseFetchHeadersJson, parseJsonConfig, parseJsonText, parseScopeAutocomplete, parseSwaggerDocument, preserveTemplateTokensInEncode, reconcileLifecycleEnabled, registerDefaultBehaviors, renderJsonWithErrorHighlights, resolveBlueprintCallStack, resolveFetchBody, resolveFetchHeaders, resolveFetchIncomingScope, resolveFetchRequestUrl, resolveFetchScopeAutocompleteRoot, resolveLifecyclePhase, resolveStorageKey, resolveStorageWriteValue, resolveTemplateDocTarget, scheduleClockOutputs, sectionSearchText, serializeStorageValue, serializeTraceValue, setBlueprintDslLocale, shouldEmitLifecycleNode, snapshotDomEvent, snapshotViewEventNode, splitTemplateDocLinks, startClockSchedule, stopAllClockSchedules, stopClockSchedule, storageNodeDefinition, stringifyScopeValue, subscribeActiveClockNodes, subscribeTemplateDoc, toApiCollectionSyncResult, uniqueStorageKinds, validateApiCollectionDocument, validateClockScheduleConfig, validateFetchJsonText, validateJsonString, validateJsonStringAllowingScope, validateLogicSourceCode, viewBindNodeDefinition, viewEventNodeDefinition };
|
|
4732
5179
|
//# sourceMappingURL=index.js.map
|
|
4733
5180
|
//# sourceMappingURL=index.js.map
|