efront 4.35.3 → 4.35.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.
- package/#/345/233/275/351/231/205/345/214/226.yml +3 -0
- package/coms/basic/Table.js +26 -0
- package/coms/basic/escapeRegExp.js +24 -0
- package/coms/basic/escapeRegExp_test.js +35 -0
- package/coms/basic/math.js +77 -0
- package/coms/basic/math.md +97 -0
- package/coms/basic/spaces.js +1 -1
- package/coms/basic/strings.js +8 -5
- package/coms/compile/Html.js +15 -7
- package/coms/compile/Program.js +3 -1
- package/coms/compile/autoeval.js +2 -2
- package/coms/compile/autoeval_test.js +5 -0
- package/coms/compile/scanner2.js +1 -1
- package/coms/compile//347/256/227/345/274/217.js +38 -7
- package/coms/compile//347/256/227/345/274/217_test.js +6 -2
- package/coms/compile//347/264/240/351/246/250.js +8 -7
- package/coms/compile//347/264/240/351/246/250_test.js +8 -2
- package/coms/explorer/main.less +1 -0
- package/coms/reptile/colors.js +2 -1
- package/coms/zimoli/arriswise.js +1 -1
- package/coms/zimoli/color-config.less +1 -1
- package/coms/zimoli/confirm.js +1 -1
- package/coms/zimoli/popup.js +1 -1
- package/coms/zimoli/prompt.js +4 -1
- package/coms/zimoli/scrollbar.less +1 -1
- package/coms/zimoli/table.js +1 -1
- package/coms/zimoli/vbox.js +1 -0
- package/coms//350/214/250/350/217/260//344/270/212/350/211/262.xht +5 -1
- package/coms//350/214/250/350/217/260//346/240/207/347/255/276/345/214/226.js +9 -1
- package/coms//350/214/250/350/217/260//346/270/262/346/237/223.js +1 -1
- package/coms//350/214/250/350/217/260//347/274/226/350/276/221/346/241/206.xht +16 -2
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/public//346/226/207/344/273/266/347/263/273/347/273/237//344/270/273/351/241/265.jsp +2 -2
- package/debug.log +0 -3
|
@@ -78,6 +78,12 @@ test(`a >{b{a:b}}`, `a>b{a:b;}`);
|
|
|
78
78
|
test(`a{>b{a:b}}`, `a>b{a:b;}`);
|
|
79
79
|
test(`.type(@type,@media) {.@{type} {&:before{content:"@{media}";}}}.type(videoinput, "相机");`, `.videoinput:before{content:"相机";}`);
|
|
80
80
|
test(`.type(@type,@media) {.@{type} {&:before{content:"@{media}";}}}.type(videoinput, 相机);`, `.videoinput:before{content:"相机";}`);
|
|
81
|
+
test(`
|
|
82
|
+
@avatar-top: -12px;
|
|
83
|
+
a{
|
|
84
|
+
top: 12px- @avatar-top;
|
|
85
|
+
}
|
|
86
|
+
`,'a{top:24px;}');
|
|
81
87
|
common.createString.debug = true;
|
|
82
88
|
Program.debug = true;
|
|
83
89
|
test(`@type(@len){
|
|
@@ -89,7 +95,7 @@ test(`@type(@len){
|
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
@type(1)
|
|
92
|
-
`, '');
|
|
98
|
+
`, '>[nlist]{width:1.9em;}');
|
|
93
99
|
Program.debug = false;
|
|
94
100
|
common.createString.debug = false;
|
|
95
101
|
assert(素馨(`:not(a):not(b){c:d}`, 'abc'), `abc :not(a):not(b){c:d;}`);
|
|
@@ -132,4 +138,4 @@ assert(素馨(`h1{a:c; span{a:b} i{a:b} }`, '.home-', true), `.home- h1 span{a:b
|
|
|
132
138
|
assert(素馨(`h1{ button{&:not(hover){.track{a:b}}} }`, '.home-', true), `.home- h1 button:not(hover) .track{a:b;}`);
|
|
133
139
|
assert(素馨(`@type(@a){&[type=@a]{a:1}} @type(white)`, '.btn-', true), `.btn-[type=white]{a:1;}`);
|
|
134
140
|
assert(素馨(`a,b{c,d{ g&{e:f}}}`, '', true), `a gc,b gc,a gd,b gd{e:f;}`);
|
|
135
|
-
assert(素馨(`a{a:lch(from rgb(20 20 20) l c h)}`, '', true), `a{a:lch(from rgb(20 20 20) l c h);}`);
|
|
141
|
+
assert(素馨(`a{a:lch(from rgb(20 20 20) l c h)}`, '', true), `a{a:lch(from rgb(20 20 20) l c h);}`);
|
package/coms/explorer/main.less
CHANGED
package/coms/reptile/colors.js
CHANGED
|
@@ -40,7 +40,8 @@ var colors = module.exports = {
|
|
|
40
40
|
BgCyan2: "\x1b[106m",
|
|
41
41
|
BgWhite2: "\x1b[107m",
|
|
42
42
|
};
|
|
43
|
-
colors.
|
|
43
|
+
colors.tag = colors.FgBlue2;
|
|
44
|
+
colors.label = colors.strap = colors.value = colors.FgWhite;
|
|
44
45
|
colors.comment = colors.FgGreen;
|
|
45
46
|
colors.invoke = colors.method = colors.FgYellow2;
|
|
46
47
|
colors.express = colors.property = colors.FgCyan2;
|
package/coms/zimoli/arriswise.js
CHANGED
|
@@ -36,7 +36,7 @@ var replaceArg = function (arg) {
|
|
|
36
36
|
function build(func, argNames, argsArr) {
|
|
37
37
|
var newf = String(func).replace(regexps, rep);
|
|
38
38
|
return Function.apply(null, argNames.map(replaceArg).concat("return " + newf))
|
|
39
|
-
.apply(this, replaceArg
|
|
39
|
+
.apply(this, argsArr.map(replaceArg));
|
|
40
40
|
}
|
|
41
41
|
var arriswise = function (func, args = []) {
|
|
42
42
|
if (isFunction(args.slice)) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@border-solid: #0003;
|
|
2
|
-
@border-focus: #
|
|
2
|
+
@border-focus: #29c;
|
package/coms/zimoli/confirm.js
CHANGED
|
@@ -151,7 +151,7 @@ function confirm() {
|
|
|
151
151
|
Promise.resolve().then(function () {
|
|
152
152
|
if (isMounted(element)) return;
|
|
153
153
|
element.$mask = true;
|
|
154
|
-
popup(element, target || [.5, .5], target ? 'rhomb' :
|
|
154
|
+
popup(element, target || [.5, .5], target ? 'rhomb' : target !== false);
|
|
155
155
|
element.focus();
|
|
156
156
|
if (!target) drag.on(head, element);
|
|
157
157
|
else {
|
package/coms/zimoli/popup.js
CHANGED
|
@@ -141,7 +141,7 @@ var popup_view = function (element, target, style) {
|
|
|
141
141
|
}
|
|
142
142
|
else if (target instanceof Array) {
|
|
143
143
|
if (isNode(style) && style.$mask) addMask(element, style);
|
|
144
|
-
else if (typeof style === 'boolean') addMask(element);
|
|
144
|
+
else if (typeof style === 'boolean' && style) addMask(element);
|
|
145
145
|
popup_to_point(element, target);
|
|
146
146
|
}
|
|
147
147
|
else if (target === true || target < 0) {
|
package/coms/zimoli/prompt.js
CHANGED
|
@@ -35,6 +35,7 @@ function prompt() {
|
|
|
35
35
|
var submit = null;
|
|
36
36
|
var wrap = false;
|
|
37
37
|
var value = '';
|
|
38
|
+
var mask = false;
|
|
38
39
|
var attrs = {
|
|
39
40
|
type: null,
|
|
40
41
|
max: null,
|
|
@@ -48,6 +49,7 @@ function prompt() {
|
|
|
48
49
|
else if (typeof arg === 'string') msg = arg;
|
|
49
50
|
else if (isArray(arg)) opts = arg;
|
|
50
51
|
else if (isFunction(arg) || arg instanceof RegExp) check = arg;
|
|
52
|
+
else if (typeof arg === 'boolean') mask = arg;
|
|
51
53
|
else if (isObject(arg)) {
|
|
52
54
|
if (isFunction(arg.test)) check = arg;
|
|
53
55
|
if (isFunction(arg.check)) check = arg.check;
|
|
@@ -55,6 +57,7 @@ function prompt() {
|
|
|
55
57
|
if (isString(arg.msg || arg.title)) msg = arg.msg || arg.title;
|
|
56
58
|
if (isHandled(arg.info)) info = arg.info;
|
|
57
59
|
if (isHandled(arg.value)) value = arg.value;
|
|
60
|
+
if (isHandled(arg.mask)) mask = arg.mask;
|
|
58
61
|
for (var k in attrs) {
|
|
59
62
|
if (k in arg) attrs[k] = arg[k];
|
|
60
63
|
}
|
|
@@ -117,7 +120,7 @@ function prompt() {
|
|
|
117
120
|
} else {
|
|
118
121
|
c.errored = true;
|
|
119
122
|
}
|
|
120
|
-
});
|
|
123
|
+
}, { target: mask });
|
|
121
124
|
on('mounted')(ipt, function () {
|
|
122
125
|
if (setDisable) setDisable();
|
|
123
126
|
setTimeout(function () {
|
package/coms/zimoli/table.js
CHANGED
package/coms/zimoli/vbox.js
CHANGED
|
@@ -147,6 +147,7 @@ function ybox(generator) {
|
|
|
147
147
|
} else {
|
|
148
148
|
var wheelTime = 0;
|
|
149
149
|
onmousewheel(_box, function (event) {
|
|
150
|
+
if (event.defaultPrevented) return;
|
|
150
151
|
event.preventDefault();
|
|
151
152
|
var isNew = event.timeStamp - wheelTime > 120;
|
|
152
153
|
wheelTime = event.timeStamp;
|
|
@@ -71,6 +71,7 @@ var codecolor = function (c) {
|
|
|
71
71
|
};
|
|
72
72
|
var setExpress = function (o, label) {
|
|
73
73
|
if (!o.text || o.wraped) return;
|
|
74
|
+
if (o.type !== EXPRESS) return;
|
|
74
75
|
o.wraped = true;
|
|
75
76
|
var keys = o.text.split(".");
|
|
76
77
|
var pdot = !keys[0] && keys.length > 1;
|
|
@@ -124,6 +125,13 @@ var codecolor = function (c) {
|
|
|
124
125
|
switch (o.type) {
|
|
125
126
|
case LABEL:
|
|
126
127
|
o.text = wrap(o.text, 'label');
|
|
128
|
+
var label = o.tack;
|
|
129
|
+
used[o.tack].forEach(o => {
|
|
130
|
+
if (o.text !== label) return;
|
|
131
|
+
var prev = o.prev;
|
|
132
|
+
if (!prev || prev.type !== STRAP || prev.isend || !/^(break|continue)$/.test(prev.text)) return;
|
|
133
|
+
o.text = wrap(o.text, 'label');
|
|
134
|
+
})
|
|
127
135
|
break;
|
|
128
136
|
case QUOTED:
|
|
129
137
|
if (o.length || !o.text) {
|
|
@@ -157,7 +165,7 @@ var codecolor = function (c) {
|
|
|
157
165
|
if (o.tag_leave) o.tag_leave = wrapcode(o.tag_leave, 'stamp');
|
|
158
166
|
if (o.entry) o.entry = wrapcode(o.entry, 'stamp');
|
|
159
167
|
if (o.leave) o.leave = wrapcode(o.leave, 'stamp');
|
|
160
|
-
o.tag = wrapcode(o.tag, '
|
|
168
|
+
o.tag = wrapcode(o.tag, 'tag');
|
|
161
169
|
o.forEach(setcolor);
|
|
162
170
|
break;
|
|
163
171
|
case SCOPED:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<style>
|
|
2
2
|
& {
|
|
3
|
-
overflow:
|
|
3
|
+
overflow: hidden;
|
|
4
4
|
border-top: 0;
|
|
5
5
|
border-bottom: 0;
|
|
6
6
|
display: block;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
margin-left:-@{w}em;
|
|
44
44
|
border-left: @{w}em solid transparent;
|
|
45
45
|
width: 100%;
|
|
46
|
-
overflow-x:
|
|
46
|
+
overflow-x: hidden;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
>[nlist] {
|
|
@@ -107,6 +107,13 @@
|
|
|
107
107
|
height: 1.36em;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
+
|
|
111
|
+
>scrollbar {
|
|
112
|
+
right: 0;
|
|
113
|
+
left: auto !important;
|
|
114
|
+
position: fixed;
|
|
115
|
+
z-index: 1;
|
|
116
|
+
}
|
|
110
117
|
</style>
|
|
111
118
|
<编辑框 spellcheck=false e-class="上色.className" e-style="{whiteSpace:'pre'}" ntype:="codeSpan">
|
|
112
119
|
<list contenteditable="false" nlist# :src="(r,i) in coderows" -style="{height:codeHeight}">
|
|
@@ -115,9 +122,16 @@
|
|
|
115
122
|
<list clist# body contenteditable:="contenteditable" :src="(r,i) in coderows" -style="{height:codeHeight}">
|
|
116
123
|
<d -html="r"></d>
|
|
117
124
|
</list>
|
|
125
|
+
<scrollbar x></scrollbar>
|
|
126
|
+
<scrollbar y :target="this.parentNode"></scrollbar>
|
|
118
127
|
</编辑框>
|
|
119
128
|
<script>
|
|
120
129
|
var coder = this;
|
|
130
|
+
onmousewheel(this, function (event) {
|
|
131
|
+
if (!event.shiftKey) return;
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
clist.scrollLeft += event.deltaY;
|
|
134
|
+
});
|
|
121
135
|
vbox(this);
|
|
122
136
|
var contenteditable = !this.readonly;
|
|
123
137
|
watch(coder, {
|