@xifu/shader-graph-glsl 0.4.1 → 0.4.2

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.
@@ -3058,7 +3058,7 @@ var Popup = ({ visiable = false, children, view, onShowChange, mask = true, keep
3058
3058
  if (view) view._setPopupShow = setShow;
3059
3059
  setShowRef.current = setShow;
3060
3060
  useEffect5(() => {
3061
- if (show !== visiable) setShow(visiable);
3061
+ if (!view && show !== visiable) setShow(visiable);
3062
3062
  }, [visiable]);
3063
3063
  const close = (e) => {
3064
3064
  e.preventDefault();
@@ -13873,9 +13873,14 @@ var BlackBoardView = class extends PopupView {
13873
13873
  return this.data.map((i) => ({ name: i.name, type: i.type, defalutValue: i.defalutValue, exposed: i.exposed, typeEdit: i.typeEdit }));
13874
13874
  }
13875
13875
  addParameter(type, editing = false, typeEdit, customName) {
13876
- const nextIndex = this.data.filter((i) => i.type == type).length;
13877
13876
  let name = customName || ValueTypeNameMap[type];
13878
- if (nextIndex) name += `(${nextIndex})`;
13877
+ if (name === customName) {
13878
+ const existingCount = this.data.filter((i) => i.name === customName).length;
13879
+ if (existingCount > 0) name = `${customName}(${existingCount})`;
13880
+ } else {
13881
+ const nextIndex = this.data.filter((i) => i.type == type).length;
13882
+ if (nextIndex) name += `(${nextIndex})`;
13883
+ }
13879
13884
  this.data.push({ name, type, exposed: true, defalutValue: ValueTypeCtor[type]?.(), editing, typeEdit });
13880
13885
  this.update();
13881
13886
  }
@@ -14162,7 +14167,7 @@ var ListIOItem = ({ list, value, onChange }) => {
14162
14167
  // package.json
14163
14168
  var package_default = {
14164
14169
  name: "@xifu/shader-graph-glsl",
14165
- version: "0.4.1",
14170
+ version: "0.4.2",
14166
14171
  description: "Shader Graph GLSL \u2014 visual node-based shader editor & runtime engine",
14167
14172
  type: "module",
14168
14173
  private: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xifu/shader-graph-glsl",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Shader Graph GLSL — visual node-based shader editor & runtime engine",
5
5
  "type": "module",
6
6
  "private": false,