lexgui 0.1.41 → 0.1.43

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,11 +1,43 @@
1
1
  # lexgui.js changelog
2
2
 
3
- ## 0.1.42 (dev)
3
+ ## 0.1.44 (dev)
4
4
 
5
- ## 0.1.41 (master)
5
+
6
+
7
+ ## 0.1.43 (master)
8
+
9
+ CodeEditor:
10
+ - Support C and CMake highlight.
11
+ - Support C/C++ header files highlighting.
12
+
13
+ Support `options.skipRoot` on LX.init.
14
+ Support lock aspect ratio in Panel.addSize
15
+ Improved CSS for overlay buttons `Area.addOverlayButtons`.
16
+ Docs Updated. Add interactive widget examples.
17
+ Minor CSS general changes.
18
+ Minor bug fixes.
19
+
20
+ ## 0.1.42
21
+
22
+ AssetView:
23
+ - Support custom element title on hover for Content layout mode `options.useNativeTitle`
24
+ - AssetView onRefreshContent option
25
+
26
+ CodeEditor:
27
+ - Renamed all option parameters (remove snake case).
28
+ - Fixed tab language override.
29
+ - Support addTab() and loadFile() with options (`options.language`)
30
+ - Fixed XML highlighting
31
+
32
+ Support options.title in Panel.addButton.
33
+ [Area] `options.no_append` -> `options.skipAppend`.
34
+ [Area] `options.skip_default_area` -> `options.skipDefaultArea`.
35
+ Minor bug fixes.
36
+
37
+ ## 0.1.41
6
38
 
7
39
  AssetView:
8
- - Renamed all option parameters (remove snake_case).
40
+ - Renamed all option parameters (remove snake case).
9
41
  - Support showing `lastModified` file data.
10
42
 
11
43
  Knob Widget:
package/demo.js CHANGED
@@ -129,6 +129,12 @@ area.addMenubar( m => {
129
129
  // split main area
130
130
  var [left, right] = area.split({ sizes:["80%","20%"], minimizable: true });
131
131
 
132
+ // left.addSidebar( m => {
133
+ // m.add( "Scene", { icon: "fa fa-cube", callback: () => { } } );
134
+ // m.add( "Code", { icon: "fa fa-code", callback: () => { } } );
135
+ // m.add( "Search", { icon: "fa fa-search", bottom: true, callback: () => { } } );
136
+ // });
137
+
132
138
  // split left area
133
139
  var [up, bottom] = left.split({ type: 'vertical', sizes:["50%", null], minimizable: true });
134
140
 
@@ -176,18 +182,16 @@ bottom.addMenubar( m => {
176
182
  kfTimeline.resize();
177
183
  }
178
184
  else {
179
- kfTimeline = new LX.KeyFramesTimeline("kf-timeline", { width: m.root.clientWidth, height: m.parent.root.parentElement.clientHeight - m.root.clientHeight });
185
+ kfTimeline = new LX.KeyFramesTimeline("kf-timeline", {
186
+ onBeforeCreateTopBar: panel => {
187
+ panel.addButton('', '<i class="fa fa-wand-magic-sparkles"></i>', ( value, event ) => { });
188
+ }
189
+ });
190
+
180
191
  bottom.attach(kfTimeline.root);
181
192
  kfTimeline.setSelectedItems(["Item 1", "Item 2", "Item 3"]);
182
193
  kfTimeline.setAnimationClip({tracks: [{name: "Item 1.position", values: [0,1,0, 1], times: [0, 0.1, 0.2, 0.3]}, {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, 0.2, 0.3, 0.8]}, {name: "Item 3.position", values: [0,1,0], times: [0, 0.1, 0.2, 0.3]}, {name: "Item 3.scale", values: [0,1,0], times: [0, 0.1, 0.2, 0.3]}], duration: 1});
183
-
184
- kfTimeline.addButtons([
185
- { icon: 'fa fa-wand-magic-sparkles', name: 'autoKeyEnabled' },
186
- { icon: 'fa fa-filter', name: "optimize", callback: (value, event) => { kfTimeline.onShowOptimizeMenu(event);}},
187
- { icon: 'fa-regular fa-rectangle-xmark', name: 'unselectAll', callback: (value, event) => { kfTimeline.unSelectAllKeyFrames();}}
188
- ]);
189
-
190
- kfTimeline.draw(0);
194
+ kfTimeline.draw( 0 );
191
195
  }
192
196
  });
193
197
 
@@ -542,7 +546,7 @@ function fillPanel( panel ) {
542
546
  }, { padSize: "100px", min: -1, max: 2 });
543
547
  panel.addSize("Screen Res", [1280, 720], (value, event) => {
544
548
  console.log(value);
545
- }, { units: "p" });
549
+ }, { units: "p", precision: 0 });
546
550
 
547
551
  const formData = { username: "", password: { value: "", type: "password" } };
548
552
  panel.addForm("Test form", formData, (value, event) => {
@@ -703,9 +707,9 @@ function fillBottomPanel( panel ) {
703
707
  panel.addTextArea("Notes", "", (value, event) => {
704
708
  console.log(value);
705
709
  }, { placeholder: 'Some notes...' });
706
- panel.addKnob("A Small Knob", 4, 0, 200, value => { console.log( value ) }, { size: 'sm', disabled: true });
710
+ panel.addKnob("A Small but disabled Knob", 4, 0, 200, value => { console.log( value ) }, { size: 'sm', disabled: true });
707
711
  panel.addKnob("A Knob", 4, 0, 200, value => { console.log( value ) } );
708
- panel.addKnob("A Big Knob", 4, 0, 200, value => { console.log( value ) }, { size: 'bg', snap: 4 });
712
+ panel.addKnob("A Big Knob with Snap", 4, 0, 200, value => { console.log( value ) }, { size: 'bg', snap: 4 });
709
713
  panel.addButton("Apply", "Add button to branch", (value, event) => {
710
714
  const branch = panel.getBranch("Information");
711
715
  panel.queue( branch.content );
@@ -42,7 +42,8 @@
42
42
  canvas.height = bounding.height;
43
43
  };
44
44
 
45
- let assetView = new LX.AssetView({
45
+ let assetView = new LX.AssetView({
46
+ // useNativeTitle: true,
46
47
  // skipBrowser: true,
47
48
  // skipPreview: true,
48
49
  // rootPath: "../"
@@ -121,7 +122,7 @@
121
122
  {
122
123
  id: "color.png",
123
124
  type: "image",
124
- src: "https://cdn.icon-icons.com/icons2/2389/PNG/512/unreal_engine_logo_icon_144771.png"
125
+ src: "https://cdn2.unrealengine.com/ue-logotype-2023-vertical-white-1686x2048-bbfded26daa7.png"
125
126
  },
126
127
  {
127
128
  id: "demo.js",
@@ -23,9 +23,9 @@
23
23
  // init library and get main area
24
24
  let area = LX.init();
25
25
 
26
- const file_explorer = true;
26
+ const fileExplorer = true;
27
27
 
28
- if( !file_explorer )
28
+ if( !fileExplorer )
29
29
  {
30
30
  var [leftArea, rightArea] = area.split({ sizes:["55%","45%"] });
31
31
 
@@ -46,22 +46,27 @@
46
46
  }
47
47
 
48
48
  let editor = new LX.CodeEditor(area, {
49
- // allow_add_scripts: false,
49
+ // allowAddScripts: false,
50
50
  // autocomplete: false,
51
- // disable_edition: true,
52
- file_explorer: file_explorer
51
+ // disableEdition: true,
52
+ fileExplorer: fileExplorer
53
53
  });
54
54
 
55
55
  editor.loadFile( "../data/js_sample.js" );
56
56
  editor.loadFile( "../data/json_sample.json" );
57
57
  editor.loadFile( "../data/css_sample.css" );
58
58
  editor.loadFile( "../data/cpp_sample.cpp" );
59
+ editor.loadFile( "../data/cpp_header_sample.hpp" );
60
+ editor.loadFile( "../data/c_sample.c" );
59
61
  editor.loadFile( "../data/xml_sample.xml" );
60
62
  editor.loadFile( "../data/python_sample.py" );
61
63
  editor.loadFile( "../data/rust_sample.rs" );
64
+ editor.loadFile( "../data/animation.bml", { language: "JSON" } );
65
+ editor.loadFile( "../data/CMakeLists.txt", { language: "CMake" } );
62
66
  editor.loadFile( "../localhost.bat" );
67
+ editor.loadFile( "../index.html" );
63
68
 
64
- if( !file_explorer )
69
+ if( !fileExplorer )
65
70
  {
66
71
  var ctx = canvas.getContext("2d");
67
72
  ctx.fillStyle = "#b7a9b1";
Binary file
Binary file
@@ -60,12 +60,12 @@
60
60
 
61
61
  var ctx = canvas.getContext("2d");
62
62
 
63
- ctx.fillStyle = "#def698";
63
+ ctx.fillStyle = "#b7a9b1";
64
64
 
65
65
  ctx.fillRect(0, 0, canvas.width, canvas.height);
66
66
  ctx.font = "44px Monospace";
67
67
 
68
- ctx.fillStyle = "#f13523";
68
+ ctx.fillStyle = "#ff1999";
69
69
 
70
70
  const text = "lexgui @jxarco";
71
71
  const pos2D = [200, 200];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",