vim-web 0.3.44-dev.71 → 0.3.44-dev.72

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
@@ -75704,6 +75704,24 @@ function GenericBoolField(props) {
75704
75704
  }
75705
75705
  );
75706
75706
  }
75707
+ function useCustomizer(baseEntries, ref) {
75708
+ const customization = useRef();
75709
+ const [entries, setEntries] = useState(baseEntries);
75710
+ const applyCustomization = () => {
75711
+ setEntries(customization.current ? customization.current(baseEntries) : baseEntries);
75712
+ };
75713
+ const setCustomization = (fn) => {
75714
+ customization.current = fn;
75715
+ applyCustomization();
75716
+ };
75717
+ useEffect(() => {
75718
+ applyCustomization();
75719
+ }, [baseEntries]);
75720
+ useImperativeHandle(ref, () => ({
75721
+ customize: setCustomization
75722
+ }));
75723
+ return entries;
75724
+ }
75707
75725
  const GenericPanel = forwardRef((props, ref) => {
75708
75726
  const panelRef = useRef(null);
75709
75727
  const panelPosition = useFloatingPanelPosition(
@@ -75742,24 +75760,6 @@ const GenericPanel = forwardRef((props, ref) => {
75742
75760
  }
75743
75761
  ) });
75744
75762
  });
75745
- function useCustomizer(baseEntries, ref) {
75746
- const customization = useRef();
75747
- const [entries, setEntries] = useState(baseEntries);
75748
- const applyCustomization = () => {
75749
- setEntries(customization.current ? customization.current(baseEntries) : baseEntries);
75750
- };
75751
- const setCustomization = (fn) => {
75752
- customization.current = fn;
75753
- applyCustomization();
75754
- };
75755
- useEffect(() => {
75756
- applyCustomization();
75757
- }, [baseEntries]);
75758
- useImperativeHandle(ref, () => ({
75759
- customize: setCustomization
75760
- }));
75761
- return entries;
75762
- }
75763
75763
  const SectionBoxPanel = forwardRef(
75764
75764
  (props, ref) => {
75765
75765
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -76120,8 +76120,8 @@ function Viewer$1(props) {
76120
76120
  const settings2 = useSettings(props.viewer, props.settings ?? {});
76121
76121
  const modal = useRef(null);
76122
76122
  const sectionBoxRef = useWebglSectionBox(props.viewer);
76123
- const isolationPanelRef = useRef(null);
76124
- const sectionBoxPanelRef = useRef(null);
76123
+ const isolationPanelHandle = useRef(null);
76124
+ const sectionBoxPanelHandle = useRef(null);
76125
76125
  const camera2 = useWebglCamera(props.viewer, sectionBoxRef);
76126
76126
  const cursor = useMemo(() => new CursorManager(props.viewer), []);
76127
76127
  const loader = useRef(new ComponentLoader(props.viewer, modal));
@@ -76158,10 +76158,10 @@ function Viewer$1(props) {
76158
76158
  camera: camera2,
76159
76159
  settings: settings2,
76160
76160
  get isolationPanel() {
76161
- return isolationPanelRef.current;
76161
+ return isolationPanelHandle.current;
76162
76162
  },
76163
76163
  get sectionBoxPanel() {
76164
- return sectionBoxPanelRef.current;
76164
+ return sectionBoxPanelHandle.current;
76165
76165
  },
76166
76166
  get sectionBox() {
76167
76167
  return sectionBoxRef;
@@ -76230,8 +76230,8 @@ function Viewer$1(props) {
76230
76230
  show: isTrue(settings2.value.ui.controlBar)
76231
76231
  }
76232
76232
  ),
76233
- /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { ref: sectionBoxPanelRef, state: sectionBoxRef }),
76234
- /* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel, { ref: isolationPanelRef, state: isolationRef }),
76233
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { ref: sectionBoxPanelHandle, state: sectionBoxRef }),
76234
+ /* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel, { ref: isolationPanelHandle, state: isolationRef }),
76235
76235
  /* @__PURE__ */ jsxRuntimeExports.jsx(
76236
76236
  AxesPanelMemo,
76237
76237
  {
@@ -76509,9 +76509,11 @@ function createViewer(container) {
76509
76509
  return promise;
76510
76510
  }
76511
76511
  function Viewer3(props) {
76512
- const modal = useRef(null);
76513
76512
  const sectionBox2 = useUltraSectionBox(props.core);
76514
76513
  const camera2 = useUltraCamera(props.core, sectionBox2);
76514
+ const isolationPanelHandle = useRef(null);
76515
+ const sectionBoxPanelHandle = useRef(null);
76516
+ const modalHandle = useRef(null);
76515
76517
  const side = useSideState(true, 400);
76516
76518
  const [_, setSelectState] = useState(0);
76517
76519
  const [controlBarCustom, setControlBarCustom] = useState(() => (c) => c);
@@ -76519,24 +76521,30 @@ function Viewer3(props) {
76519
76521
  const controlBar = useUltraControlBar(props.core, sectionBox2, isolation, camera2, (_2) => _2);
76520
76522
  useViewerInput(props.core.inputs, camera2);
76521
76523
  useEffect(() => {
76522
- props.core.onStateChanged.subscribe((state) => updateModal(modal, state));
76524
+ props.core.onStateChanged.subscribe((state) => updateModal(modalHandle, state));
76523
76525
  props.core.selection.onSelectionChanged.subscribe(() => {
76524
76526
  setSelectState((i) => (i + 1) % 2);
76525
76527
  });
76526
76528
  props.onMount({
76527
76529
  core: props.core,
76528
76530
  get modal() {
76529
- return modal.current;
76531
+ return modalHandle.current;
76530
76532
  },
76531
76533
  isolation,
76532
76534
  sectionBox: sectionBox2,
76533
76535
  camera: camera2,
76536
+ get isolationPanel() {
76537
+ return isolationPanelHandle.current;
76538
+ },
76539
+ get sectionBoxPanel() {
76540
+ return sectionBoxPanelHandle.current;
76541
+ },
76534
76542
  dispose: () => {
76535
76543
  },
76536
76544
  controlBar: {
76537
76545
  customize: (v) => setControlBarCustom(() => v)
76538
76546
  },
76539
- load: patchLoad(props.core, modal)
76547
+ load: patchLoad(props.core, modalHandle)
76540
76548
  });
76541
76549
  }, []);
76542
76550
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -76551,11 +76559,11 @@ function Viewer3(props) {
76551
76559
  show: true
76552
76560
  }
76553
76561
  ),
76554
- /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 }),
76555
- /* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel, { state: isolation })
76562
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { ref: sectionBoxPanelHandle, state: sectionBox2 }),
76563
+ /* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel, { ref: isolationPanelHandle, state: isolation })
76556
76564
  ] });
76557
76565
  } }),
76558
- /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ref: modal, canFollowLinks: true }),
76566
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ref: modalHandle, canFollowLinks: true }),
76559
76567
  /* @__PURE__ */ jsxRuntimeExports.jsx(
76560
76568
  ReactTooltip,
76561
76569
  {