jsgui3-server 0.0.145 → 0.0.146
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/docs/jsgui3-sass-patterns-book/01-vision-and-goals.md +31 -0
- package/docs/jsgui3-sass-patterns-book/02-stack-map.md +40 -0
- package/docs/jsgui3-sass-patterns-book/03-control-local-sass.md +60 -0
- package/docs/jsgui3-sass-patterns-book/04-extension-and-variants.md +76 -0
- package/docs/jsgui3-sass-patterns-book/05-theming-and-tokens.md +54 -0
- package/docs/jsgui3-sass-patterns-book/06-workspace-overrides.md +45 -0
- package/docs/jsgui3-sass-patterns-book/07-resource-and-bundling.md +46 -0
- package/docs/jsgui3-sass-patterns-book/08-examples.md +62 -0
- package/docs/jsgui3-sass-patterns-book/09-testing-and-adoption.md +27 -0
- package/docs/jsgui3-sass-patterns-book/README.md +23 -0
- package/docs/troubleshooting.md +44 -4
- package/examples/controls/14) window, canvas/client.js +1 -1
- package/examples/controls/14b) window, canvas (improved renderer)/client.js +1 -1
- package/examples/controls/14d) window, canvas globe/client.js +1 -1
- package/examples/controls/14e) window, canvas multithreaded/client.js +1 -1
- package/examples/controls/14f) window, canvas polyglobe/client.js +1 -1
- package/examples/controls/16) window, form container/client.js +254 -0
- package/examples/controls/16) window, form container/server.js +20 -0
- package/examples/controls/17) window, mvvm binding/client.js +530 -0
- package/examples/controls/17) window, mvvm binding/server.js +20 -0
- package/package.json +3 -3
- package/resources/processors/bundlers/js/esbuild/Core_JS_Non_Minifying_Bundler_Using_ESBuild.js +87 -100
- package/resources/processors/bundlers/js/esbuild/Core_JS_Single_File_Minifying_Bundler_Using_ESBuild.js +89 -60
- package/tests/README.md +45 -9
- package/tests/bundlers.test.js +53 -47
- package/tests/examples-controls.e2e.test.js +3 -1
- package/tests/sass-controls.e2e.test.js +123 -9
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
const jsgui = require('jsgui3-client');
|
|
2
|
+
const { controls, Control } = jsgui;
|
|
3
|
+
|
|
4
|
+
const Active_HTML_Document = require('../../../controls/Active_HTML_Document');
|
|
5
|
+
|
|
6
|
+
const { Badge, Progress_Bar, Range_Input, Text_Input, Window } = controls;
|
|
7
|
+
|
|
8
|
+
const is_defined = value => value !== undefined && value !== null;
|
|
9
|
+
|
|
10
|
+
const normalize_model_value = value => {
|
|
11
|
+
if (value && value.__data_value) {
|
|
12
|
+
return typeof value.value === 'function' ? value.value() : value.value;
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const get_model_value = (model, name) => {
|
|
18
|
+
if (!model) return undefined;
|
|
19
|
+
if (typeof model.get === 'function') {
|
|
20
|
+
return normalize_model_value(model.get(name));
|
|
21
|
+
}
|
|
22
|
+
return normalize_model_value(model[name]);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const set_model_value = (model, name, value) => {
|
|
26
|
+
if (!model) return;
|
|
27
|
+
const current_value = get_model_value(model, name);
|
|
28
|
+
if (current_value === value) return;
|
|
29
|
+
if (typeof model.set === 'function') {
|
|
30
|
+
model.set(name, value);
|
|
31
|
+
} else {
|
|
32
|
+
model[name] = value;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const set_control_text = (ctrl, text) => {
|
|
37
|
+
if (!ctrl) return;
|
|
38
|
+
ctrl.clear();
|
|
39
|
+
if (text) {
|
|
40
|
+
ctrl.add(String(text));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const normalize_score = value => {
|
|
45
|
+
const numeric = Number(value);
|
|
46
|
+
if (!Number.isFinite(numeric)) return 0;
|
|
47
|
+
return Math.max(0, Math.min(100, numeric));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const score_to_status = score => {
|
|
51
|
+
if (score >= 80) return 'success';
|
|
52
|
+
if (score >= 60) return 'info';
|
|
53
|
+
if (score >= 30) return 'warn';
|
|
54
|
+
return 'error';
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const score_status_label = status => {
|
|
58
|
+
switch (status) {
|
|
59
|
+
case 'success':
|
|
60
|
+
return 'HIGH';
|
|
61
|
+
case 'info':
|
|
62
|
+
return 'GOOD';
|
|
63
|
+
case 'warn':
|
|
64
|
+
return 'WARM';
|
|
65
|
+
case 'error':
|
|
66
|
+
default:
|
|
67
|
+
return 'LOW';
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
class Profile_Panel extends Control {
|
|
72
|
+
constructor(spec = {}) {
|
|
73
|
+
spec.__type_name = spec.__type_name || 'profile_panel';
|
|
74
|
+
super(spec);
|
|
75
|
+
this.add_class('profile-panel');
|
|
76
|
+
|
|
77
|
+
this.apply_default_model_values(spec);
|
|
78
|
+
|
|
79
|
+
if (!spec.el) {
|
|
80
|
+
this.compose_profile_panel();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
this.setup_view_watchers();
|
|
84
|
+
this.setup_model_bindings();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
apply_default_model_values(spec = {}) {
|
|
88
|
+
const data_model = this.data && this.data.model;
|
|
89
|
+
if (!data_model) return;
|
|
90
|
+
|
|
91
|
+
const first_name = is_defined(spec.first_name) ? spec.first_name : 'Ada';
|
|
92
|
+
const last_name = is_defined(spec.last_name) ? spec.last_name : 'Lovelace';
|
|
93
|
+
const role = is_defined(spec.role) ? spec.role : 'Analyst';
|
|
94
|
+
const score = is_defined(spec.score) ? normalize_score(spec.score) : 72;
|
|
95
|
+
|
|
96
|
+
set_model_value(data_model, 'first_name', first_name);
|
|
97
|
+
set_model_value(data_model, 'last_name', last_name);
|
|
98
|
+
set_model_value(data_model, 'role', role);
|
|
99
|
+
set_model_value(data_model, 'score', score);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
compose_profile_panel() {
|
|
103
|
+
const { context } = this;
|
|
104
|
+
|
|
105
|
+
const header_ctrl = new Control({
|
|
106
|
+
context,
|
|
107
|
+
tag_name: 'div'
|
|
108
|
+
});
|
|
109
|
+
header_ctrl.add_class('profile-header');
|
|
110
|
+
|
|
111
|
+
const title_ctrl = new Control({
|
|
112
|
+
context,
|
|
113
|
+
tag_name: 'div'
|
|
114
|
+
});
|
|
115
|
+
title_ctrl.add_class('profile-title');
|
|
116
|
+
title_ctrl.add('Profile Preview');
|
|
117
|
+
|
|
118
|
+
const score_badge = new Badge({
|
|
119
|
+
context,
|
|
120
|
+
status: 'info',
|
|
121
|
+
text: 'WARM'
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
header_ctrl.add(title_ctrl);
|
|
125
|
+
header_ctrl.add(score_badge);
|
|
126
|
+
|
|
127
|
+
const summary_ctrl = new Control({
|
|
128
|
+
context,
|
|
129
|
+
tag_name: 'div'
|
|
130
|
+
});
|
|
131
|
+
summary_ctrl.add_class('profile-summary');
|
|
132
|
+
|
|
133
|
+
const summary_name = new Control({
|
|
134
|
+
context,
|
|
135
|
+
tag_name: 'div'
|
|
136
|
+
});
|
|
137
|
+
summary_name.add_class('profile-name');
|
|
138
|
+
|
|
139
|
+
const summary_meta = new Control({
|
|
140
|
+
context,
|
|
141
|
+
tag_name: 'div'
|
|
142
|
+
});
|
|
143
|
+
summary_meta.add_class('profile-meta');
|
|
144
|
+
|
|
145
|
+
summary_ctrl.add(summary_name);
|
|
146
|
+
summary_ctrl.add(summary_meta);
|
|
147
|
+
|
|
148
|
+
const fields_ctrl = new Control({
|
|
149
|
+
context,
|
|
150
|
+
tag_name: 'div'
|
|
151
|
+
});
|
|
152
|
+
fields_ctrl.add_class('profile-fields');
|
|
153
|
+
|
|
154
|
+
const first_name_input = new Text_Input({
|
|
155
|
+
context,
|
|
156
|
+
placeholder: 'Ada'
|
|
157
|
+
});
|
|
158
|
+
first_name_input.add_class('profile-input');
|
|
159
|
+
|
|
160
|
+
const last_name_input = new Text_Input({
|
|
161
|
+
context,
|
|
162
|
+
placeholder: 'Lovelace'
|
|
163
|
+
});
|
|
164
|
+
last_name_input.add_class('profile-input');
|
|
165
|
+
|
|
166
|
+
const role_input = new Text_Input({
|
|
167
|
+
context,
|
|
168
|
+
placeholder: 'Analyst'
|
|
169
|
+
});
|
|
170
|
+
role_input.add_class('profile-input');
|
|
171
|
+
|
|
172
|
+
const score_input = new Range_Input({
|
|
173
|
+
context,
|
|
174
|
+
min: 0,
|
|
175
|
+
max: 100,
|
|
176
|
+
step: 1
|
|
177
|
+
});
|
|
178
|
+
score_input.add_class('profile-range');
|
|
179
|
+
|
|
180
|
+
const progress_bar = new Progress_Bar({
|
|
181
|
+
context,
|
|
182
|
+
max: 100,
|
|
183
|
+
value: 0
|
|
184
|
+
});
|
|
185
|
+
progress_bar.add_class('profile-progress');
|
|
186
|
+
|
|
187
|
+
const score_value = new Control({
|
|
188
|
+
context,
|
|
189
|
+
tag_name: 'div'
|
|
190
|
+
});
|
|
191
|
+
score_value.add_class('profile-score');
|
|
192
|
+
|
|
193
|
+
const score_stack = new Control({
|
|
194
|
+
context,
|
|
195
|
+
tag_name: 'div'
|
|
196
|
+
});
|
|
197
|
+
score_stack.add_class('profile-score-stack');
|
|
198
|
+
score_stack.add(score_input);
|
|
199
|
+
score_stack.add(progress_bar);
|
|
200
|
+
|
|
201
|
+
fields_ctrl.add(this.create_field_row('First name', first_name_input));
|
|
202
|
+
fields_ctrl.add(this.create_field_row('Last name', last_name_input));
|
|
203
|
+
fields_ctrl.add(this.create_field_row('Role', role_input));
|
|
204
|
+
fields_ctrl.add(this.create_field_row('Confidence', score_stack, score_value));
|
|
205
|
+
|
|
206
|
+
this.add(header_ctrl);
|
|
207
|
+
this.add(summary_ctrl);
|
|
208
|
+
this.add(fields_ctrl);
|
|
209
|
+
|
|
210
|
+
this.score_badge = score_badge;
|
|
211
|
+
this.summary_name = summary_name;
|
|
212
|
+
this.summary_meta = summary_meta;
|
|
213
|
+
this.first_name_input = first_name_input;
|
|
214
|
+
this.last_name_input = last_name_input;
|
|
215
|
+
this.role_input = role_input;
|
|
216
|
+
this.score_input = score_input;
|
|
217
|
+
this.progress_bar = progress_bar;
|
|
218
|
+
this.score_value = score_value;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
create_field_row(label_text, input_ctrl, meta_ctrl = null) {
|
|
222
|
+
const row_ctrl = new Control({
|
|
223
|
+
context: this.context,
|
|
224
|
+
tag_name: 'div'
|
|
225
|
+
});
|
|
226
|
+
row_ctrl.add_class('profile-field');
|
|
227
|
+
|
|
228
|
+
const label_ctrl = new Control({
|
|
229
|
+
context: this.context,
|
|
230
|
+
tag_name: 'label'
|
|
231
|
+
});
|
|
232
|
+
label_ctrl.add_class('profile-label');
|
|
233
|
+
label_ctrl.add(label_text);
|
|
234
|
+
|
|
235
|
+
row_ctrl.add(label_ctrl);
|
|
236
|
+
row_ctrl.add(input_ctrl);
|
|
237
|
+
if (meta_ctrl) {
|
|
238
|
+
row_ctrl.add(meta_ctrl);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return row_ctrl;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
setup_view_watchers() {
|
|
245
|
+
const view_model = this.view && this.view.data ? this.view.data.model : null;
|
|
246
|
+
if (!view_model) return;
|
|
247
|
+
|
|
248
|
+
this.watch(view_model, 'first_name', value => {
|
|
249
|
+
const normalized = normalize_model_value(value);
|
|
250
|
+
if (this.first_name_input) {
|
|
251
|
+
this.first_name_input.set_value(normalized || '');
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
this.watch(view_model, 'last_name', value => {
|
|
256
|
+
const normalized = normalize_model_value(value);
|
|
257
|
+
if (this.last_name_input) {
|
|
258
|
+
this.last_name_input.set_value(normalized || '');
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
this.watch(view_model, 'role', value => {
|
|
263
|
+
const normalized = normalize_model_value(value);
|
|
264
|
+
if (this.role_input) {
|
|
265
|
+
this.role_input.set_value(normalized || '');
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
this.watch(view_model, 'score', value => {
|
|
270
|
+
const normalized = normalize_score(normalize_model_value(value));
|
|
271
|
+
if (this.score_input) {
|
|
272
|
+
this.score_input.set_value(normalized);
|
|
273
|
+
}
|
|
274
|
+
if (this.progress_bar) {
|
|
275
|
+
this.progress_bar.set_value(normalized);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
this.watch(view_model, 'full_name', value => {
|
|
280
|
+
set_control_text(this.summary_name, normalize_model_value(value) || 'New profile');
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
this.watch(view_model, 'summary_line', value => {
|
|
284
|
+
set_control_text(this.summary_meta, normalize_model_value(value) || 'Role TBD - 0% confidence');
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
this.watch(view_model, 'score_label', value => {
|
|
288
|
+
set_control_text(this.score_value, normalize_model_value(value) || '0%');
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
this.watch(view_model, 'score_status', value => {
|
|
292
|
+
if (!this.score_badge) return;
|
|
293
|
+
const status = normalize_model_value(value) || 'info';
|
|
294
|
+
this.score_badge.set_status(status);
|
|
295
|
+
this.score_badge.set_text(score_status_label(status));
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
setup_model_bindings() {
|
|
300
|
+
const data_model = this.data && this.data.model;
|
|
301
|
+
const view_model = this.view && this.view.data ? this.view.data.model : null;
|
|
302
|
+
if (!data_model || !view_model) return;
|
|
303
|
+
|
|
304
|
+
const field_names = ['first_name', 'last_name', 'role', 'score'];
|
|
305
|
+
|
|
306
|
+
field_names.forEach(field_name => {
|
|
307
|
+
set_model_value(view_model, field_name, get_model_value(data_model, field_name));
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
data_model.on('change', e_change => {
|
|
311
|
+
if (!e_change || !field_names.includes(e_change.name)) return;
|
|
312
|
+
const raw_value = is_defined(e_change.raw_value)
|
|
313
|
+
? e_change.raw_value
|
|
314
|
+
: normalize_model_value(e_change.value);
|
|
315
|
+
set_model_value(view_model, e_change.name, raw_value);
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
this.computed(
|
|
319
|
+
view_model,
|
|
320
|
+
['first_name', 'last_name'],
|
|
321
|
+
(first, last) => {
|
|
322
|
+
const safe_first = first ? String(first).trim() : '';
|
|
323
|
+
const safe_last = last ? String(last).trim() : '';
|
|
324
|
+
const full_name = `${safe_first} ${safe_last}`.trim();
|
|
325
|
+
return full_name || 'New profile';
|
|
326
|
+
},
|
|
327
|
+
{ propertyName: 'full_name' }
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
this.computed(
|
|
331
|
+
view_model,
|
|
332
|
+
['score'],
|
|
333
|
+
score => `${Math.round(normalize_score(score))}%`,
|
|
334
|
+
{ propertyName: 'score_label' }
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
this.computed(
|
|
338
|
+
view_model,
|
|
339
|
+
['score'],
|
|
340
|
+
score => score_to_status(normalize_score(score)),
|
|
341
|
+
{ propertyName: 'score_status' }
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
this.computed(
|
|
345
|
+
view_model,
|
|
346
|
+
['full_name', 'role', 'score_label'],
|
|
347
|
+
(full_name, role, score_label) => {
|
|
348
|
+
const safe_name = full_name || 'New profile';
|
|
349
|
+
const safe_role = role ? String(role).trim() : 'Role TBD';
|
|
350
|
+
const safe_score = score_label || '0%';
|
|
351
|
+
return `${safe_name} - ${safe_role} - ${safe_score} confidence`;
|
|
352
|
+
},
|
|
353
|
+
{ propertyName: 'summary_line' }
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
activate() {
|
|
358
|
+
if (!this.__active) {
|
|
359
|
+
super.activate();
|
|
360
|
+
|
|
361
|
+
const data_model = this.data && this.data.model;
|
|
362
|
+
if (!data_model) return;
|
|
363
|
+
|
|
364
|
+
if (this.first_name_input) {
|
|
365
|
+
this.first_name_input.on('input', () => {
|
|
366
|
+
set_model_value(data_model, 'first_name', this.first_name_input.get_value() || '');
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if (this.last_name_input) {
|
|
371
|
+
this.last_name_input.on('input', () => {
|
|
372
|
+
set_model_value(data_model, 'last_name', this.last_name_input.get_value() || '');
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (this.role_input) {
|
|
377
|
+
this.role_input.on('input', () => {
|
|
378
|
+
set_model_value(data_model, 'role', this.role_input.get_value() || '');
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (this.score_input) {
|
|
383
|
+
this.score_input.on('input', () => {
|
|
384
|
+
const normalized = normalize_score(this.score_input.get_value());
|
|
385
|
+
set_model_value(data_model, 'score', normalized);
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
class Demo_UI extends Active_HTML_Document {
|
|
393
|
+
constructor(spec = {}) {
|
|
394
|
+
spec.__type_name = spec.__type_name || 'demo_ui';
|
|
395
|
+
super(spec);
|
|
396
|
+
const { context } = this;
|
|
397
|
+
|
|
398
|
+
if (typeof this.body.add_class === 'function') {
|
|
399
|
+
this.body.add_class('demo-ui');
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
const compose_ui = () => {
|
|
403
|
+
const window_ctrl = new Window({
|
|
404
|
+
context,
|
|
405
|
+
title: 'jsgui3-html MVVM Binding',
|
|
406
|
+
pos: [20, 20]
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
window_ctrl.size = [620, 460];
|
|
410
|
+
|
|
411
|
+
const profile_panel = new Profile_Panel({
|
|
412
|
+
context
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
window_ctrl.inner.add(profile_panel);
|
|
416
|
+
this.body.add(window_ctrl);
|
|
417
|
+
|
|
418
|
+
this.profile_panel = profile_panel;
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
if (!spec.el) {
|
|
422
|
+
compose_ui();
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
Demo_UI.css = `
|
|
428
|
+
* {
|
|
429
|
+
margin: 0;
|
|
430
|
+
padding: 0;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
body {
|
|
434
|
+
overflow-x: hidden;
|
|
435
|
+
overflow-y: hidden;
|
|
436
|
+
background-color: #e0e0e0;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.demo-ui .window .inner {
|
|
440
|
+
padding: 16px;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.profile-panel {
|
|
444
|
+
display: flex;
|
|
445
|
+
flex-direction: column;
|
|
446
|
+
gap: 14px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.profile-header {
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: center;
|
|
452
|
+
justify-content: space-between;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.profile-title {
|
|
456
|
+
font-weight: 600;
|
|
457
|
+
font-size: 1.1em;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.profile-summary {
|
|
461
|
+
background: #f7f7f7;
|
|
462
|
+
border-radius: 6px;
|
|
463
|
+
padding: 10px 12px;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.profile-name {
|
|
467
|
+
font-size: 1.2em;
|
|
468
|
+
font-weight: 600;
|
|
469
|
+
margin-bottom: 4px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.profile-meta {
|
|
473
|
+
color: #555;
|
|
474
|
+
font-size: 0.9em;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.profile-fields {
|
|
478
|
+
display: flex;
|
|
479
|
+
flex-direction: column;
|
|
480
|
+
gap: 12px;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.profile-field {
|
|
484
|
+
display: grid;
|
|
485
|
+
grid-template-columns: 140px 1fr auto;
|
|
486
|
+
gap: 12px;
|
|
487
|
+
align-items: center;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.profile-label {
|
|
491
|
+
font-weight: 600;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.profile-input {
|
|
495
|
+
width: 100%;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.profile-score-stack {
|
|
499
|
+
display: flex;
|
|
500
|
+
flex-direction: column;
|
|
501
|
+
gap: 6px;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.profile-score {
|
|
505
|
+
min-width: 64px;
|
|
506
|
+
text-align: right;
|
|
507
|
+
font-weight: 600;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.profile-progress {
|
|
511
|
+
width: 100%;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@media (max-width: 720px) {
|
|
515
|
+
.demo-ui .window .inner {
|
|
516
|
+
padding: 12px;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.profile-field {
|
|
520
|
+
grid-template-columns: 1fr;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.profile-score {
|
|
524
|
+
text-align: left;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
`;
|
|
528
|
+
|
|
529
|
+
controls.Demo_UI = Demo_UI;
|
|
530
|
+
module.exports = jsgui;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const jsgui = require('./client');
|
|
2
|
+
|
|
3
|
+
const { Demo_UI } = jsgui.controls;
|
|
4
|
+
const Server = require('../../../server');
|
|
5
|
+
|
|
6
|
+
if (require.main === module) {
|
|
7
|
+
const server = new Server({
|
|
8
|
+
Ctrl: Demo_UI,
|
|
9
|
+
src_path_client_js: require.resolve('./client.js')
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
server.one('ready', () => {
|
|
13
|
+
server.start(52000, err => {
|
|
14
|
+
if (err) {
|
|
15
|
+
throw err;
|
|
16
|
+
}
|
|
17
|
+
console.log('server started');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"esbuild": "^0.27.1",
|
|
11
11
|
"fnl": "^0.0.37",
|
|
12
12
|
"fnlfs": "^0.0.34",
|
|
13
|
-
"jsgui3-client": "^0.0.
|
|
14
|
-
"jsgui3-html": "^0.0.
|
|
13
|
+
"jsgui3-client": "^0.0.126",
|
|
14
|
+
"jsgui3-html": "^0.0.177",
|
|
15
15
|
"jsgui3-webpage": "^0.0.8",
|
|
16
16
|
"jsgui3-website": "^0.0.8",
|
|
17
17
|
"lang-tools": "^0.0.44",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"type": "git",
|
|
44
44
|
"url": "https://github.com/metabench/jsgui3-server.git"
|
|
45
45
|
},
|
|
46
|
-
"version": "0.0.
|
|
46
|
+
"version": "0.0.146",
|
|
47
47
|
"scripts": {
|
|
48
48
|
"cli": "node cli.js",
|
|
49
49
|
"serve": "node cli.js serve",
|