jsgui3-server 0.0.102 → 0.0.105
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/examples/controls/1) window/client.js +3 -2
- package/examples/controls/1) window/server.js +1 -1
- package/examples/controls/3) five windows/client.js +14 -2
- package/examples/controls/3) five windows/server.js +4 -1
- package/package.json +3 -3
- package/resources/jsbuilder/babel/deep_iterate/deep_iterate_babel.js +19 -0
|
@@ -61,7 +61,8 @@ class Demo_UI extends Active_HTML_Document {
|
|
|
61
61
|
|
|
62
62
|
const window = new controls.Window({
|
|
63
63
|
context: context,
|
|
64
|
-
title: 'jsgui3-html Window Control'
|
|
64
|
+
title: 'jsgui3-html Window Control',
|
|
65
|
+
pos: [10, 10]
|
|
65
66
|
})
|
|
66
67
|
this.body.add(window);
|
|
67
68
|
|
|
@@ -122,7 +123,7 @@ class Demo_UI extends Active_HTML_Document {
|
|
|
122
123
|
//
|
|
123
124
|
|
|
124
125
|
// Would need to parse the JS files to extract the CSS.
|
|
125
|
-
// Maybe could do it an easier way???
|
|
126
|
+
// Maybe could do it an easier way??? Now that it's easy, want a faster way.
|
|
126
127
|
|
|
127
128
|
|
|
128
129
|
Demo_UI.css = `
|
|
@@ -82,10 +82,10 @@ if (require.main === module) {
|
|
|
82
82
|
|
|
83
83
|
const server = new Server({
|
|
84
84
|
Ctrl: Demo_UI,
|
|
85
|
+
//debug: true,
|
|
85
86
|
// Giving it the Ctrl and disk path client js should enable to server to get the JS-bundled CSS from the file(s).
|
|
86
87
|
// Putting the JS files through proper parsing and into a syntax tree would be best.
|
|
87
88
|
|
|
88
|
-
|
|
89
89
|
//'js_mode': 'debug',
|
|
90
90
|
'src_path_client_js': require.resolve('./client.js'),
|
|
91
91
|
//debug: true // should not minify the js, should include the symbols.
|
|
@@ -56,7 +56,7 @@ class Demo_UI extends Active_HTML_Document {
|
|
|
56
56
|
|
|
57
57
|
//console.log('this.body', this.body);
|
|
58
58
|
//console.log('this.body.add_class', this.body.add_class);
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
|
|
61
61
|
const compose = () => {
|
|
62
62
|
// put 20 of them in place.
|
|
@@ -65,12 +65,24 @@ class Demo_UI extends Active_HTML_Document {
|
|
|
65
65
|
|
|
66
66
|
const num_windows = 5;
|
|
67
67
|
|
|
68
|
+
let [x, y] = [0, 0];
|
|
69
|
+
|
|
70
|
+
// pos property?
|
|
71
|
+
//. consider a pos_info or pos_details property, or use another class to help with it.
|
|
72
|
+
|
|
73
|
+
// the .pos property would be a nice shortcut.
|
|
74
|
+
//. seems more like it's for enhanced controls? Not sure.
|
|
75
|
+
|
|
76
|
+
|
|
68
77
|
for (let c = 1; c <= num_windows; c++) {
|
|
69
78
|
const window = new controls.Window({
|
|
70
79
|
context: context,
|
|
71
|
-
title: c + ') jsgui3-html Window Control'
|
|
80
|
+
title: c + ') jsgui3-html Window Control',
|
|
81
|
+
pos: [x, y]
|
|
72
82
|
})
|
|
73
83
|
this.body.add(window);
|
|
84
|
+
|
|
85
|
+
x += 32; y += 64;
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
/*
|
|
@@ -92,7 +92,10 @@ if (require.main === module) {
|
|
|
92
92
|
|
|
93
93
|
// then start the server....
|
|
94
94
|
// be able to choose the port / ports?
|
|
95
|
-
console.log('waiting for server ready event');
|
|
95
|
+
//console.log('waiting for server ready event');
|
|
96
|
+
|
|
97
|
+
//
|
|
98
|
+
|
|
96
99
|
server.on('ready', () => {
|
|
97
100
|
console.log('server ready');
|
|
98
101
|
|
package/package.json
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"esbuild": "^0.19.4",
|
|
15
15
|
"fnl": "^0.0.29",
|
|
16
16
|
"fnlfs": "^0.0.29",
|
|
17
|
-
"jsgui3-client": "^0.0.
|
|
17
|
+
"jsgui3-client": "^0.0.91",
|
|
18
18
|
"jsgui3-webpage": "^0.0.6",
|
|
19
19
|
"jsgui3-website": "^0.0.6",
|
|
20
|
-
"lang-tools": "^0.0.
|
|
20
|
+
"lang-tools": "^0.0.22",
|
|
21
21
|
|
|
22
22
|
"multiparty": "^4.2.3",
|
|
23
23
|
"ncp": "^2.0.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"type": "git",
|
|
46
46
|
"url": "https://github.com/metabench/jsgui3-server.git"
|
|
47
47
|
},
|
|
48
|
-
"version": "0.0.
|
|
48
|
+
"version": "0.0.105"
|
|
49
49
|
}
|
|
@@ -599,6 +599,20 @@ const deep_iterate_babel_for_in_statement_node = (babel_node, depth, path, commo
|
|
|
599
599
|
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
+
const deep_iterate_babel_for_of_statement_node = (babel_node, depth, path, common, callback) => {
|
|
603
|
+
// value.raw is basically it.
|
|
604
|
+
|
|
605
|
+
const {left, right, body} = babel_node;
|
|
606
|
+
let sibling_number = 0;
|
|
607
|
+
|
|
608
|
+
deep_iterate_babel_node_$INTERNAL(left, depth + 1, path + sibling_number++ + '/', common, callback);
|
|
609
|
+
deep_iterate_babel_node_$INTERNAL(right, depth + 1, path + sibling_number++ + '/', common, callback);
|
|
610
|
+
deep_iterate_babel_node_$INTERNAL(body, depth + 1, path + sibling_number++ + '/', common, callback);
|
|
611
|
+
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
// deep_iterate_babel_for_of_statement_node
|
|
615
|
+
|
|
602
616
|
// deep_iterate_babel_sequence_expression_node
|
|
603
617
|
|
|
604
618
|
|
|
@@ -771,6 +785,8 @@ const deep_iterate_babel_node_$INTERNAL = (babel_node, depth, path, common, call
|
|
|
771
785
|
return deep_iterate_babel_break_statement_node(babel_node, depth, path, common, callback);
|
|
772
786
|
} else if (type === 'ForInStatement') {
|
|
773
787
|
return deep_iterate_babel_for_in_statement_node(babel_node, depth, path, common, callback);
|
|
788
|
+
} else if (type === 'ForOfStatement') {
|
|
789
|
+
return deep_iterate_babel_for_of_statement_node(babel_node, depth, path, common, callback);
|
|
774
790
|
} else if (type === 'SequenceExpression') {
|
|
775
791
|
return deep_iterate_babel_sequence_expression_node(babel_node, depth, path, common, callback);
|
|
776
792
|
} else if (type === 'ClassExpression') {
|
|
@@ -779,6 +795,9 @@ const deep_iterate_babel_node_$INTERNAL = (babel_node, depth, path, common, call
|
|
|
779
795
|
return deep_iterate_babel_rest_element_node(babel_node, depth, path, common, callback);
|
|
780
796
|
} else if (type === 'AwaitExpression') {
|
|
781
797
|
return deep_iterate_babel_await_expression_node(babel_node, depth, path, common, callback);
|
|
798
|
+
|
|
799
|
+
// ForOfStatement
|
|
800
|
+
|
|
782
801
|
} else {
|
|
783
802
|
|
|
784
803
|
// FunctionDeclaration TemplateLiteral TemplateElement TryStatement CatchClause
|