lexgui 8.0.0 → 8.1.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.
Files changed (56) hide show
  1. package/README.md +3 -3
  2. package/build/components/AlertDialog.d.ts +7 -0
  3. package/build/components/Counter.d.ts +9 -8
  4. package/build/components/Dialog.d.ts +20 -20
  5. package/build/components/Footer.d.ts +14 -14
  6. package/build/components/Menubar.d.ts +59 -59
  7. package/build/core/Area.d.ts +143 -143
  8. package/build/core/Namespace.js +34 -34
  9. package/build/core/Namespace.js.map +1 -1
  10. package/build/core/Panel.d.ts +538 -539
  11. package/build/extensions/AssetView.d.ts +136 -134
  12. package/build/extensions/AssetView.js +1367 -1320
  13. package/build/extensions/AssetView.js.map +1 -1
  14. package/build/extensions/Audio.js +163 -163
  15. package/build/extensions/Audio.js.map +1 -1
  16. package/build/extensions/CodeEditor.js +5022 -4802
  17. package/build/extensions/CodeEditor.js.map +1 -1
  18. package/build/extensions/DocMaker.d.ts +27 -27
  19. package/build/extensions/DocMaker.js +327 -315
  20. package/build/extensions/DocMaker.js.map +1 -1
  21. package/build/extensions/GraphEditor.js +2760 -2659
  22. package/build/extensions/GraphEditor.js.map +1 -1
  23. package/build/extensions/ImUi.js +227 -226
  24. package/build/extensions/ImUi.js.map +1 -1
  25. package/build/extensions/Timeline.d.ts +670 -677
  26. package/build/extensions/Timeline.js +3955 -3958
  27. package/build/extensions/Timeline.js.map +1 -1
  28. package/build/extensions/VideoEditor.js +898 -894
  29. package/build/extensions/VideoEditor.js.map +1 -1
  30. package/build/extensions/index.d.ts +8 -8
  31. package/build/extensions/index.js +10 -10
  32. package/build/index.all.d.ts +2 -2
  33. package/build/index.css.d.ts +4 -4
  34. package/build/index.d.ts +56 -55
  35. package/build/lexgui.all.js +28488 -27640
  36. package/build/lexgui.all.js.map +1 -1
  37. package/build/lexgui.all.min.js +1 -1
  38. package/build/lexgui.all.module.js +28412 -27565
  39. package/build/lexgui.all.module.js.map +1 -1
  40. package/build/lexgui.all.module.min.js +1 -1
  41. package/build/lexgui.css +178 -71
  42. package/build/lexgui.js +13796 -13330
  43. package/build/lexgui.js.map +1 -1
  44. package/build/lexgui.min.css +2 -2
  45. package/build/lexgui.min.js +1 -1
  46. package/build/lexgui.module.js +13733 -13268
  47. package/build/lexgui.module.js.map +1 -1
  48. package/build/lexgui.module.min.js +1 -1
  49. package/changelog.md +17 -1
  50. package/demo.js +6 -5
  51. package/examples/all-components.html +3 -0
  52. package/examples/asset-view.html +4 -4
  53. package/examples/dialogs.html +3 -3
  54. package/examples/editor.html +1 -1
  55. package/examples/index.html +1 -1
  56. package/package.json +4 -1
package/changelog.md CHANGED
@@ -2,9 +2,25 @@
2
2
 
3
3
  ## dev
4
4
 
5
- ## 8.0.0 (master)
5
+ ## 8.1.0 (master)
6
+
7
+ AssetView:
8
+ - Added CreateFolder implementation to the MoveItem dialog button.
9
+ - Added more event attributes, added also to docs.
10
+ - `enterFolder` event can now modify data.
11
+ - Passing user parameters through `resolve` call is now allowed.
12
+
13
+ New Component: Alert Dialog.
14
+ Use `dprint` to auto-format code.
15
+ Style improvements for Sheet, Number slider, Counter, and Range Components.
16
+ Improved Icons page using Pagination Component & moved to main page Menubar.
17
+ Added Counter Component docs.
18
+ Minor mobile version fixes.
19
+
20
+ ## 8.0.0
6
21
 
7
22
  From 8.0 (changed versioning to set `8` as the major version), the full library is written in TypeScript to facilitate integrations in newer frameworks (Builds are still available as a JS module with its extensions).
23
+ Replaced Skypack for jsDelivr CDN.
8
24
  Aded new Spinner and Pagination Components.
9
25
  Added support for `options.submit` in Form entries.
10
26
  Added new utils: `LX.stripTags`, `LX.escapeRegExp`, and `LX.wildcardToRegExp`.
package/demo.js CHANGED
@@ -9,9 +9,10 @@ const mobile = navigator && /Android|iPhone/i.test( navigator.userAgent );
9
9
  const localHost = window.location.protocol !== "https:";
10
10
  const menubarButtons = [
11
11
  { name: "Docs", callback: () => { window.open("./docs/") } },
12
- { name: "Components", callback: () => { window.open("./docs/?p=components") } },
13
12
  { name: "Examples", callback: () => { window.open("./examples/") } },
14
- { name: "Colors", callback: () => { window.location.href = window.location.origin + ( localHost ? "/" : window.location.pathname ) + "colors/"; } }
13
+ { name: "Components", callback: () => { window.open("./docs/?p=components") } },
14
+ { name: "Colors", callback: () => { window.open("./colors/", "_self") } },
15
+ { name: "Icons", callback: () => { window.open("./icons/", "_self") } },
15
16
  ];
16
17
  let menubar = null, sheetArea = null;
17
18
 
@@ -32,7 +33,7 @@ if( mobile )
32
33
  }, {
33
34
  headerTitle: `lexgui.js`,
34
35
  headerSubtitle: `v${ LX.version }`,
35
- headerImage: "../images/favicon.png",
36
+ headerImage: "./images/favicon.png",
36
37
  footerTitle: "jxarco",
37
38
  footerSubtitle: "alexroco.30@gmail.com",
38
39
  footerImage: "https://avatars.githubusercontent.com/u/25059187?s=400&u=ad8907b748c13e4e1a7cdd3882826acb6a2928b5&v=4",
@@ -92,8 +93,8 @@ if( mobile )
92
93
  const header = LX.makeContainer( [ null, "auto" ], "flex flex-col gap-4 pt-8 pb-4 items-center", `
93
94
  <a href="docs?p=changelog" class="flex flex-row gap-1 items-center text-sm p-1 px-4 rounded-full fg-primary decoration-none hover:bg-secondary cursor-pointer"><span class="flex bg-accent w-2 h-2 rounded-full"></span>
94
95
  New Components: Spinner, Pagination and more${ LX.makeIcon( "ArrowRight", { svgClass: "sm" } ).innerHTML }</a>
95
- <p class="fg-primary font-medium tracking-tight leading-none text-center text-balance" style="font-size:2.75rem">Build your Application Interface</p>
96
- <p class="fg-primary font-light text-xl text-center text-balance" style="max-width:48rem">A modern UI kit, inspired by shadcn, built for the web. Pure JavaScript, CSS, zero dependencies. Fully Open Source.</p>
96
+ <p class="fg-primary font-medium tracking-tight leading-none text-center text-balance text-5xl xs:text-4xl">Build your Application Interface</p>
97
+ <p class="fg-primary font-light text-xl xs:text-lg text-center text-balance leading-normal max-w-3xl">A modern-style UI kit, inspired by shadcn, built for the web. Pure JavaScript, CSS, zero dependencies. Fully Open Source.</p>
97
98
  `, area );
98
99
 
99
100
  const headerButtons = LX.makeContainer( [ "auto", "auto" ], "flex flex-row mt-2", ``, header );
@@ -263,6 +263,9 @@
263
263
  panelB.addNumber("With Units", 12, null, { units: "px" });
264
264
  panelB.addNumber("With Slider", 0, null, { min: 1, max: 48, step: 1 });
265
265
  panelB.addNumber("Disabled Slider", 0, null, { min: 1, max: 48, step: 1, disabled: true });
266
+ panelB.branch("Counter Inputs", { closed: closedDefault });
267
+ panelB.addCounter("Classic", 0, null, { min: 1, max: 48, step: 1 });
268
+ panelB.addCounter("Disabled", 0, null, { min: 1, max: 48, step: 1, disabled: true });
266
269
  panelB.branch("Vector Inputs", { closed: closedDefault });
267
270
  panelB.addVector2("Classic Vec2", [0, 0], null);
268
271
  panelB.addVector3("Disabled Vec3", [0, 0, 0], null, { disabled: true });
@@ -258,13 +258,13 @@
258
258
  // Clone events
259
259
  {
260
260
  assetView.on( "beforeClone", ( event, resolve ) => {
261
- LX.prompt("Perform Clone Action?", "Server Message", () => {
262
- resolve();
261
+ LX.prompt("Perform Clone Action?", "Server Message", (value) => {
262
+ resolve( value );
263
263
  })
264
264
  } );
265
265
 
266
- assetView.on( "clone", ( event ) => {
267
- console.log(event.items[ 0 ].id + " cloned");
266
+ assetView.on( "clone", ( event, arg1, arg2 ) => {
267
+ console.log(event.items[ 0 ].id + " cloned", arg1, arg2);
268
268
  } );
269
269
  }
270
270
 
@@ -47,7 +47,6 @@
47
47
  }, { float: 'lt' });
48
48
 
49
49
  const dialogClosable = new LX.Dialog("Closable Dialog", p => {
50
- p.branch("Canvas");
51
50
  p.addColor("Background", "#b7a9b1");
52
51
  p.addText("Text", "Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "Type" });
53
52
  p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
@@ -62,8 +61,7 @@
62
61
  p.addSelect("Best Tool", ["@Engines", "Godot", "Unity", "Unreal Engine", "@Apps", "Visual Studio", "Visual Studio Code"], "Unity", (value, event) => {
63
62
  console.log(value);
64
63
  }, {filter: true, emptyMsg: "No engines found.", placeholder: "Search engines..."});
65
- p.merge();
66
- }, { size: ["350px", null], closable: true });
64
+ }, { size: ["350px", null], position: ["100px", "500px"], closable: true });
67
65
 
68
66
  const draggablePocketDialog = new LX.PocketDialog("Draggable PocketDialog", p => {
69
67
  p.branch("Canvas");
@@ -84,6 +82,8 @@
84
82
  p.merge();
85
83
  }, { size: ["350px", null], draggable: true });
86
84
 
85
+ const alertDialog = new LX.AlertDialog( "Are you absolutely sure?", "This action cannot be undone. This will permanently delete your account and remove your data from our servers." );
86
+
87
87
  // add canvas to left upper part
88
88
  let canvas = document.createElement('canvas');
89
89
  canvas.id = "mycanvas";
@@ -707,7 +707,7 @@
707
707
 
708
708
  panel.branch("Preferences", { icon: "Settings" });
709
709
  panel.addButton(null, "Show Notifications" + LX.badge("+99", "accent sm"));
710
- panel.addCounter("Calories Counter ", 350, (v) => { console.log(v + " calories!") }, { label: "CALORIES/DAY", max: 500 });
710
+ panel.addCounter("Calories Counter / day ", 350, (v) => { console.log(v + " calories!") }, { max: 500 });
711
711
  panel.addButton("Colored Tiny Button", "Click here!", () => { }, { buttonClass: "primary xs" });
712
712
  panel.addButton("Small Outlined Button", "Click here!", () => { }, { buttonClass: "accent sm outline" });
713
713
  panel.addButton("A Classic Button", "Click here!", () => { }, { buttonClass: "md" });
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
6
- <title>Examples - LexGUI.js </title>
6
+ <title>Examples - LexGUI</title>
7
7
  <link rel="stylesheet" href="../build/lexgui.css">
8
8
  <link rel="icon" href="../images/favicon.png">
9
9
  <style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",
@@ -39,6 +39,8 @@
39
39
  "url": "https://github.com/jxarco/lexgui.js/issues"
40
40
  },
41
41
  "scripts": {
42
+ "format": "dprint fmt",
43
+ "format:check": "dprint check",
42
44
  "colors": "node generate-colors.js",
43
45
  "clean:css": "rimraf build/lexgui.css && rimraf build/lexgui.min.css",
44
46
  "clean": "rimraf build",
@@ -51,6 +53,7 @@
51
53
  "@rollup/plugin-alias": "^6.0.0",
52
54
  "@rollup/plugin-terser": "^0.4.4",
53
55
  "cssnano": "^7.1.2",
56
+ "dprint": "^0.50.2",
54
57
  "postcss": "^8.5.6",
55
58
  "rimraf": "^5.0.10",
56
59
  "rollup": "^4.53.2",