lexgui 0.6.11 → 0.7.0
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/README.md +14 -9
- package/build/{components → extensions}/audio.js +11 -11
- package/build/{components → extensions}/codeeditor.js +109 -74
- package/build/{components → extensions}/docmaker.js +10 -3
- package/build/{components → extensions}/imui.js +19 -12
- package/build/{components → extensions}/nodegraph.js +1 -1
- package/build/{components → extensions}/timeline.js +150 -94
- package/build/{components → extensions}/videoeditor.js +1 -1
- package/build/lexgui-docs.css +9 -9
- package/build/lexgui.css +489 -223
- package/build/lexgui.js +1771 -777
- package/build/lexgui.min.css +2 -2
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +1803 -809
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +90 -21
- package/demo.js +52 -32
- package/examples/{all_widgets.html → all-components.html} +22 -4
- package/examples/{area_tabs.html → area-tabs.html} +3 -3
- package/examples/{asset_view.html → asset-view.html} +3 -3
- package/examples/{code_editor.html → code-editor.html} +4 -4
- package/examples/dialogs.html +3 -3
- package/examples/editor.html +27 -18
- package/examples/{immediate_ui.html → immediate-ui.html} +3 -3
- package/examples/index.html +8 -8
- package/examples/{node_graph.html → node-graph.html} +3 -3
- package/examples/previews/all-components.png +0 -0
- package/examples/previews/area-tabs.png +0 -0
- package/examples/previews/asset-view.png +0 -0
- package/examples/previews/code-editor.png +0 -0
- package/examples/previews/dialogs.png +0 -0
- package/examples/previews/editor.png +0 -0
- package/examples/previews/node-graph.png +0 -0
- package/examples/previews/side-bar.png +0 -0
- package/examples/previews/timeline.png +0 -0
- package/examples/{side_bar.html → side-bar.html} +3 -3
- package/examples/timeline.html +5 -5
- package/examples/{video_editor.html → video-editor.html} +3 -3
- package/examples/{video_editor2.html → video-editor2.html} +3 -3
- package/package.json +2 -2
- package/examples/previews/all_widgets.png +0 -0
- package/examples/previews/area_tabs.png +0 -0
- package/examples/previews/asset_view.png +0 -0
- package/examples/previews/code_editor.png +0 -0
- package/examples/previews/node_graph.png +0 -0
- package/examples/previews/side_bar.png +0 -0
package/examples/editor.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
7
7
|
<title>LexGUI Editor demo</title>
|
|
8
8
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
9
|
-
<link rel="icon" href="../images/
|
|
9
|
+
<link rel="icon" href="../images/favicon.png">
|
|
10
10
|
|
|
11
11
|
<script type="importmap">
|
|
12
12
|
{
|
|
13
13
|
"imports": {
|
|
14
14
|
"lexgui": "../build/lexgui.module.js",
|
|
15
|
-
"lexgui/
|
|
15
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
</script>
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
<script type="module">
|
|
27
27
|
|
|
28
28
|
import { LX } from 'lexgui';
|
|
29
|
-
import 'lexgui/
|
|
30
|
-
import 'lexgui/
|
|
31
|
-
import 'lexgui/
|
|
29
|
+
import 'lexgui/extensions/codeeditor.js';
|
|
30
|
+
import 'lexgui/extensions/timeline.js';
|
|
31
|
+
import 'lexgui/extensions/audio.js';
|
|
32
32
|
|
|
33
33
|
window.LX = LX;
|
|
34
34
|
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
{ name: "GLTF", kbd: "G" }
|
|
122
122
|
]
|
|
123
123
|
},
|
|
124
|
-
{ name: "
|
|
124
|
+
{ name: "Download", icon: "Download" }
|
|
125
125
|
]
|
|
126
126
|
},
|
|
127
127
|
{
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
{
|
|
131
131
|
name: "Settings", icon: "Settings2", callback: () => {
|
|
132
132
|
const dialog = new LX.Dialog("Settings", p => {
|
|
133
|
-
p.addText("A Text", "Testing first
|
|
133
|
+
p.addText("A Text", "Testing first Component");
|
|
134
134
|
p.sameLine(3);
|
|
135
135
|
p.addLabel("Buttons:");
|
|
136
136
|
p.addButton(null, "Click me", () => {
|
|
@@ -234,11 +234,20 @@
|
|
|
234
234
|
icon: starterTheme == "dark" ? "Moon" : "Sun",
|
|
235
235
|
swap: starterTheme == "dark" ? "Sun" : "Moon",
|
|
236
236
|
callback: (value, event) => { LX.switchTheme() }
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
title: "Switch Spacing",
|
|
240
|
+
icon: "AlignVerticalSpaceAround",
|
|
241
|
+
callback: (value, event) => { LX.switchSpacing() }
|
|
237
242
|
}
|
|
238
243
|
]);
|
|
239
244
|
|
|
240
245
|
menubar.setButtonIcon("Github", "Github@solid", () => { window.open("https://github.com/jxarco/lexgui.js/") })
|
|
241
|
-
menubar.setButtonImage("lexgui.js",
|
|
246
|
+
menubar.setButtonImage("lexgui.js", `../images/icon_small_${ starterTheme }.png`, () => { window.open("https://jxarco.github.io/lexgui.js/") }, { float: "left" } );
|
|
247
|
+
|
|
248
|
+
LX.addSignal( "@on_new_color_scheme", ( el, value ) => {
|
|
249
|
+
menubar.setButtonImage( "lexgui.js", `../images/icon_small_${ value }.png` );
|
|
250
|
+
} );
|
|
242
251
|
|
|
243
252
|
// split main area
|
|
244
253
|
var [left, right] = area.split({ sizes: ["70%", "30%"], minimizable: true });
|
|
@@ -522,7 +531,7 @@
|
|
|
522
531
|
|
|
523
532
|
var ctx = canvas.getContext("2d");
|
|
524
533
|
|
|
525
|
-
// Get values from panel
|
|
534
|
+
// Get values from panel components (e.g. color value)
|
|
526
535
|
ctx.fillStyle = sidePanel.getValue('Background');
|
|
527
536
|
|
|
528
537
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
@@ -657,7 +666,7 @@
|
|
|
657
666
|
}
|
|
658
667
|
});
|
|
659
668
|
|
|
660
|
-
// add
|
|
669
|
+
// add components to panel branch
|
|
661
670
|
panel.branch("Canvas", { icon: "Palette", filter: true });
|
|
662
671
|
panel.addColor("Background", "#b7a9b1", (value, event) => {
|
|
663
672
|
console.log(value);
|
|
@@ -837,9 +846,9 @@
|
|
|
837
846
|
}
|
|
838
847
|
], { vertical: false /*, showNames: true */ });
|
|
839
848
|
|
|
840
|
-
panel.addText(null, "
|
|
849
|
+
panel.addText(null, "Component below are out the tabs", null, { disabled: true })
|
|
841
850
|
|
|
842
|
-
// update panel values uising
|
|
851
|
+
// update panel values uising component name
|
|
843
852
|
panel.addNumber("HeadRoll Value", 0, (value, event) => {
|
|
844
853
|
panel.setValue('HeadRoll', value);
|
|
845
854
|
}, { min: -1, max: 1, step: 0.1 });
|
|
@@ -882,9 +891,9 @@
|
|
|
882
891
|
]);
|
|
883
892
|
|
|
884
893
|
/************** */
|
|
885
|
-
// Custom
|
|
894
|
+
// Custom Component
|
|
886
895
|
|
|
887
|
-
LX.
|
|
896
|
+
LX.ADD_CUSTOM_COMPONENT("Shader", {
|
|
888
897
|
icon: "Box",
|
|
889
898
|
default: {
|
|
890
899
|
position: [0, 0],
|
|
@@ -911,9 +920,9 @@
|
|
|
911
920
|
|
|
912
921
|
function fillBottomPanel(panel) {
|
|
913
922
|
|
|
914
|
-
// add
|
|
923
|
+
// add components to panel branch
|
|
915
924
|
panel.branch("Information", { icon: "Info" });
|
|
916
|
-
window.
|
|
925
|
+
window.tableComponent = panel.addTable("A Table", {
|
|
917
926
|
head: ["Name", "Status", "Priority", "ID"],
|
|
918
927
|
body: [
|
|
919
928
|
["Alice", "In Progress", "High", 1],
|
|
@@ -946,7 +955,7 @@
|
|
|
946
955
|
{
|
|
947
956
|
name: "Export", callback: (a) => {
|
|
948
957
|
tableData.body[index][0] = "Alex";
|
|
949
|
-
|
|
958
|
+
tableComponent.refresh();
|
|
950
959
|
}
|
|
951
960
|
},
|
|
952
961
|
{ name: "Make a copy", callback: (a) => console.log(a) },
|
|
@@ -1103,7 +1112,7 @@
|
|
|
1103
1112
|
break;
|
|
1104
1113
|
}
|
|
1105
1114
|
})
|
|
1106
|
-
}, { title: 'Lexemes', close: true, minimize: false, size: ["80%"], scroll: true, resizable: true, draggable: true });
|
|
1115
|
+
}, { modal: true, title: 'Lexemes', close: true, minimize: false, size: ["80%"], scroll: true, resizable: true, draggable: true });
|
|
1107
1116
|
}
|
|
1108
1117
|
|
|
1109
1118
|
</script>
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI ImUI Demo</title>
|
|
7
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
8
|
-
<link rel="icon" href="../images/
|
|
8
|
+
<link rel="icon" href="../images/favicon.png">
|
|
9
9
|
<script type="importmap">
|
|
10
10
|
{
|
|
11
11
|
"imports": {
|
|
12
12
|
"lexgui": "../build/lexgui.module.js",
|
|
13
|
-
"lexgui/
|
|
13
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script type="module">
|
|
21
21
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
|
-
import 'lexgui/
|
|
23
|
+
import 'lexgui/extensions/imui.js';
|
|
24
24
|
|
|
25
25
|
// init library and get main area
|
|
26
26
|
let area = await LX.init();
|
package/examples/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
6
6
|
<title>Examples - LexGUI.js </title>
|
|
7
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
8
|
-
<link rel="icon" href="../images/
|
|
8
|
+
<link rel="icon" href="../images/favicon.png">
|
|
9
9
|
<style>
|
|
10
10
|
iframe { border: none; }
|
|
11
11
|
</style>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"imports": {
|
|
15
15
|
"lexgui": "../build/lexgui.module.js",
|
|
16
|
-
"lexgui/
|
|
16
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
const mobile = navigator && /Android|iPhone/i.test( navigator.userAgent );
|
|
31
31
|
const examples = [
|
|
32
|
-
'All
|
|
32
|
+
'All Components',
|
|
33
33
|
'Area Tabs',
|
|
34
34
|
'Asset View',
|
|
35
35
|
'Code Editor',
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
if( mobile )
|
|
58
58
|
{
|
|
59
59
|
const sheetArea = new LX.Area({ skipAppend: true });
|
|
60
|
-
panel = sheetArea.addPanel();
|
|
60
|
+
panel = sheetArea.addPanel({ className: "flex flex-col gap-2" });
|
|
61
61
|
iFrameArea = area;
|
|
62
62
|
|
|
63
63
|
overlayButtons.splice( 0, 0, {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
else
|
|
72
72
|
{
|
|
73
|
-
let [ leftArea, rightArea ] = area.split({ sizes: ["
|
|
73
|
+
let [ leftArea, rightArea ] = area.split({ sizes: ["15%","85%"], resize: false });
|
|
74
74
|
leftArea.root.style.borderRight = "2px solid gray";
|
|
75
75
|
|
|
76
76
|
const menubar = leftArea.addMenubar( [
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
] );
|
|
79
79
|
menubar.setButtonIcon("Github", "Github", () => {window.open("https://github.com/jxarco/lexgui.js/")}, { float: "left" });
|
|
80
80
|
|
|
81
|
-
panel = leftArea.addPanel();
|
|
81
|
+
panel = leftArea.addPanel({ className: "flex flex-col gap-1" });
|
|
82
82
|
iFrameArea = rightArea;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
let iframe = document.createElement('iframe');
|
|
88
88
|
iframe.id = iframe.name = 'viewer';
|
|
89
|
-
iframe.src = examples[0].replace(" ", "
|
|
89
|
+
iframe.src = examples[0].replace(" ", "-").toLowerCase() + ".html";
|
|
90
90
|
iframe.style.width = "100%";
|
|
91
91
|
iframe.style.height = "100%";
|
|
92
92
|
iFrameArea.root.appendChild(iframe);
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
|
|
102
102
|
for( let ex of examples )
|
|
103
103
|
{
|
|
104
|
-
const id = ex.replace(" ", "
|
|
104
|
+
const id = ex.replace(" ", "-").toLowerCase();
|
|
105
105
|
const options = {
|
|
106
106
|
img: "previews/" + id + ".png",
|
|
107
107
|
callback: function() {
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI Node Graph Demo</title>
|
|
7
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
8
|
-
<link rel="icon" href="../images/
|
|
8
|
+
<link rel="icon" href="../images/favicon.png">
|
|
9
9
|
<script type="importmap">
|
|
10
10
|
{
|
|
11
11
|
"imports": {
|
|
12
12
|
"lexgui": "../build/lexgui.module.js",
|
|
13
|
-
"lexgui/
|
|
13
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script type="module">
|
|
21
21
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
|
-
import 'lexgui/
|
|
23
|
+
import 'lexgui/extensions/nodegraph.js';
|
|
24
24
|
|
|
25
25
|
// init library and get main area
|
|
26
26
|
let area = await LX.init();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI Area Tabs Demo</title>
|
|
7
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
8
|
-
<link rel="icon" href="../images/
|
|
8
|
+
<link rel="icon" href="../images/favicon.png">
|
|
9
9
|
<script type="importmap">
|
|
10
10
|
{
|
|
11
11
|
"imports": {
|
|
12
12
|
"lexgui": "../build/lexgui.module.js",
|
|
13
|
-
"lexgui/
|
|
13
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}, {
|
|
66
66
|
headerTitle: "jxarco",
|
|
67
67
|
headerSubtitle: "alexroco.30@gmail.com",
|
|
68
|
-
headerImage: "https://raw.githubusercontent.com/jxarco/lexgui.js/refs/heads/master/images/
|
|
68
|
+
headerImage: "https://raw.githubusercontent.com/jxarco/lexgui.js/refs/heads/master/images/favicon.png",
|
|
69
69
|
footerTitle: "jxarco",
|
|
70
70
|
footerSubtitle: "alexroco.30@gmail.com",
|
|
71
71
|
footerImage: "https://avatars.githubusercontent.com/u/25059187?s=400&u=ad8907b748c13e4e1a7cdd3882826acb6a2928b5&v=4",
|
package/examples/timeline.html
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
5
5
|
<title>LexGUI Timelines Demo</title>
|
|
6
6
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
7
|
-
<link rel="icon" href="../images/
|
|
7
|
+
<link rel="icon" href="../images/favicon.png">
|
|
8
8
|
<script type="importmap">
|
|
9
9
|
{
|
|
10
10
|
"imports": {
|
|
11
11
|
"lexgui": "../build/lexgui.module.js",
|
|
12
|
-
"lexgui/
|
|
12
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
</script>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<script type="module">
|
|
19
19
|
|
|
20
20
|
import { LX } from 'lexgui';
|
|
21
|
-
import { Timeline, KeyFramesTimeline, ClipsTimeline } from 'lexgui/
|
|
21
|
+
import { Timeline, KeyFramesTimeline, ClipsTimeline } from 'lexgui/extensions/timeline.js';
|
|
22
22
|
|
|
23
23
|
// init library and get main area
|
|
24
24
|
let area = await LX.init();
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
ctx.font = panel.getValue('Font Size') + "px Monospace";
|
|
98
98
|
ctx.fillStyle = panel.getValue('Font Color');
|
|
99
99
|
|
|
100
|
-
// Get values from panel
|
|
100
|
+
// Get values from panel component (e.g. position value)
|
|
101
101
|
const text = panel.getValue('Text');
|
|
102
102
|
const pos2D = panel.getValue('2D Position');
|
|
103
103
|
ctx.fillText(text, pos2D[0], pos2D[1]);
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
},
|
|
214
214
|
onCreateAfterTopBar: (panel) => {
|
|
215
215
|
panel.addButton("autoKeyEnabled", "autoKeyEnable", null, { icon: 'WandSparkles', hideName: true });
|
|
216
|
-
panel.addButton("
|
|
216
|
+
panel.addButton("deselectAll", "deselectAll", (value, event) => { kfTimeline.deselectAllKeyFrames();}, { icon: 'X', hideName: true, callback: (value, event) => { kfTimeline.deselectAllKeyFrames();} });
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI Video Editor Demo</title>
|
|
7
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
8
|
-
<link rel="icon" href="../images/
|
|
8
|
+
<link rel="icon" href="../images/favicon.png">
|
|
9
9
|
<script type="importmap">
|
|
10
10
|
{
|
|
11
11
|
"imports": {
|
|
12
12
|
"lexgui": "../build/lexgui.module.js",
|
|
13
|
-
"lexgui/
|
|
13
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script type="module">
|
|
21
21
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
|
-
import { VideoEditor } from 'lexgui/
|
|
23
|
+
import { VideoEditor } from 'lexgui/extensions/videoeditor.js';
|
|
24
24
|
// init library and get main area
|
|
25
25
|
let area = await LX.init();
|
|
26
26
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI Video Editor Demo</title>
|
|
7
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
8
|
-
<link rel="icon" href="../images/
|
|
8
|
+
<link rel="icon" href="../images/favicon.png">
|
|
9
9
|
<script type="importmap">
|
|
10
10
|
{
|
|
11
11
|
"imports": {
|
|
12
12
|
"lexgui": "../build/lexgui.module.js",
|
|
13
|
-
"lexgui/
|
|
13
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<script type="module">
|
|
21
21
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
|
-
import { VideoEditor } from 'lexgui/
|
|
23
|
+
import { VideoEditor } from 'lexgui/extensions/videoeditor.js';
|
|
24
24
|
|
|
25
25
|
// Init library and get main area
|
|
26
26
|
let area = await LX.init();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lexgui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "JS library to create web graphical user interfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/lexgui.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"build",
|
|
14
|
-
"build/
|
|
14
|
+
"build/extensions",
|
|
15
15
|
"examples",
|
|
16
16
|
"LICENSE",
|
|
17
17
|
"package.json",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|