vim-web 0.3.44-dev.79 → 0.3.44-dev.80

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.
Files changed (26) hide show
  1. package/dist/style.css +22 -24
  2. package/dist/types/core-viewers/shared/inputHandler.d.ts +2 -0
  3. package/dist/types/core-viewers/shared/selection.d.ts +7 -7
  4. package/dist/types/core-viewers/shared/vim.d.ts +15 -15
  5. package/dist/types/core-viewers/ultra/element3d.d.ts +2 -2
  6. package/dist/types/core-viewers/ultra/nodeState.d.ts +1 -1
  7. package/dist/types/core-viewers/ultra/vim.d.ts +4 -4
  8. package/dist/types/core-viewers/webgl/loader/element3d.d.ts +2 -2
  9. package/dist/types/core-viewers/webgl/loader/vim.d.ts +4 -4
  10. package/dist/types/core-viewers/webgl/viewer/gizmos/axes/gizmoAxes.d.ts +2 -0
  11. package/dist/types/core-viewers/webgl/viewer/gizmos/markers/gizmoMarker.d.ts +2 -2
  12. package/dist/types/react-viewers/panels/contextMenu.d.ts +0 -2
  13. package/dist/types/react-viewers/panels/help.d.ts +2 -7
  14. package/dist/types/react-viewers/panels/index.d.ts +13 -1
  15. package/dist/types/react-viewers/panels/isolationPanel.d.ts +4 -0
  16. package/dist/types/react-viewers/panels/loadingBox.d.ts +3 -0
  17. package/dist/types/react-viewers/panels/modal.d.ts +3 -4
  18. package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +5 -0
  19. package/dist/types/react-viewers/settings/index.d.ts +1 -1
  20. package/dist/types/react-viewers/settings/settings.d.ts +0 -2
  21. package/dist/types/react-viewers/settings/{menuSettings.d.ts → settingsPanel.d.ts} +1 -1
  22. package/dist/vim-web.iife.js +226 -289
  23. package/dist/vim-web.iife.js.map +1 -1
  24. package/dist/vim-web.js +226 -289
  25. package/dist/vim-web.js.map +1 -1
  26. package/package.json +1 -1
package/dist/style.css CHANGED
@@ -788,6 +788,10 @@ video:where(.vim-component,.vim-component *) {
788
788
  margin-left: 0.5rem;
789
789
  margin-right: 0.5rem;
790
790
  }
791
+ .vc-mx-auto {
792
+ margin-left: auto;
793
+ margin-right: auto;
794
+ }
791
795
  .vc-my-1 {
792
796
  margin-top: 0.25rem;
793
797
  margin-bottom: 0.25rem;
@@ -827,6 +831,9 @@ video:where(.vim-component,.vim-component *) {
827
831
  .vc-mt-2 {
828
832
  margin-top: 0.5rem;
829
833
  }
834
+ .vc-mt-4 {
835
+ margin-top: 1rem;
836
+ }
830
837
  .vc-mt-6 {
831
838
  margin-top: 1.5rem;
832
839
  }
@@ -860,18 +867,12 @@ video:where(.vim-component,.vim-component *) {
860
867
  .vc-h-\[49\%\] {
861
868
  height: 49%;
862
869
  }
863
- .vc-h-\[50\%\] {
864
- height: 50%;
865
- }
866
870
  .vc-h-\[80\%\] {
867
871
  height: 80%;
868
872
  }
869
873
  .vc-h-full {
870
874
  height: 100%;
871
875
  }
872
- .vc-max-h-\[48px\] {
873
- max-height: 48px;
874
- }
875
876
  .vc-max-h-\[80\%\] {
876
877
  max-height: 80%;
877
878
  }
@@ -935,6 +936,9 @@ video:where(.vim-component,.vim-component *) {
935
936
  .vc-max-w-full {
936
937
  max-width: 100%;
937
938
  }
939
+ .vc-max-w-md {
940
+ max-width: 28rem;
941
+ }
938
942
  .vc-flex-1 {
939
943
  flex: 1 1 0%;
940
944
  }
@@ -1019,9 +1023,6 @@ video:where(.vim-component,.vim-component *) {
1019
1023
  text-overflow: ellipsis;
1020
1024
  white-space: nowrap;
1021
1025
  }
1022
- .vc-text-clip {
1023
- text-overflow: clip;
1024
- }
1025
1026
  .vc-whitespace-nowrap {
1026
1027
  white-space: nowrap;
1027
1028
  }
@@ -1266,6 +1267,9 @@ video:where(.vim-component,.vim-component *) {
1266
1267
  .vc-text-primary {
1267
1268
  color: var(--c-primary);
1268
1269
  }
1270
+ .vc-text-secondary-yellow {
1271
+ color: var(--c-secondary-yellow);
1272
+ }
1269
1273
  .vc-text-white {
1270
1274
  --tw-text-opacity: 1;
1271
1275
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
@@ -1538,14 +1542,21 @@ video:where(.vim-component,.vim-component *) {
1538
1542
  margin-left: max(-2cqmin, -0.75rem);
1539
1543
  }
1540
1544
 
1541
- .vim-axes-panel{
1545
+ .vim-axes-panel,
1546
+ .vim-axes-panel-empty {
1542
1547
  border-radius: min(3cqmin, 1rem);
1543
1548
  top: min(2cqmin, 1.5rem);
1544
1549
  right: min(2cqmin, 1.5rem);
1545
1550
  width: min(22cqmin, 112px);
1551
+ }
1552
+
1553
+ .vim-axes-panel {
1546
1554
  height: min(28cqmin, 144px);
1547
1555
  }
1548
-
1556
+
1557
+ .vim-axes-panel-empty {
1558
+ height: min(22cqmin, 112px);
1559
+ }
1549
1560
  .vim-axes-panel-gizmo{
1550
1561
  top: min(1cqmin, 0.5rem);
1551
1562
  left: min(1cqmin, 0.5rem);
@@ -1912,27 +1923,14 @@ video:where(.vim-component,.vim-component *) {
1912
1923
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1913
1924
  }
1914
1925
 
1915
- .hover\:vc-border-primary-royal:hover {
1916
- border-color: var(--c-primary-royal);
1917
- }
1918
-
1919
1926
  .hover\:vc-bg-gray-lightest:hover {
1920
1927
  background-color: var(--c-lightest-gray);
1921
1928
  }
1922
1929
 
1923
- .hover\:vc-bg-primary-royal:hover {
1924
- background-color: var(--c-primary-royal);
1925
- }
1926
-
1927
1930
  .hover\:vc-text-primary-royal:hover {
1928
1931
  color: var(--c-primary-royal);
1929
1932
  }
1930
1933
 
1931
- .hover\:vc-text-white:hover {
1932
- --tw-text-opacity: 1;
1933
- color: rgb(255 255 255 / var(--tw-text-opacity, 1));
1934
- }
1935
-
1936
1934
  .hover\:vc-opacity-100:hover {
1937
1935
  opacity: 1;
1938
1936
  }
@@ -20,6 +20,7 @@ export interface IInputAdapter {
20
20
  orbitCamera: (value: THREE.Vector2) => void;
21
21
  rotateCamera: (value: THREE.Vector2) => void;
22
22
  panCamera: (value: THREE.Vector2) => void;
23
+ dollyCamera: (value: THREE.Vector2) => void;
23
24
  keyDown: (keyCode: string) => boolean;
24
25
  keyUp: (keyCode: string) => boolean;
25
26
  mouseDown: (pos: THREE.Vector2, button: number) => void;
@@ -61,6 +62,7 @@ export declare class InputHandler extends BaseInputHandler {
61
62
  private _onSettingsChanged;
62
63
  private _adapter;
63
64
  constructor(canvas: HTMLCanvasElement, adapter: IInputAdapter, settings?: Partial<InputSettings>);
65
+ getZoomValue(value: number): number;
64
66
  init(): void;
65
67
  get moveSpeed(): number;
66
68
  set moveSpeed(value: number);
@@ -1,19 +1,19 @@
1
1
  import { ISignal } from "ste-signals";
2
- import { IVimObject, IVim } from "./vim";
2
+ import { IVimElement, IVim } from "./vim";
3
3
  import { THREE } from "../..";
4
- export interface ISelectionAdapter<T extends IVimObject> {
5
- outline(object: T, state: boolean): void;
4
+ export interface ISelectionAdapter<T extends IVimElement> {
5
+ outline(target: T, state: boolean): void;
6
6
  }
7
7
  /**
8
8
  * Represents a selection manager that supports adding, removing, toggling, and querying selected objects.
9
9
  * The selection change signal is debounced to dispatch only once per animation frame.
10
10
  */
11
- export declare class Selection<T extends IVimObject> {
11
+ export declare class Selection<T extends IVimElement> {
12
12
  private _onSelectionChanged;
13
13
  private _selection;
14
14
  private _adapter;
15
15
  /**
16
- * If true, reselecting the currently selected single object will toggle it instead of doing nothing.
16
+ * If true, reselecting the currently selected single target will toggle it instead of doing nothing.
17
17
  */
18
18
  toggleOnRepeatSelect: boolean;
19
19
  /**
@@ -27,10 +27,10 @@ export declare class Selection<T extends IVimObject> {
27
27
  constructor(adapter: ISelectionAdapter<T>);
28
28
  /**
29
29
  * Checks whether a specific object is currently selected.
30
- * @param object - The object to check.
30
+ * @param target - The target to check.
31
31
  * @returns `true` if the object is selected; otherwise, `false`.
32
32
  */
33
- has(object: T): boolean;
33
+ has(target: T): boolean;
34
34
  /**
35
35
  * Returns the number of selected objects.
36
36
  * @returns The count of selected items.
@@ -1,32 +1,32 @@
1
1
  import { THREE } from "../..";
2
- export interface IVimObject {
3
- vim: IVim<IVimObject>;
2
+ export interface IVimElement {
3
+ vim: IVim<IVimElement>;
4
4
  getBoundingBox(): Promise<THREE.Box3>;
5
5
  }
6
- export interface IVim<T extends IVimObject> {
6
+ export interface IVim<T extends IVimElement> {
7
7
  /**
8
- * Retrieves the object associated with the specified instance number.
9
- * @param instance - The instance number of the object.
8
+ * Retrieves the element associated with the specified instance index.
9
+ * @param instance - The instance index of the of one of the instance included in the element.
10
10
  * @returns The object corresponding to the instance, or undefined if not found.
11
11
  */
12
- getObjectFromInstance(instance: number): T | undefined;
12
+ getElementFromInstanceIndex(instance: number): T | undefined;
13
13
  /**
14
- * Retrieves the objects associated with the specified element ID.
14
+ * Retrieves the element associated with the specified id.
15
15
  * @param id - The element ID to retrieve objects for.
16
- * @returns An array of objects corresponding to the element ID.
16
+ * @returns An array of element corresponding to the given id.
17
17
  */
18
- getObjectsFromElementId(id: number): T[];
18
+ getElementFromId(id: number): T[];
19
19
  /**
20
- * Retrieves the Vim object associated with the given Vim element index.
21
- * @param element - The index of the Vim element.
22
- * @returns The Vim object corresponding to the element index, or undefined if not found.
20
+ * Retrieves the element associated with the given index.
21
+ * @param element - The index of the element.
22
+ * @returns The element corresponding to the element index, or undefined if not found.
23
23
  */
24
- getObjectFromElementIndex(element: number): T | undefined;
24
+ getElementFromIndex(element: number): T | undefined;
25
25
  /**
26
- * Retrieves all objects within the Vim.
26
+ * Retrieves all elements within the Vim.
27
27
  * @returns An array of all Vim objects.
28
28
  */
29
- getAllObjects(): T[];
29
+ getAllElements(): T[];
30
30
  /**
31
31
  * Retrieves the bounding box of the Vim object.
32
32
  * @returns The bounding box of the Vim object.
@@ -1,8 +1,8 @@
1
- import { IVimObject } from "../shared/vim";
1
+ import { IVimElement } from "../shared/vim";
2
2
  import { NodeState } from "./nodeState";
3
3
  import { Box3, RGBA32 } from "./rpcTypes";
4
4
  import { Vim } from "./vim";
5
- export declare class Element3D implements IVimObject {
5
+ export declare class Element3D implements IVimElement {
6
6
  readonly vim: Vim;
7
7
  get vimHandle(): number;
8
8
  constructor(vim: Vim, instance: number);
@@ -69,7 +69,7 @@ export declare class StateSynchronizer {
69
69
  * @param state - The state to apply to all nodes
70
70
  * @param clear - If true, clears all node-specific overrides
71
71
  */
72
- setAllNodesState(state: NodeState, clear: boolean): void;
72
+ setAllNodesState(state: NodeState): void;
73
73
  /**
74
74
  * Replaces all nodes in one state (or states) with another state.
75
75
  *
@@ -22,11 +22,11 @@ export declare class Vim implements IVim<Element3D> {
22
22
  private _updateScheduled;
23
23
  private _objects;
24
24
  constructor(rpc: RpcSafeClient, color: ColorManager, renderer: Renderer, source: VimSource, logger: ILogger);
25
- getObjectFromInstance(instance: number): Element3D;
26
- getObjectsFromElementId(id: number): Element3D[];
27
- getObjectFromElementIndex(element: number): Element3D;
25
+ getElementFromInstanceIndex(instance: number): Element3D;
26
+ getElementFromId(id: number): Element3D[];
27
+ getElementFromIndex(element: number): Element3D;
28
28
  getObjectsInBox(box: THREE.Box3): Element3D[];
29
- getAllObjects(): Element3D[];
29
+ getAllElements(): Element3D[];
30
30
  get handle(): number;
31
31
  get connected(): boolean;
32
32
  connect(): LoadRequest;
@@ -5,11 +5,11 @@ import * as THREE from 'three';
5
5
  import { Vim } from './vim';
6
6
  import { IElement, VimHelpers } from 'vim-format';
7
7
  import { Submesh } from './mesh';
8
- import { IVimObject } from '../../shared/vim';
8
+ import { IVimElement } from '../../shared/vim';
9
9
  /**
10
10
  * High level api to interact with the loaded vim geometry and data.
11
11
  */
12
- export declare class Element3D implements IVimObject {
12
+ export declare class Element3D implements IVimElement {
13
13
  private _color;
14
14
  private _boundingBox;
15
15
  private _meshes;
@@ -94,24 +94,24 @@ export declare class Vim implements IVim<WebglElement3D> {
94
94
  * @param {number} instance - The instance number of the object.
95
95
  * @returns {THREE.Object3D | undefined} The object corresponding to the instance, or undefined if not found.
96
96
  */
97
- getObjectFromInstance(instance: number): WebglElement3D;
97
+ getElementFromInstanceIndex(instance: number): WebglElement3D;
98
98
  /**
99
99
  * Retrieves the objects associated with the specified element ID.
100
100
  * @param {number} id - The element ID to retrieve objects for.
101
101
  * @returns {THREE.Object3D[]} An array of objects corresponding to the element ID, or an empty array if none are found.
102
102
  */
103
- getObjectsFromElementId(id: number): any;
103
+ getElementFromId(id: number): any;
104
104
  /**
105
105
  * Retrieves the Vim object associated with the given Vim element index.
106
106
  * @param {number} element - The index of the Vim element.
107
107
  * @returns {WebglElement3D | undefined} The Vim object corresponding to the element index, or undefined if not found.
108
108
  */
109
- getObjectFromElementIndex(element: number): WebglElement3D | undefined;
109
+ getElementFromIndex(element: number): WebglElement3D | undefined;
110
110
  /**
111
111
  * Retrieves an array of all objects within the Vim.
112
112
  * @returns {WebglElement3D[]} An array containing all objects within the Vim.
113
113
  */
114
- getAllObjects(): WebglElement3D[];
114
+ getAllElements(): WebglElement3D[];
115
115
  /**
116
116
  * Retrieves an array containing all objects within the specified subset.
117
117
  * @param {G3dSubset} subset - The subset to retrieve objects from.
@@ -15,7 +15,9 @@ export declare class GizmoAxes {
15
15
  private _context;
16
16
  private _rect;
17
17
  private _reparentConnection;
18
+ private _resizeConnection;
18
19
  private _axes;
20
+ private _resized;
19
21
  private _pointerInside;
20
22
  private _isDragging;
21
23
  private _isDragSignificant;
@@ -2,12 +2,12 @@ import { Vim } from '../../../loader/vim';
2
2
  import { Viewer } from '../../viewer';
3
3
  import * as THREE from 'three';
4
4
  import { SimpleInstanceSubmesh } from '../../../loader/mesh';
5
- import { IVimObject } from '../../../../shared/vim';
5
+ import { IVimElement } from '../../../../shared/vim';
6
6
  /**
7
7
  * Marker gizmo that displays an interactive sphere at a 3D position.
8
8
  * Marker gizmos are still under development.
9
9
  */
10
- export declare class Marker implements IVimObject {
10
+ export declare class Marker implements IVimElement {
11
11
  readonly type = "Marker";
12
12
  private _viewer;
13
13
  private _submesh;
@@ -37,8 +37,6 @@ export declare const contextMenuElementIds: {
37
37
  showObject: string;
38
38
  clearSelection: string;
39
39
  showAll: string;
40
- dividerMeasure: string;
41
- deleteMeasurement: string;
42
40
  dividerSection: string;
43
41
  ignoreSection: string;
44
42
  resetSection: string;
@@ -1,15 +1,10 @@
1
1
  /**
2
2
  * @module viw-webgl-react
3
3
  */
4
- export type HelpProps = {
5
- link: boolean;
6
- };
7
- export type HelpPropsTyped = HelpProps & {
4
+ export type HelpPropsTyped = {
8
5
  type: 'help';
9
6
  };
10
7
  /**
11
8
  * JSX Component for help page.
12
9
  */
13
- export declare function MenuHelp(props: {
14
- value: HelpProps;
15
- }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function MenuHelp(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,17 @@
1
1
  export * as ContextMenu from './contextMenu';
2
+ export declare const SectionBoxPanel: {
3
+ Ids: {
4
+ showGhost: string;
5
+ ghostOpacity: string;
6
+ };
7
+ };
8
+ export declare const IsolationPanel: {
9
+ Ids: {
10
+ topOffset: string;
11
+ sideOffset: string;
12
+ bottomOffset: string;
13
+ };
14
+ };
2
15
  export type * from './axesPanel';
3
16
  export type * from './help';
4
17
  export type * from './loadingBox';
@@ -9,5 +22,4 @@ export type * from './overlay';
9
22
  export type * from './performance';
10
23
  export type * from './isolationPanel';
11
24
  export type * from './restOfScreen';
12
- export type * from './sectionBoxPanel';
13
25
  export type * from './toast';
@@ -1,5 +1,9 @@
1
1
  import { IsolationRef } from "../state/sharedIsolation";
2
2
  import { GenericPanelHandle } from "../generic/genericPanel";
3
+ export declare const Ids: {
4
+ showGhost: string;
5
+ ghostOpacity: string;
6
+ };
3
7
  export declare const IsolationPanel: import("react").ForwardRefExoticComponent<{
4
8
  state: IsolationRef;
5
9
  } & import("react").RefAttributes<GenericPanelHandle>>;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @module viw-webgl-react
3
3
  */
4
+ import { ReactNode } from 'react';
4
5
  export type ProgressMode = '%' | 'bytes';
5
6
  /**
6
7
  * Interface for message information displayed in the LoadingBox.
@@ -12,6 +13,7 @@ export type LoadingBoxProps = {
12
13
  message?: string;
13
14
  progress?: number;
14
15
  mode?: ProgressMode;
16
+ more?: ReactNode;
15
17
  };
16
18
  export type LoadingBoxPropsTyped = LoadingBoxProps & {
17
19
  type: 'loading';
@@ -24,3 +26,4 @@ export type LoadingBoxPropsTyped = LoadingBoxProps & {
24
26
  export declare function LoadingBox(props: {
25
27
  content: LoadingBoxProps;
26
28
  }): import("react/jsx-runtime").JSX.Element;
29
+ export declare function UltraSuggestion(): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,13 @@
1
1
  import React from 'react';
2
2
  import { MessageBoxProps, MessageBoxPropsTyped } from './messageBox';
3
3
  import { LoadingBoxProps, LoadingBoxPropsTyped } from './loadingBox';
4
- import { HelpProps, HelpPropsTyped } from './help';
5
- export type ModalProps = MessageBoxProps | LoadingBoxProps | HelpProps;
6
- export type ModalPropsTyped = (MessageBoxPropsTyped | LoadingBoxPropsTyped | HelpPropsTyped) & {
4
+ import { HelpPropsTyped } from './help';
5
+ export type ModalProps = (MessageBoxPropsTyped | LoadingBoxPropsTyped | HelpPropsTyped) & {
7
6
  canClose?: boolean;
8
7
  onClose?: () => void;
9
8
  };
10
9
  export type ModalHandle = {
11
- getActiveState(): ModalPropsTyped | undefined;
10
+ getActiveState(): ModalProps | undefined;
12
11
  loading(content: LoadingBoxProps | undefined): void;
13
12
  message(content: MessageBoxProps | undefined): void;
14
13
  help(show: boolean): void;
@@ -1,5 +1,10 @@
1
1
  import { SectionBoxRef } from "../state/sectionBoxState";
2
2
  import { GenericPanelHandle } from "../generic/genericPanel";
3
+ export declare const Ids: {
4
+ topOffset: string;
5
+ sideOffset: string;
6
+ bottomOffset: string;
7
+ };
3
8
  export declare const SectionBoxPanel: import("react").ForwardRefExoticComponent<{
4
9
  state: SectionBoxRef;
5
10
  } & import("react").RefAttributes<GenericPanelHandle>>;
@@ -1,5 +1,5 @@
1
1
  export * from './settings';
2
2
  export * from './settingsStorage';
3
3
  export * from './userBoolean';
4
- export type * from './menuSettings';
4
+ export type * from './settingsPanel';
5
5
  export type * from './settingsState';
@@ -17,7 +17,6 @@ export type RecursivePartial<T> = {
17
17
  */
18
18
  export type Settings = {
19
19
  materials: {
20
- useFastMaterial: boolean;
21
20
  useGhostMaterial: boolean;
22
21
  smallGhostThreshold: number;
23
22
  };
@@ -38,7 +37,6 @@ export type Settings = {
38
37
  axesPanel: UserBoolean;
39
38
  orthographic: UserBoolean;
40
39
  resetCamera: UserBoolean;
41
- enableGhost: UserBoolean;
42
40
  controlBar: UserBoolean;
43
41
  orbit: UserBoolean;
44
42
  lookAround: UserBoolean;
@@ -10,7 +10,7 @@ import { SettingsState } from './settingsState';
10
10
  * @param visible will return null if this is false.
11
11
  * @returns
12
12
  */
13
- export declare function MenuSettings(props: {
13
+ export declare function SettingsPanel(props: {
14
14
  viewer: Core.Webgl.Viewer;
15
15
  settings: SettingsState;
16
16
  visible: boolean;