chili3d 1.0.8 → 1.0.20
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/index.d.ts +42 -22
- package/index.js +57 -14
- package/package.json +7 -14
package/index.d.ts
CHANGED
|
@@ -1,35 +1,55 @@
|
|
|
1
1
|
// Type definitions for chili3d
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Chili3D namespace
|
|
5
|
+
*/
|
|
6
|
+
declare namespace Chili3D {
|
|
7
|
+
/**
|
|
8
|
+
* Application builder interface
|
|
9
|
+
*/
|
|
10
10
|
class AppBuilder {
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Build the application
|
|
13
|
+
* @returns Promise<void>
|
|
14
|
+
*/
|
|
12
15
|
build(): Promise<void>;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Logger utility
|
|
20
|
+
*/
|
|
19
21
|
class Logger {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Log a message
|
|
24
|
+
* @param message The message to log
|
|
25
|
+
*/
|
|
26
|
+
static log(message: string): void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Log a warning
|
|
30
|
+
* @param message The warning message
|
|
31
|
+
*/
|
|
32
|
+
static warn(message: string): void;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Log an error
|
|
36
|
+
* @param message The error message
|
|
37
|
+
*/
|
|
38
|
+
static error(message: string): void;
|
|
24
39
|
}
|
|
25
40
|
}
|
|
26
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Exported modules
|
|
44
|
+
*/
|
|
27
45
|
declare module 'chili3d' {
|
|
28
|
-
export
|
|
46
|
+
export { AppBuilder, Logger } from 'chili3d';
|
|
29
47
|
}
|
|
30
48
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Global variable for Chili3D
|
|
51
|
+
*/
|
|
52
|
+
declare const Chili3D: {
|
|
53
|
+
AppBuilder: typeof Chili3D.AppBuilder;
|
|
54
|
+
Logger: typeof Chili3D.Logger;
|
|
55
|
+
};
|
package/index.js
CHANGED
|
@@ -151,12 +151,12 @@ __webpack_require__.r(module.exports = {});
|
|
|
151
151
|
|
|
152
152
|
}),
|
|
153
153
|
483: (function (module, __unused_webpack_exports, __webpack_require__) {
|
|
154
|
-
module.exports = {};
|
|
154
|
+
__webpack_require__.r(module.exports = {});
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
}),
|
|
158
158
|
67: (function (module, __unused_webpack_exports, __webpack_require__) {
|
|
159
|
-
module.exports = {};
|
|
159
|
+
__webpack_require__.r(module.exports = {});
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
}),
|
|
@@ -86428,14 +86428,37 @@ class CommandContext extends HTMLElement {
|
|
|
86428
86428
|
}
|
|
86429
86429
|
customElements.define("command-context", CommandContext);
|
|
86430
86430
|
|
|
86431
|
-
// EXTERNAL MODULE: ./packages/chili-ui/src/ribbon/ribbonButton.module.css
|
|
86432
|
-
var ribbonButton_module = __webpack_require__(483);
|
|
86433
86431
|
;// CONCATENATED MODULE: ./packages/chili-ui/src/ribbon/ribbonButton.ts
|
|
86434
86432
|
// Part of the Chili3d Project, under the AGPL-3.0 License.
|
|
86435
86433
|
// See LICENSE file in the project root for full license information.
|
|
86436
86434
|
|
|
86437
86435
|
|
|
86438
|
-
|
|
86436
|
+
let ribbonButton_style = {
|
|
86437
|
+
normal: "",
|
|
86438
|
+
small: "",
|
|
86439
|
+
icon: "",
|
|
86440
|
+
smallIcon: "",
|
|
86441
|
+
largeButtonText: "",
|
|
86442
|
+
smallButtonText: "",
|
|
86443
|
+
checked: ""
|
|
86444
|
+
};
|
|
86445
|
+
try {
|
|
86446
|
+
const importedStyle = __webpack_require__(483);
|
|
86447
|
+
const loadedStyle = importedStyle.default || importedStyle;
|
|
86448
|
+
if (loadedStyle && typeof loadedStyle === 'object') {
|
|
86449
|
+
ribbonButton_style = {
|
|
86450
|
+
normal: loadedStyle.normal || "",
|
|
86451
|
+
small: loadedStyle.small || "",
|
|
86452
|
+
icon: loadedStyle.icon || "",
|
|
86453
|
+
smallIcon: loadedStyle.smallIcon || "",
|
|
86454
|
+
largeButtonText: loadedStyle.largeButtonText || "",
|
|
86455
|
+
smallButtonText: loadedStyle.smallButtonText || "",
|
|
86456
|
+
checked: loadedStyle.checked || ""
|
|
86457
|
+
};
|
|
86458
|
+
}
|
|
86459
|
+
} catch (error) {
|
|
86460
|
+
console.warn("Failed to load ribbonButton.module.css:", error);
|
|
86461
|
+
}
|
|
86439
86462
|
class RibbonButton extends HTMLElement {
|
|
86440
86463
|
onClick;
|
|
86441
86464
|
constructor(display, icon, size, onClick){
|
|
@@ -86463,10 +86486,17 @@ class RibbonButton extends HTMLElement {
|
|
|
86463
86486
|
const image = controls_svg({
|
|
86464
86487
|
icon
|
|
86465
86488
|
});
|
|
86466
|
-
|
|
86467
|
-
|
|
86489
|
+
const buttonClass = size === button_ButtonSize.large ? ribbonButton_style.normal : ribbonButton_style.small;
|
|
86490
|
+
if (buttonClass) {
|
|
86491
|
+
this.className = buttonClass;
|
|
86492
|
+
}
|
|
86493
|
+
const iconClass = size === button_ButtonSize.large ? ribbonButton_style.icon : ribbonButton_style.smallIcon;
|
|
86494
|
+
if (iconClass) {
|
|
86495
|
+
image.classList.add(iconClass);
|
|
86496
|
+
}
|
|
86497
|
+
const textClass = size === button_ButtonSize.large ? ribbonButton_style.largeButtonText : ribbonButton_style.smallButtonText;
|
|
86468
86498
|
const text = controls_label({
|
|
86469
|
-
className:
|
|
86499
|
+
className: textClass || "",
|
|
86470
86500
|
textContent: new Localize(display)
|
|
86471
86501
|
});
|
|
86472
86502
|
i18n_I18n.set(this, "title", display);
|
|
@@ -86490,24 +86520,37 @@ class RibbonToggleButton extends RibbonButton {
|
|
|
86490
86520
|
super(`command.${data.key}`, data.icon, size, ()=>{
|
|
86491
86521
|
PubSub["default"].pub("executeCommand", data.key);
|
|
86492
86522
|
});
|
|
86493
|
-
if (data.toggle) {
|
|
86494
|
-
data.toggle.converter = new ToggleConverter(this.className,
|
|
86523
|
+
if (data.toggle && ribbonButton_style.checked) {
|
|
86524
|
+
data.toggle.converter = new ToggleConverter(this.className, ribbonButton_style.checked);
|
|
86495
86525
|
data.toggle.setBinding(this, "className");
|
|
86496
86526
|
}
|
|
86497
86527
|
}
|
|
86498
86528
|
}
|
|
86499
86529
|
customElements.define("ribbon-toggle-button", RibbonToggleButton);
|
|
86500
86530
|
|
|
86501
|
-
// EXTERNAL MODULE: ./packages/chili-ui/src/ribbon/ribbonStack.module.css
|
|
86502
|
-
var ribbonStack_module = __webpack_require__(67);
|
|
86503
86531
|
;// CONCATENATED MODULE: ./packages/chili-ui/src/ribbon/ribbonStack.ts
|
|
86504
86532
|
// Part of the Chili3d Project, under the AGPL-3.0 License.
|
|
86505
86533
|
// See LICENSE file in the project root for full license information.
|
|
86506
|
-
|
|
86534
|
+
let ribbonStack_style = {
|
|
86535
|
+
root: ""
|
|
86536
|
+
};
|
|
86537
|
+
try {
|
|
86538
|
+
const importedStyle = __webpack_require__(67);
|
|
86539
|
+
const loadedStyle = importedStyle.default || importedStyle;
|
|
86540
|
+
if (loadedStyle && typeof loadedStyle === 'object') {
|
|
86541
|
+
ribbonStack_style = {
|
|
86542
|
+
root: loadedStyle.root || ""
|
|
86543
|
+
};
|
|
86544
|
+
}
|
|
86545
|
+
} catch (error) {
|
|
86546
|
+
console.warn("Failed to load ribbonStack.module.css:", error);
|
|
86547
|
+
}
|
|
86507
86548
|
class RibbonStack extends HTMLElement {
|
|
86508
86549
|
constructor(){
|
|
86509
86550
|
super();
|
|
86510
|
-
|
|
86551
|
+
if (ribbonStack_style.root) {
|
|
86552
|
+
this.className = ribbonStack_style.root;
|
|
86553
|
+
}
|
|
86511
86554
|
}
|
|
86512
86555
|
}
|
|
86513
86556
|
customElements.define("ribbon-stack", RibbonStack);
|
package/package.json
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chili3d",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Chili3D -
|
|
3
|
+
"version": "1.0.20",
|
|
4
|
+
"description": "Chili3D - 3D modeling and animation software",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
7
10
|
"keywords": [
|
|
8
11
|
"3d",
|
|
9
12
|
"modeling",
|
|
10
13
|
"animation",
|
|
11
|
-
"webgl"
|
|
12
|
-
"threejs"
|
|
14
|
+
"webgl"
|
|
13
15
|
],
|
|
14
16
|
"author": "Chili3D Team",
|
|
15
|
-
"license": "AGPL-3.0"
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "https://github.com/chili3d/chili3d.git"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"three": "^0.160.0",
|
|
22
|
-
"lit": "^3.0.0",
|
|
23
|
-
"mobx": "^6.0.0"
|
|
24
|
-
}
|
|
17
|
+
"license": "AGPL-3.0"
|
|
25
18
|
}
|