lexgui 0.2.0 → 0.4.1

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
@@ -1,8 +1,54 @@
1
1
  # lexgui.js changelog
2
2
 
3
- ## 0.2.1 (dev)
3
+ ## dev
4
4
 
5
- ## 0.2.0 (master)
5
+ ## 0.4.1 (master)
6
+
7
+ Widgets:
8
+ - Text: Skip callback if no changes.
9
+
10
+ Updated NodeGraph Editor sidebar.
11
+ Expose `Sidebar.update` to rebuild from current items.
12
+ Added `force` option to force sidebar collapse status in `Sidebar.toggleCollapsed(force)`.
13
+ Added Sidebar search bar to filter entries.
14
+ Set overflow ellipsis on large toast texts.
15
+ Fixed Menubar menus with scroll > 0.
16
+ Removed padding when no PocketDialog content.
17
+ Sidebar docs updated.
18
+
19
+ ## 0.4.0
20
+
21
+ Widgets:
22
+ - Support new RadioGroup Widget.
23
+ - Support Checkbox `options.label`.
24
+ - Fixed Uncheck selectAll on uncheck row (TableWidget).
25
+
26
+ Removed hardcoded font-sizes. Added media queries for screeen size and ppi.
27
+ Start support for `LX.makeCollapsible`.
28
+ Started adding LX.ICONS to avoid using external libs for icons.
29
+ Updated Sidebar. Cooler and better customization.
30
+ Fixed AssetView navigation buttons.
31
+ Fixed few dialog dragging issues.
32
+ Removed debug clog.
33
+ Minor CSS tweaks.
34
+
35
+ ## 0.3.0
36
+
37
+ Widgets:
38
+ - Support toggle mode and button disabled in ComboButtons Widget.
39
+ - Added new Range Slider Widget.
40
+
41
+ Support for toasts `LX.toast(title, description, options)`;
42
+ Improve Menubar menus look & feel.
43
+ Fixed menubar buttons vertical alignment.
44
+ Fixed menubar entries when adding `OverlayButtons` in the area below.
45
+ Restyled area tabs (row mode).
46
+ Dialog tweaks. Renamed `class` to `className` for Dialog options.
47
+ Timeline theme updated support light scheme color.
48
+ Minor CSS tweaks.
49
+ Minor bug fixes.
50
+
51
+ ## 0.2.0
6
52
 
7
53
  Widgets:
8
54
  - Support for new Table Widget `Panel.addTable()`.
package/demo.js CHANGED
@@ -13,7 +13,10 @@ let area = LX.init( { strictViewport: false } );
13
13
 
14
14
  m.setButtonImage("lexgui.js", "images/icon.png", () => {window.open("https://jxarco.github.io/lexgui.js/")}, {float: "left"})
15
15
 
16
- m.add( "Docs", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
16
+ // m.add( "Docs", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
17
+ m.add( "Docs/Pepe", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
18
+ m.add( "Docs/Luis/ac", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
19
+ m.add( "Docs/Luis/vrr", { icon: "fa-solid fa-magnifying-glass", short: "F1", callback: () => { window.open("./docs/") }});
17
20
 
18
21
  const panel = new LX.Panel();
19
22
  panel.addButton(null, "Search command...", () => { LX.setCommandbarState( true ) }, { width: "256px", className: "right", buttonClass: "outline left" });
@@ -115,11 +118,8 @@ let area = LX.init( { strictViewport: false } );
115
118
  ],
116
119
  credits: `2019-${ new Date().getUTCFullYear() } Alex Rodríguez and contributors. Website source code on GitHub.`,
117
120
  socials: [
118
- { title: "Github", link: "", icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6.0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6.0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3.0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1.0-6.2-.3-40.4-.3-61.4.0.0-70 15-84.7-29.8.0.0-11.4-29.1-27.8-36.6.0.0-22.9-15.7 1.6-15.4.0.0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5.0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9.0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4.0 33.7-.3 75.4-.3 83.6.0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6.0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9.0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>` },
119
- { title: "BlueSky", link: "", icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M407.8 294.7c-3.3-.4-6.7-.8-10-1.3 3.4.4 6.7.9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3 61.6-9.4 37.5-1.7 21.6 5.5 3.3 13.8.0 41.9.0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7 3.3-.5 6.6-.9 10-1.4-3.3.5-6.6 1-10 1.4-93.9 14-177.3 48.2-67.9 169.9C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4 102.4-103.4 28.1-156-65.8-169.9-3.3-.4-6.7-.8-10-1.3 3.4.4 6.7.9 10 1.3 64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1z"></path></svg>` },
120
- { title: "Mastodon", link: "", icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433 179.1c0-97.2-63.7-125.7-63.7-125.7-62.5-28.7-228.6-28.4-290.5.0.0.0-63.7 28.5-63.7 125.7.0 115.7-6.6 259.4 105.6 289.1 40.5 10.7 75.3 13 103.3 11.4 50.8-2.8 79.3-18.1 79.3-18.1l-1.7-36.9s-36.3 11.4-77.1 10.1c-40.4-1.4-83-4.4-89.6-54a102.5 102.5.0 01-.9-13.9c85.6 20.9 158.7 9.1 178.8 6.7 56.1-6.7 105-41.3 111.2-72.9 9.8-49.8 9-121.5 9-121.5zm-75.1 125.2h-46.6V190.1c0-49.7-64-51.6-64 6.9v62.5H201V197c0-58.5-64-56.6-64-6.9v114.2H90.2c0-122.1-5.2-147.9 18.4-175 25.9-28.9 79.8-30.8 103.8 6.1l11.6 19.5 11.6-19.5c24.1-37.1 78.1-34.8 103.8-6.1 23.7 27.3 18.4 53 18.4 175z"></path></svg>` },
121
- { title: "Discord", link: "", icon: `<a class="fa-brands fa-discord"></a>` },
122
- { title: "Reddit", link: "", icon: `<a class="fa-brands fa-reddit"></a>` }
121
+ { title: "Github", link: "https://github.com/jxarco/lexgui.js/", icon: `<a class="fa-brands fa-github"></a>` },
122
+ { title: "Discord", link: "https://discord.gg/vwqVrMZBXv", icon: `<a class="fa-brands fa-discord"></a>` }
123
123
  ]
124
124
  } );
125
125
  }
@@ -34,9 +34,6 @@
34
34
 
35
35
  leftArea.root.style.borderRight = "2px solid gray";
36
36
  leftArea.addMenubar( m => {
37
- m.add( "Examples", () => {
38
- location.href = "../examples/";
39
- });
40
37
  m.add( "Docs v" + LX.version, (v, name) => {
41
38
  location.href = "../docs/";
42
39
  });
Binary file
@@ -18,7 +18,6 @@
18
18
  <script type="module">
19
19
 
20
20
  import { LX } from 'lexgui';
21
- import 'lexgui/components/codeeditor.js';
22
21
 
23
22
  // init library and get main area
24
23
  let area = LX.init();
@@ -34,17 +33,44 @@
34
33
  el.style.display = 'block';
35
34
  }
36
35
 
37
- area.addSidebar( m => {
38
- m.add( "Scene", { icon: "fa fa-cube", callback: () => { codeArea.hide(); show( canvas ); } } );
39
- m.add( "Code", { icon: "fa fa-code", callback: () => { hide( canvas ); codeArea.show(); } } );
40
-
41
- m.add( "Search", { icon: "fa fa-search", bottom: true, callback: () => { } } );
36
+ const logParams = (entryName, value, event) => { console.log(entryName, value, event) };
37
+ const actionLogParams = (entryName, event) => { console.log("Action called!", entryName, event) };
38
+
39
+ window.sidebar = area.addSidebar( m => {
40
+ m.group( "Projects", { icon: "fa fa-plus", callback: (groupName, event) => { console.log(groupName) }} );
41
+ m.add( "Getting Started", { icon: "fa fa-cube", callback: logParams } );
42
+ m.add( "Getting Started/Installation", { icon: "fa fa-cube", callback: logParams } );
43
+ m.add( "Getting Started/Project Structure", { icon: "fa fa-cube", callback: logParams, action: { name: "ShowMenu", callback: actionLogParams, icon: null } } );
44
+ m.add( "Building Your Application", { icon: "fa fa-code", callback: logParams, action: { name: "ShowMenu", callback: actionLogParams, icon: null } } );
45
+ m.add( "Search Blocks", { icon: "fa fa-search", callback: logParams } );
46
+ m.add( "Very loooooooooooooooooooooooong sun", { icon: "fa fa-sun",callback: logParams, action: { name: "ShowMenu", callback: actionLogParams, icon: null } } );
47
+ m.separator();
48
+ m.group( "API Reference" );
49
+ m.add( "Components", { icon: "fa fa-cube", callback: logParams } );
50
+ m.add( "File Conventions", { icon: "fa fa-code", callback: logParams } );
51
+ m.add( "Functions", { icon: "fa fa-search",callback: logParams } );
52
+ m.add( "CLI", { icon: "fa fa-sun",callback: logParams } );
53
+ m.separator();
54
+ m.group( "Architecture" );
55
+ m.add( "Accessibility ", { icon: "fa fa-cube", callback: logParams } );
56
+ m.add( "Fast Refresh", { icon: "fa fa-code", callback: logParams } );
57
+ m.add( "Supported Browsers", { icon: "fa fa-search",callback: logParams } );
58
+ m.separator();
59
+ m.add( "Calendar ", { collapsable: 3 } );
60
+ m.add( "Personal ", { callback: logParams, type: "checkbox" } );
61
+ m.add( "Work", { callback: logParams, type: "checkbox", value: true } );
62
+ m.add( "Family", { callback: logParams, type: "checkbox" } );
63
+ }, {
64
+ headerTitle: "jxarco",
65
+ headerSubtitle: "alexroco.30@gmail.com",
66
+ headerImage: "https://raw.githubusercontent.com/jxarco/lexgui.js/refs/heads/master/images/icon.png",
67
+ footerTitle: "jxarco",
68
+ footerSubtitle: "alexroco.30@gmail.com",
69
+ footerImage: "https://avatars.githubusercontent.com/u/25059187?s=400&u=ad8907b748c13e4e1a7cdd3882826acb6a2928b5&v=4",
70
+ onHeaderPressed: (e) => { console.log( "onHeaderPressed" ) },
71
+ onFooterPressed: (e) => { console.log( "onFooterPressed" ) }
42
72
  });
43
73
 
44
- let codeArea = new LX.Area( { width: "100%", height: "100%" } );
45
- let editor = new LX.CodeEditor( codeArea );
46
- editor.loadFile( "../data/js_sample.js" );
47
-
48
74
  // add canvas to left upper part
49
75
  var canvas = document.createElement('canvas');
50
76
  canvas.id = "mycanvas";
@@ -53,8 +79,14 @@
53
79
  canvas.style.width = "100%";
54
80
  canvas.style.height = "100%";
55
81
 
82
+ area = sidebar.siblingArea;
83
+
84
+ area.onresize = ( bounding ) => {
85
+ canvas.width = bounding.width;
86
+ canvas.height = bounding.height;
87
+ };;
88
+
56
89
  area.attach( canvas );
57
- area.attach( codeArea );
58
90
 
59
91
  function loop(dt) {
60
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "0.2.0",
3
+ "version": "0.4.1",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",