chili3d 1.0.5 → 1.0.7

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 (2) hide show
  1. package/index.js +70 -35
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -166,7 +166,7 @@ module.exports = {};
166
166
 
167
167
  }),
168
168
  429: (function (module, __unused_webpack_exports, __webpack_require__) {
169
- module.exports = {};
169
+ __webpack_require__.r(module.exports = {});
170
170
 
171
171
 
172
172
  }),
@@ -86654,19 +86654,29 @@ class Ribbon extends HTMLElement {
86654
86654
  }, div({
86655
86655
  className: ribbon_style.appIcon || "",
86656
86656
  onclick: ()=>PubSub["default"].pub("displayHome", true)
86657
- }, controls_svg({
86658
- className: ribbon_style.icon || "",
86659
- icon: "icon-chili"
86660
- }), span({
86657
+ }, (()=>{
86658
+ const svgOptions = {
86659
+ icon: "icon-chili"
86660
+ };
86661
+ if (ribbon_style.icon) {
86662
+ svgOptions.className = ribbon_style.icon;
86663
+ }
86664
+ return controls_svg(svgOptions);
86665
+ })(), span({
86661
86666
  id: "appName",
86662
86667
  textContent: `Chili3D - v${"0.6.1"}`
86663
86668
  })), div({
86664
86669
  className: ribbon_style.ribbonTitlePanel || ""
86665
- }, controls_svg({
86666
- className: ribbon_style.home || "",
86667
- icon: "icon-home",
86668
- onclick: ()=>PubSub["default"].pub("displayHome", true)
86669
- }), collection({
86670
+ }, (()=>{
86671
+ const svgOptions = {
86672
+ icon: "icon-home",
86673
+ onclick: ()=>PubSub["default"].pub("displayHome", true)
86674
+ };
86675
+ if (ribbon_style.home) {
86676
+ svgOptions.className = ribbon_style.home;
86677
+ }
86678
+ return controls_svg(svgOptions);
86679
+ })(), collection({
86670
86680
  className: ribbon_style.quickCommands || "",
86671
86681
  sources: this.dataContent.quickCommands,
86672
86682
  template: (command)=>QuickButton(command)
@@ -86696,12 +86706,17 @@ class Ribbon extends HTMLElement {
86696
86706
  className: ribbon_style.views || "",
86697
86707
  sources: this.dataContent.app.views,
86698
86708
  template: (view)=>this.createViewItem(view)
86699
- }), controls_svg({
86700
- className: ribbon_style.new || "",
86701
- icon: "icon-plus",
86702
- title: i18n_I18n.translate("command.doc.new"),
86703
- onclick: ()=>PubSub["default"].pub("executeCommand", "doc.new")
86704
- }));
86709
+ }), (()=>{
86710
+ const svgOptions = {
86711
+ icon: "icon-plus",
86712
+ title: i18n_I18n.translate("command.doc.new"),
86713
+ onclick: ()=>PubSub["default"].pub("executeCommand", "doc.new")
86714
+ };
86715
+ if (ribbon_style.new) {
86716
+ svgOptions.className = ribbon_style.new;
86717
+ }
86718
+ return controls_svg(svgOptions);
86719
+ })());
86705
86720
  }
86706
86721
  createViewItem(view) {
86707
86722
  return div({
@@ -86713,14 +86728,19 @@ class Ribbon extends HTMLElement {
86713
86728
  className: ribbon_style.name || ""
86714
86729
  }, span({
86715
86730
  textContent: new Binding(view.document, "name")
86716
- })), controls_svg({
86717
- className: ribbon_style.close || "",
86718
- icon: "icon-times",
86719
- onclick: (e)=>{
86720
- e.stopPropagation();
86721
- view.close();
86731
+ })), (()=>{
86732
+ const svgOptions = {
86733
+ icon: "icon-times",
86734
+ onclick: (e)=>{
86735
+ e.stopPropagation();
86736
+ view.close();
86737
+ }
86738
+ };
86739
+ if (ribbon_style.close) {
86740
+ svgOptions.className = ribbon_style.close;
86722
86741
  }
86723
- }));
86742
+ return controls_svg(svgOptions);
86743
+ })());
86724
86744
  }
86725
86745
  rightPanel() {
86726
86746
  return div({
@@ -86728,11 +86748,16 @@ class Ribbon extends HTMLElement {
86728
86748
  }, controls_a({
86729
86749
  href: "https://github.com/xiangechen/chili3d",
86730
86750
  target: "_blank"
86731
- }, controls_svg({
86732
- title: "Github",
86733
- className: ribbon_style.icon || "",
86734
- icon: "icon-github"
86735
- })));
86751
+ }, (()=>{
86752
+ const svgOptions = {
86753
+ title: "Github",
86754
+ icon: "icon-github"
86755
+ };
86756
+ if (ribbon_style.icon) {
86757
+ svgOptions.className = ribbon_style.icon;
86758
+ }
86759
+ return controls_svg(svgOptions);
86760
+ })()));
86736
86761
  }
86737
86762
  ribbonTabs() {
86738
86763
  return collection({
@@ -86923,24 +86948,34 @@ class SnapConfig extends HTMLElement {
86923
86948
  }
86924
86949
  customElements.define("chili-snap-config", SnapConfig);
86925
86950
 
86926
- // EXTERNAL MODULE: ./packages/chili-ui/src/statusbar/statusbar.module.css
86927
- var statusbar_module = __webpack_require__(429);
86928
86951
  ;// CONCATENATED MODULE: ./packages/chili-ui/src/statusbar/statusbar.ts
86929
86952
  // Part of the Chili3d Project, under the AGPL-3.0 License.
86930
86953
  // See LICENSE file in the project root for full license information.
86931
86954
 
86932
86955
 
86933
86956
 
86934
-
86957
+ let statusbar_style = {
86958
+ tip: "",
86959
+ panel: "",
86960
+ left: "",
86961
+ right: ""
86962
+ };
86963
+ try {
86964
+ const importedStyle = __webpack_require__(429);
86965
+ statusbar_style = importedStyle.default || importedStyle;
86966
+ } catch (error) {
86967
+ console.warn("Failed to load statusbar.module.css:", error);
86968
+ }
86935
86969
  class Statusbar extends HTMLElement {
86936
86970
  _isDefaultTip = true;
86937
86971
  tip = controls_label({
86938
86972
  textContent: "",
86939
- className: statusbar_module/* ["default"].tip */.A.tip
86973
+ className: statusbar_style.tip || ""
86940
86974
  });
86941
86975
  constructor(className){
86942
86976
  super();
86943
- this.className = `${statusbar_module/* ["default"].panel */.A.panel} ${className}`;
86977
+ const panelClass = statusbar_style.panel || "";
86978
+ this.className = panelClass ? `${panelClass} ${className}` : className;
86944
86979
  this.setDefaultTip();
86945
86980
  this.render();
86946
86981
  PubSub["default"].sub("statusBarTip", this.statusBarTip);
@@ -86954,9 +86989,9 @@ class Statusbar extends HTMLElement {
86954
86989
  };
86955
86990
  render() {
86956
86991
  this.append(div({
86957
- className: statusbar_module/* ["default"].left */.A.left
86992
+ className: statusbar_style.left || ""
86958
86993
  }, this.tip), div({
86959
- className: statusbar_module/* ["default"].right */.A.right
86994
+ className: statusbar_style.right || ""
86960
86995
  }, new SnapConfig()));
86961
86996
  }
86962
86997
  statusBarTip = (tip)=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chili3d",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Chili3D - A 3D modeling and animation tool",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",