vim-web 0.3.44-dev.83 → 0.3.44-dev.85

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/dist/vim-web.js CHANGED
@@ -52480,9 +52480,6 @@ class MouseHandler extends BaseInputHandler {
52480
52480
  this.reg(this._canvas, "wheel", (e) => {
52481
52481
  this.onMouseScroll(e);
52482
52482
  });
52483
- this.reg(this._canvas, "dblclick", (e) => {
52484
- this.handleDoubleClick(e);
52485
- });
52486
52483
  }
52487
52484
  dispose() {
52488
52485
  this.unregister();
@@ -52515,7 +52512,6 @@ class MouseHandler extends BaseInputHandler {
52515
52512
  var _a3;
52516
52513
  if (event.pointerType !== "mouse") return;
52517
52514
  if (event.button !== 0) return;
52518
- console.log("click!");
52519
52515
  const pos = this.relativePosition(event);
52520
52516
  if (!almostEqual(this._lastMouseDownPosition, pos, 0.01)) {
52521
52517
  return;
@@ -52534,7 +52530,6 @@ class MouseHandler extends BaseInputHandler {
52534
52530
  }
52535
52531
  async handleDoubleClick(event) {
52536
52532
  var _a3;
52537
- console.log("double click!");
52538
52533
  const pos = this.relativePosition(event);
52539
52534
  (_a3 = this.onDoubleClick) == null ? void 0 : _a3.call(this, pos);
52540
52535
  event.preventDefault();
@@ -75305,11 +75300,14 @@ function UltraSuggestion() {
75305
75300
  ] });
75306
75301
  }
75307
75302
  class ComponentLoader {
75308
- constructor(viewer, modal) {
75303
+ constructor(viewer, modal, settings2) {
75309
75304
  __publicField(this, "_viewer");
75310
75305
  __publicField(this, "_modal");
75306
+ __publicField(this, "_addLink", false);
75311
75307
  this._viewer = viewer;
75312
75308
  this._modal = modal;
75309
+ this._addLink = /* settings.capacity.canFollowUrl */
75310
+ false;
75313
75311
  }
75314
75312
  /**
75315
75313
  * Event emitter for progress updates.
@@ -75320,7 +75318,7 @@ class ComponentLoader {
75320
75318
  message: "Loading in WebGL Mode",
75321
75319
  progress: p.loaded,
75322
75320
  mode: "bytes",
75323
- more: UltraSuggestion()
75321
+ more: this._addLink ? UltraSuggestion() : void 0
75324
75322
  });
75325
75323
  }
75326
75324
  /**
@@ -75583,10 +75581,13 @@ function useFloatingPanelPosition(panelRef, anchorElement, enabled) {
75583
75581
  return position;
75584
75582
  }
75585
75583
  function InputNumber(props) {
75586
- const defaultValue = useRef(props.state.get());
75584
+ var _a3;
75585
+ const entry = props.entry;
75586
+ const state = entry.state;
75587
+ const defaultValue = useRef(props.entry.state.get());
75587
75588
  const externalValue = useSyncExternalStore(
75588
- (callback) => props.state.onChange.subscribe(callback),
75589
- () => props.state.get()
75589
+ (callback) => state.onChange.subscribe(callback),
75590
+ () => state.get()
75590
75591
  );
75591
75592
  const [inputValue, setInputValue] = useState(externalValue.toString());
75592
75593
  useEffect(() => {
@@ -75600,24 +75601,27 @@ function InputNumber(props) {
75600
75601
  setInputValue(input);
75601
75602
  const parsed = parseFloat(input);
75602
75603
  if (!isNaN(parsed)) {
75603
- props.state.set(parsed);
75604
+ state.set(parsed);
75604
75605
  }
75605
75606
  };
75606
75607
  const handleBlur = () => {
75607
75608
  const parsed = parseFloat(inputValue);
75608
75609
  const value = isNaN(parsed) ? defaultValue.current : parsed;
75609
- props.state.set(value);
75610
- setInputValue(props.state.get().toString());
75610
+ state.set(value);
75611
+ setInputValue(state.get().toString());
75611
75612
  };
75612
75613
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
75613
75614
  "input",
75614
75615
  {
75615
- disabled: props.disabled ?? false,
75616
+ disabled: ((_a3 = entry.enabled) == null ? void 0 : _a3.call(entry)) === false,
75616
75617
  type: "number",
75617
75618
  value: inputValue,
75618
75619
  onChange: handleChange,
75619
75620
  onBlur: handleBlur,
75620
- className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1"
75621
+ className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
75622
+ min: entry.min,
75623
+ max: entry.max,
75624
+ step: entry.step
75621
75625
  }
75622
75626
  );
75623
75627
  }
@@ -75638,14 +75642,14 @@ function GenericEntry(field) {
75638
75642
  );
75639
75643
  }
75640
75644
  function GenericField(props) {
75641
- var _a3, _b2, _c, _d, _e, _f;
75645
+ var _a3, _b2, _c, _d;
75642
75646
  switch (props.field.type) {
75643
75647
  case "number":
75644
- return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state, disabled: ((_b2 = (_a3 = props.field).enabled) == null ? void 0 : _b2.call(_a3)) === false });
75648
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { entry: props.field });
75645
75649
  case "text":
75646
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: ((_d = (_c = props.field).enabled) == null ? void 0 : _d.call(_c)) === false });
75650
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: ((_b2 = (_a3 = props.field).enabled) == null ? void 0 : _b2.call(_a3)) === false });
75647
75651
  case "bool":
75648
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: ((_f = (_e = props.field).enabled) == null ? void 0 : _f.call(_e)) === false });
75652
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: ((_d = (_c = props.field).enabled) == null ? void 0 : _d.call(_c)) === false });
75649
75653
  default:
75650
75654
  return null;
75651
75655
  }
@@ -75933,7 +75937,16 @@ const IsolationPanel$1 = forwardRef(
75933
75937
  entries: [
75934
75938
  { type: "bool", id: Ids.showGhost, label: "Show Ghost", state: props.state.showGhost },
75935
75939
  // { type: "bool", id: "showRooms", label: "Show Rooms", state: props.state.showRooms },
75936
- { type: "number", id: Ids.ghostOpacity, label: "Ghost Opacity", state: props.state.ghostOpacity, enabled: () => props.state.showGhost.get() }
75940
+ {
75941
+ type: "number",
75942
+ id: Ids.ghostOpacity,
75943
+ label: "Ghost Opacity",
75944
+ state: props.state.ghostOpacity,
75945
+ enabled: () => props.state.showGhost.get(),
75946
+ min: 0,
75947
+ max: 1,
75948
+ step: 0.05
75949
+ }
75937
75950
  ]
75938
75951
  }
75939
75952
  );
@@ -76112,7 +76125,7 @@ function Viewer$1(props) {
76112
76125
  const sectionBoxPanelHandle = useRef(null);
76113
76126
  const camera2 = useWebglCamera(props.viewer, sectionBoxRef);
76114
76127
  const cursor = useMemo(() => new CursorManager(props.viewer), []);
76115
- const loader = useRef(new ComponentLoader(props.viewer, modal));
76128
+ const loader = useRef(new ComponentLoader(props.viewer, modal, settings2.value));
76116
76129
  useViewerInput(props.viewer.inputs, camera2);
76117
76130
  const side = useSideState(
76118
76131
  isTrue(settings2.value.ui.bimTreePanel) || isTrue(settings2.value.ui.bimInfoPanel),