lexgui 0.5.10 → 0.6.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 +1 -1
- package/build/components/codeeditor.js +89 -40
- package/build/components/nodegraph.js +32 -23
- package/build/components/timeline.js +5 -5
- package/build/components/videoeditor.js +1 -1
- package/build/lexgui.css +187 -394
- package/build/lexgui.js +892 -1001
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +892 -1001
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +38 -1
- package/demo.js +103 -86
- package/examples/all_widgets.html +37 -38
- package/examples/area_tabs.html +5 -5
- package/examples/asset_view.html +1 -1
- package/examples/code_editor.html +1 -1
- package/examples/dialogs.html +4 -4
- package/examples/immediate_ui.html +1 -1
- package/examples/index.html +8 -8
- package/examples/node_graph.html +1 -1
- package/examples/side_bar.html +15 -15
- package/examples/timeline.html +9 -9
- package/examples/video_editor.html +1 -1
- package/examples/video_editor2.html +5 -6
- package/package.json +1 -1
package/examples/index.html
CHANGED
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
import { LX } from 'lexgui';
|
|
24
24
|
|
|
25
25
|
// Init library and get main area
|
|
26
|
-
let area = LX.init();
|
|
26
|
+
let area = await LX.init();
|
|
27
27
|
|
|
28
28
|
// Split main area
|
|
29
29
|
let [leftArea, rightArea] = area.split({ sizes: ["20%","80%"], resize: false });
|
|
30
30
|
|
|
31
31
|
leftArea.root.style.borderRight = "2px solid gray";
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
32
|
+
|
|
33
|
+
const menubar = leftArea.addMenubar( [
|
|
34
|
+
{ name: "Docs v" + LX.version, callback: (v, name) => { location.href = "../docs/"; } }
|
|
35
|
+
] );
|
|
36
|
+
|
|
37
|
+
menubar.setButtonIcon("Github", "Github", () => {window.open("https://github.com/jxarco/lexgui.js/")}, { float: "left" });
|
|
38
38
|
|
|
39
39
|
const examples = [
|
|
40
40
|
'All Widgets',
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
rightArea.addOverlayButtons([
|
|
62
62
|
{
|
|
63
63
|
name: "View Source Code",
|
|
64
|
-
icon: "
|
|
64
|
+
icon: "Code",
|
|
65
65
|
callback: (value, event) => {
|
|
66
66
|
const tokens = iframe.src.split('/');
|
|
67
67
|
window.open("https://github.com/jxarco/lexgui.js/blob/master/examples/" + tokens[tokens.length - 1], '_blank')
|
package/examples/node_graph.html
CHANGED
package/examples/side_bar.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
23
|
|
|
24
24
|
// init library and get main area
|
|
25
|
-
let area = LX.init();
|
|
25
|
+
let area = await LX.init();
|
|
26
26
|
|
|
27
27
|
area.root.style.width = "100%";
|
|
28
28
|
area.root.style.height = "100%";
|
|
@@ -39,24 +39,24 @@
|
|
|
39
39
|
const actionLogParams = (entryName, event) => { console.log("Action called!", entryName, event) };
|
|
40
40
|
|
|
41
41
|
window.sidebar = area.addSidebar(m => {
|
|
42
|
-
m.group("Projects", { icon: "
|
|
43
|
-
m.add("Getting Started", { icon: "
|
|
44
|
-
m.add("Getting Started/Installation", { icon: "
|
|
45
|
-
m.add("Getting Started/Project Structure", { icon: "
|
|
46
|
-
m.add("Building Your Application", { icon: "
|
|
47
|
-
m.add("Search Blocks", { icon: "
|
|
48
|
-
m.add("Very loooooooooooooooooooooooong sun", { icon: "
|
|
42
|
+
m.group("Projects", { icon: "Plus", callback: (groupName, event) => { console.log(groupName) } });
|
|
43
|
+
m.add("Getting Started", { icon: "Box", callback: logParams });
|
|
44
|
+
m.add("Getting Started/Installation", { icon: "Box", callback: logParams });
|
|
45
|
+
m.add("Getting Started/Project Structure", { icon: "Box", callback: logParams, action: { name: "ShowMenu", callback: actionLogParams, icon: null } });
|
|
46
|
+
m.add("Building Your Application", { icon: "Code", callback: logParams, action: { name: "ShowMenu", callback: actionLogParams, icon: null } });
|
|
47
|
+
m.add("Search Blocks", { icon: "Search", callback: logParams });
|
|
48
|
+
m.add("Very loooooooooooooooooooooooong sun", { icon: "Sun", callback: logParams, action: { name: "ShowMenu", callback: actionLogParams, icon: null } });
|
|
49
49
|
m.separator();
|
|
50
50
|
m.group("API Reference");
|
|
51
|
-
m.add("Components", { icon: "
|
|
52
|
-
m.add("File Conventions", { icon: "
|
|
53
|
-
m.add("Functions", { icon: "
|
|
54
|
-
m.add("CLI", { icon: "
|
|
51
|
+
m.add("Components", { icon: "Box", callback: logParams });
|
|
52
|
+
m.add("File Conventions", { icon: "Code", callback: logParams });
|
|
53
|
+
m.add("Functions", { icon: "Search", callback: logParams });
|
|
54
|
+
m.add("CLI", { icon: "Sun", callback: logParams });
|
|
55
55
|
m.separator();
|
|
56
56
|
m.group("Architecture");
|
|
57
|
-
m.add("Accessibility ", { icon: "
|
|
58
|
-
m.add("Fast Refresh", { icon: "
|
|
59
|
-
m.add("Supported Browsers", { icon: "
|
|
57
|
+
m.add("Accessibility ", { icon: "Box", callback: logParams });
|
|
58
|
+
m.add("Fast Refresh", { icon: "Code", callback: logParams });
|
|
59
|
+
m.add("Supported Browsers", { icon: "Search", callback: logParams });
|
|
60
60
|
m.separator();
|
|
61
61
|
m.add("Calendar ", { collapsable: 3 });
|
|
62
62
|
m.add("Personal ", { callback: logParams, type: "checkbox" });
|
package/examples/timeline.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { Timeline, KeyFramesTimeline, ClipsTimeline, CurvesTimeline } from 'lexgui/components/timeline.js';
|
|
22
22
|
|
|
23
23
|
// init library and get main area
|
|
24
|
-
let area = LX.init();
|
|
24
|
+
let area = await LX.init();
|
|
25
25
|
|
|
26
26
|
// split main area
|
|
27
27
|
var [leftArea, rightArea] = area.split({sizes:["75%","25%"]});
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
|
|
93
93
|
if(mode == types.KEYFRAMES) {
|
|
94
94
|
let ctx = canvas.getContext("2d");
|
|
95
|
-
ctx.fillStyle = LX.getThemeColor("global-
|
|
95
|
+
ctx.fillStyle = LX.getThemeColor("global-color-accent");
|
|
96
96
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
97
97
|
ctx.font = panel.getValue('Font Size') + "px Monospace";
|
|
98
98
|
ctx.fillStyle = panel.getValue('Font Color');
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
|
|
113
113
|
function fillPanel( panel ) {
|
|
114
114
|
panel.clear();
|
|
115
|
-
panel.branch("Canvas", {icon: "
|
|
116
|
-
panel.addColor("Background", LX.getThemeColor("global-
|
|
115
|
+
panel.branch("Canvas", {icon: "Palette", filter: true});
|
|
116
|
+
panel.addColor("Background", LX.getThemeColor("global-color-accent"));
|
|
117
117
|
panel.addText("Track", trackName, null)
|
|
118
|
-
panel.addText("Text", "Lexgui.js @evallsg", null, {placeholder: "e.g. ColorPicker", icon: "
|
|
118
|
+
panel.addText("Text", "Lexgui.js @evallsg", null, {placeholder: "e.g. ColorPicker", icon: "Type"});
|
|
119
119
|
panel.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
120
120
|
console.log("Font Color: ", value);
|
|
121
121
|
});
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
panel.branch(clip.name || "Clip", {
|
|
150
|
+
panel.branch(clip.name || "Clip", {filter: true});
|
|
151
151
|
panel.addNumber("Start", clip.start, (v) => {
|
|
152
152
|
const diff = v - clip.start;
|
|
153
153
|
clip.start = v;
|
|
@@ -191,12 +191,12 @@
|
|
|
191
191
|
panel.addSelect("Animation", ["Anim 1", "Anim 2", "Anim 3"], "Anim 1", ()=> {})
|
|
192
192
|
},
|
|
193
193
|
onAfterCreateTopBar: (panel) => {
|
|
194
|
-
panel.addButton("autoKeyEnabled", "autoKeyEnable", null, { icon: '
|
|
195
|
-
panel.addButton("unselectAll", "unselectAll", (value, event) => { kfTimeline.unSelectAllKeyFrames();}, { icon: '
|
|
194
|
+
panel.addButton("autoKeyEnabled", "autoKeyEnable", null, { icon: 'WandSparkles', hideName: true });
|
|
195
|
+
panel.addButton("unselectAll", "unselectAll", (value, event) => { kfTimeline.unSelectAllKeyFrames();}, { icon: 'X', hideName: true, callback: (value, event) => { kfTimeline.unSelectAllKeyFrames();} });
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
-
keyframesPanel.attach(kfTimeline.
|
|
199
|
+
keyframesPanel.attach(kfTimeline.mainArea);
|
|
200
200
|
kfTimeline.setAnimationClip({tracks: [{name: "Font.position", values: [250, 450, 250, 250, 250, 450], times: [0, 0.5, 1.0]}, {name: "Item 1.scale", values: [0,1,0, 0.5], times: [0, 0.1, 0.2, 0.3]}, {name: "Item 2", values: [0,1,0,1], times: [0.1]}, {name: "Item 3.position", values: [0,1,0,0,0,0], times: [0.1, 0.2, 0.3]}, {name: "Item 3.scale", values: [0,1,0], times: [ 0.1, 0.2, 0.3]}], duration: 1});
|
|
201
201
|
kfTimeline.setSelectedItems(["Font", "Item 2", "Item 3"]);
|
|
202
202
|
activeTimeline = kfTimeline;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { LX } from 'lexgui';
|
|
23
23
|
import { VideoEditor } from 'lexgui/components/videoeditor.js';
|
|
24
24
|
// init library and get main area
|
|
25
|
-
let area = LX.init();
|
|
25
|
+
let area = await LX.init();
|
|
26
26
|
|
|
27
27
|
// split main area
|
|
28
28
|
let [leftArea, rightArea] = area.split({ sizes: ["75%", "25%"], minimizable: true });
|
|
@@ -23,10 +23,9 @@
|
|
|
23
23
|
import { VideoEditor } from 'lexgui/components/videoeditor.js';
|
|
24
24
|
|
|
25
25
|
// Init library and get main area
|
|
26
|
-
let area = LX.init();
|
|
27
|
-
const menubar = area.addMenubar(
|
|
28
|
-
|
|
29
|
-
});
|
|
26
|
+
let area = await LX.init();
|
|
27
|
+
const menubar = area.addMenubar();
|
|
28
|
+
menubar.setButtonImage("Page", "../data/godot_pixelart.png", null, { float: "left" });
|
|
30
29
|
|
|
31
30
|
// Split main area
|
|
32
31
|
let [leftArea, rightArea] = area.split({ sizes: ["75%", "25%"], minimizable: true });
|
|
@@ -69,7 +68,7 @@
|
|
|
69
68
|
videoArea.addOverlayButtons([{
|
|
70
69
|
selectable: true,
|
|
71
70
|
selected: true,
|
|
72
|
-
icon: "
|
|
71
|
+
icon: "Info",
|
|
73
72
|
name: "Properties",
|
|
74
73
|
callback: (v, e) => {
|
|
75
74
|
if (area.split_extended) {
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
|
|
88
87
|
videoArea.sections[1].root.resize(["20%", "20%"])
|
|
89
88
|
}, { width: "100px" })
|
|
90
|
-
p.addButton(null, null, (v) => { }, { width: "40px", icon: "
|
|
89
|
+
p.addButton(null, null, (v) => { }, { width: "40px", icon: "RotateLeft" })
|
|
91
90
|
|
|
92
91
|
/* Create right panel */
|
|
93
92
|
let panel = new LX.Panel({ id: "Properties" });
|