vim-web 0.5.0-dev.17 → 0.5.0-dev.19
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 +37 -7
- package/dist/types/core-viewers/ultra/viewport.d.ts +6 -0
- package/dist/types/core-viewers/webgl/loader/mesh.d.ts +3 -1
- package/dist/types/core-viewers/webgl/loader/progressive/insertableMesh.d.ts +4 -2
- package/dist/types/core-viewers/webgl/loader/progressive/instancedMesh.d.ts +5 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/markers/gizmoMarker.d.ts +1 -0
- package/dist/types/core-viewers/webgl/viewer/rendering/renderer.d.ts +7 -0
- 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/errors/errorStyle.d.ts +1 -1
- 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/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 +40 -7
- package/dist/types/react-viewers/state/sharedIsolation.d.ts +2 -0
- package/dist/types/react-viewers/ultra/controlBar.d.ts +3 -1
- package/dist/types/react-viewers/ultra/index.d.ts +1 -0
- package/dist/types/react-viewers/ultra/settings.d.ts +10 -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 +2 -2
- 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 +12 -5
- package/dist/vim-web.iife.js +1045 -481
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +1045 -481
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/settings/settings.d.ts +0 -61
|
@@ -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
|
}
|
|
@@ -3,4 +3,6 @@ import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
|
3
3
|
import { CameraRef } from '../state/cameraState';
|
|
4
4
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
5
5
|
import { IsolationRef } from '../state/sharedIsolation';
|
|
6
|
-
|
|
6
|
+
import { SideState } from '../state/sideState';
|
|
7
|
+
import { UltraSettings } from './settings';
|
|
8
|
+
export declare function useUltraControlBar(viewer: Core.Viewer, section: SectionBoxRef, isolation: IsolationRef, camera: CameraRef, settings: UltraSettings, side: SideState, customization: ControlBarCustomization | undefined): import("../controlbar").IControlBarSection[];
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
settings: UserBoolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
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";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as Core from '../../core-viewers';
|
|
5
5
|
import { LoadRequest } from '../helpers/loadRequest';
|
|
6
6
|
import { ModalHandle } from '../panels/modal';
|
|
7
|
-
import {
|
|
7
|
+
import { WebglSettings } from './settings';
|
|
8
8
|
type AddSettings = {
|
|
9
9
|
/**
|
|
10
10
|
* Controls whether to frame the camera on a vim everytime it is updated.
|
|
@@ -30,7 +30,7 @@ export declare class ComponentLoader {
|
|
|
30
30
|
private _viewer;
|
|
31
31
|
private _modal;
|
|
32
32
|
private _addLink;
|
|
33
|
-
constructor(viewer: Core.Webgl.Viewer, modal: React.RefObject<ModalHandle>, settings:
|
|
33
|
+
constructor(viewer: Core.Webgl.Viewer, modal: React.RefObject<ModalHandle>, settings: WebglSettings);
|
|
34
34
|
/**
|
|
35
35
|
* Event emitter for progress updates.
|
|
36
36
|
*/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RecursivePartial } from "../../utils";
|
|
2
|
+
import { UserBoolean } from "../settings/userBoolean";
|
|
3
|
+
import { ControlBarCameraSettings, ControlBarCursorSettings, ControlBarMeasureSettings, ControlBarSectionBoxSettings, ControlBarVisibilitySettings } from "../state/controlBarState";
|
|
4
|
+
export type PartialWebglSettings = RecursivePartial<WebglSettings>;
|
|
5
|
+
/**
|
|
6
|
+
* Complete settings configuration for the Vim viewer
|
|
7
|
+
* @interface Settings
|
|
8
|
+
*/
|
|
9
|
+
export type WebglSettings = {
|
|
10
|
+
capacity: {
|
|
11
|
+
canFollowUrl: boolean;
|
|
12
|
+
canGoFullScreen: boolean;
|
|
13
|
+
canDownload: boolean;
|
|
14
|
+
canReadLocalStorage: boolean;
|
|
15
|
+
};
|
|
16
|
+
ui: ControlBarCameraSettings & ControlBarCursorSettings & ControlBarSectionBoxSettings & ControlBarVisibilitySettings & ControlBarMeasureSettings & {
|
|
17
|
+
logo: UserBoolean;
|
|
18
|
+
bimTreePanel: UserBoolean;
|
|
19
|
+
bimInfoPanel: UserBoolean;
|
|
20
|
+
performance: UserBoolean;
|
|
21
|
+
axesPanel: UserBoolean;
|
|
22
|
+
controlBar: UserBoolean;
|
|
23
|
+
orthographic: UserBoolean;
|
|
24
|
+
resetCamera: UserBoolean;
|
|
25
|
+
projectInspector: UserBoolean;
|
|
26
|
+
settings: UserBoolean;
|
|
27
|
+
help: UserBoolean;
|
|
28
|
+
maximise: UserBoolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Default settings configuration for the React Webgl Vim viewer
|
|
33
|
+
* @constant
|
|
34
|
+
* @type {WebglSettings}
|
|
35
|
+
*/
|
|
36
|
+
export declare function getDefaultSettings(): WebglSettings;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Viewer } from "../../core-viewers/webgl";
|
|
2
|
+
import { SettingsItem } from "../settings/settingsItem";
|
|
3
|
+
import { WebglSettings } from "./settings";
|
|
4
|
+
export declare function getControlBarVariousSettings(): SettingsItem<WebglSettings>[];
|
|
5
|
+
export declare function getPanelsVisibilitySettings(): SettingsItem<WebglSettings>[];
|
|
6
|
+
export declare function getInputsSettings(viewer: Viewer): SettingsItem<WebglSettings>[];
|
|
7
|
+
export declare function getControlBarMeasureSettings(): SettingsItem<WebglSettings>[];
|
|
8
|
+
export declare function getWebglSettingsContent(viewer: Viewer): SettingsItem<WebglSettings>[];
|
|
9
|
+
/**
|
|
10
|
+
* Apply given vim viewer settings to the given viewer.
|
|
11
|
+
*/
|
|
12
|
+
export declare function applyWebglSettings(settings: WebglSettings): void;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module public-api
|
|
3
3
|
*/
|
|
4
4
|
import * as Core from '../../core-viewers';
|
|
5
|
-
import { PartialSettings } from '../settings';
|
|
6
5
|
import { Container } from '../container';
|
|
7
6
|
import { ViewerRef } from './viewerRef';
|
|
7
|
+
import { PartialWebglSettings } from './settings';
|
|
8
8
|
/**
|
|
9
9
|
* Creates a UI container along with a VIM.Viewer and its associated React viewer.
|
|
10
10
|
* @param container An optional container object. If none is provided, a container will be created.
|
|
@@ -12,7 +12,7 @@ import { ViewerRef } from './viewerRef';
|
|
|
12
12
|
* @param coreSettings Viewer settings.
|
|
13
13
|
* @returns An object containing the resulting container, reactRoot, and viewer.
|
|
14
14
|
*/
|
|
15
|
-
export declare function createViewer(container?: Container | HTMLElement, settings?:
|
|
15
|
+
export declare function createViewer(container?: Container | HTMLElement, settings?: PartialWebglSettings, coreSettings?: Core.Webgl.PartialViewerSettings): Promise<ViewerRef>;
|
|
16
16
|
/**
|
|
17
17
|
* Represents a React viewer providing UI for the Vim viewer.
|
|
18
18
|
* @param container The container object containing root, gfx, and UI elements for the Vim viewer.
|
|
@@ -24,5 +24,5 @@ export declare function Viewer(props: {
|
|
|
24
24
|
container: Container;
|
|
25
25
|
viewer: Core.Webgl.Viewer;
|
|
26
26
|
onMount: (viewer: ViewerRef) => void;
|
|
27
|
-
settings?:
|
|
27
|
+
settings?: PartialWebglSettings;
|
|
28
28
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Core from '../../core-viewers';
|
|
5
5
|
import { ContextMenuRef } from '../panels/contextMenu';
|
|
6
|
-
import {
|
|
6
|
+
import { AnySettings } from '../settings/anySettings';
|
|
7
7
|
import { CameraRef } from '../state/cameraState';
|
|
8
8
|
import { Container } from '../container';
|
|
9
9
|
import { BimInfoPanelRef } from '../bim/bimInfoData';
|
|
@@ -13,20 +13,27 @@ import { ModalHandle } from '../panels/modal';
|
|
|
13
13
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
14
14
|
import { IsolationRef } from '../state/sharedIsolation';
|
|
15
15
|
import { GenericPanelHandle } from '../generic';
|
|
16
|
+
import { SettingsItem } from '../settings/settingsItem';
|
|
17
|
+
import { WebglSettings } from './settings';
|
|
16
18
|
/**
|
|
17
19
|
* Settings API managing settings applied to the viewer.
|
|
18
20
|
*/
|
|
19
|
-
export type SettingsRef = {
|
|
21
|
+
export type SettingsRef<T extends AnySettings> = {
|
|
20
22
|
/**
|
|
21
23
|
* Allows updating settings by providing a callback function.
|
|
22
24
|
* @param updater A function that updates the current settings.
|
|
23
25
|
*/
|
|
24
|
-
update: (updater: (settings:
|
|
26
|
+
update: (updater: (settings: T) => void) => void;
|
|
25
27
|
/**
|
|
26
28
|
* Registers a callback function to be notified when settings are updated.
|
|
27
29
|
* @param callback A function to be called when settings are updated, receiving the updated settings.
|
|
28
30
|
*/
|
|
29
|
-
register: (callback: (settings:
|
|
31
|
+
register: (callback: (settings: T) => void) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Customizes the settings panel by providing a customizer function.
|
|
34
|
+
* @param customizer A function that modifies the settings items.
|
|
35
|
+
*/
|
|
36
|
+
customize: (customizer: (items: SettingsItem<T>[]) => SettingsItem<T>[]) => void;
|
|
30
37
|
};
|
|
31
38
|
/**
|
|
32
39
|
* Reference to manage help message functionality in the viewer.
|
|
@@ -79,7 +86,7 @@ export type ViewerRef = {
|
|
|
79
86
|
/**
|
|
80
87
|
* Settings API managing settings applied to the viewer.
|
|
81
88
|
*/
|
|
82
|
-
settings: SettingsRef
|
|
89
|
+
settings: SettingsRef<WebglSettings>;
|
|
83
90
|
/**
|
|
84
91
|
* Message API to interact with the loading box.
|
|
85
92
|
*/
|