jsgui3-server 0.0.143 → 0.0.145
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/comprehensive-documentation.md +25 -6
- package/docs/configuration-reference.md +46 -11
- package/docs/controls-development.md +54 -26
- package/docs/jsgui3-html-improvement-ideas.md +162 -0
- package/docs/jsgui3-html-improvement-ideas.svg +151 -0
- package/docs/troubleshooting.md +9 -8
- package/examples/controls/14d) window, canvas globe/EarthGlobeRenderer.js +19 -14
- package/examples/controls/14d) window, canvas globe/pipeline/TransformStage.js +5 -5
- package/examples/jsgui3-html/01) mvvm-counter/client.js +648 -0
- package/examples/jsgui3-html/01) mvvm-counter/server.js +21 -0
- package/examples/jsgui3-html/02) date-transform/client.js +764 -0
- package/examples/jsgui3-html/02) date-transform/server.js +21 -0
- package/examples/jsgui3-html/03) form-validation/client.js +1045 -0
- package/examples/jsgui3-html/03) form-validation/server.js +21 -0
- package/examples/jsgui3-html/04) data-grid/client.js +738 -0
- package/examples/jsgui3-html/04) data-grid/server.js +21 -0
- package/examples/jsgui3-html/05) master-detail/client.js +649 -0
- package/examples/jsgui3-html/05) master-detail/server.js +21 -0
- package/examples/jsgui3-html/06) theming/client.js +514 -0
- package/examples/jsgui3-html/06) theming/server.js +21 -0
- package/examples/jsgui3-html/07) mixins/client.js +465 -0
- package/examples/jsgui3-html/07) mixins/server.js +21 -0
- package/examples/jsgui3-html/08) router/client.js +372 -0
- package/examples/jsgui3-html/08) router/server.js +21 -0
- package/examples/jsgui3-html/09) resource-transform/client.js +692 -0
- package/examples/jsgui3-html/09) resource-transform/server.js +21 -0
- package/examples/jsgui3-html/10) binding-debugger/client.js +810 -0
- package/examples/jsgui3-html/10) binding-debugger/server.js +21 -0
- package/examples/jsgui3-html/README.md +48 -0
- package/http/responders/static/Static_Route_HTTP_Responder.js +25 -20
- package/lab/README.md +19 -0
- package/lab/experiments/window_examples_dom_audit.js +241 -0
- package/lab/results/window_examples_dom_audit.json +131 -0
- package/lab/results/window_examples_dom_audit.md +46 -0
- package/package.json +8 -3
- package/publishers/http-webpageorsite-publisher.js +8 -4
- package/resources/processors/bundlers/css-bundler.js +28 -173
- package/resources/processors/bundlers/js/esbuild/Advanced_JS_Bundler_Using_ESBuild.js +32 -20
- package/resources/processors/bundlers/style-bundler.js +288 -0
- package/resources/processors/compilers/SASS_Compiler.js +88 -0
- package/resources/processors/extractors/js/css_and_js/AST_Node/CSS_And_JS_From_JS_String_Using_AST_Node_Extractor.js +64 -68
- package/resources/website-css-resource.js +24 -20
- package/resources/website-javascript-resource-processor.js +17 -57
- package/resources/website-javascript-resource.js +17 -57
- package/serve-factory.js +38 -24
- package/server.js +116 -92
- package/tests/README.md +38 -3
- package/tests/bundlers.test.js +41 -32
- package/tests/content-analysis.test.js +19 -18
- package/tests/end-to-end.test.js +336 -365
- package/tests/error-handling.test.js +13 -11
- package/tests/examples-controls.e2e.test.js +13 -1
- package/tests/fixtures/end-to-end-client.js +54 -0
- package/tests/fixtures/jsgui3-html/binding_debugger_expectations.json +15 -0
- package/tests/fixtures/jsgui3-html/counter_expectations.json +31 -0
- package/tests/fixtures/jsgui3-html/data_grid_expectations.json +26 -0
- package/tests/fixtures/jsgui3-html/date_transform_expectations.json +26 -0
- package/tests/fixtures/jsgui3-html/form_validation_expectations.json +27 -0
- package/tests/fixtures/jsgui3-html/master_detail_expectations.json +15 -0
- package/tests/fixtures/jsgui3-html/mixins_expectations.json +10 -0
- package/tests/fixtures/jsgui3-html/resource_transform_expectations.json +11 -0
- package/tests/fixtures/jsgui3-html/router_expectations.json +10 -0
- package/tests/fixtures/jsgui3-html/theming_expectations.json +10 -0
- package/tests/jsgui3-html-examples.puppeteer.test.js +537 -0
- package/tests/sass-controls.e2e.test.js +327 -0
- package/tests/test-runner.js +4 -1
- package/tests/window-examples.puppeteer.test.js +455 -0
|
@@ -284,11 +284,30 @@ body {
|
|
|
284
284
|
}
|
|
285
285
|
`;
|
|
286
286
|
|
|
287
|
-
controls.MyControl = MyControl;
|
|
288
|
-
module.exports = jsgui;
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
|
|
287
|
+
controls.MyControl = MyControl;
|
|
288
|
+
module.exports = jsgui;
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
SCSS/SASS: You can also set `MyControl.scss` or `MyControl.sass` using template literals. These are compiled to CSS during bundling and removed from the JS output, just like `.css`. CSS and SCSS blocks can be mixed in a control; the bundler preserves their order during compilation. If you mix indented `.sass` with `.scss`/`.css`, each block is compiled independently to preserve order. Inline CSS sourcemaps are emitted only when a single compilation pass is used; mixed syntax skips inline maps to keep them accurate.
|
|
292
|
+
|
|
293
|
+
To enable inline CSS sourcemaps for Sass/SCSS outputs, pass a `style` configuration:
|
|
294
|
+
|
|
295
|
+
```javascript
|
|
296
|
+
Server.serve({
|
|
297
|
+
ctrl: MyControl,
|
|
298
|
+
src_path_client_js: require.resolve('./client.js'),
|
|
299
|
+
debug: true,
|
|
300
|
+
style: {
|
|
301
|
+
sourcemaps: {
|
|
302
|
+
enabled: true,
|
|
303
|
+
inline: true,
|
|
304
|
+
include_sources: true
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
2. Create server:
|
|
292
311
|
|
|
293
312
|
```javascript
|
|
294
313
|
// server.js
|
|
@@ -1400,4 +1419,4 @@ MIT License - see LICENSE file for details.
|
|
|
1400
1419
|
---
|
|
1401
1420
|
|
|
1402
1421
|
This documentation provides a comprehensive overview of JSGUI3 Server. For more detailed information about specific components, see the individual files in the `docs/` directory and the examples in `examples/`.</content>
|
|
1403
|
-
<parameter name="filePath">c:\\Users\\james\\Documents\\repos\\jsgui3-server\\docs\\comprehensive-documentation.md
|
|
1422
|
+
<parameter name="filePath">c:\\Users\\james\\Documents\\repos\\jsgui3-server\\docs\\comprehensive-documentation.md
|
|
@@ -198,16 +198,51 @@ Configuration values are resolved in this order (later sources override earlier
|
|
|
198
198
|
});
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
#### `config`
|
|
202
|
-
- **Type:** `string`
|
|
203
|
-
- **Description:** Path to configuration file
|
|
204
|
-
- **Default:** `'jsgui.config.js'` (if exists)
|
|
205
|
-
- **Example:**
|
|
206
|
-
```javascript
|
|
207
|
-
Server.serve({
|
|
208
|
-
config: './my-config.js'
|
|
209
|
-
});
|
|
210
|
-
```
|
|
201
|
+
#### `config`
|
|
202
|
+
- **Type:** `string`
|
|
203
|
+
- **Description:** Path to configuration file
|
|
204
|
+
- **Default:** `'jsgui.config.js'` (if exists)
|
|
205
|
+
- **Example:**
|
|
206
|
+
```javascript
|
|
207
|
+
Server.serve({
|
|
208
|
+
config: './my-config.js'
|
|
209
|
+
});
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### `style`
|
|
213
|
+
- **Type:** `object`
|
|
214
|
+
- **Description:** Style pipeline options for CSS/SCSS/Sass extraction and compilation.
|
|
215
|
+
- **Default:** `{}` (inherits debug behavior for sourcemaps)
|
|
216
|
+
- **Example:**
|
|
217
|
+
```javascript
|
|
218
|
+
Server.serve({
|
|
219
|
+
ctrl: MyControl,
|
|
220
|
+
debug: true,
|
|
221
|
+
style: {
|
|
222
|
+
sourcemaps: {
|
|
223
|
+
enabled: true,
|
|
224
|
+
inline: true,
|
|
225
|
+
include_sources: true
|
|
226
|
+
},
|
|
227
|
+
load_paths: ['styles', 'controls'],
|
|
228
|
+
output_style: 'expanded',
|
|
229
|
+
quiet_dependencies: true,
|
|
230
|
+
compile_css_with_sass: true
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Style options:**
|
|
236
|
+
- `sourcemaps.enabled` (`boolean`): Enable CSS sourcemaps. Defaults to `true` when `debug` is enabled.
|
|
237
|
+
- `sourcemaps.inline` (`boolean`): Inline sourcemaps into compiled CSS (default `true`).
|
|
238
|
+
- `sourcemaps.include_sources` (`boolean`): Embed sources content in the sourcemap (default `true`).
|
|
239
|
+
- `load_paths` (`string[]`): Sass load paths for `@use`/`@import`.
|
|
240
|
+
- `output_style` (`string`): Sass output style (e.g., `expanded`, `compressed`).
|
|
241
|
+
- `quiet_dependencies` (`boolean`): Suppress dependency warnings during Sass compilation.
|
|
242
|
+
- `compile_css_with_sass` (`boolean`): Compile `.css` blocks through Sass when mixing with SCSS (default `true`).
|
|
243
|
+
- `scss_sources` / `sass_sources` (`string[]`): Extra Sass/SCSS sources appended during compilation.
|
|
244
|
+
|
|
245
|
+
Inline CSS sourcemaps are emitted only when a single compilation pass is possible. Mixed `.sass` plus `.scss`/`.css` inputs skip inline maps to avoid inaccurate mappings.
|
|
211
246
|
|
|
212
247
|
## Environment Variables
|
|
213
248
|
|
|
@@ -805,4 +840,4 @@ Solution: port: 3000 instead of port: "3000"
|
|
|
805
840
|
|
|
806
841
|
---
|
|
807
842
|
|
|
808
|
-
This configuration reference provides comprehensive coverage of all JSGUI3 Server configuration options. Remember that most options have sensible defaults, so you only need to specify what differs from the defaults for your use case.
|
|
843
|
+
This configuration reference provides comprehensive coverage of all JSGUI3 Server configuration options. Remember that most options have sensible defaults, so you only need to specify what differs from the defaults for your use case.
|
|
@@ -74,23 +74,44 @@ class My_Custom_Control extends Active_HTML_Document {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// Static CSS definition
|
|
77
|
-
My_Custom_Control.css = `
|
|
78
|
-
* { margin: 0; padding: 0; }
|
|
79
|
-
body {
|
|
80
|
-
overflow-x: hidden;
|
|
77
|
+
My_Custom_Control.css = `
|
|
78
|
+
* { margin: 0; padding: 0; }
|
|
79
|
+
body {
|
|
80
|
+
overflow-x: hidden;
|
|
81
81
|
overflow-y: hidden;
|
|
82
82
|
background-color: #E0E0E0;
|
|
83
83
|
}
|
|
84
84
|
.my-custom-control {
|
|
85
85
|
padding: 20px;
|
|
86
86
|
background: #f0f0f0;
|
|
87
|
-
}
|
|
88
|
-
`;
|
|
89
|
-
|
|
90
|
-
// Register control globally
|
|
91
|
-
controls.My_Custom_Control = My_Custom_Control;
|
|
92
|
-
module.exports = jsgui;
|
|
93
|
-
```
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
// Register control globally
|
|
91
|
+
controls.My_Custom_Control = My_Custom_Control;
|
|
92
|
+
module.exports = jsgui;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Note: You can also define `My_Custom_Control.scss` or `My_Custom_Control.sass` using template literals. These are compiled to CSS during bundling and removed from the JS output, just like `.css`. CSS and SCSS blocks can be mixed in a control; the bundler preserves their order during compilation. If you mix indented `.sass` with `.scss`/`.css`, each block is compiled independently to preserve order. Inline CSS sourcemaps are emitted only when a single compilation pass is used; mixed syntax skips inline maps to keep them accurate.
|
|
96
|
+
|
|
97
|
+
To enable inline CSS sourcemaps for Sass/SCSS outputs, pass a `style` configuration when serving:
|
|
98
|
+
|
|
99
|
+
```javascript
|
|
100
|
+
Server.serve({
|
|
101
|
+
ctrl: My_Custom_Control,
|
|
102
|
+
src_path_client_js: require.resolve('./client.js'),
|
|
103
|
+
debug: true,
|
|
104
|
+
style: {
|
|
105
|
+
sourcemaps: {
|
|
106
|
+
enabled: true,
|
|
107
|
+
inline: true,
|
|
108
|
+
include_sources: true
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
E2E coverage for Sass/CSS controls (including sourcemaps) lives in `tests/sass-controls.e2e.test.js`.
|
|
94
115
|
|
|
95
116
|
#### Control (Base)
|
|
96
117
|
|
|
@@ -114,20 +135,27 @@ module.exports = jsgui;
|
|
|
114
135
|
- Child control containment
|
|
115
136
|
- Positioning and sizing
|
|
116
137
|
|
|
117
|
-
```javascript
|
|
118
|
-
const window = new controls.Window({
|
|
119
|
-
context,
|
|
120
|
-
title: 'My Window',
|
|
121
|
-
pos: [100, 100], // [x, y] position
|
|
122
|
-
size: [400, 300] // [width, height]
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
// Add content to window
|
|
126
|
-
window.inner.add(childControl);
|
|
127
|
-
this.body.add(window);
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
|
|
138
|
+
```javascript
|
|
139
|
+
const window = new controls.Window({
|
|
140
|
+
context,
|
|
141
|
+
title: 'My Window',
|
|
142
|
+
pos: [100, 100], // [x, y] position
|
|
143
|
+
size: [400, 300] // [width, height]
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// Add content to window
|
|
147
|
+
window.inner.add(childControl);
|
|
148
|
+
this.body.add(window);
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Lab results (from `lab/results/window_examples_dom_audit.md`, generated 2025-12-19):
|
|
152
|
+
|
|
153
|
+
- Window example renders one window, a title bar, and three control buttons.
|
|
154
|
+
- Tabbed panel example renders two tabs with a default checked input.
|
|
155
|
+
- Checkbox example renders one checkbox input with the expected label.
|
|
156
|
+
- Date picker example renders a native date input on the server.
|
|
157
|
+
|
|
158
|
+
#### Panel
|
|
131
159
|
|
|
132
160
|
**Purpose:** Basic container for grouping controls.
|
|
133
161
|
|
|
@@ -983,4 +1011,4 @@ Use browser developer tools to:
|
|
|
983
1011
|
|
|
984
1012
|
---
|
|
985
1013
|
|
|
986
|
-
This guide provides the foundation for developing controls in JSGUI3. For specific control implementations, refer to the examples in the `examples/` directory and the base classes in `controls/`.
|
|
1014
|
+
This guide provides the foundation for developing controls in JSGUI3. For specific control implementations, refer to the examples in the `examples/` directory and the base classes in `controls/`.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# JSGUI3-HTML Improvement Ideas
|
|
2
|
+
|
|
3
|
+
This document outlines improvement opportunities for `jsgui3-html` controls based on inspecting the current control catalog under `node_modules/jsgui3-html/controls`.
|
|
4
|
+
|
|
5
|
+
## Control Inventory Snapshot (Observed)
|
|
6
|
+
|
|
7
|
+
Source: `node_modules/jsgui3-html/controls/controls.js` and `controls/organised/*`.
|
|
8
|
+
|
|
9
|
+
### Core (0-core)
|
|
10
|
+
|
|
11
|
+
- 0-basic / 0-native-compositional
|
|
12
|
+
- button, checkbox, date-picker, dropdown-list, file-upload, icon, radio-button, Select_Options, Text_Input
|
|
13
|
+
- 0-basic / 1-compositional
|
|
14
|
+
- calendar, combo-box, context-menu, color-grid, color-palette, grid, list, scroll-view, scrollbar
|
|
15
|
+
- item, item-selector, menu-node, month-view, text-item, Text_Field
|
|
16
|
+
- toggle-button, plus-minus-toggle-button, radio-button-group, timespan-selector
|
|
17
|
+
- status indicators: Indicator, Status_Indicator, Validation_Status_Indicator
|
|
18
|
+
- 0-core / 1-advanced
|
|
19
|
+
- Canvas, login, popup-menu-button, string-span
|
|
20
|
+
|
|
21
|
+
### Standard (1-standard)
|
|
22
|
+
|
|
23
|
+
- 0-viewer
|
|
24
|
+
- array, object, object-kvp, number, string
|
|
25
|
+
- 1-editor
|
|
26
|
+
- form_field / FormField, PropertyEditor / property_editor, Rich_Text_Editor
|
|
27
|
+
- array/object/number/string editors
|
|
28
|
+
- 2-misc
|
|
29
|
+
- left-right-arrows-selector, up-down-arrow-buttons
|
|
30
|
+
- 3-page
|
|
31
|
+
- standard-web-page, message-web-page
|
|
32
|
+
- 4-data
|
|
33
|
+
- data-item, data-row, data-filter
|
|
34
|
+
- 5-ui
|
|
35
|
+
- tree, tree-node, file-tree, file-tree-node
|
|
36
|
+
- toolbar, toolbox, horizontal-menu, horizontal-slider
|
|
37
|
+
- line-chart, search-bar, audio-volume, media-scrubber
|
|
38
|
+
- 6-layout
|
|
39
|
+
- panel, titled-panel, title-bar, window, modal
|
|
40
|
+
- tabbed-panel, tile-slide, vertical-expander, single-line
|
|
41
|
+
- app/multi-layout-mode
|
|
42
|
+
|
|
43
|
+
### Showcase (2-showcase)
|
|
44
|
+
|
|
45
|
+
- icon-library
|
|
46
|
+
|
|
47
|
+
### Notes / Legacy
|
|
48
|
+
|
|
49
|
+
- `controls/connected/data-grid.js` exists but is commented out in `controls.js`.
|
|
50
|
+
- `controls/old/*` contains historical controls (item, item-view).
|
|
51
|
+
- `controls/swaps/notes.md` references progressive enhancement and swapping native controls.
|
|
52
|
+
- Naming duplication: `FormField.js` vs `form_field.js`, `PropertyEditor.js` vs `property_editor.js`.
|
|
53
|
+
|
|
54
|
+
## Improvement Themes
|
|
55
|
+
|
|
56
|
+
### 1) Add Missing Core Controls
|
|
57
|
+
|
|
58
|
+
These should be small, reliable building blocks with strong HTML parity and predictable activation.
|
|
59
|
+
|
|
60
|
+
- Textarea
|
|
61
|
+
- Password, email, url, tel inputs
|
|
62
|
+
- Number input with stepper (native + stylized)
|
|
63
|
+
- Range slider (native) + stepped slider
|
|
64
|
+
- Progress bar, meter
|
|
65
|
+
- Switch/toggle (native checkbox + styled)
|
|
66
|
+
- Chip/tag input
|
|
67
|
+
- Inline validation message control
|
|
68
|
+
- Breadcrumbs, pagination
|
|
69
|
+
- Tooltip/popover
|
|
70
|
+
- Notification/toast, alert banner
|
|
71
|
+
- Badge/pill
|
|
72
|
+
|
|
73
|
+
### 2) Data & Collection Controls
|
|
74
|
+
|
|
75
|
+
The existing data controls are minimal; add richer, reusable data views.
|
|
76
|
+
|
|
77
|
+
- Data table with sorting, filtering, pagination
|
|
78
|
+
- Virtualized list/grid for large datasets
|
|
79
|
+
- Tree-table hybrid (folders with columns)
|
|
80
|
+
- List reordering (drag-and-drop)
|
|
81
|
+
- Master/detail split view
|
|
82
|
+
- Data grid should reconnect to `controls/connected/data-grid.js` with a modern API
|
|
83
|
+
|
|
84
|
+
### 3) Layout + Navigation Expansion
|
|
85
|
+
|
|
86
|
+
The layout set is strong but missing higher-level patterns.
|
|
87
|
+
|
|
88
|
+
- Split pane / resizable panes
|
|
89
|
+
- Accordion / collapsible sections
|
|
90
|
+
- Sidebar + responsive drawer
|
|
91
|
+
- Tab variants (vertical, icon tabs, overflow)
|
|
92
|
+
- Stepper / wizard layout
|
|
93
|
+
- Layout primitives: stack, cluster, center, grid-with-gap
|
|
94
|
+
|
|
95
|
+
### 4) Form & Editor Features
|
|
96
|
+
|
|
97
|
+
Existing editors need feature depth, validation, and accessibility.
|
|
98
|
+
|
|
99
|
+
- Form container with built-in validation routing
|
|
100
|
+
- Field-level error display + status badges
|
|
101
|
+
- Input masking (date, currency, phone)
|
|
102
|
+
- Autosize text field / textarea
|
|
103
|
+
- Rich text editor improvements: toolbar, markdown, paste sanitization
|
|
104
|
+
- Object editor: expand/collapse, add/remove key-values, schema-driven rendering
|
|
105
|
+
|
|
106
|
+
### 5) Feature Depth for Existing Controls
|
|
107
|
+
|
|
108
|
+
Concrete enhancements based on a quick control scan:
|
|
109
|
+
|
|
110
|
+
- Checkbox: fix `el_radio` typo in change handler, add `checked` sync, keyboard focus state
|
|
111
|
+
- Date picker: add min/max, locale formatting, keyboard navigation, week start configuration
|
|
112
|
+
- Dropdown/list/combobox: async options, filtering, typeahead, ARIA roles
|
|
113
|
+
- Window/panel: snap, dock, maximize, z-index management, resize handles
|
|
114
|
+
- Tree/file tree: lazy loading, multi-select, drag reparent, keyboard navigation
|
|
115
|
+
- Scrollbar/scroll-view: horizontal + vertical sync, scroll inertia
|
|
116
|
+
|
|
117
|
+
### 6) Accessibility + Semantics
|
|
118
|
+
|
|
119
|
+
- Standardize ARIA roles, labels, and keyboard handling
|
|
120
|
+
- Focus ring consistency and tab order control
|
|
121
|
+
- High contrast mode + reduced motion theme
|
|
122
|
+
- Screen reader text for icon-only buttons
|
|
123
|
+
|
|
124
|
+
### 7) Theming + Styling System
|
|
125
|
+
|
|
126
|
+
- Token-driven theme layer (color, spacing, radius, typography)
|
|
127
|
+
- Control style overrides via theme context
|
|
128
|
+
- Light/dark/system themes with CSS variables
|
|
129
|
+
- CSS layering: base, component, utility
|
|
130
|
+
- Improve `swaps` approach for progressive enhancement of native elements
|
|
131
|
+
|
|
132
|
+
### 8) Consistency + Packaging
|
|
133
|
+
|
|
134
|
+
- Normalize naming and case conventions in control filenames
|
|
135
|
+
- Reduce duplicate editor components (FormField vs form_field)
|
|
136
|
+
- Clarify which controls are core vs showcase
|
|
137
|
+
- Provide explicit exports for stable public API
|
|
138
|
+
|
|
139
|
+
## Suggested Roadmap
|
|
140
|
+
|
|
141
|
+
### Phase 1: Core and Reliability
|
|
142
|
+
|
|
143
|
+
- Add missing native inputs (textarea, number, range)
|
|
144
|
+
- Fix known control bugs (checkbox `el_radio` reference)
|
|
145
|
+
- Normalize control naming duplication
|
|
146
|
+
- Basic accessibility pass across core controls
|
|
147
|
+
|
|
148
|
+
### Phase 2: Data + Forms
|
|
149
|
+
|
|
150
|
+
- Data table + virtualized list
|
|
151
|
+
- Form container + validation hooks
|
|
152
|
+
- Object editor improvements
|
|
153
|
+
|
|
154
|
+
### Phase 3: Layout + UX Features
|
|
155
|
+
|
|
156
|
+
- Split panes, accordion, responsive drawer
|
|
157
|
+
- Enhanced window management
|
|
158
|
+
- Theme system and style tokens
|
|
159
|
+
|
|
160
|
+
## Visual Summary
|
|
161
|
+
|
|
162
|
+
See `docs/jsgui3-html-improvement-ideas.svg` for an Industrial Luxury Obsidian themed diagram of these ideas.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img" aria-label="JSGUI3-HTML improvement ideas diagram">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg_grad" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0%" stop-color="#0a0b0e" />
|
|
5
|
+
<stop offset="45%" stop-color="#101419" />
|
|
6
|
+
<stop offset="100%" stop-color="#141a20" />
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<radialGradient id="highlight_grad" cx="70%" cy="20%" r="60%">
|
|
9
|
+
<stop offset="0%" stop-color="#2a2f36" stop-opacity="0.7" />
|
|
10
|
+
<stop offset="70%" stop-color="#0a0b0e" stop-opacity="0" />
|
|
11
|
+
</radialGradient>
|
|
12
|
+
<linearGradient id="gold_grad" x1="0" y1="0" x2="1" y2="0">
|
|
13
|
+
<stop offset="0%" stop-color="#8f7a3c" />
|
|
14
|
+
<stop offset="50%" stop-color="#d2b86a" />
|
|
15
|
+
<stop offset="100%" stop-color="#8f7a3c" />
|
|
16
|
+
</linearGradient>
|
|
17
|
+
<linearGradient id="steel_grad" x1="0" y1="0" x2="0" y2="1">
|
|
18
|
+
<stop offset="0%" stop-color="#1b2127" />
|
|
19
|
+
<stop offset="100%" stop-color="#11151a" />
|
|
20
|
+
</linearGradient>
|
|
21
|
+
<pattern id="grid_pattern" width="40" height="40" patternUnits="userSpaceOnUse">
|
|
22
|
+
<path d="M 40 0 L 0 0 0 40" fill="none" stroke="#1a2026" stroke-width="1" />
|
|
23
|
+
</pattern>
|
|
24
|
+
<filter id="soft_glow" x="-50%" y="-50%" width="200%" height="200%">
|
|
25
|
+
<feDropShadow dx="0" dy="0" stdDeviation="6" flood-color="#c9b26b" flood-opacity="0.4" />
|
|
26
|
+
</filter>
|
|
27
|
+
<filter id="panel_shadow" x="-50%" y="-50%" width="200%" height="200%">
|
|
28
|
+
<feDropShadow dx="0" dy="4" stdDeviation="10" flood-color="#000000" flood-opacity="0.6" />
|
|
29
|
+
</filter>
|
|
30
|
+
</defs>
|
|
31
|
+
|
|
32
|
+
<rect width="1600" height="1000" fill="url(#bg_grad)" />
|
|
33
|
+
<rect width="1600" height="1000" fill="url(#grid_pattern)" opacity="0.35" />
|
|
34
|
+
<rect width="1600" height="1000" fill="url(#highlight_grad)" />
|
|
35
|
+
|
|
36
|
+
<!-- Obsidian shards -->
|
|
37
|
+
<polygon points="120,80 360,40 420,140 180,210" fill="#0e1217" opacity="0.9" />
|
|
38
|
+
<polygon points="1320,90 1540,60 1580,200 1360,240" fill="#0e1217" opacity="0.85" />
|
|
39
|
+
<polygon points="420,820 640,760 720,900 480,950" fill="#0d1116" opacity="0.9" />
|
|
40
|
+
<polygon points="1080,760 1360,700 1460,860 1160,930" fill="#0d1116" opacity="0.85" />
|
|
41
|
+
|
|
42
|
+
<!-- Decorative gold rails -->
|
|
43
|
+
<path d="M 80 120 L 1520 120" stroke="url(#gold_grad)" stroke-width="2" opacity="0.7" />
|
|
44
|
+
<path d="M 80 900 L 1520 900" stroke="url(#gold_grad)" stroke-width="2" opacity="0.6" />
|
|
45
|
+
<path d="M 140 150 L 140 870" stroke="#3a3220" stroke-width="1" opacity="0.5" />
|
|
46
|
+
<path d="M 1460 150 L 1460 870" stroke="#3a3220" stroke-width="1" opacity="0.5" />
|
|
47
|
+
|
|
48
|
+
<!-- Title -->
|
|
49
|
+
<text x="120" y="95" fill="#e5d6a2" font-size="36" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="2">
|
|
50
|
+
JSGUI3-HTML IMPROVEMENT MAP
|
|
51
|
+
</text>
|
|
52
|
+
<text x="120" y="125" fill="#9aa1a8" font-size="16" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
53
|
+
Industrial Luxury Obsidian theme | Control Expansion + Feature Depth
|
|
54
|
+
</text>
|
|
55
|
+
|
|
56
|
+
<!-- Central crest -->
|
|
57
|
+
<circle cx="800" cy="500" r="120" fill="url(#steel_grad)" stroke="url(#gold_grad)" stroke-width="3" filter="url(#soft_glow)" />
|
|
58
|
+
<circle cx="800" cy="500" r="90" fill="#0f141a" stroke="#2c3138" stroke-width="2" />
|
|
59
|
+
<text x="800" y="485" fill="#e5d6a2" font-size="22" font-family="Trebuchet MS, Arial, sans-serif" text-anchor="middle">
|
|
60
|
+
CONTROL SYSTEMS
|
|
61
|
+
</text>
|
|
62
|
+
<text x="800" y="515" fill="#9aa1a8" font-size="14" font-family="Trebuchet MS, Arial, sans-serif" text-anchor="middle">
|
|
63
|
+
themes | behavior | data
|
|
64
|
+
</text>
|
|
65
|
+
|
|
66
|
+
<!-- Panels -->
|
|
67
|
+
<g filter="url(#panel_shadow)">
|
|
68
|
+
<rect x="120" y="180" width="560" height="220" rx="18" fill="#11161c" stroke="#2c333b" stroke-width="2" />
|
|
69
|
+
<rect x="920" y="180" width="560" height="220" rx="18" fill="#11161c" stroke="#2c333b" stroke-width="2" />
|
|
70
|
+
<rect x="120" y="430" width="560" height="220" rx="18" fill="#11161c" stroke="#2c333b" stroke-width="2" />
|
|
71
|
+
<rect x="920" y="430" width="560" height="220" rx="18" fill="#11161c" stroke="#2c333b" stroke-width="2" />
|
|
72
|
+
<rect x="120" y="680" width="560" height="200" rx="18" fill="#11161c" stroke="#2c333b" stroke-width="2" />
|
|
73
|
+
<rect x="920" y="680" width="560" height="200" rx="18" fill="#11161c" stroke="#2c333b" stroke-width="2" />
|
|
74
|
+
</g>
|
|
75
|
+
|
|
76
|
+
<!-- Panel headings -->
|
|
77
|
+
<text x="160" y="220" fill="#e5d6a2" font-size="20" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
78
|
+
CORE CONTROL EXPANSION
|
|
79
|
+
</text>
|
|
80
|
+
<text x="960" y="220" fill="#e5d6a2" font-size="20" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
81
|
+
FORM AND EDITOR DEPTH
|
|
82
|
+
</text>
|
|
83
|
+
<text x="160" y="470" fill="#e5d6a2" font-size="20" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
84
|
+
DATA AND COLLECTION
|
|
85
|
+
</text>
|
|
86
|
+
<text x="960" y="470" fill="#e5d6a2" font-size="20" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
87
|
+
LAYOUT AND NAVIGATION
|
|
88
|
+
</text>
|
|
89
|
+
<text x="160" y="720" fill="#e5d6a2" font-size="20" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
90
|
+
ACCESSIBILITY AND THEME
|
|
91
|
+
</text>
|
|
92
|
+
<text x="960" y="720" fill="#e5d6a2" font-size="20" font-family="Trebuchet MS, Arial, sans-serif" letter-spacing="1">
|
|
93
|
+
INFRA AND DX
|
|
94
|
+
</text>
|
|
95
|
+
|
|
96
|
+
<!-- Panel bullets -->
|
|
97
|
+
<g fill="#c3c8ce" font-size="14" font-family="Trebuchet MS, Arial, sans-serif">
|
|
98
|
+
<text x="160" y="252">- textarea, number, range, progress, meter</text>
|
|
99
|
+
<text x="160" y="274">- switch, badge, tooltip, toast, breadcrumb</text>
|
|
100
|
+
<text x="160" y="296">- chip input, pagination, notification banner</text>
|
|
101
|
+
<text x="160" y="318">- standard icon buttons and input masks</text>
|
|
102
|
+
|
|
103
|
+
<text x="960" y="252">- form container + validation hooks</text>
|
|
104
|
+
<text x="960" y="274">- field error display and status badges</text>
|
|
105
|
+
<text x="960" y="296">- object editor schema rendering</text>
|
|
106
|
+
<text x="960" y="318">- rich text toolbar + paste sanitization</text>
|
|
107
|
+
|
|
108
|
+
<text x="160" y="502">- data table with sort, filter, paginate</text>
|
|
109
|
+
<text x="160" y="524">- virtual list/grid for large data</text>
|
|
110
|
+
<text x="160" y="546">- tree-table hybrid + lazy load</text>
|
|
111
|
+
<text x="160" y="568">- reconnect modern data grid module</text>
|
|
112
|
+
|
|
113
|
+
<text x="960" y="502">- split panes + resizable layout</text>
|
|
114
|
+
<text x="960" y="524">- accordion, drawer, wizard stepper</text>
|
|
115
|
+
<text x="960" y="546">- tab variants + overflow handling</text>
|
|
116
|
+
<text x="960" y="568">- window snap, dock, z-order</text>
|
|
117
|
+
|
|
118
|
+
<text x="160" y="752">- ARIA roles and focus management</text>
|
|
119
|
+
<text x="160" y="774">- keyboard navigation standards</text>
|
|
120
|
+
<text x="160" y="796">- theming tokens + CSS variables</text>
|
|
121
|
+
<text x="160" y="818">- high contrast + reduced motion</text>
|
|
122
|
+
|
|
123
|
+
<text x="960" y="752">- normalize duplicate control names</text>
|
|
124
|
+
<text x="960" y="774">- stable public API surface</text>
|
|
125
|
+
<text x="960" y="796">- test harnesses + visual regressions</text>
|
|
126
|
+
<text x="960" y="818">- structured docs and sample gallery</text>
|
|
127
|
+
</g>
|
|
128
|
+
|
|
129
|
+
<!-- Connectors -->
|
|
130
|
+
<g stroke="#3b3f46" stroke-width="1" opacity="0.7">
|
|
131
|
+
<line x1="680" y1="290" x2="720" y2="410" />
|
|
132
|
+
<line x1="920" y1="290" x2="880" y2="410" />
|
|
133
|
+
<line x1="680" y1="540" x2="720" y2="540" />
|
|
134
|
+
<line x1="920" y1="540" x2="880" y2="540" />
|
|
135
|
+
<line x1="680" y1="790" x2="720" y2="600" />
|
|
136
|
+
<line x1="920" y1="790" x2="880" y2="600" />
|
|
137
|
+
</g>
|
|
138
|
+
|
|
139
|
+
<!-- Gold accents -->
|
|
140
|
+
<g stroke="url(#gold_grad)" stroke-width="2" opacity="0.8">
|
|
141
|
+
<line x1="120" y1="410" x2="680" y2="410" />
|
|
142
|
+
<line x1="920" y1="410" x2="1480" y2="410" />
|
|
143
|
+
<line x1="120" y1="660" x2="680" y2="660" />
|
|
144
|
+
<line x1="920" y1="660" x2="1480" y2="660" />
|
|
145
|
+
</g>
|
|
146
|
+
|
|
147
|
+
<!-- Footer note -->
|
|
148
|
+
<text x="120" y="950" fill="#7f8790" font-size="13" font-family="Trebuchet MS, Arial, sans-serif">
|
|
149
|
+
Diagram companion to docs/jsgui3-html-improvement-ideas.md
|
|
150
|
+
</text>
|
|
151
|
+
</svg>
|
package/docs/troubleshooting.md
CHANGED
|
@@ -197,13 +197,14 @@ input.js:1:0: ERROR: Expected identifier but found "}"
|
|
|
197
197
|
|
|
198
198
|
2. **Verify CSS definition:**
|
|
199
199
|
```javascript
|
|
200
|
-
MyControl.css = `
|
|
201
|
-
.my-control {
|
|
202
|
-
padding: 20px;
|
|
203
|
-
background: #f0f0f0;
|
|
204
|
-
}
|
|
205
|
-
`;
|
|
206
|
-
```
|
|
200
|
+
MyControl.css = `
|
|
201
|
+
.my-control {
|
|
202
|
+
padding: 20px;
|
|
203
|
+
background: #f0f0f0;
|
|
204
|
+
}
|
|
205
|
+
`;
|
|
206
|
+
```
|
|
207
|
+
You can also use `MyControl.scss` or `MyControl.sass` with template literals; these compile to CSS during bundling (ensure the `sass` dependency is installed). To see inline CSS sourcemaps in devtools, enable `style.sourcemaps` (or run with `debug: true`).
|
|
207
208
|
|
|
208
209
|
3. **Check activation:**
|
|
209
210
|
```javascript
|
|
@@ -746,4 +747,4 @@ This minimal setup helps isolate whether the issue is with your specific code or
|
|
|
746
747
|
|
|
747
748
|
---
|
|
748
749
|
|
|
749
|
-
Remember: Most issues can be resolved by carefully checking the console output, verifying file paths, and ensuring proper control lifecycle management. Start with the basics and work systematically through the possible causes.
|
|
750
|
+
Remember: Most issues can be resolved by carefully checking the console output, verifying file paths, and ensuring proper control lifecycle management. Start with the basics and work systematically through the possible causes.
|
|
@@ -149,19 +149,24 @@ class EarthGlobeRenderer {
|
|
|
149
149
|
enablePipeline() { this.pipelineEnabled = true; }
|
|
150
150
|
disablePipeline() { this.pipelineEnabled = false; }
|
|
151
151
|
setSunDirection(vec3) { this.sun = this._normVec(vec3); this.render(false); }
|
|
152
|
-
setSunFromSpherical(lonDeg, latDeg) {
|
|
153
|
-
// convenience API used by existing client code
|
|
154
|
-
const λ = lonDeg * Math.PI/180;
|
|
155
|
-
const φ = latDeg * Math.PI/180;
|
|
156
|
-
const cφ = Math.cos(φ);
|
|
157
|
-
this.setSunDirection([
|
|
158
|
-
cφ * Math.sin(λ),
|
|
159
|
-
Math.sin(φ),
|
|
160
|
-
cφ * Math.cos(λ)
|
|
161
|
-
]);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
152
|
+
setSunFromSpherical(lonDeg, latDeg) {
|
|
153
|
+
// convenience API used by existing client code
|
|
154
|
+
const λ = lonDeg * Math.PI/180;
|
|
155
|
+
const φ = latDeg * Math.PI/180;
|
|
156
|
+
const cφ = Math.cos(φ);
|
|
157
|
+
this.setSunDirection([
|
|
158
|
+
cφ * Math.sin(λ),
|
|
159
|
+
Math.sin(φ),
|
|
160
|
+
cφ * Math.cos(λ)
|
|
161
|
+
]);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
_update_rot() {
|
|
165
|
+
this.R = mat3FromQuat(this.q);
|
|
166
|
+
this.Rt = mat3Transpose(this.R);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
_buildContinents() {
|
|
165
170
|
const arr = [];
|
|
166
171
|
for (const name of Object.keys(CONTINENT_OUTLINES)) {
|
|
167
172
|
const def = CONTINENT_OUTLINES[name];
|
|
@@ -356,4 +361,4 @@ class EarthGlobeRenderer {
|
|
|
356
361
|
}
|
|
357
362
|
}
|
|
358
363
|
|
|
359
|
-
module.exports = EarthGlobeRenderer;
|
|
364
|
+
module.exports = EarthGlobeRenderer;
|
|
@@ -2,9 +2,9 @@ const BaseStage = require('./BaseStage');
|
|
|
2
2
|
|
|
3
3
|
class TransformStage extends BaseStage {
|
|
4
4
|
/** @param {RenderState} rs */
|
|
5
|
-
execute(rs) {
|
|
6
|
-
const r = this.r;
|
|
7
|
-
r.
|
|
5
|
+
execute(rs) {
|
|
6
|
+
const r = this.r;
|
|
7
|
+
r._update_rot();
|
|
8
8
|
|
|
9
9
|
const rect = r.canvas.getBoundingClientRect();
|
|
10
10
|
const width = rect.width || r.canvas.width / r.opts.dpr;
|
|
@@ -13,8 +13,8 @@ class TransformStage extends BaseStage {
|
|
|
13
13
|
rs.height = height;
|
|
14
14
|
|
|
15
15
|
const pad = r.opts.padding;
|
|
16
|
-
const
|
|
17
|
-
rs.radius = Math.max(1,
|
|
16
|
+
const min_side = Math.min(width, height);
|
|
17
|
+
rs.radius = Math.max(1, min_side / 2 - pad);
|
|
18
18
|
rs.cx = width * 0.5;
|
|
19
19
|
rs.cy = height * 0.5;
|
|
20
20
|
}
|