lexgui 0.6.8 → 0.6.10
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/build/components/timeline.js +116 -80
- package/build/lexgui.css +31 -6
- package/build/lexgui.js +438 -250
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +438 -250
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +42 -1
- package/demo.js +2 -2
- package/examples/all_widgets.html +5 -4
- package/examples/editor.html +28 -21
- package/package.json +3 -2
package/changelog.md
CHANGED
|
@@ -2,7 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
## dev
|
|
4
4
|
|
|
5
|
-
## 0.6.
|
|
5
|
+
## 0.6.10 (master)
|
|
6
|
+
|
|
7
|
+
Timeline:
|
|
8
|
+
- Added support for cloning clips and tracks.
|
|
9
|
+
- Minor fixes.
|
|
10
|
+
|
|
11
|
+
Widgets:
|
|
12
|
+
- All `Button` widgets have now `setState` method (not only those with `swap` feature).
|
|
13
|
+
- Layers Widget allow `options.maxBits` to specify number of bit layers.
|
|
14
|
+
- If Button is selectable, the `selected` state is not sent to the callback.
|
|
15
|
+
- Fixed Color Picker not updating on change Hex text input.
|
|
16
|
+
- TabSections: Allow `item.selected` option. Add support for `select( tabName )`.
|
|
17
|
+
- Fixed Select Widget positioning when no space above&below.
|
|
18
|
+
|
|
19
|
+
New `AreaOverlayButtons` to improve management and support changing buttons state.
|
|
20
|
+
Fixed Commandbar error on checking String Menubar items.
|
|
21
|
+
Fixed Asset View custom title overflow.
|
|
22
|
+
Docs updated.
|
|
23
|
+
|
|
24
|
+
## 0.6.9
|
|
25
|
+
|
|
26
|
+
Timeline:
|
|
27
|
+
- `addKeyframes` now returns new indices.
|
|
28
|
+
- Fixed fadein/fadeout when one of them doesn't exist.
|
|
29
|
+
- Fix fadeout draw
|
|
30
|
+
- `setClip` now returns the Animation Clip.
|
|
31
|
+
|
|
32
|
+
Widgets:
|
|
33
|
+
- Added support for `options.iconPosition` in Button Widget (`cover` as default).
|
|
34
|
+
- Fixed rowId in Table Widget.
|
|
35
|
+
- Show "No results." row if no data in Table Widget.
|
|
36
|
+
- Fixed disabled NumberInput slider.
|
|
37
|
+
- TabSections icons can be modified using `iconClass` and `svgClass`.
|
|
38
|
+
- TabSection's `onCreate` now receives also the tab content HTML Container (2nd parameter).
|
|
39
|
+
- Fixed some Delete edge cases (key and ContextMenu) of Tree Widget.
|
|
40
|
+
- Select Widget now allows creating new widgets as suboptions for each select value.
|
|
41
|
+
|
|
42
|
+
Added support for Area Overlaybuttons separators.
|
|
43
|
+
Fixed Menubar buttons using `float: left` alignment.
|
|
44
|
+
Minor fixes CSS.
|
|
45
|
+
|
|
46
|
+
## 0.6.8
|
|
6
47
|
|
|
7
48
|
Widgets:
|
|
8
49
|
- Support `options.onCreate` on register Custom Widget.
|
package/demo.js
CHANGED
|
@@ -16,8 +16,8 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
16
16
|
|
|
17
17
|
menubar.setButtonImage("lexgui.js", "images/icon.png", () => {window.open("https://jxarco.github.io/lexgui.js/")}, {float: "left"})
|
|
18
18
|
|
|
19
|
-
const commandButton = new LX.Button(null,
|
|
20
|
-
width: "256px", className: "right", buttonClass: "border
|
|
19
|
+
const commandButton = new LX.Button(null, `Search command...<span class="ml-auto">${ LX.makeKbd( ["Ctrl", "Space"], false, "bg-tertiary border px-1 rounded" ).innerHTML }</span>`, () => { LX.setCommandbarState( true ) }, {
|
|
20
|
+
width: "256px", className: "right", buttonClass: "border fg-tertiary bg-secondary" }
|
|
21
21
|
);
|
|
22
22
|
menubar.root.appendChild( commandButton.root );
|
|
23
23
|
|
|
@@ -224,6 +224,7 @@
|
|
|
224
224
|
panelB.addNumber("Disabled", 0, null, { disabled: true });
|
|
225
225
|
panelB.addNumber("With Units", 12, null, { units: "px" });
|
|
226
226
|
panelB.addNumber("With Slider", 0, null, { min: 1, max: 48, step: 1 });
|
|
227
|
+
panelB.addNumber("Disabled Slider", 0, null, { min: 1, max: 48, step: 1, disabled: true });
|
|
227
228
|
panelB.branch("Vector Inputs", { closed: closedDefault });
|
|
228
229
|
panelB.addVector2("Classic Vec2", [0, 0], null);
|
|
229
230
|
panelB.addVector3("Disabled Vec3", [0, 0, 0], null, { disabled: true });
|
|
@@ -254,6 +255,9 @@
|
|
|
254
255
|
panelB.addRange("Disabled", 29, null, { min: 1, max: 48, step: 1, disabled: true });
|
|
255
256
|
panelB.branch("Select Inputs", { closed: closedDefault });
|
|
256
257
|
panelB.addSelect("Classic", selectValues, "Unity", null);
|
|
258
|
+
panelB.addSelect("With Suboptions", selectValues, "Unity", null, { on_Unity: (p) => {
|
|
259
|
+
p.addButton("Unity Button", "Click me!", null, { buttonClass: "contrast" });
|
|
260
|
+
} });
|
|
257
261
|
panelB.addSelect("With Labels", selectValuesWithLabels, "Unity", null);
|
|
258
262
|
panelB.addSelect("With Filter", selectValuesWithLabels, "Godot", null, { filter: true, placeholder: "Search tools..." });
|
|
259
263
|
panelB.addSelect("Custom Empty Msg", selectValuesWithLabels, "Unreal Engine", null, { filter: true, emptyMsg: "No tools found.", placeholder: "Search tools..." });
|
|
@@ -290,10 +294,7 @@
|
|
|
290
294
|
'actions': [
|
|
291
295
|
{
|
|
292
296
|
'name': 'Open script',
|
|
293
|
-
'icon': 'Scroll'
|
|
294
|
-
'callback': function (node) {
|
|
295
|
-
console.log(node.id + ": Script opened!")
|
|
296
|
-
}
|
|
297
|
+
'icon': 'Scroll'
|
|
297
298
|
}
|
|
298
299
|
]
|
|
299
300
|
}
|
package/examples/editor.html
CHANGED
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
name: "Help", submenu: [
|
|
200
|
-
{ name: "Search Help", icon: "Search", kbd: "F1", callback: () => { window.open("
|
|
200
|
+
{ name: "Search Help", icon: "Search", kbd: "F1", callback: () => { window.open("../docs/") } },
|
|
201
201
|
{ name: "Support LexGUI", icon: "Heart" },
|
|
202
202
|
]
|
|
203
203
|
},
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
{
|
|
226
226
|
icon: "RotateLeft",
|
|
227
227
|
callback: (value, event) => {
|
|
228
|
-
const playButton =
|
|
228
|
+
const playButton = menubar.getButton("Play");
|
|
229
229
|
playButton.swap();
|
|
230
230
|
}
|
|
231
231
|
},
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
// add on resize event to control canvas size
|
|
419
419
|
topTabs.area.onresize = resizeCanvas;
|
|
420
420
|
|
|
421
|
-
topTabs.area.addOverlayButtons([
|
|
421
|
+
const overlaybuttons = topTabs.area.addOverlayButtons([
|
|
422
422
|
[
|
|
423
423
|
{
|
|
424
424
|
name: "Select",
|
|
@@ -440,8 +440,9 @@
|
|
|
440
440
|
}
|
|
441
441
|
],
|
|
442
442
|
{
|
|
443
|
-
name: "
|
|
443
|
+
name: "Render Mode",
|
|
444
444
|
options: ["Lit", "Unlit", "Wireframe"],
|
|
445
|
+
value: "Lit",
|
|
445
446
|
callback: (value, event) => console.log(value)
|
|
446
447
|
},
|
|
447
448
|
[
|
|
@@ -452,11 +453,14 @@
|
|
|
452
453
|
selectable: true
|
|
453
454
|
},
|
|
454
455
|
{
|
|
455
|
-
name:
|
|
456
|
+
name: "Snap Values",
|
|
457
|
+
value: 10,
|
|
456
458
|
options: [10, 100, 1000],
|
|
457
459
|
callback: value => console.log(value)
|
|
458
460
|
}
|
|
459
|
-
],
|
|
461
|
+
],
|
|
462
|
+
null, // Separator
|
|
463
|
+
{
|
|
460
464
|
name: "Open Sidebar Sheet",
|
|
461
465
|
icon: "PanelLeftDashed",
|
|
462
466
|
callback: (value, event) => {
|
|
@@ -467,27 +471,27 @@
|
|
|
467
471
|
const sidebar = area.addSidebar(m => {
|
|
468
472
|
m.group("Projects", { icon: "Plus", callback: (groupName, event) => { console.log(groupName) } });
|
|
469
473
|
m.add("Getting Started", { icon: "Box" /*,collapsable: false*/ });
|
|
470
|
-
m.add("Getting Started/Installation", { icon: "Box"
|
|
471
|
-
m.add("Getting Started/Project Structure", { icon: "Box",
|
|
472
|
-
m.add("Building Your Application", { icon: "Code",
|
|
473
|
-
m.add("Search Blocks", { icon: "Search"
|
|
474
|
-
m.add("Very loooooooooooooooooooooooong sun", { icon: "Sun",
|
|
474
|
+
m.add("Getting Started/Installation", { icon: "Box" });
|
|
475
|
+
m.add("Getting Started/Project Structure", { icon: "Box", action: { name: "ShowMenu", icon: null } });
|
|
476
|
+
m.add("Building Your Application", { icon: "Code", action: { name: "ShowMenu", icon: null } });
|
|
477
|
+
m.add("Search Blocks", { icon: "Search" });
|
|
478
|
+
m.add("Very loooooooooooooooooooooooong sun", { icon: "Sun", action: { name: "ShowMenu", icon: null } });
|
|
475
479
|
m.separator();
|
|
476
480
|
m.group("API Reference");
|
|
477
|
-
m.add("Components", { icon: "Box"
|
|
478
|
-
m.add("File Conventions", { icon: "Code"
|
|
479
|
-
m.add("Functions", { icon: "Search"
|
|
480
|
-
m.add("CLI", { icon: "Sun"
|
|
481
|
+
m.add("Components", { icon: "Box" });
|
|
482
|
+
m.add("File Conventions", { icon: "Code" });
|
|
483
|
+
m.add("Functions", { icon: "Search" });
|
|
484
|
+
m.add("CLI", { icon: "Sun" });
|
|
481
485
|
m.separator();
|
|
482
486
|
m.group("Architecture");
|
|
483
|
-
m.add("Accessibility ", { icon: "Box"
|
|
484
|
-
m.add("Fast Refresh", { icon: "Code"
|
|
485
|
-
m.add("Supported Browsers", { icon: "Search"
|
|
487
|
+
m.add("Accessibility ", { icon: "Box" });
|
|
488
|
+
m.add("Fast Refresh", { icon: "Code" });
|
|
489
|
+
m.add("Supported Browsers", { icon: "Search" });
|
|
486
490
|
m.separator();
|
|
487
491
|
m.add("Calendar ", { icon: "Calendar", collapsable: 3 });
|
|
488
|
-
m.add("Personal ", {
|
|
489
|
-
m.add("Work", {
|
|
490
|
-
m.add("Family", {
|
|
492
|
+
m.add("Personal ", { type: "checkbox" });
|
|
493
|
+
m.add("Work", { type: "checkbox", value: true });
|
|
494
|
+
m.add("Family", { type: "checkbox" });
|
|
491
495
|
}, { /* collapseToIcons: false, */
|
|
492
496
|
skipHeader: true,
|
|
493
497
|
filter: true,
|
|
@@ -725,6 +729,9 @@
|
|
|
725
729
|
panel.addLayers("Layers", 10, (value, event) => {
|
|
726
730
|
console.log(value);
|
|
727
731
|
});
|
|
732
|
+
panel.addLayers("Layers (8 bits)", 10, (value, event) => {
|
|
733
|
+
console.log(value);
|
|
734
|
+
}, { maxBits: 8 });
|
|
728
735
|
panel.addArray("An Item Array", ['GPTeam', 'Blat Panthers', 'Blat Bunny'], (value, event) => {
|
|
729
736
|
console.log(value);
|
|
730
737
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lexgui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "JS library to create web graphical user interfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/lexgui.js",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"rollup-js": "rollup -c rollup.build.config.js",
|
|
40
40
|
"minify-css": "cleancss -o build/lexgui.min.css build/lexgui.css",
|
|
41
41
|
"minify": "npm run rollup-js && npm run minify-css",
|
|
42
|
-
"
|
|
42
|
+
"legacy": "python build-legacy.py",
|
|
43
|
+
"build": "npm run legacy && npm run minify"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@rollup/plugin-terser": "^0.4.4"
|