efront 4.11.2 → 4.11.5

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 (36) hide show
  1. package/#/345/233/275/351/231/205/345/214/226.yml +1 -1
  2. package/apps/pivot/cert/list.js +3 -7
  3. package/coms/basic/#loader.js +13 -14
  4. package/coms/basic/JSAM.js +2 -1
  5. package/coms/basic/assert.js +5 -3
  6. package/coms/basic/cookie.js +9 -9
  7. package/coms/basic/data.js +1 -1
  8. package/coms/basic/i18n.js +4 -2
  9. package/coms/basic_/Array2.js +4 -1
  10. package/coms/compile/Html_test.js +1 -0
  11. package/coms/compile/Javascript.js +5 -1
  12. package/coms/compile/Javascript_test.js +14 -2
  13. package/coms/compile/Program.js +6 -3
  14. package/coms/compile/common.js +1 -1
  15. package/coms/docs/markdown.js +5 -3
  16. package/coms/frame/route.js +15 -15
  17. package/coms/pivot/pedit.less +23 -1
  18. package/coms/zimoli/cless.js +2 -1
  19. package/coms/zimoli/forceUpdate.js +1 -1
  20. package/coms/zimoli/render.js +44 -64
  21. package/coms/zimoli/view.less +0 -1
  22. package/coms//350/214/250/350/217/260/tab.js +35 -0
  23. package/coms//350/214/250/350/217/260//344/270/212/350/211/262.xht +99 -0
  24. package/coms//350/214/250/350/217/260//345/205/211/346/240/207.js +1 -0
  25. package/coms//350/214/250/350/217/260//346/211/253/346/217/217.js +12 -0
  26. package/coms/{docs/codecolor.js → /350/214/250/350/217/260//346/240/207/347/255/276/345/214/226.js} +2 -1
  27. package/coms//350/214/250/350/217/260//346/270/262/346/237/223.js +45 -0
  28. package/coms//350/214/250/350/217/260//347/274/226/350/276/221/346/241/206.xht +132 -0
  29. package/coms//350/214/250/350/217/260//350/257/255/350/250/200.js +210 -0
  30. package/coms//350/214/250/350/217/260//350/277/275/345/212/240/345/205/211/346/240/207.js +62 -0
  31. package/docs//347/273/204/344/273/266.xht +8 -162
  32. package/package.json +1 -1
  33. package/public/efront.js +1 -1
  34. package/readme-en.md +4 -5
  35. package/readme.md +2 -5
  36. package/coms/docs/codetext.xht +0 -386
package/readme-en.md CHANGED
@@ -161,13 +161,12 @@ You can also click on [github](https://github.com/yunxu1019/efront/issues). The
161
161
 
162
162
  # Related Links
163
163
 
164
- [efront Online Documents](https://efront.cc/docs/)
165
-
166
164
  [efront Compatibility Description](coms/basic_/readme-en.md)
167
165
    [Version Introduction](docs/version-desc.md)
168
166
    [Compared to the front-end framework](docs/compare-en.md)
169
167
 
170
- [efront server manager](https://efront.cc/pivot/)
168
+ > If you would like to help me to improve this project, please follow the following link to join the metting in skype.
169
+ https://join.skype.com/v8a630zaeGks
170
+
171
171
 
172
- [白前看图](https://efront.cc/baiplay)
173
-   [酷酷千百易云音乐](https://efront.cc/kugou/)
172
+ > If you are willing to offer me a job or only let me try ... try, please drop a letter to yunxu1019@live.cn
package/readme.md CHANGED
@@ -158,13 +158,10 @@ efront 默认读取当前路径下的`_envs/`和用户目录的`.efront/_envs/`
158
158
  * 从 efront3.29 开始`.xht`文件将被识别为组件文件,如果文件内未提供入口,入口函数将由 efront 自动生成并填充
159
159
  # 相关链接
160
160
 
161
- [efront 在线文档](https://efront.cc/docs/)
162
-
163
161
  [efront 兼容性说明](coms/basic_/readme.md)
164
162
    [版本简介](docs/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E.md)
165
163
    [与前端框架对比](docs/compare.md)
166
164
 
167
- [efront服务器管理工具](https://efront.cc/pivot/)
165
+ > 如果您要提供修改建议或报告问题,可加入QQ群 710029752 反馈。
168
166
 
169
- [白前看图](https://efront.cc/baiplay)
170
-   [酷酷千百易云音乐](https://efront.cc/kugou/)
167
+ > 项目作者正在找工作,有招工意向的可将招工信息发送至我的邮箱 yunxu1019@live.cn
@@ -1,386 +0,0 @@
1
- <style>
2
- :scope {
3
- white-space: pre-wrap;
4
- line-height: 1.36;
5
- word-break: break-all;
6
- padding: 10px 20px;
7
- border-radius: 3px;
8
- display: inline-block;
9
- background: #2c2c2c;
10
- color: #d4d4d4;
11
- font-family: Consolas, "Courier New", monospace;
12
- vertical-align: top;
13
- text-decoration-line: none;
14
- tab-size: 4;
15
- }
16
-
17
- stamp {
18
- color: #808080;
19
- }
20
-
21
- strap,
22
- value {
23
- color: #569cd6;
24
- }
25
-
26
- regexp {
27
- color: #d16969;
28
- }
29
-
30
- text {
31
- color: #ce9178;
32
- }
33
-
34
- flow {
35
- color: #c586c0;
36
- }
37
-
38
- digit {
39
- color: #b5cea8;
40
- }
41
-
42
- label {
43
- color: #569cd6;
44
- }
45
-
46
- selector {
47
- color: #d7ba7d;
48
- }
49
-
50
- @deep(@num, @color) {
51
- deep@num {
52
- color: @color;
53
- }
54
- }
55
-
56
- @deep(0, #ffd700);
57
- @deep(1, #da70d6);
58
- @deep(2, #179fff);
59
- @deep(3, #ffd700);
60
- @deep(4, #da70d6);
61
- @deep(5, #179fff);
62
- @deep(6, #ffd700);
63
- @deep(7, #da70d6);
64
- @deep(8, #179fff);
65
- @deep(9, #ffd700);
66
- @deep(10, #da70d6);
67
- @deep(11, #179fff);
68
- @deep(12, #ffd700);
69
- @deep(13, #da70d6);
70
- @deep(14, #179fff);
71
- @deep(15, #ffd700);
72
- @deep(16, #da70d6);
73
- @deep(17, #179fff);
74
-
75
- express,
76
- property {
77
- color: #9cdcfe;
78
- }
79
-
80
- invoke,
81
- method {
82
- color: #dcdcaa;
83
- }
84
-
85
- predef {
86
- color: #4ec9b0;
87
- }
88
-
89
- outside {
90
- color: #4fc1ff;
91
- }
92
-
93
- comment {
94
- color: #6a9955;
95
- }
96
- </style>
97
- <script>
98
- var encode = function (text) {
99
- return text.replace(/[\<\>\|]/g, a => `&#${a.charCodeAt()};`);
100
- };
101
- var typescript = new compile$Javascript;
102
- typescript.straps = typescript.straps.concat(
103
- "interface", "implements", "declare", "module", "namespace",
104
- "readonly", "private", "asserts", "is",
105
- "enum", "type");
106
- typescript.tags[0].push("{");
107
- var js = new compile$Javascript;
108
- js.tags[0].push("{");
109
- var json = new compile$Javascript;
110
- json.inExpress = true;
111
- var gl = new compile$Javascript;
112
- gl.straps = gl.straps.concat(
113
- "in", "out", "inout", "uniform", "buffer", "shared",
114
- "highp", "mediump", "lowp",
115
- "invariant", "const", "varying", "attribute",
116
- "sampler2D", "texture2D",
117
- "sampler3D", "texture3D",
118
- "coherent", "volatile", "restrict", "readonly", "writeonly",
119
- "flat", "noperspective", "smooth",
120
- "packed", "shared", "std140", "std340", "row_major", "colum_major",
121
- "location", "set", "binding", "offset", "index", "xfb_buffer", "xfb_offset", "local_size",
122
- "void",
123
- 'require', 'enable', 'disable', 'warn',
124
- 'struct',
125
- 'float', 'int',
126
- 'vec4', 'vec3', 'vec2',
127
- 'mat4', 'mat3', 'mat2',
128
- 'bool', 'const', 'precision',
129
- "step", "smoothstep",
130
- "mix", "clamp"
131
- );
132
- var rust = new compile$Javascript;
133
- rust.powermap = Object.assign({}, rust.powermap);
134
- rust.powermap["->"] = 0;
135
- rust.straps = ["let", 'use', 'mut', 'fn', 'if', 'else', 'loop', 'while', 'for', 'in', 'break', 'true', 'false', 'struct', 'enum', 'impl', 'self', 'match', 'pub', 'mod', 'trait'];
136
- var struct_reg = /^(while|do|for|with|switch|case|default|if|else|try|catch|finally|loop|import|export)$/;
137
-
138
- gl.setType = function (o) {
139
- var { type } = o;
140
- var queue = o.queue;
141
- var last = o.prev;
142
- if (type & (SCOPED | EXPRESS | PROPERTY)) {
143
- if (last && last === queue[queue.length - 1] && last.type & (EXPRESS | STRAP | PROPERTY)) {
144
- last.istype = !struct_reg.test(last.text);
145
- }
146
- }
147
- }
148
- var 素心 = new compile$素馨.素心;
149
- 素心.scopes.push(['[', ']']);
150
- 素心.straps.push('important',
151
- 'after', 'backdrop', 'before',
152
- 'cue', 'cue-range',
153
- 'file-selector-button', 'first-letter', 'last-letter', 'first-line',
154
- 'grammer-error', 'highlight', 'marker', 'part',
155
- 'placeholder', 'selection', 'slotted', 'spelling-error', 'target-text',
156
- 'view-transition', 'view-transition-group', 'view-transition-image-pair', 'view-transition-new', 'view-transition-old',
157
- 'active', 'any-link', 'autofill',
158
- 'blank',
159
- 'checked', 'current',
160
- 'dir', 'default', 'defined', 'disabled',
161
- 'empty', 'enabled',
162
- 'first', 'first-child', 'first-of-type', 'future', 'focus', 'focus-visible', 'focus-within', 'fullscreen',
163
- 'has', 'host', 'host-context', 'hover',
164
- 'indeterminate', 'in-range', 'invalid', 'is',
165
- 'lang', 'last-child', 'last-of-type', 'left', 'link', 'local-link',
166
- 'modal',
167
- 'not', 'nth-child', 'nth-col', 'nth-last-child', 'nth-last-col', 'nth-last-of-type', 'nth-of-type',
168
- "only-child", 'only-of-type', 'optional', 'out-of-range',
169
- 'past', 'picture-in-picture', 'placeholder-shown', 'paused', 'playing',
170
- 'read-only', 'read-write', 'required', 'right', 'root',
171
- 'scope', 'state',
172
- 'target', 'target-within',
173
- 'user-invalid',
174
- 'valid', 'visited',
175
- 'where'
176
- );
177
- 素心.stamps.push("=");
178
- var setless = function (c) {
179
- var set = function (o) {
180
- if (o.type === PROPERTY) {
181
- var q = o.queue;
182
- if (q.type === SCOPED && q.entry !== "{") return;
183
- var next = o.next;
184
- if (next && (next.type !== STAMP || !/^[\:\=]$/.test(next.text))) {
185
- o.text = `<selector>${o.text}</selector>`;
186
- return;
187
- }
188
- if (next && (next.type === STAMP && next.text === ':')) {
189
- while (next && next.type !== SCOPED) {
190
- if (next.type === STAMP && next.text === ';') return;
191
- next = next.next;
192
- }
193
- if (next) o.text = `<selector>${o.text}</selector>`;
194
- }
195
- return;
196
- }
197
- if (o.type === EXPRESS) {
198
- var next = o.next;
199
- if (next?.type === SCOPED) return;
200
- if (!o.length) o.type = QUOTED;
201
- return;
202
- }
203
- if (o.type === STRAP) {
204
- if (!o.isprop) return o.type = EXPRESS;
205
- var p = o.prev;
206
- if (!/^@/.test(o.text) && (!p || p.type !== STAMP || !/\:$/.test(p.text))) o.type = PROPERTY;
207
- return;
208
- }
209
-
210
- if (o.type === SCOPED && o.length) {
211
- o.forEach(set);
212
- }
213
- };
214
- c.forEach(set);
215
- };
216
- var codesupports = {
217
- javascript(a, blink) {
218
- if (blink) var index = a.indexOf(blink);
219
- if (index >= 0) a = a.slice(0, index) + a.slice(index + 1);
220
- var c = compile$scanner2(a, js);
221
- c.scoped;
222
- if (index >= 0) {
223
- var patched = patchBlink(c, index, blink);
224
- }
225
- codecolor(c, encode);
226
- a = c.toString();
227
- if (index >= 0 && !patched) a = blink + a;
228
- return a;
229
- },
230
- typescript(a) {
231
- var c = compile$scanner2(a, typescript);
232
- codecolor(c, encode);
233
- return c.toString();
234
- },
235
- json(a) {
236
- var c = compile$scanner2(a, json);
237
- codecolor(c, encode);
238
- return c.toString();
239
- },
240
- less(a) {
241
- var c = compile$scanner2(a, 素心);
242
- setless(c);
243
- codecolor(c, encode);
244
- return c.toString();
245
- },
246
- rs(a) {
247
- var c = compile$scanner2(a, rust);
248
- codecolor(c, encode);
249
- return c.toString();
250
- },
251
- glsl(a) {
252
- var c = compile$scanner2(a, gl);
253
- codecolor(c, encode);
254
- return c.toString();
255
- },
256
- html(a) {
257
- var code = compile$scanner2(a, 'html');
258
- var scoped = code.scoped;
259
- backEach(scoped.richNodes, n => {
260
- if (n.isScript || n.isStyle) {
261
- var s = n.isScript ? js : 素心;
262
- var c = [];
263
- compile$common.createString(n).replace(/^(\s*\<\!--)([\s\S]*)(--\!?\>\s*)$|^[\s\S]*$/, (m, p, a, f) => {
264
- if (!a) {
265
- c = compile$scanner2(m, s);
266
- }
267
- else {
268
- c = compile$scanner2(a, s);
269
- c.unshift(
270
- { type: compile$common.COMMENT, text: p },
271
- );
272
- c.push(
273
- { type: compile$common.COMMENT, text: f }
274
- );
275
- }
276
- if (n.isStyle) setless(c);
277
- codecolor(c, encode);
278
- });
279
- n.splice(0, n.length, ...c);
280
- }
281
- })
282
- codecolor(code, encode);
283
- return code.toString();
284
- },
285
- css(a) {
286
- var c = compile$scanner2(a);
287
- codecolor(c, encode);
288
- return c.toString();
289
- }
290
- };
291
- codesupports.gl = codesupports.glsl;
292
- codesupports.cmd = codesupports.bat;
293
- codesupports.css = codesupports.less;
294
- codesupports.cjs = codesupports.mjs = codesupports.jsx = codesupports.js = codesupports.javascript;
295
- codesupports.tsx = codesupports.ts = codesupports.typescript;
296
- codesupports.xht = codesupports.jsp = codesupports.asp = codesupports.php = codesupports.xml = codesupports.html;
297
- codesupports.vue = codesupports.xht;
298
- var { SCOPED, QUOTED, SPACE, STAMP, STRAP, EXPRESS, PROPERTY } = compile$common;
299
- var patchBlink = function (code, index, blink) {
300
- for (var cx = 0, dx = code.length; cx < dx; cx++) {
301
- var c = code[cx];
302
- var haschildren = c => c.type === SCOPED || c.type === QUOTED && c.length;
303
- if (c.start === index) {
304
- if (haschildren(c)) {
305
- c.entry = blink + c.entry;
306
- }
307
- else {
308
- c.blink = 0;
309
- c.text = blink + c.text;
310
- }
311
- return true;
312
- }
313
- else if (c.start < index && c.end > index) {
314
- if (haschildren(c)) {
315
- return patchBlink(c, index, blink);
316
- }
317
- else {
318
- c.blink = index - c.start;
319
- c.text = c.text.slice(0, c.blink) + blink + c.text.slice(c.blink);
320
-
321
- return true;
322
- }
323
- }
324
- else if (c.end === index) {
325
- if (haschildren(c)) {
326
- c.leave += blink;
327
- }
328
- else {
329
- c.blink = c.text.length;
330
- c.text += blink;
331
- }
332
- return true;
333
- }
334
- else if (c.start > index) {
335
- if (cx === 0) {
336
- if (code.entry) return code.entry += blink, true;
337
- return false;
338
- }
339
- else {
340
- var p = code[cx - 1];
341
- if (haschildren(p)) {
342
- p.leave += blink;
343
- }
344
- else {
345
- p.blink = p.text.length;
346
- p.text = p.text + blink;
347
- }
348
- return true;
349
- }
350
- }
351
- }
352
- if (code.leave) {
353
- code.leave = blink + code.leave;
354
- return true;
355
- }
356
- if (c) return c.text += blink, true;
357
- return false;
358
- };
359
- var rows = function (type, text, blink) {
360
- type = type.toLowerCase();
361
- if (type in codesupports) {
362
- text = codesupports[type](text, blink);
363
- }
364
- else text = encode(text);
365
- var codes = text.split(/\r\n|\r|\n/);
366
- var minSpace = Infinity;
367
- for (var c of codes) {
368
- var m = /^\s+/.exec(c);
369
- if (!m) {
370
- minSpace = 0;
371
- break;
372
- }
373
- if (m[0].length < minSpace) {
374
- minSpace = m[0].length;
375
- }
376
- }
377
- if (minSpace > 0 && minSpace < Infinity) codes = codes.map(c => /^\s+/.test(c) ? c.slice(minSpace) : c);
378
- return codes;
379
- }
380
- function codetext(type, text, blink) {
381
- var ws = rows(type, text, blink);
382
- return `<code type=${type}>${ws.join("<br/>")}</code>`;
383
- }
384
- codetext.rows = rows;
385
- codetext.encode = encode;
386
- </script>