lexgui 0.6.12 → 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 +95 -63
- 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 +23 -23
- package/build/{components → extensions}/videoeditor.js +1 -1
- package/build/lexgui-docs.css +9 -9
- package/build/lexgui.css +484 -224
- package/build/lexgui.js +1399 -735
- package/build/lexgui.min.css +2 -2
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +1400 -736
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +72 -21
- package/demo.js +43 -30
- package/examples/{all_widgets.html → all-components.html} +21 -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 +4 -4
- 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/changelog.md
CHANGED
|
@@ -2,7 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
## dev
|
|
4
4
|
|
|
5
|
-
## 0.
|
|
5
|
+
## 0.7.0 (master)
|
|
6
|
+
|
|
7
|
+
General/Utils:
|
|
8
|
+
- "Components" have been renamed to "Extensions".
|
|
9
|
+
- Every elements, widget, etc. is now a "Component".
|
|
10
|
+
- Added support for `LX.toCamelCase` and `LX.toTitleCase`.
|
|
11
|
+
- Polished CSS.
|
|
12
|
+
- Changed LexGUI brand icons.
|
|
13
|
+
- Unified code fonts. Using now CascadiaCode (https://github.com/microsoft/cascadia-code).
|
|
14
|
+
|
|
15
|
+
New Components:
|
|
16
|
+
- Skeleton Component (Feedback)
|
|
17
|
+
- Breadcrumb Component (Navigation)
|
|
18
|
+
- Rate Component (Data Input)
|
|
19
|
+
|
|
20
|
+
New "default" | "compact" layout spacing:
|
|
21
|
+
- `options.spacingMode` in LX.init
|
|
22
|
+
- `LX.setSpacingMode` and `LX.switchSpacing`
|
|
23
|
+
|
|
24
|
+
Component Updates:
|
|
25
|
+
- Badges:
|
|
26
|
+
- Added `options.parent` to use them as notification indicators inside an element
|
|
27
|
+
- Added `options.chip` to use as notification indicators alone
|
|
28
|
+
- Added `options.callback` option on click.
|
|
29
|
+
- Toast:
|
|
30
|
+
- Allow creation at left, center and right + top/bottom using `options.position`.
|
|
31
|
+
- Sidebar:
|
|
32
|
+
- Added subitem option `options.content` to match main items.
|
|
33
|
+
- Added entry option `options.skipSelection` to avoid selections even with `displaySelected`.
|
|
34
|
+
- Support swap icons in entries.
|
|
35
|
+
- Fixed subentry selection.
|
|
36
|
+
- Dropdowns:
|
|
37
|
+
- Support radio button groups.
|
|
38
|
+
- AssetView:
|
|
39
|
+
- Improved toolbar with Dropdowns. Now refreshes icons on change sort and layout modes.
|
|
40
|
+
- Table:
|
|
41
|
+
- Added support for Calendar Date filter in Table Component.
|
|
42
|
+
- Other Bugfixes:
|
|
43
|
+
- Fixed Select Component above placement on filter.
|
|
44
|
+
- FIxed CodeEditor 'End' horizontal scrolling.
|
|
45
|
+
- Fixed CodeEditor CSS harcoded Tab height.
|
|
46
|
+
- Fixed dropdown, popovers, etc within modal backdrop.
|
|
47
|
+
- Fixed minor issue with CalendarRange when selecting >1 months apart.
|
|
48
|
+
|
|
49
|
+
Improved Documentation:
|
|
50
|
+
- Added AssetView, CodeSnippet and other small components (badge, sheet, toast, etc.).
|
|
51
|
+
- Added Docmaker and Video Editor extension docs.
|
|
52
|
+
- Added addition version to elements in sidebar.
|
|
53
|
+
- Added Changelog section.
|
|
54
|
+
|
|
55
|
+
## 0.6.12
|
|
6
56
|
|
|
7
57
|
Widgets:
|
|
8
58
|
- Button Widget now supports `options.mustConfirm` to confirm the trigger with custom options.
|
|
@@ -122,10 +172,10 @@ Added `hover:scale` CSS selectors.
|
|
|
122
172
|
## 0.6.5
|
|
123
173
|
|
|
124
174
|
Timeline:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
175
|
+
- Refactored undo-redo.
|
|
176
|
+
- ClipsTimeline: added an argument on `addClip` to start search at a particular track.
|
|
177
|
+
- Documentation updated.
|
|
178
|
+
- Minor fixes.
|
|
129
179
|
|
|
130
180
|
Use sidebar inside Sheet element on mobile.
|
|
131
181
|
Removed LX.UTILS. Moved methods to global namespace `LX`.
|
|
@@ -134,11 +184,11 @@ Minor fixes in example demos.
|
|
|
134
184
|
## 0.6.4
|
|
135
185
|
|
|
136
186
|
Timeline:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
187
|
+
- Paste refactor.
|
|
188
|
+
- `onUpdateTrack` now expects an array of track indices as argument.
|
|
189
|
+
- Added root.
|
|
190
|
+
- Added documentation.
|
|
191
|
+
- Fixed example.
|
|
142
192
|
|
|
143
193
|
Widgets:
|
|
144
194
|
- Centered Map2D initial position.
|
|
@@ -190,9 +240,6 @@ Improved robustness of `LX.getSupportedDOMName`.
|
|
|
190
240
|
|
|
191
241
|
`LX.init` now has to called using `await`.
|
|
192
242
|
Use Dropdowns elements in menubar.
|
|
193
|
-
Remove legacy:
|
|
194
|
-
- Removed `options.selected` in ComboButtons Widget.
|
|
195
|
-
- Removed FA icons.
|
|
196
243
|
Added LucideIcons as main icon provider.
|
|
197
244
|
`LX.makeIcon`: Support for solid variants in supported icons (also using `iconName@variant`).
|
|
198
245
|
`LX.registerIcon`: Support for classes and attributes for svg and path elements.
|
|
@@ -205,14 +252,18 @@ Added support for right sidebar.
|
|
|
205
252
|
Restyled Number Widget units to avoid layout trashing when recomputing units span location.
|
|
206
253
|
|
|
207
254
|
CodeEditor:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
255
|
+
- Remove language images and use SVG instead.
|
|
256
|
+
- Scrolling fixes.
|
|
257
|
+
- Fixed minor css issues.
|
|
258
|
+
|
|
259
|
+
Remove legacy:
|
|
260
|
+
- Removed `options.selected` in ComboButtons Widget.
|
|
261
|
+
- Removed FA icons.
|
|
211
262
|
|
|
212
263
|
Docs updated:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
264
|
+
- Added interactive code examples for widgets.
|
|
265
|
+
- Improved widget list parameters and options.
|
|
266
|
+
- Added live examples for sidebar and menubar.
|
|
216
267
|
|
|
217
268
|
## 0.5.11
|
|
218
269
|
|
|
@@ -560,8 +611,8 @@ Minor bug fixes.
|
|
|
560
611
|
Timeline: Fixed timeline signals and added callbacks
|
|
561
612
|
|
|
562
613
|
Number/Vector widgets:
|
|
563
|
-
|
|
564
|
-
|
|
614
|
+
- Support for onPress&onRelease for catching mouse events.
|
|
615
|
+
- Added `setLimits` for min, max, step parameters.
|
|
565
616
|
|
|
566
617
|
Added Size Widget (N dimension number widget).
|
|
567
618
|
Minor bug fixes.
|
package/demo.js
CHANGED
|
@@ -1,53 +1,66 @@
|
|
|
1
1
|
import { LX } from 'lexgui';
|
|
2
|
-
import 'lexgui/
|
|
3
|
-
import 'lexgui/
|
|
4
|
-
import 'lexgui/
|
|
2
|
+
import 'lexgui/extensions/codeeditor.js';
|
|
3
|
+
import 'lexgui/extensions/timeline.js';
|
|
4
|
+
import 'lexgui/extensions/audio.js';
|
|
5
5
|
|
|
6
6
|
window.LX = LX;
|
|
7
7
|
|
|
8
8
|
const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
9
|
+
const starterTheme = LX.getTheme();
|
|
9
10
|
|
|
10
11
|
// Menubar
|
|
11
12
|
{
|
|
12
13
|
const menubar = area.addMenubar( [
|
|
13
14
|
{ name: "Docs", callback: () => { window.open("./docs/") } },
|
|
15
|
+
{ name: "Components", callback: () => { window.open("./docs/?p=components") } },
|
|
14
16
|
{ name: "Examples", callback: () => { window.open("./examples/") } },
|
|
15
17
|
] );
|
|
16
18
|
|
|
17
|
-
menubar.setButtonImage("lexgui.js",
|
|
19
|
+
menubar.setButtonImage("lexgui.js", `images/icon_${ starterTheme }.png`, () => { window.open("https://jxarco.github.io/lexgui.js/") }, { float: "left"} );
|
|
20
|
+
|
|
21
|
+
LX.addSignal( "@on_new_color_scheme", ( el, value ) => {
|
|
22
|
+
menubar.setButtonImage("lexgui.js", `images/icon_${ value }.png` );
|
|
23
|
+
} );
|
|
18
24
|
|
|
19
25
|
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
26
|
width: "256px", className: "right", buttonClass: "border fg-tertiary bg-secondary" }
|
|
21
27
|
);
|
|
22
28
|
menubar.root.appendChild( commandButton.root );
|
|
23
29
|
|
|
24
|
-
const starterTheme = LX.getTheme();
|
|
25
|
-
|
|
26
30
|
menubar.addButtons( [
|
|
27
31
|
{
|
|
28
32
|
title: "Github",
|
|
29
33
|
icon: "Github@solid",
|
|
30
|
-
callback: (event) =>
|
|
31
|
-
window.open( "https://github.com/jxarco/lexgui.js/", "_blank" );
|
|
32
|
-
}
|
|
34
|
+
callback: (event) => window.open( "https://github.com/jxarco/lexgui.js/", "_blank" )
|
|
33
35
|
},
|
|
34
36
|
{
|
|
35
37
|
title: "Switch Theme",
|
|
36
38
|
icon: starterTheme == "dark" ? "Moon" : "Sun",
|
|
37
39
|
swap: starterTheme == "dark" ? "Sun" : "Moon",
|
|
38
40
|
callback: (value, event) => { LX.switchTheme() }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: "Switch Spacing",
|
|
44
|
+
icon: "AlignVerticalSpaceAround",
|
|
45
|
+
callback: (value, event) => { LX.switchSpacing() }
|
|
39
46
|
}
|
|
40
47
|
], { float: "right" });
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
// Header
|
|
44
51
|
{
|
|
45
|
-
const header = LX.makeContainer( [ null, "auto" ], "flex flex-col border-top border-bottom gap-2 px-
|
|
52
|
+
const header = LX.makeContainer( [ null, "auto" ], "flex flex-col border-top border-bottom gap-2 px-10 py-8", `
|
|
46
53
|
<a>Get started with LexGUI.js <span class="text-sm fg-secondary">${ LX.version }</span></a>
|
|
47
54
|
<h1>Build your application interface</h1>
|
|
48
|
-
<p class="font-light" style="max-width:32rem">A set of beautifully-designed, accessible
|
|
55
|
+
<p class="font-light" style="max-width:32rem">A set of beautifully-designed, accessible components.
|
|
49
56
|
No complex frameworks. Pure JavaScript and CSS. Open Source.</p>
|
|
50
57
|
`, area );
|
|
58
|
+
|
|
59
|
+
const headerButtons = LX.makeContainer( [ "auto", "auto" ], "flex flex-row", ``, header );
|
|
60
|
+
const getStartedButton = new LX.Button( null, "Get Started", () => window.open( "./docs/", "_blank" ), { buttonClass: "contrast p-1 px-3" } );
|
|
61
|
+
const componentsButton = new LX.Button( null, "View Components", () => window.open( "./docs/?p=components", "_blank" ), { buttonClass: "tertiary p-1 px-3" } );
|
|
62
|
+
headerButtons.appendChild( getStartedButton.root );
|
|
63
|
+
headerButtons.appendChild( componentsButton.root );
|
|
51
64
|
}
|
|
52
65
|
|
|
53
66
|
// Content
|
|
@@ -107,7 +120,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
107
120
|
},
|
|
108
121
|
{
|
|
109
122
|
title: "Side Panel",
|
|
110
|
-
content: "This panel contains various
|
|
123
|
+
content: "This panel contains various components and settings for your application.",
|
|
111
124
|
reference: sidePanel.root,
|
|
112
125
|
side: "left",
|
|
113
126
|
align: "start"
|
|
@@ -240,7 +253,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
240
253
|
}
|
|
241
254
|
});
|
|
242
255
|
|
|
243
|
-
// add
|
|
256
|
+
// add components to panel branch
|
|
244
257
|
panel.branch("Canvas", { icon: "Palette", filter: true });
|
|
245
258
|
panel.addColor("Background", "#b7a9b1", null);
|
|
246
259
|
panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "Type"});
|
|
@@ -294,7 +307,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
294
307
|
// Mail
|
|
295
308
|
{
|
|
296
309
|
const mailContainer = LX.makeContainer( [ null, "800px" ], "flex flex-col bg-primary border rounded-lg overflow-hidden" );
|
|
297
|
-
tabs.add( "Mail", mailContainer, { xselected: true } );
|
|
310
|
+
tabs.add( "Mail", mailContainer, { xselected: true, badge: { content: "5", className: "xs fg-white bg-error", asChild: true } } );
|
|
298
311
|
|
|
299
312
|
const mailArea = new LX.Area();
|
|
300
313
|
mailContainer.appendChild( mailArea.root );
|
|
@@ -317,7 +330,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
317
330
|
className: "border-right",
|
|
318
331
|
headerTitle: "jxarco",
|
|
319
332
|
headerSubtitle: "alexroco.30@gmail.com",
|
|
320
|
-
headerImage: "
|
|
333
|
+
headerImage: "images/favicon.png",
|
|
321
334
|
skipFooter: true,
|
|
322
335
|
displaySelected: true,
|
|
323
336
|
onHeaderPressed: (e, element) => { }
|
|
@@ -441,7 +454,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
441
454
|
const avatarContainer = LX.makeContainer( [ "40px", "40px" ], "bg-tertiary rounded-full content-center", "", mailPreviewInfo );
|
|
442
455
|
|
|
443
456
|
const mailNames = mail.name.split( ' ' );
|
|
444
|
-
const avatarIcon = LX.makeContainer( [ "auto", "auto" ], "font-medium
|
|
457
|
+
const avatarIcon = LX.makeContainer( [ "auto", "auto" ], "font-medium self-center", mailNames[ 0 ][ 0 ] + mailNames[ 1 ][ 0 ], avatarContainer );
|
|
445
458
|
|
|
446
459
|
const senderData = LX.makeContainer( [ "auto", "auto" ], "flex flex-col gap-0.5", `
|
|
447
460
|
<div class="text-md font-semibold">${ mail.name }</div>
|
|
@@ -484,18 +497,18 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
484
497
|
<p class="fg-tertiary">Here's a list of your tasks for this month!</p>
|
|
485
498
|
`, tasksContainer );
|
|
486
499
|
|
|
487
|
-
const
|
|
488
|
-
head: [ "Name", "Status", "Priority", "ID" ],
|
|
500
|
+
const tableComponent = new LX.Table(null, {
|
|
501
|
+
head: [ "Name", "Status", "Priority", "Date", "ID" ],
|
|
489
502
|
body: [
|
|
490
|
-
[ "Alice", "In Progress", "High", 1 ],
|
|
491
|
-
[ "Bob", "Backlog", "Medium", 2 ],
|
|
492
|
-
[ "Prince", "Canceled", "Low", 3 ],
|
|
493
|
-
[ "Sean", "Done", "High", 4 ],
|
|
494
|
-
[ "Carter", "In Progress", "Medium", 5 ],
|
|
495
|
-
[ "James", "Backlog", "Low", 6 ],
|
|
496
|
-
[ "Mickey", "Todo", "Low", 7 ],
|
|
497
|
-
[ "Charlie", "Canceled", "Low", 8 ],
|
|
498
|
-
[ "Potato", "Todo", "High", 9 ]
|
|
503
|
+
[ "Alice", "In Progress", "High", "20/06/2025", 1 ],
|
|
504
|
+
[ "Bob", "Backlog", "Medium", "11/04/2025", 2 ],
|
|
505
|
+
[ "Prince", "Canceled", "Low", "13/05/2025", 3 ],
|
|
506
|
+
[ "Sean", "Done", "High", "28/07/2025", 4 ],
|
|
507
|
+
[ "Carter", "In Progress", "Medium", "20/03/2025", 5 ],
|
|
508
|
+
[ "James", "Backlog", "Low", "10/02/2025", 6 ],
|
|
509
|
+
[ "Mickey", "Todo", "Low", "08/01/2025", 7 ],
|
|
510
|
+
[ "Charlie", "Canceled", "Low", "23/05/2025", 8 ],
|
|
511
|
+
[ "Potato", "Todo", "High", "15/07/2025", 9 ]
|
|
499
512
|
]
|
|
500
513
|
}, {
|
|
501
514
|
selectable: true,
|
|
@@ -506,6 +519,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
506
519
|
{ name: "Status", options: ["Backlog", "Todo", "In Progress", "Done", "Canceled"] },
|
|
507
520
|
{ name: "Priority", options: ["Low", "Medium", "High"] },
|
|
508
521
|
{ name: "ID", type: "range", min: 0, max: 9, step: 1, units: "hr" },
|
|
522
|
+
{ name: "Date", type: "date", xdefault: ["23/07/2025", "29/07/2025"] },
|
|
509
523
|
],
|
|
510
524
|
rowActions: [
|
|
511
525
|
{ icon: "Edit", title: "Edit Row" },
|
|
@@ -522,7 +536,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
522
536
|
]
|
|
523
537
|
}
|
|
524
538
|
});
|
|
525
|
-
tasksContainer.appendChild(
|
|
539
|
+
tasksContainer.appendChild( tableComponent.root );
|
|
526
540
|
}
|
|
527
541
|
|
|
528
542
|
// Code
|
|
@@ -560,8 +574,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
|
|
|
560
574
|
{
|
|
561
575
|
title: "LexGUI",
|
|
562
576
|
items: [
|
|
563
|
-
{ title: "
|
|
564
|
-
{ title: "Source code", link: "https://github.com/jxarco/lexgui.js/" }
|
|
577
|
+
{ title: "Source code on Github", link: "https://github.com/jxarco/lexgui.js/" }
|
|
565
578
|
]
|
|
566
579
|
},
|
|
567
580
|
{
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
7
7
|
<title>LexGUI 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>
|
|
@@ -25,13 +25,14 @@
|
|
|
25
25
|
|
|
26
26
|
<script type="module">
|
|
27
27
|
import { LX } from 'lexgui';
|
|
28
|
-
import 'lexgui/
|
|
28
|
+
import 'lexgui/extensions/codeeditor.js';
|
|
29
29
|
|
|
30
30
|
window.LX = LX;
|
|
31
31
|
|
|
32
32
|
// Init library and get main area
|
|
33
33
|
let area = await LX.init();
|
|
34
34
|
|
|
35
|
+
const starterTheme = LX.getTheme();
|
|
35
36
|
const menubar = area.addMenubar( [], { sticky: false } );
|
|
36
37
|
menubar.addButtons([
|
|
37
38
|
{
|
|
@@ -44,11 +45,20 @@
|
|
|
44
45
|
icon: "Moon",
|
|
45
46
|
swap: "Sun",
|
|
46
47
|
callback: (swapValue) => { LX.setTheme(swapValue ? "light" : "dark") }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "Switch Spacing",
|
|
51
|
+
icon: "AlignVerticalSpaceAround",
|
|
52
|
+
callback: (value, event) => { LX.switchSpacing() }
|
|
47
53
|
}
|
|
48
54
|
]);
|
|
49
55
|
|
|
50
56
|
menubar.setButtonIcon("Github", "Github", () => { window.open("https://github.com/jxarco/lexgui.js/") })
|
|
51
|
-
menubar.setButtonImage("lexgui.js",
|
|
57
|
+
menubar.setButtonImage("lexgui.js", `../images/icon_small_${ starterTheme }.png`, () => { window.open("https://jxarco.github.io/lexgui.js/") }, { float: "left" } );
|
|
58
|
+
|
|
59
|
+
LX.addSignal( "@on_new_color_scheme", ( el, value ) => {
|
|
60
|
+
menubar.setButtonImage( "lexgui.js", `../images/icon_small_${ value }.png` );
|
|
61
|
+
} );
|
|
52
62
|
|
|
53
63
|
var [middle, right] = area.split({ sizes: ["70%", "30%"], minimizable: true });
|
|
54
64
|
var [left, center] = middle.split({ sizes: ["50%", null], minimizable: true });
|
|
@@ -268,6 +278,13 @@
|
|
|
268
278
|
panelB.addFile("Disabled", null, { disabled: true });
|
|
269
279
|
}
|
|
270
280
|
|
|
281
|
+
// Rate
|
|
282
|
+
{
|
|
283
|
+
panelC.branch("Rate", { closed: closedDefault });
|
|
284
|
+
panelC.addRate("Basic Rate", 2, null);
|
|
285
|
+
panelC.addRate("Rate With Halfs", 4.5, null, { allowHalf: true });
|
|
286
|
+
}
|
|
287
|
+
|
|
271
288
|
// DatePicker
|
|
272
289
|
{
|
|
273
290
|
panelC.branch("Date Picker", { closed: closedDefault });
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
7
7
|
<title>LexGUI Area Tabs 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
|
<script type="importmap">
|
|
11
11
|
{
|
|
12
12
|
"imports": {
|
|
13
13
|
"lexgui": "../build/lexgui.module.js",
|
|
14
|
-
"lexgui/
|
|
14
|
+
"lexgui/extensions/": "../build/extensions/"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
</script>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
var ctx = canvas.getContext("2d");
|
|
66
66
|
|
|
67
|
-
// Get values from panel
|
|
67
|
+
// Get values from panel components (e.g. color value)
|
|
68
68
|
ctx.fillStyle = panelA.getValue('Background');
|
|
69
69
|
|
|
70
70
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI AssetView 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/codeeditor.js';
|
|
24
24
|
|
|
25
25
|
// Init library and get main area
|
|
26
26
|
let area = await LX.init();
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI Code 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 'lexgui/
|
|
23
|
+
import 'lexgui/extensions/codeeditor.js';
|
|
24
24
|
|
|
25
25
|
// init library and get main area
|
|
26
26
|
let area = await LX.init();
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
editor.loadFile("../data/rust_sample.rs");
|
|
65
65
|
editor.loadFile("../data/animation.bml", { language: "JSON" });
|
|
66
66
|
editor.loadFile("../data/CMakeLists.txt", { language: "CMake" });
|
|
67
|
-
editor.loadFile("../localhost.bat");
|
|
67
|
+
editor.loadFile("../data/localhost.bat");
|
|
68
68
|
editor.loadFile("../index.html");
|
|
69
69
|
|
|
70
70
|
if (!fileExplorer) {
|
package/examples/dialogs.html
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
6
6
|
<title>LexGUI Dialogs 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>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
|
|
98
98
|
var ctx = canvas.getContext("2d");
|
|
99
99
|
|
|
100
|
-
// Get values from panel
|
|
100
|
+
// Get values from panel component (e.g. color value)
|
|
101
101
|
ctx.fillStyle = pocketDialog.panel.getValue('Background');
|
|
102
102
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
103
103
|
|
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();
|