jsgui3-server 0.0.119 → 0.0.121
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/boxes/square_boxes.js +3 -0
- package/examples/boxes/square_boxes_client.js +5 -1
- package/examples/controls/11) window, mirrored text fields/client.js +31 -273
- package/examples/controls/11b) window, shared Data_Object model mirrored text fields/client.js +331 -0
- package/examples/controls/{11b) window, shared model mirrored text fields → 11c) window, shared Data_Value model mirrored text fields}/client.js +17 -7
- package/examples/controls/11c) window, shared Data_Value model mirrored text fields/server.js +118 -0
- package/examples/controls/11d) window, shared model mirrored integer text fields/both.js +17 -0
- package/examples/controls/11d) window, shared model mirrored integer text fields/client.js +280 -0
- package/examples/controls/11d) window, shared model mirrored integer text fields/server.js +23 -0
- package/examples/controls/12) window, Select_Options control/client.js +17 -0
- package/examples/controls/13) window, shared model mirrored lat_long/client.js +933 -0
- package/examples/controls/13) window, shared model mirrored lat_long/server.js +50 -0
- package/examples/controls/14) window, control compositional model/client.js +328 -0
- package/examples/controls/14) window, control compositional model/server.js +118 -0
- package/examples/controls/14a) window, control spec has compositional model/client.js +440 -0
- package/examples/controls/14a) window, control spec has compositional model/server.js +118 -0
- package/examples/controls/15) window, text field/client.js +256 -0
- package/examples/controls/15) window, text field/server.js +39 -0
- package/examples/controls/16) Window([Text_Input])/client.js +266 -0
- package/examples/controls/16) Window([Text_Input])/server.js +109 -0
- package/examples/controls/16a) Window([Text_Input]) Integer data.model.data_type/client.js +494 -0
- package/examples/controls/16a) Window([Text_Input]) Integer data.model.data_type/isomorphic.js +24 -0
- package/examples/controls/16a) Window([Text_Input]) Integer data.model.data_type/server.js +73 -0
- package/examples/controls/2b) two window, context menus/client.js +193 -0
- package/examples/controls/2b) two window, context menus/server.js +114 -0
- package/examples/controls/3) five windows/server.js +0 -1
- package/examples/controls/4) window, tabbed panel/client.js +15 -2
- package/examples/controls/4a) window, tabbed panel with various controls inside/client.js +233 -0
- package/examples/controls/4a) window, tabbed panel with various controls inside/server.js +118 -0
- package/examples/controls/5) window, grid/client.js +289 -9
- package/examples/controls/5) window, grid/server.js +2 -0
- package/examples/controls/8) window, checkbox/client.js +63 -101
- package/package.json +11 -11
- package/publishers/http-webpage-publisher.js +4 -5
- package/resources/jsbuilder/Abstract_Single_Declaration.js +1 -1
- package/resources/jsbuilder/Abstract_Single_Declaration_Sequence.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_0-Core.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_1-Babel.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_3.6-Basics_Callmap.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_4.1-Index.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_8-Features.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Node_Feature_Declaration.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Node_Feature_Declarator.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/JS_AST_Root_Node_Feature_Exported.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/JS_AST_Root_Node_Interpreted.js +1 -1
- package/resources/jsbuilder/JS_AST/JS_AST_Relationship_Node_To_Group.js +1 -1
- package/resources/jsbuilder/JS_AST/query/enable_array_as_queryable.js +1 -1
- package/resources/jsbuilder/JS_AST/query/find_object_keys.js +1 -1
- package/resources/jsbuilder/JS_AST_Node_Extended/JS_AST_Node_Declaration.js +1 -1
- package/resources/jsbuilder/JS_Builder.js +1 -1
- package/resources/jsbuilder/JS_File/JS_File_0-Core.js +1 -1
- package/resources/jsbuilder/JS_File/JS_File_2-Babel.js +1 -1
- package/resources/jsbuilder/JS_File/JS_File_4-Query.js +1 -1
- package/resources/jsbuilder/JS_File/JS_File_4.1-Query_Features.js +1 -1
- package/resources/jsbuilder/JS_File/JS_File_5-Planning.js +1 -1
- package/resources/jsbuilder/JS_File/JS_File_6-Changing.js +1 -1
- package/resources/jsbuilder/JS_File/JS_Files.js +1 -1
- package/resources/jsbuilder/Platform.js +1 -1
- package/resources/jsbuilder/Platforms.js +1 -1
- package/resources/jsbuilder/Project.js +1 -1
- package/resources/jsbuilder/Scope.js +1 -1
- package/resources/jsbuilder/_JS_File.js +1 -1
- package/resources/jsbuilder/babel/babel_node_tools.js +1 -1
- package/resources/jsbuilder/babel/deep_iterate/deep_iterate_babel.js +6 -2
- package/resources/jsbuilder/test/test_ast_node.js +1 -1
- package/resources/jsbuilder/test/test_js_file.js +2 -2
- package/resources/jsbuilder/test/test_project.js +1 -1
- package/resources/process-js.js +1 -1
- package/resources/processors/bundlers/js/esbuild/Advanced_JS_Bundler_Using_ESBuild.js +9 -6
- package/resources/processors/bundlers/js/esbuild/Core_JS_Single_File_Minifying_Bundler_Using_ESBuild.js +2 -1
- package/resources/processors/bundlers/test_ast.js +1 -1
- package/resources/processors/extractors/Extractor.js +3 -1
- package/resources/processors/extractors/js/css_and_js/AST_Node/CSS_And_JS_From_JS_String_Using_AST_Node_Extractor.js +19 -4
- /package/examples/controls/{11b) window, shared model mirrored text fields → 11b) window, shared Data_Object model mirrored text fields}/server.js +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// Indexing at every level looks like it would be useful.
|
|
8
8
|
// so in order to get the info about how the names relate to nodes we consult indexes.
|
|
9
9
|
|
|
10
|
-
const { each } = require('lang-
|
|
10
|
+
const { each } = require('lang-tools');
|
|
11
11
|
const JS_AST_Node_Basics_Callmap = require('./JS_AST_Node_3.6-Basics_Callmap');
|
|
12
12
|
const JS_AST_Node_Indexes = require('./JS_AST_Node_4.0-Index_Indexes');
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// When a declaration is treated as a feature, there is programming less specifically for it being a node.
|
|
2
2
|
|
|
3
3
|
// Feature is an abstraction on top of JS_AST_Node.
|
|
4
|
-
const {each} = require('lang-
|
|
4
|
+
const {each} = require('lang-tools');
|
|
5
5
|
|
|
6
6
|
const JS_AST_Node_Feature = require('./JS_AST_Node_Feature');
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// When a declaration is treated as a feature, there is programming less specifically for it being a node.
|
|
2
2
|
|
|
3
3
|
// Feature is an abstraction on top of JS_AST_Node.
|
|
4
|
-
const {each} = require('lang-
|
|
4
|
+
const {each} = require('lang-tools');
|
|
5
5
|
|
|
6
6
|
const JS_AST_Node_Feature = require('./JS_AST_Node_Feature');
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@ const JS_AST_Node = require('../../JS_AST_Node');
|
|
|
4
4
|
const JS_AST_Root_Node_Feature_Exports = require('./JS_AST_Root_Node_Feature_Exports');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
const {each} = require('lang-
|
|
7
|
+
const {each} = require('lang-tools');
|
|
8
8
|
// A map of named / relevant inner nodes could be a useful feature of the ast node overall.
|
|
9
9
|
|
|
10
10
|
// or is it an index if it's mapping to an array?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//const JS_AST_Node = require('../JS_AST/JS_AST_Node');
|
|
2
|
-
const {each} = require('lang-
|
|
2
|
+
const {each} = require('lang-tools');
|
|
3
3
|
const JS_AST_Node_Extended_Core = require('./JS_AST_Node_Extended_0-Core');
|
|
4
4
|
|
|
5
5
|
class JS_AST_Node_Declaration extends JS_AST_Node_Extended_Core {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const JS_File_Query_Features = require('./JS_File_4.1-Query_Features.js');
|
|
2
2
|
const Variable_Name_Provider = require('../Variable_Name_Provider');
|
|
3
|
-
const { each } = require('lang-
|
|
3
|
+
const { each } = require('lang-tools');
|
|
4
4
|
class JS_File_Planning extends JS_File_Query_Features {
|
|
5
5
|
constructor(spec) {
|
|
6
6
|
super(spec);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const JS_File_Planning = require('./JS_File_5-Planning');
|
|
2
2
|
const Variable_Name_Provider = require('../Variable_Name_Provider');
|
|
3
|
-
const { each } = require('lang-
|
|
3
|
+
const { each } = require('lang-tools');
|
|
4
4
|
|
|
5
5
|
const {transform} = require("@babel/core");
|
|
6
6
|
// import { transform } from "@babel/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Make a platform about providing variables.
|
|
2
2
|
|
|
3
|
-
const {each, Evented_Class} = require('lang-
|
|
3
|
+
const {each, Evented_Class} = require('lang-tools');
|
|
4
4
|
const Declaration_Sequence = require('./Abstract_Single_Declaration_Sequence');
|
|
5
5
|
|
|
6
6
|
class Platform extends Evented_Class {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Could load a whole load of them / category.
|
|
9
9
|
// Or
|
|
10
10
|
|
|
11
|
-
const {each, Evented_Class} = require('lang-
|
|
11
|
+
const {each, Evented_Class} = require('lang-tools');
|
|
12
12
|
|
|
13
13
|
//const JS_File = require('./JS_File_Core');
|
|
14
14
|
const Platforms = require('./Platforms');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// Want to write out jsgui in such a way that the lower levels are all accessed as local functions and objects within an inner scope.
|
|
4
4
|
|
|
5
|
-
const {each, Evented_Class} = require('lang-
|
|
5
|
+
const {each, Evented_Class} = require('lang-tools');
|
|
6
6
|
//const { default: JS_Builder } = require('./JS_Builder');
|
|
7
7
|
|
|
8
8
|
// Interpret / arrange a file in terms of the other objects within this system.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
const {each} = require('lang-
|
|
11
|
+
const {each} = require('lang-tools');
|
|
12
12
|
//const babel_node_tools = require('../babel_node_tools');
|
|
13
13
|
|
|
14
14
|
|
|
@@ -475,7 +475,11 @@ const deep_iterate_babel_template_literal_node = (babel_node, depth, path, commo
|
|
|
475
475
|
|
|
476
476
|
|
|
477
477
|
if (expressions.length > 0) {
|
|
478
|
-
|
|
478
|
+
// Array of nodes....
|
|
479
|
+
|
|
480
|
+
//console.log('babel_node', babel_node);
|
|
481
|
+
//throw 'NYI';
|
|
482
|
+
each(expressions, x => deep_iterate_babel_node_$INTERNAL(x, depth + 1, path + sibling_number++ + '/', common, callback));
|
|
479
483
|
}
|
|
480
484
|
|
|
481
485
|
if (quasis.length > 0) {
|
|
@@ -14,7 +14,7 @@ const JS_File = require('../JS_File/JS_File');
|
|
|
14
14
|
const path = require('path');
|
|
15
15
|
const fs = require('fs');
|
|
16
16
|
const Project = require('../Project');
|
|
17
|
-
const {each} = require('lang-
|
|
17
|
+
const {each} = require('lang-tools');
|
|
18
18
|
|
|
19
19
|
//const JS_AST_Node = require('../JS_AST/JS_AST_Node');
|
|
20
20
|
const JS_AST_Node = require('../JS_AST_Node_Extended/JS_AST_Node_Extended');
|
|
@@ -38,7 +38,7 @@ const JS_File = require('../JS_File/JS_File');
|
|
|
38
38
|
const path = require('path');
|
|
39
39
|
const fs = require('fs');
|
|
40
40
|
const Project = require('../Project');
|
|
41
|
-
const {each} = require('lang-
|
|
41
|
+
const {each} = require('lang-tools');
|
|
42
42
|
|
|
43
43
|
const JS_AST_Node = require('../JS_AST_Node_Extended/JS_AST_Node_Extended');
|
|
44
44
|
|
|
@@ -217,7 +217,7 @@ const test_js_file = () => {
|
|
|
217
217
|
//console.log('node.source', node.source);
|
|
218
218
|
|
|
219
219
|
if (node.signature === 'VDn(VDr(ID,CE(ID,SL)))') {
|
|
220
|
-
// var lang_mini = require('lang-
|
|
220
|
+
// var lang_mini = require('lang-tools');
|
|
221
221
|
|
|
222
222
|
// could spot that it's a require call here.
|
|
223
223
|
// basically this code is going to be re-worked in some ways to make use of improved queries.
|
|
@@ -20,7 +20,7 @@ const test_lang_mini_project = () => {
|
|
|
20
20
|
const path = require('path');
|
|
21
21
|
const fs = require('fs');
|
|
22
22
|
const Project = require('../Project');
|
|
23
|
-
const {each} = require('lang-
|
|
23
|
+
const {each} = require('lang-tools');
|
|
24
24
|
|
|
25
25
|
const JS_AST_Node = require('../JS_AST_Node_Extended/JS_AST_Node_Extended');
|
|
26
26
|
|
package/resources/process-js.js
CHANGED
|
@@ -25,13 +25,20 @@ class Advanced_JS_Bundler_Using_ESBuild extends Bundler_Using_ESBuild {
|
|
|
25
25
|
|
|
26
26
|
//this.css_extractor = new CSS_Extractor();
|
|
27
27
|
|
|
28
|
+
// A Debug Bundler would help.
|
|
29
|
+
// Need to make it keep the CSS in the js.
|
|
30
|
+
|
|
31
|
+
|
|
28
32
|
|
|
29
33
|
this.non_minifying_bundler = new Core_JS_Non_Minifying_Bundler_Using_ESBuild({
|
|
30
34
|
debug: this.debug
|
|
31
35
|
});
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
// a keep_css_in_js option too....
|
|
38
|
+
// and a 'debug' property, so it keeps the css in the js...?
|
|
39
|
+
this.css_and_js_from_js_string_extractor = new CSS_And_JS_From_JS_String_Extractor({
|
|
40
|
+
debug: this.debug
|
|
41
|
+
});
|
|
35
42
|
|
|
36
43
|
|
|
37
44
|
// Probably don't use that minifying bundler in debug mode.
|
|
@@ -131,12 +138,8 @@ class Advanced_JS_Bundler_Using_ESBuild extends Bundler_Using_ESBuild {
|
|
|
131
138
|
// Should put it all in a single res bundle though....
|
|
132
139
|
// Though merging / concating bundles will be fine too.
|
|
133
140
|
|
|
134
|
-
|
|
135
|
-
|
|
136
141
|
const minified_js_bundle_collection = minified_js[0];
|
|
137
142
|
|
|
138
|
-
|
|
139
|
-
|
|
140
143
|
const o_css_bundle_item = {
|
|
141
144
|
type: 'CSS',
|
|
142
145
|
extension: 'css',
|
|
@@ -61,13 +61,14 @@ class Core_JS_Single_File_Minifying_Bundler_Using_ESBuild extends Bundler_Using_
|
|
|
61
61
|
//loader: 'ts',
|
|
62
62
|
},
|
|
63
63
|
//bundle: true,
|
|
64
|
+
target: 'es2022',
|
|
64
65
|
|
|
65
66
|
// Possibly no minification here....
|
|
66
67
|
// Want to use non-minified or only partially minified version to separate the JS and the CSS.
|
|
67
68
|
|
|
68
69
|
treeShaking: true,
|
|
69
70
|
minify: true,
|
|
70
|
-
|
|
71
|
+
format: 'cjs',
|
|
71
72
|
|
|
72
73
|
//sourcemap: 'external',
|
|
73
74
|
write: false,
|
|
@@ -42,7 +42,7 @@ const JS_File = require('../resources/jsbuilder/JS_File/JS_File');
|
|
|
42
42
|
//const JS_File_Comprehension = require('../JS_File_Comprehension');
|
|
43
43
|
const path = require('path');
|
|
44
44
|
const fs = require('fs');
|
|
45
|
-
const {each} = require('lang-
|
|
45
|
+
const {each} = require('lang-tools');
|
|
46
46
|
|
|
47
47
|
const JS_AST_Node = require('../resources/jsbuilder/JS_AST_Node_Extended/JS_AST_Node_Extended');
|
|
48
48
|
|
|
@@ -35,6 +35,10 @@ const Pos_Span_String_Extractor = require('../../../string/Pos_Span_String_Extra
|
|
|
35
35
|
|
|
36
36
|
class CSS_And_JS_From_JS_String_Using_AST_Node_Extractor extends Extractor {
|
|
37
37
|
constructor(spec) {
|
|
38
|
+
|
|
39
|
+
// and a 'debug' property...?
|
|
40
|
+
// in which case it keeps the css in the js - but extracts it to its own css though.
|
|
41
|
+
|
|
38
42
|
super(spec);
|
|
39
43
|
|
|
40
44
|
this.pos_span_string_extractor = new Pos_Span_String_Extractor();
|
|
@@ -183,11 +187,22 @@ class CSS_And_JS_From_JS_String_Using_AST_Node_Extractor extends Extractor {
|
|
|
183
187
|
// object with keys may be easier / better / simpler.
|
|
184
188
|
// or even a Bundle object?
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
if (this.debug === true) {
|
|
191
|
+
const res = {
|
|
192
|
+
css: str_css,
|
|
193
|
+
js: str_js
|
|
194
|
+
}
|
|
195
|
+
complete(res);
|
|
196
|
+
} else {
|
|
197
|
+
const res = {
|
|
198
|
+
css: str_css,
|
|
199
|
+
js: str_js_without_css_assignments
|
|
200
|
+
}
|
|
201
|
+
complete(res);
|
|
189
202
|
}
|
|
190
203
|
|
|
204
|
+
|
|
205
|
+
|
|
191
206
|
|
|
192
207
|
|
|
193
208
|
|
|
@@ -197,7 +212,7 @@ class CSS_And_JS_From_JS_String_Using_AST_Node_Extractor extends Extractor {
|
|
|
197
212
|
|
|
198
213
|
|
|
199
214
|
|
|
200
|
-
|
|
215
|
+
|
|
201
216
|
} else {
|
|
202
217
|
complete();
|
|
203
218
|
}
|