efront 4.9.2 → 4.9.3
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/#/345/233/275/351/231/205/345/214/226.yml +6 -0
- package/coms/docs/codecolor.js +6 -6
- package/coms/zimoli/SpeechRecognition_test.js +1 -1
- package/coms/zimoli/container.js +30 -30
- package/docs//347/273/204/344/273/266.xht +10 -2
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/coms/zimoli/robot.js +0 -7
- package/coms/zimoli/robot_test.js +0 -4
- /package/coms/zimoli/{SpeechReconigition_test.html → SpeechRecognition_test.html} +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
- zh-CN: 这个文件的内容不能在非nodejs环境中运行
|
|
2
|
+
en: The content of this file cannot be run in a non nodejs environment
|
|
3
|
+
|
|
4
|
+
- zh-CN: 这个文件的内容不能在线运行
|
|
5
|
+
en: The content of this file cannot be run online
|
|
6
|
+
|
|
1
7
|
- zh-CN: 这个文件内的测试代码暂不支持在线查看
|
|
2
8
|
en: The test code in this file does not currently support online viewing
|
|
3
9
|
|
package/coms/docs/codecolor.js
CHANGED
|
@@ -11,18 +11,18 @@ var codecolor = function (c, encode) {
|
|
|
11
11
|
var deep = 0;
|
|
12
12
|
var used = c.used;
|
|
13
13
|
var setExpress = function (o, label) {
|
|
14
|
-
|
|
14
|
+
if (!o.text) return;
|
|
15
15
|
var keys = o.text.split(".");
|
|
16
16
|
var next = o.next;
|
|
17
17
|
if (next && next.type === SCOPED && next.entry === '(') {
|
|
18
|
-
keys[keys.length - 1] = `<invoke>${keys[keys.length - 1]}</invoke>`;
|
|
18
|
+
if (!/^\</.test(keys[keys.length - 1])) keys[keys.length - 1] = `<invoke>${keys[keys.length - 1]}</invoke>`;
|
|
19
19
|
}
|
|
20
|
-
var [name0] = text.split(".");
|
|
21
20
|
var [name] = keys;
|
|
22
|
-
if (
|
|
23
|
-
else if (/^(
|
|
21
|
+
if (/^\</.test(name));
|
|
22
|
+
else if (c.program?.strap_reg.test(name) || c.program?.value_reg.test(name) || /^(this|arguments)$/.test(name)) name = `<strap>${name}</strap>`;
|
|
23
|
+
else name = `<${label}>${name}</${label}>`;
|
|
24
24
|
keys[0] = name;
|
|
25
|
-
o.text = keys.map(k => /^\</.test(k) || !k ? k :
|
|
25
|
+
o.text = keys.map(k => /^\</.test(k) || !k ? k : `<express>${k}</express>`).join(".");
|
|
26
26
|
}
|
|
27
27
|
var setPredef = o => setExpress(o, 'predef');
|
|
28
28
|
var setOutside = o => setExpress(o, 'outside');
|
package/coms/zimoli/container.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
function container(element) {
|
|
2
|
+
var change = lazy(async function (src) {
|
|
3
|
+
if (src !== this.$src) return;
|
|
4
|
+
if (!src) remove(this.with);
|
|
5
|
+
else if (isNode(src)) {
|
|
6
|
+
if (isElement(src) && this.$struct.copys) {
|
|
7
|
+
for (var c of this.$struct.copys) {
|
|
8
|
+
if (c.name === 'class') {
|
|
9
|
+
addClass(src, c.value);
|
|
10
|
+
}
|
|
11
|
+
else if (c.name === 'style') {
|
|
12
|
+
css(src, c.value);
|
|
13
|
+
}
|
|
14
|
+
else src.setAttribute(c.name, c.value);
|
|
12
15
|
}
|
|
13
|
-
else src.setAttribute(c.name, c.value);
|
|
14
16
|
}
|
|
17
|
+
zimoli.global(src, this);
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
zimoli.go(this.$src, params, this);
|
|
32
|
-
});
|
|
33
|
-
function container(element) {
|
|
19
|
+
else if (isString(src) || +src < 0) {
|
|
20
|
+
watch(this, 'params', onparams);
|
|
21
|
+
onparams.call(this, this.params);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var gosrc = function (src) {
|
|
25
|
+
if (!isHandled(this.$src) && !isHandled(src)) return;
|
|
26
|
+
if (src !== this.$src) {
|
|
27
|
+
this.$src = src;
|
|
28
|
+
change.call(this, src);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var onparams = lazy(function (params) {
|
|
32
|
+
zimoli.go(this.$src, params, this);
|
|
33
|
+
});
|
|
34
34
|
var comment = document.createComment('container');
|
|
35
35
|
comment.$struct = element.$struct;
|
|
36
36
|
care(comment, gosrc);
|
|
@@ -193,9 +193,10 @@
|
|
|
193
193
|
render.refresh();
|
|
194
194
|
if (tags[1].actived) loadcode();
|
|
195
195
|
});
|
|
196
|
+
var modName = '';
|
|
196
197
|
var loadcode = async function () {
|
|
197
198
|
jschanged = false;
|
|
198
|
-
|
|
199
|
+
modName = name.replace(/\.js$/i, '_test');
|
|
199
200
|
if (doc.test) {
|
|
200
201
|
var lessdata = [], htmldata = [];
|
|
201
202
|
jstext = [];
|
|
@@ -374,7 +375,6 @@
|
|
|
374
375
|
var getEnspBefore = function (node) {
|
|
375
376
|
if (!node) return 0;
|
|
376
377
|
while (node && (node.nodeType !== 1 || !/^br$/i.test(node.tagName))) {
|
|
377
|
-
console.log(node)
|
|
378
378
|
node = node.previousSibling;
|
|
379
379
|
}
|
|
380
380
|
if (node) {
|
|
@@ -428,6 +428,14 @@
|
|
|
428
428
|
data.patchInstance("docscode", { codetext: jstext })
|
|
429
429
|
var code = compile$scanner2(jstext);
|
|
430
430
|
var envs = code.envs;
|
|
431
|
+
if (envs.require && !window.require) {
|
|
432
|
+
throw i18n`这个文件的内容不能在非nodejs环境中运行`;
|
|
433
|
+
}
|
|
434
|
+
for (var k in envs) {
|
|
435
|
+
if (/\_test/i.test(k) && k !== modName) {
|
|
436
|
+
if (isProduction) throw i18n`这个文件的内容不能在线运行`;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
431
439
|
var argNames = Object.keys(envs);
|
|
432
440
|
var args = await Promise.all(argNames.map(a => init(a + "*" + live, null, { ["init*" + live]: init, ["put*" + live]: put, ["zimoli*" + live]: zimoli, ["appendChild*" + live]: appendChild, ["remove*" + live]: remove, ["render*" + live]: render })));
|
|
433
441
|
var func = createFunction("", jstext, argNames, code.async, code.yield);
|