lexgui 8.2.4 → 8.3.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/build/components/NodeTree.d.ts +1 -1
- package/build/components/Tabs.d.ts +1 -0
- package/build/core/Namespace.js +1 -1
- package/build/core/Namespace.js.map +1 -1
- package/build/extensions/AssetView.d.ts +3 -2
- package/build/extensions/AssetView.js +1433 -1404
- package/build/extensions/AssetView.js.map +1 -1
- package/build/extensions/CodeEditor.d.ts +428 -325
- package/build/extensions/CodeEditor.js +3768 -4637
- package/build/extensions/CodeEditor.js.map +1 -1
- package/build/extensions/DocMaker.d.ts +1 -1
- package/build/extensions/DocMaker.js +363 -354
- package/build/extensions/DocMaker.js.map +1 -1
- package/build/extensions/Timeline.d.ts +2 -2
- package/build/extensions/Timeline.js +28 -15
- package/build/extensions/Timeline.js.map +1 -1
- package/build/extensions/VideoEditor.d.ts +1 -1
- package/build/extensions/VideoEditor.js +15 -7
- package/build/extensions/VideoEditor.js.map +1 -1
- package/build/extensions/index.js +1 -1
- package/build/lexgui.all.js +6202 -6929
- package/build/lexgui.all.js.map +1 -1
- package/build/lexgui.all.min.js +1 -1
- package/build/lexgui.all.module.js +6202 -6930
- package/build/lexgui.all.module.js.map +1 -1
- package/build/lexgui.all.module.min.js +1 -1
- package/build/lexgui.css +160 -85
- package/build/lexgui.js +4536 -241
- package/build/lexgui.js.map +1 -1
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +4536 -241
- package/build/lexgui.module.js.map +1 -1
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +44 -1
- package/examples/asset-view.html +29 -2
- package/examples/code-editor.html +88 -16
- package/package.json +2 -1
package/changelog.md
CHANGED
|
@@ -2,7 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
## dev
|
|
4
4
|
|
|
5
|
-
## 8.
|
|
5
|
+
## 8.3.0 (master)
|
|
6
|
+
|
|
7
|
+
CodeEditor:
|
|
8
|
+
Added `Tabs.setIcon(name, icon)`.
|
|
9
|
+
Added DropdownMenu item option `useKbdSpecialKeys` (true).
|
|
10
|
+
Added `LX.requestFileAsync` util.
|
|
11
|
+
Added support for AlertDialog `options.cancelCallback`.
|
|
12
|
+
Replace `options.addDefault` for `options.useDefaultContextMenuItems (true)` in NodeTree.
|
|
13
|
+
Added support for `options.contextMenuTitle` in NodeTree.
|
|
14
|
+
Fixed Progress component default `blue-500` color.
|
|
15
|
+
|
|
16
|
+
Full refactor for CodeEditor:
|
|
17
|
+
- Improved robustness and fixed several minor bugs.
|
|
18
|
+
- Improved symbol detection.
|
|
19
|
+
- Added support to write Backtick char (`).
|
|
20
|
+
- Added support for `HLSL` language.
|
|
21
|
+
- Added `options.onCodeChange` to receive callback on code document changed.
|
|
22
|
+
- `options.files` moved to `CodeEditor.loadFiles`.
|
|
23
|
+
- Removed legacy `options.onsave` and `options.onrun`.
|
|
24
|
+
- Disabled virtual scrolling until next version.
|
|
25
|
+
- Next version will add back `detectLanguage`.
|
|
26
|
+
|
|
27
|
+
Timeline:
|
|
28
|
+
- Selected Tree entries now use the primary color.
|
|
29
|
+
- Removed `onTrackTreeEvent`.
|
|
30
|
+
- Added `setTrackTreeEventListener`. It sets a specific callback for the tree component.
|
|
31
|
+
|
|
32
|
+
VideoEditor
|
|
33
|
+
- `controlsLayout` of the constructor now expects an object that may contain `type`, `height` and/or `l1TimelineHeight`.
|
|
34
|
+
|
|
35
|
+
## 8.2.5
|
|
36
|
+
|
|
37
|
+
Added some WGSL keywords to DocMaker code snippets.
|
|
38
|
+
`NodeTree.select` now supports using `path` for select items.
|
|
39
|
+
|
|
40
|
+
AssetView:
|
|
41
|
+
- Custom item actions now receive item or selected items list.
|
|
42
|
+
- Fixed `options.allowMultipleSelection`, added moved old option to `options.allowItemCheck`.
|
|
43
|
+
- Fixed item deletion when multiple selection.
|
|
44
|
+
- Fixed minor issues with AssetView item rename.
|
|
45
|
+
- Fixed AssetView MoveItem dialog not showing path Breadcrumb component.
|
|
46
|
+
- Fixed minor bug `_enterFolder` using same ids for >1 folder.
|
|
47
|
+
|
|
48
|
+
## 8.2.4
|
|
6
49
|
|
|
7
50
|
Fixed Form not automatically syncing inputs when pressing primary action button.
|
|
8
51
|
Added support for Tags `options.tagClass`.
|
package/examples/asset-view.html
CHANGED
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
// skipPreview: true,
|
|
52
52
|
// rootPath: "../",
|
|
53
53
|
// onlyFolders: false,
|
|
54
|
+
// allowItemCheck: true,
|
|
55
|
+
allowMultipleSelection: true,
|
|
54
56
|
allowedTypes: {
|
|
55
57
|
"Mesh": { color: "rose-800" },
|
|
56
58
|
"Script": { color: "orange-500" },
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
"SIGML": { color: "emerald-300" },
|
|
59
61
|
},
|
|
60
62
|
itemContextMenuOptions: [
|
|
61
|
-
{ name: "Like", callback: (
|
|
63
|
+
{ name: "Like", callback: ( items ) => { console.log(items) } }
|
|
62
64
|
]
|
|
63
65
|
});
|
|
64
66
|
bottomArea.attach(assetView);
|
|
@@ -172,6 +174,31 @@
|
|
|
172
174
|
{
|
|
173
175
|
id: "unreal",
|
|
174
176
|
type: "folder",
|
|
177
|
+
children: [
|
|
178
|
+
{
|
|
179
|
+
id: "color.png",
|
|
180
|
+
type: "image",
|
|
181
|
+
src: "https://cdn2.unrealengine.com/ue-logotype-2023-vertical-white-1686x2048-bbfded26daa7.png"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: "demo.js",
|
|
185
|
+
type: "script",
|
|
186
|
+
src: "../data/script.js"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "empty_folder",
|
|
190
|
+
type: "folder",
|
|
191
|
+
children: [{
|
|
192
|
+
id: "demo.js",
|
|
193
|
+
type: "script",
|
|
194
|
+
src: "../data/script.js"
|
|
195
|
+
}]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "unreal2",
|
|
201
|
+
type: "folder",
|
|
175
202
|
children: [
|
|
176
203
|
{
|
|
177
204
|
id: "color.png",
|
|
@@ -300,7 +327,7 @@
|
|
|
300
327
|
} );
|
|
301
328
|
|
|
302
329
|
assetView.on( "delete", ( event ) => {
|
|
303
|
-
|
|
330
|
+
event.items.forEach( item => console.log(item.id + " deleted") );
|
|
304
331
|
} );
|
|
305
332
|
}
|
|
306
333
|
|
|
@@ -69,9 +69,91 @@
|
|
|
69
69
|
// skipInfo: true,
|
|
70
70
|
fileExplorer: fileExplorer,
|
|
71
71
|
explorerName: "EXPLORER",
|
|
72
|
+
highlight: 'TypeScript',
|
|
72
73
|
// statusShowFontSizeZoom: false,
|
|
73
74
|
// skipTabs: true,
|
|
74
|
-
|
|
75
|
+
xonCreateFile: ( instance ) => {
|
|
76
|
+
return { name: "new_shader.wgsl", language: "WGSL" }
|
|
77
|
+
},
|
|
78
|
+
onCtrlSpace: () => console.log("Ctrl + Space pressed"),
|
|
79
|
+
onRun: () => console.log("Script running"),
|
|
80
|
+
onSave: () => console.log("Script saved"),
|
|
81
|
+
onContextMenu: ( editor, content, event ) => {
|
|
82
|
+
if( !content ) return;
|
|
83
|
+
return [
|
|
84
|
+
{ path: "Custom Action", callback: () => console.log( content ) }
|
|
85
|
+
];
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
editor.setText(`// Example TypeScript file for syntax highlighting
|
|
90
|
+
|
|
91
|
+
// Type alias and interface
|
|
92
|
+
type ID = number | string;
|
|
93
|
+
|
|
94
|
+
interface Person {
|
|
95
|
+
id: ID;
|
|
96
|
+
name: string;
|
|
97
|
+
age?: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Enum
|
|
101
|
+
enum Role {
|
|
102
|
+
Admin,
|
|
103
|
+
User,
|
|
104
|
+
Guest
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Class with generics and inheritance
|
|
108
|
+
class User<T extends Person> {
|
|
109
|
+
private role: Role;
|
|
110
|
+
|
|
111
|
+
constructor(public data: T, role: Role = Role.User) {
|
|
112
|
+
this.role = role;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
get id(): ID {
|
|
116
|
+
return this.data.id;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
printInfo(): void {
|
|
120
|
+
console.log(\`\${this.data.name} (\${Role[this.role]})\`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Generic function
|
|
125
|
+
function identity<T>(value: T): T {
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Arrow function and async/await
|
|
130
|
+
const fetchUser = async (id: ID): Promise<Person> => {
|
|
131
|
+
return { id, name: "Alice", age: 25 };
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// Union, intersection, type assertions
|
|
135
|
+
let input: string | number = "42";
|
|
136
|
+
let result = (input as string).toUpperCase();
|
|
137
|
+
|
|
138
|
+
// Arrays, tuples
|
|
139
|
+
let nums: number[] = [1, 2, 3];
|
|
140
|
+
let pair: [string, number] = ["age", 30];
|
|
141
|
+
|
|
142
|
+
// Map, Set (built-ins)
|
|
143
|
+
const map = new Map<string, number>();
|
|
144
|
+
map.set("one", 1);
|
|
145
|
+
|
|
146
|
+
const set = new Set<ID>([1, "two"]);
|
|
147
|
+
|
|
148
|
+
// Usage
|
|
149
|
+
(async () => {
|
|
150
|
+
const person = await fetchUser(1);
|
|
151
|
+
const user = new User(person, Role.Admin);
|
|
152
|
+
user.printInfo();
|
|
153
|
+
console.log(identity(nums));
|
|
154
|
+
})();`);
|
|
155
|
+
|
|
156
|
+
editor.loadFiles( [
|
|
75
157
|
"../data/js_sample.js",
|
|
76
158
|
"../data/ts_sample.ts",
|
|
77
159
|
"../data/json_sample.json",
|
|
@@ -87,24 +169,14 @@
|
|
|
87
169
|
"../data/frag.wgsl",
|
|
88
170
|
"../changelog.md",
|
|
89
171
|
"../index.html",
|
|
90
|
-
|
|
91
|
-
|
|
172
|
+
"../README.md"
|
|
173
|
+
], ( instance, results, numFilesLoaded ) => {
|
|
92
174
|
console.log( `CodeEditor: ${ numFilesLoaded } files loaded!` );
|
|
93
175
|
instance.loadTab("js_sample.js");
|
|
94
|
-
}
|
|
95
|
-
xonCreateFile: ( instance ) => {
|
|
96
|
-
return { name: "new_shader.wgsl", language: "WGSL" }
|
|
97
|
-
},
|
|
98
|
-
onContextMenu: ( editor, content, event ) => {
|
|
99
|
-
if( !content ) return;
|
|
100
|
-
return [
|
|
101
|
-
{ path: "Custom Action", callback: () => console.log( content ) }
|
|
102
|
-
];
|
|
103
|
-
},
|
|
104
|
-
});
|
|
176
|
+
} );
|
|
105
177
|
|
|
106
|
-
|
|
107
|
-
|
|
178
|
+
editor.loadFile("../data/animation.bml", { language: "JSON" });
|
|
179
|
+
editor.loadFile("../data/CMakeLists.txt", { language: "CMake" });
|
|
108
180
|
|
|
109
181
|
if( !fileExplorer )
|
|
110
182
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lexgui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "JS library to create web graphical user interfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/lexgui.js",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@rollup/plugin-alias": "^6.0.0",
|
|
55
55
|
"@rollup/plugin-terser": "^0.4.4",
|
|
56
56
|
"@tailwindcss/cli": "^4.1.18",
|
|
57
|
+
"baseline-browser-mapping": "^2.9.19",
|
|
57
58
|
"cssnano": "^7.1.2",
|
|
58
59
|
"dprint": "^0.50.2",
|
|
59
60
|
"postcss": "^8.5.6",
|