vim-web 0.3.44-dev.84 → 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
@@ -75300,11 +75300,14 @@ function UltraSuggestion() {
75300
75300
  ] });
75301
75301
  }
75302
75302
  class ComponentLoader {
75303
- constructor(viewer, modal) {
75303
+ constructor(viewer, modal, settings2) {
75304
75304
  __publicField(this, "_viewer");
75305
75305
  __publicField(this, "_modal");
75306
+ __publicField(this, "_addLink", false);
75306
75307
  this._viewer = viewer;
75307
75308
  this._modal = modal;
75309
+ this._addLink = /* settings.capacity.canFollowUrl */
75310
+ false;
75308
75311
  }
75309
75312
  /**
75310
75313
  * Event emitter for progress updates.
@@ -75315,7 +75318,7 @@ class ComponentLoader {
75315
75318
  message: "Loading in WebGL Mode",
75316
75319
  progress: p.loaded,
75317
75320
  mode: "bytes",
75318
- more: UltraSuggestion()
75321
+ more: this._addLink ? UltraSuggestion() : void 0
75319
75322
  });
75320
75323
  }
75321
75324
  /**
@@ -75578,10 +75581,13 @@ function useFloatingPanelPosition(panelRef, anchorElement, enabled) {
75578
75581
  return position;
75579
75582
  }
75580
75583
  function InputNumber(props) {
75581
- 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());
75582
75588
  const externalValue = useSyncExternalStore(
75583
- (callback) => props.state.onChange.subscribe(callback),
75584
- () => props.state.get()
75589
+ (callback) => state.onChange.subscribe(callback),
75590
+ () => state.get()
75585
75591
  );
75586
75592
  const [inputValue, setInputValue] = useState(externalValue.toString());
75587
75593
  useEffect(() => {
@@ -75595,24 +75601,27 @@ function InputNumber(props) {
75595
75601
  setInputValue(input);
75596
75602
  const parsed = parseFloat(input);
75597
75603
  if (!isNaN(parsed)) {
75598
- props.state.set(parsed);
75604
+ state.set(parsed);
75599
75605
  }
75600
75606
  };
75601
75607
  const handleBlur = () => {
75602
75608
  const parsed = parseFloat(inputValue);
75603
75609
  const value = isNaN(parsed) ? defaultValue.current : parsed;
75604
- props.state.set(value);
75605
- setInputValue(props.state.get().toString());
75610
+ state.set(value);
75611
+ setInputValue(state.get().toString());
75606
75612
  };
75607
75613
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
75608
75614
  "input",
75609
75615
  {
75610
- disabled: props.disabled ?? false,
75616
+ disabled: ((_a3 = entry.enabled) == null ? void 0 : _a3.call(entry)) === false,
75611
75617
  type: "number",
75612
75618
  value: inputValue,
75613
75619
  onChange: handleChange,
75614
75620
  onBlur: handleBlur,
75615
- 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
75616
75625
  }
75617
75626
  );
75618
75627
  }
@@ -75633,14 +75642,14 @@ function GenericEntry(field) {
75633
75642
  );
75634
75643
  }
75635
75644
  function GenericField(props) {
75636
- var _a3, _b2, _c, _d, _e, _f;
75645
+ var _a3, _b2, _c, _d;
75637
75646
  switch (props.field.type) {
75638
75647
  case "number":
75639
- 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 });
75640
75649
  case "text":
75641
- 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 });
75642
75651
  case "bool":
75643
- 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 });
75644
75653
  default:
75645
75654
  return null;
75646
75655
  }
@@ -75928,7 +75937,16 @@ const IsolationPanel$1 = forwardRef(
75928
75937
  entries: [
75929
75938
  { type: "bool", id: Ids.showGhost, label: "Show Ghost", state: props.state.showGhost },
75930
75939
  // { type: "bool", id: "showRooms", label: "Show Rooms", state: props.state.showRooms },
75931
- { 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
+ }
75932
75950
  ]
75933
75951
  }
75934
75952
  );
@@ -76107,7 +76125,7 @@ function Viewer$1(props) {
76107
76125
  const sectionBoxPanelHandle = useRef(null);
76108
76126
  const camera2 = useWebglCamera(props.viewer, sectionBoxRef);
76109
76127
  const cursor = useMemo(() => new CursorManager(props.viewer), []);
76110
- const loader = useRef(new ComponentLoader(props.viewer, modal));
76128
+ const loader = useRef(new ComponentLoader(props.viewer, modal, settings2.value));
76111
76129
  useViewerInput(props.viewer.inputs, camera2);
76112
76130
  const side = useSideState(
76113
76131
  isTrue(settings2.value.ui.bimTreePanel) || isTrue(settings2.value.ui.bimInfoPanel),