vim-web 0.5.0-dev.9 → 0.6.0-dev.0
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/style.css +34 -7
- package/dist/types/core-viewers/shared/index.d.ts +2 -0
- package/dist/types/core-viewers/shared/inputAdapter.d.ts +2 -1
- package/dist/types/core-viewers/shared/keyboardHandler.d.ts +1 -1
- package/dist/types/core-viewers/shared/loadResult.d.ts +55 -0
- package/dist/types/core-viewers/shared/mouseHandler.d.ts +4 -1
- package/dist/types/core-viewers/shared/raycaster.d.ts +5 -5
- package/dist/types/core-viewers/shared/vimCollection.d.ts +25 -0
- package/dist/types/core-viewers/ultra/loadRequest.d.ts +6 -28
- package/dist/types/core-viewers/ultra/viewer.d.ts +6 -1
- package/dist/types/core-viewers/ultra/viewport.d.ts +6 -0
- package/dist/types/core-viewers/ultra/vim.d.ts +3 -1
- package/dist/types/core-viewers/ultra/vimCollection.d.ts +15 -11
- package/dist/types/core-viewers/webgl/index.d.ts +0 -1
- package/dist/types/core-viewers/webgl/loader/index.d.ts +3 -3
- package/dist/types/core-viewers/webgl/loader/materials/index.d.ts +1 -0
- package/dist/types/core-viewers/webgl/loader/materials/pickingMaterial.d.ts +42 -0
- package/dist/types/core-viewers/webgl/loader/mesh.d.ts +3 -1
- package/dist/types/core-viewers/webgl/loader/progressive/insertableGeometry.d.ts +6 -1
- package/dist/types/core-viewers/webgl/loader/progressive/insertableMesh.d.ts +6 -3
- package/dist/types/core-viewers/webgl/loader/progressive/instancedMesh.d.ts +5 -0
- package/dist/types/core-viewers/webgl/loader/progressive/instancedMeshFactory.d.ts +8 -1
- package/dist/types/core-viewers/webgl/loader/progressive/legacyMeshFactory.d.ts +4 -1
- package/dist/types/core-viewers/webgl/loader/progressive/loadRequest.d.ts +21 -0
- package/dist/types/core-viewers/webgl/loader/progressive/subsetBuilder.d.ts +2 -1
- package/dist/types/core-viewers/webgl/loader/progressive/subsetRequest.d.ts +3 -2
- package/dist/types/core-viewers/webgl/loader/vim.d.ts +12 -2
- package/dist/types/core-viewers/webgl/loader/vimCollection.d.ts +78 -0
- package/dist/types/core-viewers/webgl/loader/vimSettings.d.ts +11 -4
- package/dist/types/core-viewers/webgl/viewer/camera/cameraMovement.d.ts +8 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmoOrbit.d.ts +22 -17
- package/dist/types/core-viewers/webgl/viewer/gizmos/markers/gizmoMarker.d.ts +1 -0
- package/dist/types/core-viewers/webgl/viewer/raycaster.d.ts +3 -1
- package/dist/types/core-viewers/webgl/viewer/rendering/gpuPicker.d.ts +127 -0
- package/dist/types/core-viewers/webgl/viewer/rendering/renderScene.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/rendering/renderer.d.ts +7 -0
- package/dist/types/core-viewers/webgl/viewer/rendering/renderingSection.d.ts +4 -0
- package/dist/types/core-viewers/webgl/viewer/settings/viewerSettings.d.ts +11 -6
- package/dist/types/core-viewers/webgl/viewer/viewer.d.ts +16 -1
- package/dist/types/core-viewers/webgl/viewer/viewport.d.ts +1 -1
- package/dist/types/react-viewers/bim/bimPanel.d.ts +3 -3
- package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +32 -36
- package/dist/types/react-viewers/errors/errorStyle.d.ts +1 -1
- package/dist/types/react-viewers/helpers/loadRequest.d.ts +14 -16
- package/dist/types/react-viewers/helpers/reactUtils.d.ts +2 -1
- package/dist/types/react-viewers/helpers/utils.d.ts +8 -0
- package/dist/types/react-viewers/panels/axesPanel.d.ts +2 -1
- package/dist/types/react-viewers/panels/index.d.ts +1 -0
- package/dist/types/react-viewers/panels/isolationPanel.d.ts +2 -0
- package/dist/types/react-viewers/panels/loadingBox.d.ts +1 -1
- package/dist/types/react-viewers/panels/messageBox.d.ts +2 -0
- package/dist/types/react-viewers/panels/sidePanel.d.ts +1 -1
- package/dist/types/react-viewers/settings/anySettings.d.ts +7 -0
- package/dist/types/react-viewers/settings/index.d.ts +1 -1
- package/dist/types/react-viewers/settings/settingsInputBox.d.ts +4 -0
- package/dist/types/react-viewers/settings/settingsItem.d.ts +30 -0
- package/dist/types/react-viewers/settings/settingsKeys.d.ts +46 -0
- package/dist/types/react-viewers/settings/settingsPanel.d.ts +5 -4
- package/dist/types/react-viewers/settings/settingsPanelContent.d.ts +6 -0
- package/dist/types/react-viewers/settings/settingsState.d.ts +11 -11
- package/dist/types/react-viewers/settings/settingsStorage.d.ts +3 -3
- package/dist/types/react-viewers/settings/settingsSubtitle.d.ts +2 -0
- package/dist/types/react-viewers/settings/settingsToggle.d.ts +11 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +41 -7
- package/dist/types/react-viewers/state/sharedIsolation.d.ts +2 -0
- package/dist/types/react-viewers/ultra/controlBar.d.ts +4 -1
- package/dist/types/react-viewers/ultra/index.d.ts +1 -0
- package/dist/types/react-viewers/ultra/settings.d.ts +13 -0
- package/dist/types/react-viewers/ultra/settingsPanel.d.ts +5 -0
- package/dist/types/react-viewers/ultra/viewer.d.ts +3 -1
- package/dist/types/react-viewers/ultra/viewerRef.d.ts +3 -0
- package/dist/types/react-viewers/urls.d.ts +0 -1
- package/dist/types/react-viewers/webgl/index.d.ts +1 -0
- package/dist/types/react-viewers/webgl/loading.d.ts +19 -24
- package/dist/types/react-viewers/webgl/settings.d.ts +36 -0
- package/dist/types/react-viewers/webgl/settingsPanel.d.ts +12 -0
- package/dist/types/react-viewers/webgl/viewer.d.ts +3 -3
- package/dist/types/react-viewers/webgl/viewerRef.d.ts +32 -8
- package/dist/types/utils/asyncQueue.d.ts +15 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/vim-web.iife.js +49873 -49090
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +49690 -48907
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/core-viewers/webgl/loader/progressive/open.d.ts +0 -12
- package/dist/types/core-viewers/webgl/loader/progressive/vimRequest.d.ts +0 -44
- package/dist/types/react-viewers/settings/settings.d.ts +0 -61
- package/dist/types/utils/result.d.ts +0 -13
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const buttonSectionBoxToSelection = "controlBar.sectionBox.sectionSelection";
|
|
34
|
-
export declare const buttonSectionBoxToScene = "controlBar.sectionBox.sectionScene";
|
|
35
|
-
export declare const buttonSectionBoxAuto = "controlBar.sectionBox.auto";
|
|
36
|
-
export declare const buttonSectionBoxSettings = "controlBar.sectionBox.settings";
|
|
1
|
+
export declare const cameraSpan = "controlBar.cameraSpan";
|
|
2
|
+
export declare const cameraFrameSelection = "controlBar.cameraFrameSelection";
|
|
3
|
+
export declare const cameraFrameScene = "controlBar.cameraFrameScene";
|
|
4
|
+
export declare const cameraAuto = "controlBar.cameraAuto";
|
|
5
|
+
export declare const cursorSpan = "controlBar.cursorSpan";
|
|
6
|
+
export declare const cursorOrbit = "controlBar.cursorOrbit";
|
|
7
|
+
export declare const cursorLook = "controlBar.cursorLook";
|
|
8
|
+
export declare const cursorPan = "controlBar.cursorPan";
|
|
9
|
+
export declare const cursorZoom = "controlBar.cursorZoom";
|
|
10
|
+
export declare const cursorZoomWindow = "controlBar.cursorZoomWindow";
|
|
11
|
+
export declare const visibilitySpan = "controlBar.visibilitySpan";
|
|
12
|
+
export declare const visibilityClearSelection = "controlBar.visibilityClearSelection";
|
|
13
|
+
export declare const visibilityShowAll = "controlBar.visibilityShowAll";
|
|
14
|
+
export declare const visibilityIsolateSelection = "controlBar.visibilityIsolateSelection";
|
|
15
|
+
export declare const visibilityHideSelection = "controlBar.visibilityHideSelection";
|
|
16
|
+
export declare const visibilityShowSelection = "controlBar.visibilityShowSelection";
|
|
17
|
+
export declare const visibilityAutoIsolate = "controlBar.visibilityAutoIsolate";
|
|
18
|
+
export declare const visibilitySettings = "controlBar.visibilitySettings";
|
|
19
|
+
export declare const sectioningSpan = "controlBar.sectioningSpan";
|
|
20
|
+
export declare const sectioningEnable = "controlBar.sectioningEnable";
|
|
21
|
+
export declare const sectioningVisible = "controlBar.sectioningVisible";
|
|
22
|
+
export declare const sectioningFitSelection = "controlBar.sectioningFitSelection";
|
|
23
|
+
export declare const sectioningFitScene = "controlBar.sectioningFitScene";
|
|
24
|
+
export declare const sectioningAuto = "controlBar.sectioningAuto";
|
|
25
|
+
export declare const sectioningSettings = "controlBar.sectioningSettings";
|
|
26
|
+
export declare const measureSpan = "controlBar.measureSpan";
|
|
27
|
+
export declare const measureEnable = "controlBar.measureEnable";
|
|
28
|
+
export declare const miscSpan = "controlBar.miscSpan";
|
|
29
|
+
export declare const miscInspector = "controlBar.miscInspector";
|
|
30
|
+
export declare const miscSettings = "controlBar.miscSettings";
|
|
31
|
+
export declare const miscHelp = "controlBar.miscHelp";
|
|
32
|
+
export declare const miscMaximize = "controlBar.miscMaximize";
|
|
@@ -4,7 +4,7 @@ export declare const vcColorLink = "vc-text-[#0590CC]";
|
|
|
4
4
|
export declare const vcLink = "vc-text-[#0590CC] vc-underline";
|
|
5
5
|
export declare const vcLabel = "vc-text-[#3F444F]";
|
|
6
6
|
export declare const vcRoboto = "vc-font-['Roboto',sans-serif]";
|
|
7
|
-
export declare function footer(
|
|
7
|
+
export declare function footer(): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare function mainText(text: JSX.Element): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export declare function detailText(text: string): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare function bold(text: string): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import * as Core from '../../core-viewers';
|
|
2
|
+
import { ILoadRequest as CoreILoadRequest } from '../../core-viewers/webgl/loader/progressive/loadRequest';
|
|
3
|
+
import { IProgress } from '../../core-viewers/shared/loadResult';
|
|
2
4
|
import { LoadingError } from '../webgl/loading';
|
|
3
5
|
type RequestCallbacks = {
|
|
4
|
-
onProgress: (p:
|
|
6
|
+
onProgress: (p: IProgress) => void;
|
|
5
7
|
onError: (e: LoadingError) => void;
|
|
6
8
|
onDone: () => void;
|
|
7
9
|
};
|
|
8
10
|
/**
|
|
9
11
|
* Class to handle loading a request.
|
|
12
|
+
* Implements ILoadRequest for compatibility with Ultra viewer's load request interface.
|
|
10
13
|
*/
|
|
11
|
-
export declare class LoadRequest {
|
|
12
|
-
|
|
13
|
-
private _callbacks;
|
|
14
|
+
export declare class LoadRequest implements CoreILoadRequest {
|
|
15
|
+
private _source;
|
|
14
16
|
private _request;
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
private onError;
|
|
24
|
-
private end;
|
|
25
|
-
getProgress(): AsyncGenerator<Core.Webgl.IProgressLogs, void, void>;
|
|
26
|
-
getResult(): Promise<import("../../utils").Result<Core.Webgl.Vim>>;
|
|
17
|
+
private _callbacks;
|
|
18
|
+
private _onLoaded?;
|
|
19
|
+
private _progressQueue;
|
|
20
|
+
constructor(callbacks: RequestCallbacks, source: Core.Webgl.RequestSource, settings: Core.Webgl.VimPartialSettings, vimIndex: number, onLoaded?: (vim: Core.Webgl.Vim) => void);
|
|
21
|
+
private trackRequest;
|
|
22
|
+
get isCompleted(): boolean;
|
|
23
|
+
getProgress(): AsyncGenerator<IProgress>;
|
|
24
|
+
getResult(): Promise<Core.LoadResult<Core.Webgl.Vim, Core.ILoadError>>;
|
|
27
25
|
abort(): void;
|
|
28
26
|
}
|
|
29
27
|
export {};
|
|
@@ -55,9 +55,10 @@ export declare function useRefresher(): StateRefresher;
|
|
|
55
55
|
* The reference provides access to the state, along with event dispatching, validation, and confirmation logic.
|
|
56
56
|
*
|
|
57
57
|
* @param initialValue - The initial state value.
|
|
58
|
+
* @param isLazy - Whether to treat the initialValue as a lazy initializer function.
|
|
58
59
|
* @returns An object implementing StateRef along with additional helper hooks.
|
|
59
60
|
*/
|
|
60
|
-
export declare function useStateRef<T>(initialValue: T | (() => T)): {
|
|
61
|
+
export declare function useStateRef<T>(initialValue: T | (() => T), isLazy?: boolean): {
|
|
61
62
|
/**
|
|
62
63
|
* Returns the current state value.
|
|
63
64
|
*/
|
|
@@ -5,3 +5,11 @@ export declare function whenAllTrue(value: (UserBoolean | boolean)[], element: J
|
|
|
5
5
|
export declare function whenAllFalse(value: (UserBoolean | boolean)[], element: JSX.Element): JSX.Element;
|
|
6
6
|
export declare function whenSomeTrue(value: (UserBoolean | boolean)[], element: JSX.Element): JSX.Element;
|
|
7
7
|
export declare function whenSomeFalse(value: (UserBoolean | boolean)[], element: JSX.Element): JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Makes all fields optional recursively
|
|
10
|
+
* @template T - The type to make recursively partial
|
|
11
|
+
* @returns A type with all nested properties made optional
|
|
12
|
+
*/
|
|
13
|
+
export type RecursivePartial<T> = {
|
|
14
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
15
|
+
};
|
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import * as Core from '../../core-viewers';
|
|
6
6
|
import { CameraRef } from '../state/cameraState';
|
|
7
7
|
import { SettingsState } from '../settings/settingsState';
|
|
8
|
+
import { WebglSettings } from '../webgl/settings';
|
|
8
9
|
/**
|
|
9
10
|
* Memoized version of the AxesPanelMemo.
|
|
10
11
|
*/
|
|
@@ -15,6 +16,6 @@ export declare const AxesPanelMemo: React.MemoExoticComponent<typeof AxesPanel>;
|
|
|
15
16
|
declare function AxesPanel(props: {
|
|
16
17
|
viewer: Core.Webgl.Viewer;
|
|
17
18
|
camera: CameraRef;
|
|
18
|
-
settings: SettingsState
|
|
19
|
+
settings: SettingsState<WebglSettings>;
|
|
19
20
|
}): import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -3,7 +3,9 @@ import { GenericPanelHandle } from "../generic/genericPanel";
|
|
|
3
3
|
export declare const Ids: {
|
|
4
4
|
showGhost: string;
|
|
5
5
|
ghostOpacity: string;
|
|
6
|
+
transparency: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const IsolationPanel: import("react").ForwardRefExoticComponent<{
|
|
8
9
|
state: IsolationRef;
|
|
10
|
+
transparency: boolean;
|
|
9
11
|
} & import("react").RefAttributes<GenericPanelHandle>>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
export type ProgressMode = '
|
|
5
|
+
export type ProgressMode = 'percent' | 'bytes';
|
|
6
6
|
/**
|
|
7
7
|
* Interface for message information displayed in the LoadingBox.
|
|
8
8
|
* @property message - Optional main message text.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type MessageBoxProps = {
|
|
2
2
|
title: string;
|
|
3
3
|
body: string | JSX.Element;
|
|
4
|
+
icon?: JSX.Element;
|
|
4
5
|
footer?: string | JSX.Element;
|
|
5
6
|
canClose?: boolean;
|
|
7
|
+
minimize?: boolean;
|
|
6
8
|
onClose?: () => void;
|
|
7
9
|
};
|
|
8
10
|
export type MessageBoxPropsTyped = MessageBoxProps & {
|
|
@@ -15,6 +15,6 @@ export declare const SidePanelMemo: React.MemoExoticComponent<typeof SidePanel>;
|
|
|
15
15
|
export declare function SidePanel(props: {
|
|
16
16
|
container: Container;
|
|
17
17
|
side: SideState;
|
|
18
|
-
viewer: Core.Webgl.Viewer;
|
|
18
|
+
viewer: Core.Webgl.Viewer | Core.Ultra.Viewer;
|
|
19
19
|
content: () => JSX.Element;
|
|
20
20
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SettingsBox } from './settingsItem';
|
|
2
|
+
import { SettingsState } from './settingsState';
|
|
3
|
+
import { AnySettings } from './anySettings';
|
|
4
|
+
export declare function renderSettingsInputBox(settings: SettingsState<AnySettings>, item: SettingsBox<AnySettings>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnySettings } from './anySettings';
|
|
2
|
+
import { UserBoolean } from './userBoolean';
|
|
3
|
+
export type SettingsCustomizer<T extends AnySettings> = (items: SettingsItem<T>[]) => SettingsItem<T>[];
|
|
4
|
+
export type SettingsItem<T extends AnySettings> = SettingsSubtitle | SettingsToggle<T> | SettingsBox<T> | SettingsElement;
|
|
5
|
+
export type BaseSettingsItem = {
|
|
6
|
+
type: string;
|
|
7
|
+
key: string;
|
|
8
|
+
};
|
|
9
|
+
export type SettingsSubtitle = BaseSettingsItem & {
|
|
10
|
+
type: 'subtitle';
|
|
11
|
+
title: string;
|
|
12
|
+
};
|
|
13
|
+
export type SettingsToggle<T extends AnySettings> = BaseSettingsItem & {
|
|
14
|
+
type: 'toggle';
|
|
15
|
+
label: string;
|
|
16
|
+
getter: (settings: T) => UserBoolean;
|
|
17
|
+
setter: (settings: T, b: boolean) => void;
|
|
18
|
+
};
|
|
19
|
+
export type SettingsBox<T extends AnySettings> = BaseSettingsItem & {
|
|
20
|
+
type: 'box';
|
|
21
|
+
label: string;
|
|
22
|
+
info: string;
|
|
23
|
+
transform: (value: number) => number;
|
|
24
|
+
getter: (settings: T) => number;
|
|
25
|
+
setter: (settings: T, b: number) => void;
|
|
26
|
+
};
|
|
27
|
+
export type SettingsElement = BaseSettingsItem & {
|
|
28
|
+
type: 'element';
|
|
29
|
+
element: JSX.Element;
|
|
30
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare class SettingsPanelKeys {
|
|
2
|
+
static InputsSubtitle: string;
|
|
3
|
+
static InputsScrollSpeedBox: string;
|
|
4
|
+
static PanelsSubtitle: string;
|
|
5
|
+
static PanelsShowLogoToggle: string;
|
|
6
|
+
static PanelsShowBimTreeToggle: string;
|
|
7
|
+
static PanelsShowBimInfoToggle: string;
|
|
8
|
+
static PanelsShowAxesPanelToggle: string;
|
|
9
|
+
static PanelsShowPerformancePanelToggle: string;
|
|
10
|
+
static AxesSubtitle: string;
|
|
11
|
+
static AxesShowOrthographicButtonToggle: string;
|
|
12
|
+
static AxesShowResetCameraButtonToggle: string;
|
|
13
|
+
static ControlBarSubtitle: string;
|
|
14
|
+
static ControlBarShowControlBarToggle: string;
|
|
15
|
+
static ControlBarCursorsSubtitle: string;
|
|
16
|
+
static ControlBarCursorsShowOrbitButtonToggle: string;
|
|
17
|
+
static ControlBarCursorsShowLookAroundButtonToggle: string;
|
|
18
|
+
static ControlBarCursorsShowPanButtonToggle: string;
|
|
19
|
+
static ControlBarCursorsShowZoomButtonToggle: string;
|
|
20
|
+
static ControlBarCursorsShowZoomWindowButtonToggle: string;
|
|
21
|
+
static ControlBarToolsSubtitle: string;
|
|
22
|
+
static ControlBarToolsShowMeasuringModeButtonToggle: string;
|
|
23
|
+
static ControlBarCameraSubtitle: string;
|
|
24
|
+
static ControlBarAutoCamera: string;
|
|
25
|
+
static ControlBarFrameSelection: string;
|
|
26
|
+
static ControlBarFrameAll: string;
|
|
27
|
+
static ControlBarSectioningSubtitle: string;
|
|
28
|
+
static ControlBarSectioningEnable: string;
|
|
29
|
+
static ControlBarSectioningFitToSelection: string;
|
|
30
|
+
static ControlBarSectioningReset: string;
|
|
31
|
+
static ControlBarSectioningShow: string;
|
|
32
|
+
static ControlBarSectioningAuto: string;
|
|
33
|
+
static ControlBarSectioningSettings: string;
|
|
34
|
+
static ControlBarVisibilitySubtitle: string;
|
|
35
|
+
static ControlBarVisibilityClearSelection: string;
|
|
36
|
+
static ControlBarVisibilityShowAll: string;
|
|
37
|
+
static ControlBarVisibilityToggle: string;
|
|
38
|
+
static ControlBarVisibilityIsolate: string;
|
|
39
|
+
static ControlBarVisibilityAutoIsolate: string;
|
|
40
|
+
static ControlBarVisibilitySettings: string;
|
|
41
|
+
static ControlBarMiscSubtitle: string;
|
|
42
|
+
static ControlBarMiscShowProjectInspectorButtonToggle: string;
|
|
43
|
+
static ControlBarMiscShowSettingsButtonToggle: string;
|
|
44
|
+
static ControlBarMiscShowHelpButtonToggle: string;
|
|
45
|
+
static ControlBarMiscShowMaximiseButtonToggle: string;
|
|
46
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import * as Core from '../../core-viewers';
|
|
5
4
|
import { SettingsState } from './settingsState';
|
|
5
|
+
import { SettingsItem } from './settingsItem';
|
|
6
|
+
import { AnySettings } from './anySettings';
|
|
6
7
|
/**
|
|
7
8
|
* JSX Component to interact with settings.
|
|
8
9
|
* @param viewer current viewer
|
|
@@ -10,8 +11,8 @@ import { SettingsState } from './settingsState';
|
|
|
10
11
|
* @param visible will return null if this is false.
|
|
11
12
|
* @returns
|
|
12
13
|
*/
|
|
13
|
-
export declare function SettingsPanel(props: {
|
|
14
|
-
|
|
15
|
-
settings: SettingsState
|
|
14
|
+
export declare function SettingsPanel<T extends AnySettings>(props: {
|
|
15
|
+
content: SettingsItem<T>[];
|
|
16
|
+
settings: SettingsState<T>;
|
|
16
17
|
visible: boolean;
|
|
17
18
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SettingsItem } from './settingsItem';
|
|
2
|
+
import { AnySettings } from './anySettings';
|
|
3
|
+
export declare function getControlBarCursorSettings(): SettingsItem<AnySettings>[];
|
|
4
|
+
export declare function getControlBarCameraSettings(): SettingsItem<AnySettings>[];
|
|
5
|
+
export declare function getControlBarSectionBoxSettings(): SettingsItem<AnySettings>[];
|
|
6
|
+
export declare function getControlBarVisibilitySettings(): SettingsItem<AnySettings>[];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { StateRef } from '../helpers/reactUtils';
|
|
5
|
+
import { SettingsCustomizer } from './settingsItem';
|
|
6
|
+
import { AnySettings } from './anySettings';
|
|
7
|
+
import { RecursivePartial } from '../../utils';
|
|
8
|
+
export type SettingsState<T extends AnySettings> = {
|
|
9
|
+
value: T;
|
|
10
|
+
update: (updater: (s: T) => void) => void;
|
|
11
|
+
register: (action: (s: T) => void) => void;
|
|
12
|
+
customizer: StateRef<SettingsCustomizer<T>>;
|
|
10
13
|
};
|
|
11
14
|
/**
|
|
12
15
|
* Returns a new state closure for settings.
|
|
13
16
|
*/
|
|
14
|
-
export declare function useSettings(
|
|
15
|
-
|
|
16
|
-
* Apply given vim viewer settings to the given viewer.
|
|
17
|
-
*/
|
|
18
|
-
export declare function applySettings(viewer: Core.Webgl.Viewer, settings: Settings): void;
|
|
17
|
+
export declare function useSettings<T extends AnySettings>(value: RecursivePartial<T>, defaultSettings: T, applySettings?: (settings: T) => void): SettingsState<T>;
|
|
18
|
+
export declare function createSettings<T extends AnySettings>(settings: RecursivePartial<T>, defaultSettings: T): T;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { AnySettings } from './anySettings';
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves viewer settings from localStorage and applies permissions
|
|
7
7
|
* @param settings - Partial viewer settings to apply permissions from
|
|
8
8
|
* @returns The stored settings with applied permissions, or empty object if retrieval fails
|
|
9
9
|
*/
|
|
10
|
-
export declare function getLocalSettings(settings?:
|
|
10
|
+
export declare function getLocalSettings(settings?: Partial<AnySettings>): {};
|
|
11
11
|
/**
|
|
12
12
|
* Saves viewer settings to localStorage after removing permissions
|
|
13
13
|
* @param value - Component settings to save
|
|
14
14
|
*/
|
|
15
|
-
export declare function saveSettingsToLocal(value:
|
|
15
|
+
export declare function saveSettingsToLocal(value: AnySettings): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SettingsToggle } from './settingsItem';
|
|
2
|
+
import { SettingsState } from './settingsState';
|
|
3
|
+
import { AnySettings } from './anySettings';
|
|
4
|
+
/**
|
|
5
|
+
* Renders a toggle (checkbox) UI element for a given SettingsToggle item.
|
|
6
|
+
* @param viewer The WebGL viewer instance (for future consistency).
|
|
7
|
+
* @param settings The current settings state object.
|
|
8
|
+
* @param item The SettingsToggle configuration.
|
|
9
|
+
* @returns JSX.Element | null
|
|
10
|
+
*/
|
|
11
|
+
export declare function renderSettingsToggle(settings: SettingsState<AnySettings>, item: SettingsToggle<AnySettings>): JSX.Element | null;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Core from "../../core-viewers";
|
|
2
2
|
import { CameraRef } from './cameraState';
|
|
3
3
|
import { CursorManager } from '../helpers/cursor';
|
|
4
|
-
import { Settings } from '../settings';
|
|
5
4
|
import { SideState } from './sideState';
|
|
6
5
|
import * as Icons from '../icons';
|
|
7
6
|
import { SectionBoxRef } from './sectionBoxState';
|
|
@@ -9,11 +8,31 @@ import { getMeasureState } from './measureState';
|
|
|
9
8
|
import { ModalHandle } from '../panels/modal';
|
|
10
9
|
import { IsolationRef } from './sharedIsolation';
|
|
11
10
|
import * as ControlBar from '../controlbar';
|
|
11
|
+
import { UserBoolean } from "../settings/userBoolean";
|
|
12
|
+
import { UltraSettings } from "../ultra/settings";
|
|
13
|
+
import { WebglSettings } from "../webgl/settings";
|
|
14
|
+
export type ControlBarSectionBoxSettings = {
|
|
15
|
+
sectioningEnable: UserBoolean;
|
|
16
|
+
sectioningFitToSelection: UserBoolean;
|
|
17
|
+
sectioningReset: UserBoolean;
|
|
18
|
+
sectioningShow: UserBoolean;
|
|
19
|
+
sectioningAuto: UserBoolean;
|
|
20
|
+
sectioningSettings: UserBoolean;
|
|
21
|
+
};
|
|
12
22
|
/**
|
|
13
23
|
* Returns a control bar section for the section box.
|
|
14
24
|
*/
|
|
15
|
-
export declare function controlBarSectionBox(section: SectionBoxRef, hasSelection: boolean): ControlBar.IControlBarSection;
|
|
16
|
-
export
|
|
25
|
+
export declare function controlBarSectionBox(section: SectionBoxRef, hasSelection: boolean, settings: ControlBarSectionBoxSettings): ControlBar.IControlBarSection;
|
|
26
|
+
export type ControlBarCursorSettings = {
|
|
27
|
+
cursorOrbit: UserBoolean;
|
|
28
|
+
cursorLookAround: UserBoolean;
|
|
29
|
+
cursorPan: UserBoolean;
|
|
30
|
+
cursorZoom: UserBoolean;
|
|
31
|
+
};
|
|
32
|
+
export type ControlBarMeasureSettings = {
|
|
33
|
+
measureEnable: UserBoolean;
|
|
34
|
+
};
|
|
35
|
+
export declare function controlBarMeasure(measure: ReturnType<typeof getMeasureState>, settings: ControlBarMeasureSettings): {
|
|
17
36
|
id: string;
|
|
18
37
|
enable: () => boolean;
|
|
19
38
|
style: string;
|
|
@@ -27,12 +46,26 @@ export declare function controlBarMeasure(settings: Settings, measure: ReturnTyp
|
|
|
27
46
|
style: typeof ControlBar.Style.buttonDefaultStyle;
|
|
28
47
|
}[];
|
|
29
48
|
};
|
|
30
|
-
export declare function
|
|
31
|
-
export
|
|
49
|
+
export declare function controlBarMiscUltra(modal: ModalHandle, side: SideState, settings: UltraSettings): ControlBar.IControlBarSection;
|
|
50
|
+
export type ControlBarCameraSettings = {
|
|
51
|
+
cameraAuto: UserBoolean;
|
|
52
|
+
cameraFrameSelection: UserBoolean;
|
|
53
|
+
cameraFrameScene: UserBoolean;
|
|
54
|
+
};
|
|
55
|
+
export declare function controlBarCamera(camera: CameraRef, settings: ControlBarCameraSettings): ControlBar.IControlBarSection;
|
|
56
|
+
export type ControlBarVisibilitySettings = {
|
|
57
|
+
visibilityClearSelection: UserBoolean;
|
|
58
|
+
visibilityShowAll: UserBoolean;
|
|
59
|
+
visibilityToggle: UserBoolean;
|
|
60
|
+
visibilityIsolate: UserBoolean;
|
|
61
|
+
visibilityAutoIsolate: UserBoolean;
|
|
62
|
+
visibilitySettings: UserBoolean;
|
|
63
|
+
};
|
|
64
|
+
export declare function controlBarVisibility(isolation: IsolationRef, settings: ControlBarVisibilitySettings): ControlBar.IControlBarSection;
|
|
32
65
|
/**
|
|
33
66
|
* Combines all control bar sections into one control bar.
|
|
34
67
|
*/
|
|
35
|
-
export declare function useControlBar(viewer: Core.Webgl.Viewer, camera: CameraRef, modal: ModalHandle, side: SideState, cursor: CursorManager, settings:
|
|
68
|
+
export declare function useControlBar(viewer: Core.Webgl.Viewer, camera: CameraRef, modal: ModalHandle, side: SideState, cursor: CursorManager, settings: WebglSettings, section: SectionBoxRef, isolationRef: IsolationRef, customization: ControlBar.ControlBarCustomization | undefined): (ControlBar.IControlBarSection | {
|
|
36
69
|
id: string;
|
|
37
70
|
enable: () => boolean;
|
|
38
71
|
style: string;
|
|
@@ -51,4 +84,5 @@ export declare function useControlBar(viewer: Core.Webgl.Viewer, camera: CameraR
|
|
|
51
84
|
* @param {Settings} settings - The viewer settings to check
|
|
52
85
|
* @returns {boolean} True if any settings buttons are enabled
|
|
53
86
|
*/
|
|
54
|
-
export declare function
|
|
87
|
+
export declare function anyWebglMiscButton(settings: WebglSettings): boolean;
|
|
88
|
+
export declare function anyUltraMiscButton(settings: UltraSettings): boolean;
|
|
@@ -9,6 +9,7 @@ export interface IsolationRef {
|
|
|
9
9
|
showPanel: StateRef<boolean>;
|
|
10
10
|
showGhost: StateRef<boolean>;
|
|
11
11
|
ghostOpacity: StateRef<number>;
|
|
12
|
+
transparency: StateRef<boolean>;
|
|
12
13
|
showRooms: StateRef<boolean>;
|
|
13
14
|
onAutoIsolate: FuncRef<void>;
|
|
14
15
|
onVisibilityChange: FuncRef<void>;
|
|
@@ -32,6 +33,7 @@ export interface IsolationAdapter {
|
|
|
32
33
|
showGhost(show: boolean): void;
|
|
33
34
|
getGhostOpacity(): number;
|
|
34
35
|
setGhostOpacity(opacity: number): void;
|
|
36
|
+
enableTransparency(enable: boolean): void;
|
|
35
37
|
getShowRooms(): boolean;
|
|
36
38
|
setShowRooms(show: boolean): void;
|
|
37
39
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as Core from '../../core-viewers/ultra';
|
|
2
2
|
import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
3
|
+
import { ModalHandle } from '../panels';
|
|
3
4
|
import { CameraRef } from '../state/cameraState';
|
|
4
5
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
5
6
|
import { IsolationRef } from '../state/sharedIsolation';
|
|
6
|
-
|
|
7
|
+
import { SideState } from '../state/sideState';
|
|
8
|
+
import { UltraSettings } from './settings';
|
|
9
|
+
export declare function useUltraControlBar(viewer: Core.Viewer, section: SectionBoxRef, isolation: IsolationRef, camera: CameraRef, settings: UltraSettings, side: SideState, modal: ModalHandle, customization: ControlBarCustomization | undefined): import("../controlbar").IControlBarSection[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RecursivePartial } from "../helpers/utils";
|
|
2
|
+
import { UserBoolean } from "../settings/userBoolean";
|
|
3
|
+
import { ControlBarCameraSettings, ControlBarCursorSettings, ControlBarSectionBoxSettings, ControlBarVisibilitySettings } from "../state/controlBarState";
|
|
4
|
+
export type PartialUltraSettings = RecursivePartial<UltraSettings>;
|
|
5
|
+
export type UltraSettings = {
|
|
6
|
+
ui: ControlBarCameraSettings & ControlBarCursorSettings & ControlBarSectionBoxSettings & ControlBarVisibilitySettings & {
|
|
7
|
+
panelLogo: UserBoolean;
|
|
8
|
+
panelControlBar: UserBoolean;
|
|
9
|
+
miscSettings: UserBoolean;
|
|
10
|
+
miscHelp: UserBoolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function getDefaultUltraSettings(): UltraSettings;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Viewer } from "../../core-viewers/ultra";
|
|
2
|
+
import { SettingsItem } from "../settings/settingsItem";
|
|
3
|
+
import { UltraSettings } from "./settings";
|
|
4
|
+
export declare function getControlBarUltraSettings(): SettingsItem<UltraSettings>[];
|
|
5
|
+
export declare function getUltraSettingsContent(viewer: Viewer): SettingsItem<UltraSettings>[];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as Core from '../../core-viewers';
|
|
2
2
|
import { Container } from '../container';
|
|
3
3
|
import { ViewerRef } from './viewerRef';
|
|
4
|
+
import { PartialUltraSettings } from './settings';
|
|
4
5
|
/**
|
|
5
6
|
* Creates a UI container along with a VIM.Viewer and its associated React viewer.
|
|
6
7
|
* @param container An optional container object. If none is provided, a container will be created.
|
|
7
8
|
* @returns An object containing the resulting container, reactRoot, and viewer.
|
|
8
9
|
*/
|
|
9
|
-
export declare function createViewer(container?: Container | HTMLElement): Promise<ViewerRef>;
|
|
10
|
+
export declare function createViewer(container?: Container | HTMLElement, settings?: PartialUltraSettings): Promise<ViewerRef>;
|
|
10
11
|
/**
|
|
11
12
|
* Represents a React viewer providing UI for the Vim viewer.
|
|
12
13
|
* @param container The container object containing root, gfx, and UI elements for the Vim viewer.
|
|
@@ -17,5 +18,6 @@ export declare function createViewer(container?: Container | HTMLElement): Promi
|
|
|
17
18
|
export declare function Viewer(props: {
|
|
18
19
|
container: Container;
|
|
19
20
|
core: Core.Ultra.Viewer;
|
|
21
|
+
settings?: PartialUltraSettings;
|
|
20
22
|
onMount: (viewer: ViewerRef) => void;
|
|
21
23
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,8 @@ import { SectionBoxRef } from '../state/sectionBoxState';
|
|
|
5
5
|
import { IsolationRef } from '../state/sharedIsolation';
|
|
6
6
|
import { ControlBarRef } from '../controlbar';
|
|
7
7
|
import { GenericPanelHandle } from '../generic/';
|
|
8
|
+
import { SettingsRef } from '../webgl';
|
|
9
|
+
import { UltraSettings } from './settings';
|
|
8
10
|
export type ViewerRef = {
|
|
9
11
|
/**
|
|
10
12
|
* The Vim viewer instance associated with the viewer.
|
|
@@ -27,6 +29,7 @@ export type ViewerRef = {
|
|
|
27
29
|
*/
|
|
28
30
|
camera: CameraRef;
|
|
29
31
|
isolation: IsolationRef;
|
|
32
|
+
settings: SettingsRef<UltraSettings>;
|
|
30
33
|
/**
|
|
31
34
|
* API to interact with the isolation panel.
|
|
32
35
|
*/
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export declare const support = "https://docs.vimaec.com";
|
|
2
1
|
export declare const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
|
|
3
2
|
export declare const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
|