efront 4.32.3 → 4.33.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.
@@ -877,6 +877,206 @@ Javascript.prototype.newVar = function (used, string_template) {
877
877
  used[name] = [];
878
878
  return name;
879
879
  }
880
+ var newSpreadDeclared = false;
881
+ var newSpread = function (code) {
882
+ var c = code.first;
883
+ while (c) {
884
+ var n = c.next, q = null;
885
+ if (c.type === STRAP && c.text === "new") {
886
+ var t = snapExpressFoot(c);
887
+ if (n) do {
888
+ if (n.type === SCOPED) {
889
+ if (n.entry === '{') break;
890
+ if (n.entry === "(") {
891
+ q = n;
892
+ break;
893
+ }
894
+ }
895
+ if (n === t) break;
896
+ n = n.next;
897
+ } while (n);
898
+ if (q) {
899
+ convertNewSpread(c, q);
900
+ c = q;
901
+ continue;
902
+ }
903
+ c = c.next;
904
+ continue;
905
+ }
906
+ if (c.type & (SCOPED | QUOTED) && c.length) {
907
+ newSpread(c);
908
+ }
909
+ c = n;
910
+ }
911
+ };
912
+ var convertNewSpread = function (c, q) {
913
+ var qf = q.first;
914
+ if (!qf) return;
915
+ if (qf.text !== "...") return;
916
+ var qfn = qf.next;
917
+ if (qfn.type !== SCOPED || qfn.entry !== "{" || qfn !== q.last) return;
918
+ var qfi = q.indexOf(qf);
919
+ var qni = q.indexOf(qfn, qfi);
920
+ splice(q, qfi, qni + 1 - qfi);
921
+ var o = qfn.first;
922
+ if (!o) {
923
+ splice(q, qfi, 0, ...qfn);
924
+ setqueue(q);
925
+ return;
926
+ }
927
+ var nq = [];
928
+ var dist = nq;
929
+ var pushProps = function (qfn) {
930
+ var inProperty = true;
931
+ var doted = function () {
932
+ var ext = scan(`&extend("\\new",)`);
933
+ nq.push(ext[0], ext[1]);
934
+ dist = ext[1];
935
+ inProperty = false;
936
+ }
937
+ var defines = Object.create(null);
938
+ var get = false, set = false, async = null, aster = null, name;
939
+ for (var o of qfn) {
940
+ if (o.type === STAMP && o.text === ',') {
941
+ inProperty = true;
942
+ get = false, set = false, async = false, aster = false;
943
+ name = undefined;
944
+ if (dist !== nq) relink(dist), setqueue(dist), dist = nq;
945
+ nq.push(o);
946
+ continue;
947
+ }
948
+ if (!inProperty) {
949
+ dist.push(o);
950
+ continue;
951
+ }
952
+ if (o.type & (STRAP | STAMP)) {
953
+ switch (o.text) {
954
+ case "get": get = true; break;
955
+ case "set": set = true; break;
956
+ case "async": async = o; break;
957
+ case "*": aster = o; break;
958
+ case "...":
959
+ doted();
960
+ break;
961
+ case ":":
962
+ inProperty = false;
963
+ nq.push(
964
+ { type: EXPRESS, text: "\\new" },
965
+ name,
966
+ { type: STAMP, text: '=' }
967
+ );
968
+ break;
969
+ }
970
+ continue;
971
+ }
972
+ if (o.type & (PROPERTY | EXPRESS)) {
973
+ if (/^\.\.\./.test(o.text)) {
974
+ o.text = o.text.slice(3);
975
+ doted();
976
+ dist.push(o);
977
+ continue;
978
+ }
979
+ if (o.short) {
980
+ delete o.short;
981
+ nq.push(
982
+ { type: EXPRESS, text: "\\new." + o.text },
983
+ { type: STAMP, text: "=" },
984
+ o
985
+ );
986
+ }
987
+ else {
988
+ o.type = EXPRESS;
989
+ o.text = "." + o.text;
990
+ name = o;
991
+ }
992
+ continue;
993
+ }
994
+ if (o.type === SCOPED) {
995
+ if (o.entry = "[") {
996
+ name = o;
997
+ continue;
998
+ }
999
+ if (o.entry = "(") {
1000
+ if (get || set) {
1001
+ var key = name.type !== SCOPED || name.first === name.last ? createString(name) : null;
1002
+ dist = key ? defines[key] : null;
1003
+ if (!dist) {
1004
+ dist = scan(`&defineProperty(\\new,,{})`);
1005
+ nq.push(dist[0], dist[1]);
1006
+ if (name.type === SCOPED) {
1007
+ if (name.first === name.last) dist[1].splice(2, 0, ...name);
1008
+ else {
1009
+ name.entry = "(";
1010
+ name.leave = ")";
1011
+ dist[1].splice(2, 0, name);
1012
+ relink(dist[1]);
1013
+ setqueue(dist[1]);
1014
+ }
1015
+ }
1016
+ dist = dist[1].last;
1017
+ if (key) defines[key] = dist;
1018
+ }
1019
+ if (dist.length) {
1020
+ dist.push({ type: STAMP, text: ',' });
1021
+ }
1022
+ if (get) {
1023
+ dist.push(
1024
+ { type: PROPERTY, text: "get" }
1025
+ );
1026
+ }
1027
+ if (set) {
1028
+ dist.push(
1029
+ { type: PROPERTY, text: "set" }
1030
+ )
1031
+ }
1032
+ dist.push(
1033
+ { type: STAMP, text: ":" },
1034
+ )
1035
+ }
1036
+ else {
1037
+ nq.push(
1038
+ { type: EXPRESS, text: '\\new' },
1039
+ name,
1040
+ { type: STAMP, text: "=" }
1041
+ );
1042
+ }
1043
+ if (async) dist.push(async);
1044
+ dist.push(
1045
+ { type: STRAP, text: "function" },
1046
+ )
1047
+ if (aster) dist.push(aster);
1048
+ inProperty = false;
1049
+ continue;
1050
+ }
1051
+ }
1052
+ if (o.type & (COMMENT | SPACE)) {
1053
+ nq.push(o);
1054
+ continue;
1055
+ }
1056
+ throw new Error('代码结构异常!');
1057
+ }
1058
+ }
1059
+ pushProps(qfn);
1060
+ var i = nq.length - 1;
1061
+ while (i > 0 && nq[i].type & (COMMENT | SPACE)) i--;
1062
+ var nqe = nq[i];
1063
+ if (nqe.type !== STAMP || nqe.text !== ',') nq.push({ type: STAMP, text: ',' });
1064
+ newSpreadDeclared = true;
1065
+ var cq = c.queue;
1066
+ var ci = cq.indexOf(c);
1067
+ var qi = cq.indexOf(q, ci);
1068
+ var cn = splice(cq, ci, qi - ci);
1069
+ splice(q, 0, 0, { type: EXPRESS, text: "\\new" }, { type: STAMP, text: "=" }, ...cn, { type: STAMP, text: ',' }, ...nq, { type: EXPRESS, text: '\\new' });
1070
+ relink(q);
1071
+ setqueue(q);
1072
+ };
1073
+ Javascript.prototype.newSpread = function (code) {
1074
+ newSpreadDeclared = false;
1075
+ newSpread(code);
1076
+ if (newSpreadDeclared) {
1077
+ splice(code, code.length, 0, { type: STRAP, text: 'var' }, { type: EXPRESS, text: "\\new" }, { type: STAMP, text: ";" });
1078
+ }
1079
+ };
880
1080
  Javascript.prototype.fix = function (code) {
881
1081
  var hasExport = false;
882
1082
  backEach(code, function (o, i) {
@@ -102,6 +102,9 @@ class Code extends Array {
102
102
  var last = skipSentenceQueue(this.first);
103
103
  return this.last === last || !last;
104
104
  }
105
+ newSpread() {
106
+ return this.program.newSpread(this);
107
+ }
105
108
  fix() {
106
109
  return this.program.fix(this);
107
110
  }
@@ -163,7 +163,6 @@ function translate([imap, supports], code) {
163
163
  var a = scanner2(`[]`);
164
164
  v.map(function (o) {
165
165
  var name = o.name;
166
- if (!name) return o;
167
166
  if (!name) return scanner2(`(${JSON.stringify(o)})`)[0];
168
167
  delete o.name;
169
168
  name = ctn('i18n' + getm(name, t.nodup, t.warn), t);
@@ -5,7 +5,7 @@
5
5
  <div class="body">
6
6
  <item>
7
7
  <label>原始价格:</label>
8
- <span v-model="(+price).toFixed(2)"></span>元
8
+ <span -bind="(+price).toFixed(2)"></span>元
9
9
  </item>
10
10
  <item>
11
11
  <label>支付渠道:</label>
@@ -22,7 +22,7 @@
22
22
  <item ng-if="+paytype">
23
23
  <label>应支付:</label>
24
24
  <span style="color: red;">
25
- <span v-model=finalpay></span>元
25
+ <span -bind=finalpay></span>元
26
26
  </span>
27
27
  </item>
28
28
  <item ng-if="+paytype">
@@ -16,7 +16,7 @@
16
16
  var parseName = function (k) {
17
17
  var icon, name, hotkey;
18
18
  if (/(^|\s+)\./.test(k)) {
19
- k = k.replace(/(?:^|\s+)\.([^\s,"'`]+)/, (_, m) => {
19
+ k = k.replace(/(^\s*\.[^\s,"'`]+\s*|\s+\.[^\s,"'`]+)/, (_, m) => {
20
20
  icon = m;
21
21
  return '';
22
22
  });
@@ -41,7 +41,7 @@
41
41
  }
42
42
  if (!name) name = k;
43
43
  var item = {};
44
- if (icon) item.icon = icon.replace(/\./g, ' ');
44
+ if (icon) item.icon = icon.replace(/\./g, ' ').trim();
45
45
  item.name = name;
46
46
  if (hotkey) {
47
47
  hotkey = hotkey.split(',');
@@ -57,32 +57,7 @@ var request = async function (id, params) {
57
57
  var account = await data1.from(id, params);
58
58
  return account;
59
59
  };
60
- var ASN1 = function (type) {
61
- var length = 0;
62
- var bytesarr = [];
63
- for (var cx = 1, dx = arguments.length; cx < dx; cx++) {
64
- var bytes = arguments[cx];
65
- if (bytes.constructor !== Array) {
66
- bytes = Array.apply(null, bytes);
67
- }
68
- bytesarr.push(bytes);
69
- length += bytes.length;
70
- }
71
- var asn1 = [type];
72
- if (length > 127) {
73
- var nums = [];
74
- while (length > 0) {
75
- nums.unshift(length & 0xff);
76
- length = length >>> 8;
77
- }
78
- asn1.push(0x80 | nums.length, ...nums);
79
- }
80
- else {
81
- asn1.push(length);
82
- }
83
- asn1 = asn1.concat(...bytesarr);
84
- return asn1;
85
- };
60
+
86
61
  var packUint = function (bytes) {
87
62
  if (bytes[0] & 0x80) {
88
63
  return ASN1(0x02, [0], bytes);
@@ -1,4 +1,4 @@
1
-
1
+ var URL = this.URL;
2
2
  var Module = typeof Module != "undefined" ? Module : {};
3
3
  var quit_ = (status, toThrow) => { throw toThrow };
4
4
  var scriptDirectory = "";
@@ -19,8 +19,6 @@ readAsync = async (filename, binary = true) => {
19
19
  var ret = fs.readFileSync(filename, binary ? undefined : "utf8");
20
20
  return ret
21
21
  };
22
- if (process.argv.length > 1) { thisProgram = process.argv[1].replace(/\\/g, "/") }
23
- arguments_ = process.argv.slice(2);
24
22
  if (typeof module != "undefined") { module["exports"] = Module }
25
23
  quit_ = (status, toThrow) => {
26
24
  process.exitCode = status;
@@ -45,7 +43,6 @@ function preRun() {
45
43
  callRuntimeCallbacks(onPreRuns)
46
44
  }
47
45
  function initRuntime() {
48
- runtimeInitialized = true;
49
46
  wasmExports["c"]()
50
47
  }
51
48
  function postRun() {
@@ -20,13 +20,20 @@ function _onappend(node, append = createEvent("append"), mount = createEvent("mo
20
20
  dispatch(node, mount);
21
21
  }
22
22
 
23
+ var unremove = function (o) {
24
+ if (o.removeTimer) {
25
+ clearTimeout(o.removeTimer);
26
+ delete o.removeTimer;
27
+ }
28
+ }
29
+
23
30
  function appendChild(parent, obj, transition) {
24
31
  var children = getArgsChildren(arguments);
25
32
  if (parent.appendChild) {
26
33
  for (var cx = 0, dx = children.length; cx < dx; cx++) {
27
34
  var o = release(children[cx]);
28
35
  if (!o) continue;
29
- if (o.removeTimer) clearTimeout(o.removeTimer);
36
+ unremove(o);
30
37
  if (hasEnterStyle(o) && transition !== false) {
31
38
  isFunction(appendChild.transition) && appendChild.transition(o);
32
39
  }
@@ -44,7 +51,7 @@ function insertBefore(alreadyMounted, obj, transition) {
44
51
  for (var cx = 0, dx = children.length; cx < dx; cx++) {
45
52
  var o = release(children[cx]);
46
53
  if (!o) continue;
47
- if (o.removeTimer) clearTimeout(o.removeTimer);
54
+ unremove(o);
48
55
  parent.insertBefore(o, alreadyMounted);
49
56
  o.with && insertBefore(alreadyMounted, o.with, transition);
50
57
  if (isMounted(parent)) _onappend(o);
@@ -64,7 +71,7 @@ function insertAfter(alreadyMounted, obj, transition) {
64
71
  for (var cx = 0, dx = children.length; cx < dx; cx++) {
65
72
  var o = release(children[cx]);
66
73
  if (!o) continue;
67
- if (o.removeTimer) clearTimeout(o.removeTimer);
74
+ unremove(o);
68
75
  parent.insertBefore(o, nextSibling);
69
76
  o.with && insertBefore(nextSibling, o.with, transition);
70
77
  if (isMounted(parent)) _onappend(o);
@@ -11,8 +11,9 @@ function marker(e) {
11
11
  if (!e) e = document.createElement("marker");
12
12
  on("changes")(e, function () {
13
13
  remove(e.childNodes);
14
- if (isEmpty(this.source)) return;
15
- var source = mark(this.source, this.search, wrap);
14
+ var source = this.source;
15
+ if (isEmpty(source)) source = '';
16
+ else if (typeof source === 'string') source = mark(source, this.search, wrap);
16
17
  if (isArray(source)) appendChild(this, source);
17
18
  else this.innerText = source;
18
19
  });
@@ -101,10 +101,10 @@ body:active & {
101
101
  menu-item {
102
102
  line-height: 24px;
103
103
  display: inline-block;
104
-
104
+
105
105
  &.has-children:after {
106
- padding-top: 3px;
107
106
  content: "﹀";
107
+ padding-top: .3em;
108
108
  }
109
109
  }
110
110
 
@@ -155,7 +155,8 @@ body:active & {
155
155
  line-height: 20px;
156
156
  font-size: 14px;
157
157
  border-radius: 0;
158
- /*
158
+
159
+ /*
159
160
  狗物业弄了电子门禁还嫌不够,连人行道也弄个一人一杆。
160
161
  住在这里就像住在监狱,随时都可能被限制人身自由。
161
162
  狗日的共产党还和狗物业尿到一个壶里。
@@ -190,12 +191,12 @@ body:active & {
190
191
 
191
192
  &.open {
192
193
  background: #1e282c;
193
-
194
+
194
195
  & s:after {
195
196
  top: -9.2px;
196
197
  }
197
198
  }
198
-
199
+
199
200
  &.checked,
200
201
  &.actived,
201
202
  &.selected {
@@ -46,6 +46,7 @@
46
46
  padding-left: 16px;
47
47
 
48
48
  &:after {
49
+ font-family: monospace;
49
50
  content: ">";
50
51
  display: block;
51
52
  width: 20px;
@@ -9,7 +9,7 @@ function password() {
9
9
  if (numhide !== null) numhide = !numhide; break;
10
10
  case 20/*capslock*/: if (capslock !== null) capslock = !capslock; break;
11
11
  }
12
- if (!numhide && /^Numpad/.test(event.code)) {
12
+ if (!numhide && /^Numpad/.test(event.code) && which !== 13) {
13
13
  numhide = which < 96;
14
14
  }
15
15
  if (which >= 65 && which <= 90) {
@@ -82,7 +82,14 @@
82
82
 
83
83
  >holder {
84
84
  color: #777;
85
- position: relative;
85
+ pointer-events: none;
86
+ top: 50%;
87
+ line-height: 1;
88
+ left: 0;
89
+ right: 0;
90
+ text-align: inherit;
91
+ margin-top: -.5em;
92
+ position: absolute;
86
93
  }
87
94
 
88
95
  >input[type=password] {
@@ -329,7 +329,7 @@ var _as_yextra = function (global, innerWidth, innerHeight, element, target, poi
329
329
  css(_rhomb, temp);
330
330
  _rhomb.setSide(side);
331
331
  }
332
- var targetX = position.left - parseFloat(getComputedStyle(element).paddingLeft);
332
+ var targetX = position.left;
333
333
  if (targetX < 0) {
334
334
  css(element, `left:0;right:auto`);
335
335
  if (_rhomb) css(_rhomb, `left:${fromOffset(position.left + position.width / 2)};right:auto`);
@@ -5,11 +5,13 @@ function remove(node, transition) {
5
5
  node = args[cx];
6
6
  if (!node) continue;
7
7
  if (node.removeTimer) clearTimeout(node.removeTimer);
8
+ delete node.removeTimer;
8
9
  if (hasLeaveStyle(node) && transition !== false && isFunction(remove.transition)) {
9
10
  var duration = remove.transition(node, true);
10
11
  if (duration) {
11
12
  node.removeTimer = setTimeout(function (node) {
12
13
  return function () {
14
+ delete node.removeTimer;
13
15
  remove(node, false);
14
16
  };
15
17
  }(node), +duration || 100);
@@ -429,7 +429,7 @@ var ifset = function (shouldMount) {
429
429
  var c = elements[cx];
430
430
  if (cx === shouldMount) {
431
431
  var e = c.$template;
432
- if (c.nextSibling !== e) appendChild.after(c, e);
432
+ if (c.nextSibling !== e || e.removeTimer) appendChild.after(c, e);
433
433
  if (renderIds.get(e) < 0) {
434
434
  renderIds.set(e, this.$id);
435
435
  e = c.$template = render(e);
Binary file
package/debug.log ADDED
@@ -0,0 +1,3 @@
1
+ [1106/041816.465:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2)
2
+ [1114/175715.384:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2)
3
+ [1115/022347.226:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.32.3",
3
+ "version": "4.33.0",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {