lexgui 0.5.11 → 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/changelog.md CHANGED
@@ -2,7 +2,35 @@
2
2
 
3
3
  ## dev
4
4
 
5
- ## 0.5.11 (master)
5
+ ## 0.6.0 (master)
6
+
7
+ `LX.init` now has to called using `await`.
8
+ Use Dropdowns elements in menubar.
9
+ Remove legacy:
10
+ - Removed `options.selected` in ComboButtons Widget.
11
+ - Removed FA icons.
12
+ Added LucideIcons as main icon provider.
13
+ `LX.makeIcon`: Support for solid variants in supported icons (also using `iconName@variant`).
14
+ `LX.registerIcon`: Support for classes and attributes for svg and path elements.
15
+ Refactor `strictViewport` to `layoutMode` (app|document) in `LX.init`.
16
+ Added support for Sheet element (hiding dialog at the window sides).
17
+ Support disabling layer (zindex) update in `LX.makeDraggable` using `options.updateLayers`.
18
+ Fixed minor issues with some Nodegraph elements.
19
+ Added `className` to `LX.sameLine(numberOfWidgets, class)` to allow customization when using `numberOfWidgets`.
20
+ Added support for right sidebar.
21
+ Restyled Number Widget units to avoid layout trashing when recomputing units span location.
22
+
23
+ CodeEditor:
24
+ - Remove language images and use SVG instead.
25
+ - Scrolling fixes.
26
+ - Fixed minor css issues.
27
+
28
+ Docs updated:
29
+ - Added interactive code examples for widgets.
30
+ - Improved widget list parameters and options.
31
+ - Added live examples for sidebar and menubar.
32
+
33
+ ## 0.5.11
6
34
 
7
35
  Widgets:
8
36
  - Form: Add more custom options. Fixed issue using a String as Form field.
package/demo.js CHANGED
@@ -5,39 +5,39 @@ import 'lexgui/components/audio.js';
5
5
 
6
6
  window.LX = LX;
7
7
 
8
- const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
8
+ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
9
+
9
10
 
10
11
  // Menubar
11
12
  {
12
- area.addMenubar( m => {
13
-
14
- m.setButtonImage("lexgui.js", "images/icon.png", () => {window.open("https://jxarco.github.io/lexgui.js/")}, {float: "left"})
13
+ const menubar = area.addMenubar( [
14
+ { name: "Docs", icon: "search", kbd: "F1", callback: () => { window.open("./docs/") } }
15
+ ] );
15
16
 
16
- m.add( "Docs", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
17
+ menubar.setButtonImage("lexgui.js", "images/icon.png", () => {window.open("https://jxarco.github.io/lexgui.js/")}, {float: "left"})
17
18
 
18
- const commandButton = new LX.Button(null, "Search command...", () => { LX.setCommandbarState( true ) }, {
19
- width: "256px", className: "right", buttonClass: "border left fg-tertiary bg-secondary" }
20
- );
21
- m.root.appendChild( commandButton.root );
19
+ const commandButton = new LX.Button(null, "Search command...", () => { LX.setCommandbarState( true ) }, {
20
+ width: "256px", className: "right", buttonClass: "border left fg-tertiary bg-secondary" }
21
+ );
22
+ menubar.root.appendChild( commandButton.root );
22
23
 
23
- const starterTheme = LX.getTheme();
24
+ const starterTheme = LX.getTheme();
24
25
 
25
- m.addButtons( [
26
- {
27
- title: "Github",
28
- icon: "fa-brands fa-github",
29
- callback: (event) => {
30
- window.open( "https://github.com/jxarco/lexgui.js/", "_blank" );
31
- }
32
- },
33
- {
34
- title: "Switch Theme",
35
- icon: starterTheme == "dark" ? "fa-solid fa-moon" : "fa-solid fa-sun",
36
- swap: starterTheme == "dark" ? "fa-solid fa-sun" : "fa-solid fa-moon",
37
- callback: (value, event) => { LX.switchTheme() }
26
+ menubar.addButtons( [
27
+ {
28
+ title: "Github",
29
+ icon: "Github@solid",
30
+ callback: (event) => {
31
+ window.open( "https://github.com/jxarco/lexgui.js/", "_blank" );
38
32
  }
39
- ], { float: "right" });
40
- });
33
+ },
34
+ {
35
+ title: "Switch Theme",
36
+ icon: starterTheme == "dark" ? "Moon" : "Sun",
37
+ swap: starterTheme == "dark" ? "Sun" : "Moon",
38
+ callback: (value, event) => { LX.switchTheme() }
39
+ }
40
+ ], { float: "right" });
41
41
  }
42
42
 
43
43
  // Header
@@ -62,34 +62,49 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
62
62
  const editorArea = new LX.Area({ className: "rounded-lg" });
63
63
  editorContainer.appendChild( editorArea.root );
64
64
 
65
- editorArea.addMenubar( m => {
66
- m.add( "Scene/New Scene", () => { console.log("New scene created!") });
67
- m.add( "Scene/Open Scene", { icon: "fa-solid fa-folder-open", short: "S" } );
68
- m.add( "Scene/Open Recent/hello.scene" );
69
- m.add( "Scene/Open Recent/Old/goodbye.scene" );
70
- m.add( "Scene/Open Recent/Old/salute.scene" );
71
- m.add( "Project/Project Settings", { disabled: true } );
72
- m.add( "Project/" );
73
- m.add( "Project/Export", { icon: "fa-solid fa-download" });
74
- m.add( "Project/Export/DAE", { icon: "fa-solid fa-cube", short: "D" } );
75
- m.add( "Project/Export/GLTF", { short: "G" } );
76
- m.add( "Account/Login", { icon: "fa-solid fa-user" } );
77
- m.add( "Help/Search Help", { icon: "fa-solid fa-magnifying-glass", short: "F1" } );
78
- m.add( "Help/Support LexGUI/Please", { icon: "fa-solid fa-heart" } );
79
- m.add( "Help/Support LexGUI/Do it" );
80
- m.addButtons( [
81
- {
82
- title: "Play",
83
- icon: "fa-solid fa-play",
84
- swap: "fa-solid fa-stop"
85
- },
86
- {
87
- title: "Pause",
88
- icon: "fa-solid fa-pause",
89
- disabled: true
90
- }
91
- ]);
92
- }, { sticky: false });
65
+ const menubar = editorArea.addMenubar( [
66
+ { name: "Scene", submenu: [
67
+ { name: "New Scene" },
68
+ { name: "Open Scene", icon: "FolderOpen", kbd: "S" },
69
+ { name: "Open Recent", icon: "File", submenu: [
70
+ { name: "hello.scene" },
71
+ { name: "goodbye.scene" }
72
+ ] }
73
+ ] },
74
+ { name: "Project", submenu: [
75
+ { name: "Project Settings", disabled: true },
76
+ null,
77
+ { name: "Export", submenu: [
78
+ { name: "DAE", icon: "Frame", kbd: "D" },
79
+ { name: "GLTF", kbd: "G" }
80
+ ] },
81
+ { name: "Export", icon: "Download" }
82
+ ] },
83
+ { name: "Editor", submenu: [
84
+ { name: "Autosave", checked: true, icon: "Save" },
85
+ { name: "Settings", icon: "Settings2" },
86
+ ] },
87
+ { name: "Account", submenu: [
88
+ { name: "Login", icon: "User" },
89
+ ] },
90
+ { name: "Help", submenu: [
91
+ { name: "Search Help", icon: "Search", kbd: "F1" },
92
+ { name: "Support LexGUI", icon: "Heart" },
93
+ ] },
94
+ ], { sticky: false });
95
+
96
+ menubar.addButtons( [
97
+ {
98
+ title: "Play",
99
+ icon: "Play@solid",
100
+ swap: "Stop@solid"
101
+ },
102
+ {
103
+ title: "Pause",
104
+ icon: "Pause@solid",
105
+ disabled: true
106
+ }
107
+ ]);
93
108
 
94
109
  // split main area
95
110
  const [ left, right ] = editorArea.split({ sizes:["70%","30%"], minimizable: true });
@@ -110,13 +125,13 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
110
125
  left.onresize = resizeCanvas;
111
126
  left.addOverlayButtons( [
112
127
  [
113
- { name: "Select", icon: "fa fa-arrow-pointer", selectable: true },
114
- { name: "Move", icon: "fa-solid fa-arrows-up-down-left-right", selectable: true },
115
- { name: "Rotate", icon: "fa-solid fa-rotate-right", selectable: true }
128
+ { name: "Select", icon: "MousePointer", selectable: true },
129
+ { name: "Move", icon: "Move", selectable: true },
130
+ { name: "Rotate", icon: "RotateRight", selectable: true }
116
131
  ],
117
132
  { name: "Lit", options: ["Lit", "Unlit", "Wireframe"] },
118
133
  [
119
- { name: "Enable Snap", icon: "fa fa-table-cells", selectable: true },
134
+ { name: "Enable Snap", icon: "Frame", selectable: true },
120
135
  { name: 10, options: [10, 100, 1000] }
121
136
  ]
122
137
  ], { float: "htc" } );
@@ -153,12 +168,12 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
153
168
  'children': [
154
169
  {
155
170
  'id': 'node_1_1',
156
- 'icon': 'fa-solid fa-cube',
171
+ 'icon': 'Box',
157
172
  'children': [],
158
173
  'actions': [
159
174
  {
160
175
  'name': 'Open script',
161
- 'icon': 'fa-solid fa-scroll'
176
+ 'icon': 'Script'
162
177
  }
163
178
  ]
164
179
  }
@@ -166,7 +181,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
166
181
  },
167
182
  {
168
183
  'id': 'node_2',
169
- 'icon': 'fa-solid fa-circle-play',
184
+ 'icon': 'CirclePlay',
170
185
  'children': []
171
186
  }
172
187
  ]
@@ -176,11 +191,11 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
176
191
  const treeIcons = [
177
192
  {
178
193
  'name':'Add node',
179
- 'icon': 'fa-solid fa-plus'
194
+ 'icon': 'Plus'
180
195
  },
181
196
  {
182
197
  'name':'Instantiate scene',
183
- 'icon': 'fa-solid fa-link'
198
+ 'icon': 'Link'
184
199
  }
185
200
  ];
186
201
 
@@ -199,9 +214,9 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
199
214
  });
200
215
 
201
216
  // add widgets to panel branch
202
- panel.branch("Canvas", {icon: "fa-solid fa-palette", filter: true});
217
+ panel.branch("Canvas", { icon: "Palette", filter: true });
203
218
  panel.addColor("Background", "#b7a9b1", null);
204
- panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "fa fa-font"});
219
+ panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "Type"});
205
220
  panel.addColor("Font Color", "#303b8d", null);
206
221
  panel.addNumber("Font Size", 36, null, { min: 1, max: 48, step: 1, units: "px"});
207
222
  panel.addSelect("Font Family", ["Arial", "GeistSans", "Monospace", "Ubuntu"], "GeistSans");
@@ -216,7 +231,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
216
231
  panel.addSize("Resolution", [1280, 720], null, { units: "p", precision: 0 });
217
232
  panel.merge();
218
233
 
219
- panel.branch("Node", { icon: "fa-solid fa-cube" });
234
+ panel.branch("Node", { icon: "Box" });
220
235
  panel.addText("Name", "node_1");
221
236
  panel.addCheckbox("Visibility", true, null, { className: "accent" });
222
237
  panel.addLayers("Layers", 10, null);
@@ -240,18 +255,18 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
240
255
  const badgeClass = "ml-auto no-bg font-medium";
241
256
 
242
257
  const sidebar = mailArea.addSidebar( m => {
243
- m.add( "Inbox", { selected: true, icon: "inbox", content: LX.badge("128", badgeClass, { asElement: true }) } );
244
- m.add( "Drafts", { icon: "file", content: LX.badge("9", badgeClass, { asElement: true }) } );
245
- m.add( "Sent", { icon: "paper-plane" } );
246
- m.add( "Junk", { icon: "box-archive-x", content: LX.badge("23", badgeClass, { asElement: true }) } );
247
- m.add( "Trash", { icon: "trash-can" } );
248
- m.add( "Archive", { icon: "box-archive" } );
258
+ m.add( "Inbox", { selected: true, icon: "Inbox", content: LX.badge("128", badgeClass, { asElement: true }) } );
259
+ m.add( "Drafts", { icon: "File", content: LX.badge("9", badgeClass, { asElement: true }) } );
260
+ m.add( "Sent", { icon: "PaperPlane" } );
261
+ m.add( "Junk", { icon: "ArchiveX", content: LX.badge("23", badgeClass, { asElement: true }) } );
262
+ m.add( "Trash", { icon: "Trash3" } );
263
+ m.add( "Archive", { icon: "Archive" } );
249
264
  m.separator();
250
- m.add( "Social", { icon: "user", content: LX.badge("972", badgeClass, { asElement: true }) } );
251
- m.add( "Updates", { icon: "circle-info", content: LX.badge("342", badgeClass, { asElement: true }) } );
252
- m.add( "Forums", { icon: "comments", content: LX.badge("96", badgeClass, { asElement: true }) } );
253
- m.add( "Shopping ", { icon: "shopping-cart" } );
254
- m.add( "Promotions", { icon: "flag", content: LX.badge("21", badgeClass, { asElement: true }) } );
265
+ m.add( "Social", { icon: "User", content: LX.badge("972", badgeClass, { asElement: true }) } );
266
+ m.add( "Updates", { icon: "Info", content: LX.badge("342", badgeClass, { asElement: true }) } );
267
+ m.add( "Forums", { icon: "MessagesCircle", content: LX.badge("96", badgeClass, { asElement: true }) } );
268
+ m.add( "Shopping ", { icon: "ShoppingCart" } );
269
+ m.add( "Promotions", { icon: "Flag", content: LX.badge("21", badgeClass, { asElement: true }) } );
255
270
  }, {
256
271
  className: "border-right",
257
272
  headerTitle: "jxarco",
@@ -281,7 +296,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
281
296
  {
282
297
  const allMailFilter = LX.makeContainer( [ "100%", "50px" ], "flex p-2", "", container );
283
298
  const filterInput = new LX.TextInput(null, "", null,
284
- { inputClass: "outline", width: "100%", icon: "fa fa-magnifying-glass", placeholder: "Search..." }
299
+ { inputClass: "outline", width: "100%", icon: "Search", placeholder: "Search..." }
285
300
  );
286
301
  allMailFilter.appendChild( filterInput.root );
287
302
  }
@@ -348,15 +363,15 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
348
363
  {
349
364
  const mailPreviewHeader = LX.makeContainer( [ "100%", "59.59px" ], "flex flex-row border-bottom p-1", "", right );
350
365
 
351
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Archive", tooltip: true, buttonClass: "bg-none", icon: "box-archive" } ).root );
352
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to junk", tooltip: true, buttonClass: "bg-none", icon: "box-archive-x" } ).root );
353
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to trash", tooltip: true, buttonClass: "bg-none", icon: "trash-can" } ).root );
366
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Archive", tooltip: true, buttonClass: "bg-none", icon: "Archive" } ).root );
367
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to junk", tooltip: true, buttonClass: "bg-none", icon: "ArchiveX" } ).root );
368
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to trash", tooltip: true, buttonClass: "bg-none", icon: "Trash3" } ).root );
354
369
  mailPreviewHeader.appendChild( LX.makeContainer( [ "1px", "35%" ], "border-right self-center ml-2 mr-2" ) );
355
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Snooze", tooltip: true, buttonClass: "bg-none", icon: "clock" } ).root );
370
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Snooze", tooltip: true, buttonClass: "bg-none", icon: "Clock" } ).root );
356
371
 
357
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply", tooltip: true, buttonClass: "bg-none", className: "ml-auto", icon: "reply" } ).root );
358
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply all", tooltip: true, buttonClass: "bg-none", icon: "reply-all" } ).root );
359
- mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Forward", tooltip: true, buttonClass: "bg-none", icon: "forward" } ).root );
372
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply", tooltip: true, buttonClass: "bg-none", className: "ml-auto", icon: "Reply" } ).root );
373
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Reply all", tooltip: true, buttonClass: "bg-none", icon: "ReplyAll" } ).root );
374
+ mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Forward", tooltip: true, buttonClass: "bg-none", icon: "Forward" } ).root );
360
375
  mailPreviewHeader.appendChild( LX.makeContainer( [ "1px", "35%" ], "border-right self-center ml-2 mr-2" ) );
361
376
  mailPreviewHeader.appendChild( new LX.Button( null, "", (value, event) => {
362
377
  new LX.DropdownMenu( event.target, [
@@ -365,7 +380,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
365
380
  { name: "Add label" },
366
381
  { name: "Mute thread" }
367
382
  ], { side: "bottom", align: "end" });
368
- }, { buttonClass: "bg-none", icon: "more" } ).root );
383
+ }, { buttonClass: "bg-none", icon: "EllipsisVertical" } ).root );
369
384
  }
370
385
 
371
386
  // Prewiew Info
@@ -446,7 +461,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
446
461
  { name: "Priority", options: ["Low", "Medium", "High"] },
447
462
  ],
448
463
  rowActions: [
449
- { icon: "edit", title: "Edit Row" },
464
+ { icon: "Edit", title: "Edit Row" },
450
465
  "delete",
451
466
  "menu"
452
467
  ],
@@ -517,8 +532,8 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
517
532
  ],
518
533
  credits: `2019-${ new Date().getUTCFullYear() } Alex Rodríguez and contributors. Website source code on GitHub.`,
519
534
  socials: [
520
- { title: "Github", link: "https://github.com/jxarco/lexgui.js/", icon: `<a class="fa-brands fa-github"></a>` },
521
- { title: "Discord", link: "https://discord.gg/vwqVrMZBXv", icon: `<a class="fa-brands fa-discord"></a>` }
535
+ { title: "Github", link: "https://github.com/jxarco/lexgui.js/", icon: "Github" },
536
+ { title: "Discord", link: "https://discord.gg/vwqVrMZBXv", icon: "Discord" }
522
537
  ]
523
538
  } );
524
539
  }
@@ -30,26 +30,25 @@
30
30
  window.LX = LX;
31
31
 
32
32
  // Init library and get main area
33
- let area = LX.init();
34
-
35
- area.addMenubar(m => {
36
- m.addButtons([
37
- {
38
- title: "Toggle Sections",
39
- icon: "fa-solid fa-eye",
40
- callback: (swapValue) => { closedDefault = !closedDefault; fillPanels(); }
41
- },
42
- {
43
- title: "Change Theme",
44
- icon: "fa-solid fa-moon",
45
- swap: "fa-solid fa-sun",
46
- callback: (swapValue) => { LX.setTheme(swapValue ? "light" : "dark") }
47
- }
48
- ]);
49
-
50
- m.setButtonIcon("Github", "fa-brands fa-github", () => { window.open("https://github.com/jxarco/lexgui.js/") })
51
- m.setButtonImage("lexgui.js", "../images/icon.png", () => { window.open("https://jxarco.github.io/lexgui.js/") }, { float: "left" })
52
- }, { sticky: false });
33
+ let area = await LX.init();
34
+
35
+ const menubar = area.addMenubar( [], { sticky: false } );
36
+ menubar.addButtons([
37
+ {
38
+ title: "Toggle Sections",
39
+ icon: "Eye",
40
+ callback: (swapValue) => { closedDefault = !closedDefault; fillPanels(); }
41
+ },
42
+ {
43
+ title: "Change Theme",
44
+ icon: "Moon",
45
+ swap: "Sun",
46
+ callback: (swapValue) => { LX.setTheme(swapValue ? "light" : "dark") }
47
+ }
48
+ ]);
49
+
50
+ menubar.setButtonIcon("Github", "Github", () => { window.open("https://github.com/jxarco/lexgui.js/") })
51
+ menubar.setButtonImage("lexgui.js", "../images/icon.png", () => { window.open("https://jxarco.github.io/lexgui.js/") }, { float: "left" })
53
52
 
54
53
  var [middle, right] = area.split({ sizes: ["70%", "30%"], minimizable: true });
55
54
  var [left, center] = middle.split({ sizes: ["50%", null], minimizable: true });
@@ -72,9 +71,9 @@
72
71
  panelC.root.innerHTML = "";
73
72
 
74
73
  const comboValues = [
75
- { value: 'left', selected: true, icon: 'fa fa-align-left' },
76
- { value: 'center', icon: 'fa fa-align-center' },
77
- { value: 'right', icon: 'fa fa-align-right' }
74
+ { value: 'left', selected: true, icon: 'AlignLeft' },
75
+ { value: 'center', icon: 'AlignCenter' },
76
+ { value: 'right', icon: 'AlignRight' }
78
77
  ];
79
78
 
80
79
  const selectValues = ["Godot", "Unity", "Unreal Engine", "Visual Studio", "Visual Studio Code"];
@@ -108,19 +107,19 @@
108
107
  buttonsLeftPanel.addButton(null, "Warning", null, { disabled: true, buttonClass: "warning" });
109
108
  buttonsLeftPanel.addButton(null, "Error", null, { disabled: true, buttonClass: "error" });
110
109
  buttonsLeftPanel.branch("Advanced Buttons", { closed: closedDefault });
111
- buttonsLeftPanel.addButton("Icon Button", "Not used", null, { icon: "fa fa-skull" });
110
+ buttonsLeftPanel.addButton("Icon Button", "Not used", null, { icon: "Skull" });
112
111
  buttonsLeftPanel.sameLine();
113
112
  buttonsLeftPanel.addLabel("Customized Inline Buttons");
114
- buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-skull", buttonClass: "bg-none" });
115
- buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-cube", buttonClass: "bg-primary" });
116
- buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-table-cells", buttonClass: "bg-tertiary fg-tertiary" });
113
+ buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Skull", buttonClass: "bg-none" });
114
+ buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Box", buttonClass: "bg-primary" });
115
+ buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Grid3x3", buttonClass: "bg-tertiary fg-tertiary" });
117
116
  buttonsLeftPanel.endLine("justify-start");
118
117
  buttonsLeftPanel.sameLine();
119
118
  buttonsLeftPanel.addLabel("Swap Buttons");
120
- buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-moon", swap: "fa fa-sun", buttonClass: "bg-none" });
121
- buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-eye", swap: "fa fa-eye-slash" });
119
+ buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Moon", swap: "Sun", buttonClass: "bg-none" });
120
+ buttonsLeftPanel.addButton(null, "Not used", null, { icon: "Eye", swap: "EyeOff" });
122
121
  buttonsLeftPanel.endLine("justify-start");
123
- buttonsLeftPanel.addButton(null, LX.makeIcon("circle-plus").innerHTML + "Button with Inlined Icon", null);
122
+ buttonsLeftPanel.addButton(null, LX.makeIcon("CirclePlus").innerHTML + "Button with Inlined Icon", null);
124
123
  buttonsLeftPanel.addButton(null, "With a Badge" + LX.badge("+99", "accent sm"));
125
124
  buttonsRightPanel.branch("Outline Buttons", { closed: closedDefault });
126
125
  buttonsRightPanel.addButton(null, "Classic Outline", null, { buttonClass: "outline" });
@@ -265,12 +264,12 @@
265
264
  'children': [
266
265
  {
267
266
  'id': 'node_1_1',
268
- 'icon': 'fa-solid fa-cube',
267
+ 'icon': 'Box',
269
268
  'children': [],
270
269
  'actions': [
271
270
  {
272
271
  'name': 'Open script',
273
- 'icon': 'fa-solid fa-scroll',
272
+ 'icon': 'Script',
274
273
  'callback': function (node) {
275
274
  console.log(node.id + ": Script opened!")
276
275
  }
@@ -281,7 +280,7 @@
281
280
  },
282
281
  {
283
282
  'id': 'node_2',
284
- 'icon': 'fa-solid fa-circle-play',
283
+ 'icon': 'CirclePlay',
285
284
  'children': []
286
285
  },
287
286
  {
@@ -289,12 +288,12 @@
289
288
  'children': [
290
289
  {
291
290
  'id': 'node_3_1',
292
- 'icon': 'fa-solid fa-cube',
291
+ 'icon': 'Box',
293
292
  'children': []
294
293
  },
295
294
  {
296
295
  'id': 'node_3_2',
297
- 'icon': 'fa-solid fa-cube',
296
+ 'icon': 'Box',
298
297
  'children': []
299
298
  }
300
299
  ]
@@ -306,12 +305,12 @@
306
305
  const treeIcons = [
307
306
  {
308
307
  'name': 'Add node',
309
- 'icon': 'fa-solid fa-plus',
308
+ 'icon': 'Plus',
310
309
  'callback': () => { console.log("Node added!") }
311
310
  },
312
311
  {
313
312
  'name': 'Instantiate scene',
314
- 'icon': 'fa-solid fa-link',
313
+ 'icon': 'Link',
315
314
  'callback': () => { console.log("Scene instantiated!") }
316
315
  }
317
316
  ];
@@ -357,7 +356,7 @@
357
356
  { name: "Priority", options: ["Low", "Medium", "High"] },
358
357
  ],
359
358
  rowActions: [
360
- { icon: "edit", title: "Edit Row" },
359
+ { icon: "Edit", title: "Edit Row" },
361
360
  "delete",
362
361
  "menu"
363
362
  ],
@@ -23,7 +23,7 @@
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
  var [leftArea, rightArea] = area.split({ sizes: ["75%", "25%"] });
@@ -84,9 +84,9 @@
84
84
  // **** **** **** **** **** **** **** **** **** **** **** ****
85
85
 
86
86
  function fillPanelA(panel) {
87
- panel.branch("Canvas", { icon: "fa-solid fa-palette", filter: true });
87
+ panel.branch("Canvas", { icon: "Palette", filter: true });
88
88
  panel.addColor("Background", "#b7a9b1");
89
- panel.addText("Text", "Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
89
+ panel.addText("Text", "Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
90
90
  panel.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
91
91
  console.log("Font Color: ", value);
92
92
  });
@@ -100,7 +100,7 @@
100
100
  }
101
101
 
102
102
  function fillPanelB(panel) {
103
- panel.branch("Settings", { icon: "fa-solid fa-palette", filter: true });
103
+ panel.branch("Settings", { icon: "Palette", filter: true });
104
104
  panel.addTitle("Configuration (Im a title)");
105
105
  panel.addCheckbox("Toggle me", true, (value, event) => {
106
106
  console.log(value);
@@ -115,7 +115,7 @@
115
115
  }
116
116
 
117
117
  function fillPanelC(panel) {
118
- panel.branch("Some Branch", { icon: "fa-solid fa-palette", filter: true });
118
+ panel.branch("Some Branch", { icon: "Palette", filter: true });
119
119
  panel.addTitle("C title");
120
120
  panel.addToggle("A cool Toggle", true, (value, event) => {
121
121
  console.log(value);
@@ -23,7 +23,7 @@
23
23
  import 'lexgui/components/codeeditor.js';
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
  var [topArea, bottomArea] = area.split({ type: 'vertical', sizes: ["60vh", "40vh"] });
@@ -23,7 +23,7 @@
23
23
  import 'lexgui/components/codeeditor.js';
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
  const fileExplorer = true;
29
29
 
@@ -22,14 +22,14 @@
22
22
  import { LX } from 'lexgui';
23
23
 
24
24
  // Init library and get main area
25
- let area = LX.init({ skip_default_area: true });
25
+ let area = await LX.init({ skip_default_area: true });
26
26
 
27
27
  LX.popup("Hello! I'm a popup dialog :)", null, { position: ["45%", "20%"] })
28
28
 
29
29
  const pocketDialog = new LX.PocketDialog("Load Settings", p => {
30
30
  p.branch("Canvas");
31
31
  p.addColor("Background", "#b7a9b1");
32
- p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
32
+ p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
33
33
  p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
34
34
  console.log("Font Color: ", value);
35
35
  });
@@ -49,7 +49,7 @@
49
49
  const dialogClosable = new LX.Dialog("Closable Dialog", p => {
50
50
  p.branch("Canvas");
51
51
  p.addColor("Background", "#b7a9b1");
52
- p.addText("Text", "Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
52
+ p.addText("Text", "Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
53
53
  p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
54
54
  console.log("Font Color: ", value);
55
55
  });
@@ -68,7 +68,7 @@
68
68
  const draggablePocketDialog = new LX.PocketDialog("Draggable PocketDialog", p => {
69
69
  p.branch("Canvas");
70
70
  p.addColor("Background", "#b7a9b1");
71
- p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
71
+ p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
72
72
  p.addSelect("Best Engine", ["Godot", "Unity", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Pepe"], "Godot", (value, event) => {
73
73
  console.log(value);
74
74
  }, { filter: true });
@@ -23,7 +23,7 @@
23
23
  import 'lexgui/components/imui.js';
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
  // add canvas to area
29
29
  var canvas = document.createElement('canvas');