vim-web 1.0.0-alpha.0 → 1.0.0-alpha.10

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.d.ts CHANGED
@@ -3,8 +3,9 @@ export { THREE };
3
3
  import * as BIM from 'vim-format';
4
4
  import { IElement, VimHelpers, VimHeader, VimDocument } from 'vim-format';
5
5
  export { BIM };
6
+ import * as React from 'react';
7
+ import React__default, { ReactNode } from 'react';
6
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
- import React, { ReactNode } from 'react';
8
9
 
9
10
  /**
10
11
  * @module vim-loader
@@ -89,6 +90,14 @@ type RecursivePartial<T> = {
89
90
  @module viw-webgl-viewer
90
91
  */
91
92
 
93
+ /**
94
+ * How selected elements are filled (beyond the outline).
95
+ * - 'none': Outline only, no fill.
96
+ * - 'default': Tint selected meshes in the main render pass (zero cost).
97
+ * - 'xray': Tint + render selected on top of everything (1 extra pass).
98
+ * - 'seethrough': Tint + render a semi-transparent ghost where behind geometry (1 extra pass).
99
+ */
100
+ type SelectionFillMode = 'none' | 'default' | 'xray' | 'seethrough';
92
101
  type MaterialSettings = {
93
102
  /**
94
103
  * Ghost material options
@@ -132,6 +141,33 @@ type MaterialSettings = {
132
141
  */
133
142
  thickness: number;
134
143
  };
144
+ /**
145
+ * Selection fill options (beyond outlines).
146
+ */
147
+ selection: {
148
+ /**
149
+ * How selected elements are filled.
150
+ * Default: 'none'
151
+ */
152
+ fillMode: SelectionFillMode;
153
+ /**
154
+ * Tint color applied to selected elements.
155
+ * Default: rgb(0, 100, 255) — blue
156
+ */
157
+ color: THREE.Color;
158
+ /**
159
+ * Tint blend strength (0 = no tint, 1 = solid color).
160
+ * Default: 0.3
161
+ */
162
+ opacity: number;
163
+ /**
164
+ * Opacity of the overlay pass in 'xray' and 'seethrough' modes.
165
+ * In xray: applies to all selected geometry rendered on top.
166
+ * In seethrough: applies to selected geometry rendered behind other objects.
167
+ * Default: 0.25
168
+ */
169
+ overlayOpacity: number;
170
+ };
135
171
  };
136
172
  /**
137
173
  * Core renderer configuration, passed to `Core.Webgl.createViewer(settings)` at initialization.
@@ -276,8 +312,8 @@ type ViewerSettings = {
276
312
  */
277
313
  background: {
278
314
  /**
279
- * Color of the cavas background
280
- * Default: THREE.Color('#96999f')
315
+ * Color of the canvas background.
316
+ * Default: #F0F0F0
281
317
  */
282
318
  color: THREE.Color;
283
319
  };
@@ -375,6 +411,14 @@ interface IMaterials {
375
411
  outlineColor: THREE.Color;
376
412
  /** Clipping planes applied to all materials. Set to undefined to disable clipping. */
377
413
  clippingPlanes: THREE.Plane[] | undefined;
414
+ /** Selection fill mode: 'none' | 'default' | 'xray' | 'seethrough'. */
415
+ selectionFillMode: SelectionFillMode;
416
+ /** Color used to tint selected elements. */
417
+ selectionColor: THREE.Color;
418
+ /** Blend strength for selection tint (0 = off, 1 = solid). */
419
+ selectionOpacity: number;
420
+ /** Opacity of the overlay pass in 'xray' and 'seethrough' modes. */
421
+ selectionOverlayOpacity: number;
378
422
  /** Applies a full set of material settings from the viewer configuration. */
379
423
  applySettings(settings: MaterialSettings): void;
380
424
  }
@@ -399,7 +443,11 @@ interface IScene {
399
443
  * A signal with no payload.
400
444
  * Subscribe to be notified when the signal fires.
401
445
  */
402
- interface ISignal {
446
+ interface ISignalHandler {
447
+ (ev: IEventManagement): void;
448
+ }
449
+
450
+ interface ISignal$1 {
403
451
  /** Number of active subscriptions. */
404
452
  readonly count: number;
405
453
  /** Subscribe to the signal. Returns a function that unsubscribes. */
@@ -477,6 +525,12 @@ interface IVim<T extends IVimElement> {
477
525
  * @returns The element corresponding to the element index, or undefined if not found.
478
526
  */
479
527
  getElementFromIndex(element: number): T | undefined;
528
+ /**
529
+ * Retrieves the element associated with the specified Revit unique ID string.
530
+ * @param uniqueId - The Revit unique ID string.
531
+ * @returns The element, or undefined if not found.
532
+ */
533
+ getElementFromUniqueId(uniqueId: string): T | undefined;
480
534
  /**
481
535
  * Retrieves all elements within the Vim.
482
536
  * @returns An array of all Vim objects.
@@ -518,7 +572,7 @@ interface ISelection<T extends IVimElement> {
518
572
  /** Returns true if at least one object is selected. */
519
573
  any(): boolean;
520
574
  /** Signal that fires whenever the selection changes. */
521
- readonly onSelectionChanged: ISignal;
575
+ readonly onSelectionChanged: ISignal$1;
522
576
  /** Replaces the entire selection with the given object. */
523
577
  select(object: T): void;
524
578
  /** Replaces the entire selection with the given objects. */
@@ -622,9 +676,13 @@ interface IElement3D extends ISelectable {
622
676
  readonly element: number;
623
677
  /** The unique element ID. */
624
678
  readonly elementId: bigint;
679
+ /** The Revit unique ID string. */
680
+ readonly elementUniqueId: string | undefined;
625
681
  /** The geometry instances associated with this element. */
626
682
  readonly instances: number[] | undefined;
627
- /** True if this element has associated geometry. */
683
+ /** True if this element has geometry definitions (instances). Always available after the vim is parsed, even before geometry is loaded. */
684
+ readonly hasGeometry: boolean;
685
+ /** True if this element has loaded mesh data. Only true after `vim.load()` has been called for a subset containing this element. */
628
686
  readonly hasMesh: boolean;
629
687
  /** True if this element is a room. */
630
688
  readonly isRoom: boolean;
@@ -685,6 +743,101 @@ interface ISubset {
685
743
  except(mode: SubsetFilter, filter: number[] | Set<number>): ISubset;
686
744
  /** Return a new subset including only instances matching the filter. */
687
745
  filter(mode: SubsetFilter, filter: number[] | Set<number>): ISubset;
746
+ /** Return a new subset including only instances whose element matches one of the given Revit unique IDs. */
747
+ filterByUniqueId(uniqueIds: string[] | Set<string>): ISubset;
748
+ /** Return a new subset excluding instances whose element matches one of the given Revit unique IDs. */
749
+ exceptByUniqueId(uniqueIds: string[] | Set<string>): ISubset;
750
+ }
751
+
752
+ /**
753
+ * Event handler type definition for subscription changes.
754
+ */
755
+ type SubscriptionChangeEventHandler = (count: number) => void;
756
+
757
+ /**
758
+ * Indicates the object implements generic subscriptions.
759
+ *
760
+ * @export
761
+ * @interface ISubscribable
762
+ * @template TEventHandler The type of events to handle.
763
+ */
764
+ interface ISubscribable<TEventHandler> {
765
+ /**
766
+ * Returns the number of subscriptions.
767
+ *
768
+ * @type {number}
769
+ * @memberOf ISubscribable
770
+ */
771
+ readonly count: number;
772
+ /**
773
+ * Subscribe to the event.
774
+ *
775
+ * @param {TEventHandler} fn The event handler that is called when the event is dispatched.
776
+ * @returns {() => void} function that unsubscribes the event handler from the event.
777
+ *
778
+ * @memberOf ISubscribable
779
+ */
780
+ subscribe(fn: TEventHandler): () => void;
781
+ /**
782
+ * Subscribe to the event.
783
+ * @param {TEventHandler} fn The event handler that is called when the event is dispatched.
784
+ * @returns A function that unsubscribes the event handler from the event.
785
+ *
786
+ * @memberOf ISubscribable
787
+ */
788
+ sub(fn: TEventHandler): () => void;
789
+ /**
790
+ * Unsubscribe from the event.
791
+ * @param {TEventHandler} fn The event handler that will be unsubsribed from the event.
792
+ *
793
+ * @memberOf ISubscribable
794
+ */
795
+ unsubscribe(fn: TEventHandler): void;
796
+ /**
797
+ * Unsubscribe from the event.
798
+ * @param {TEventHandler} fn The event handler that will be unsubsribed from the event.
799
+ *
800
+ * @memberOf ISubscribable
801
+ */
802
+ unsub(fn: TEventHandler): void;
803
+ /**
804
+ * Subscribes to the event only once.
805
+ * @param {TEventHandler} fn The event handler that is called when the event is dispatched.
806
+ * @returns A function that unsubscribes the event handler from the event.
807
+ *
808
+ * @memberOf ISubscribable
809
+ */
810
+ one(fn: TEventHandler): () => void;
811
+ /**
812
+ * Checks it the event has a subscription for the specified handler.
813
+ * @param {TEventHandler} fn The event handler.
814
+ *
815
+ * @memberOf ISubscribable
816
+ */
817
+ has(fn: TEventHandler): boolean;
818
+ /**
819
+ * Clears all the subscriptions.
820
+ *
821
+ * @memberOf ISubscribable
822
+ */
823
+ clear(): void;
824
+ /**
825
+ * Triggered when subscriptions are changed (added or removed).
826
+ *
827
+ * @type {ISubscribable<SubscriptionChangeEventHandler>}
828
+ * @memberOf ISubscribable
829
+ */
830
+ readonly onSubscriptionChange: ISubscribable<SubscriptionChangeEventHandler>;
831
+ }
832
+
833
+ /**
834
+ * Models a signal. This type of events has no arguments.
835
+ *
836
+ * @export
837
+ * @interface ISignal
838
+ * @extends {ISubscribable<ISignalHandler>}
839
+ */
840
+ interface ISignal extends ISubscribable<ISignalHandler> {
688
841
  }
689
842
 
690
843
  /**
@@ -747,6 +900,8 @@ interface IWebglVim extends IVim<IElement3D> {
747
900
  load(subset?: ISubset): Promise<void>;
748
901
  /** Removes all loaded geometry from the renderer (does NOT unload the vim from the viewer). */
749
902
  clear(): void;
903
+ /** Fires after `load(subset)` completes and new geometry is available. */
904
+ readonly onGeometryLoaded: ISignal;
750
905
  }
751
906
 
752
907
  interface ILoadSuccess<T> {
@@ -908,11 +1063,11 @@ interface IWebglCamera {
908
1063
  /**
909
1064
  * A signal that is dispatched when camera settings change.
910
1065
  */
911
- onSettingsChanged: ISignal;
1066
+ onSettingsChanged: ISignal$1;
912
1067
  /**
913
1068
  * A signal that is dispatched when camera moves.
914
1069
  */
915
- onMoved: ISignal;
1070
+ onMoved: ISignal$1;
916
1071
  /**
917
1072
  * True if the camera has moved this frame.
918
1073
  */
@@ -931,19 +1086,22 @@ interface IWebglCamera {
931
1086
  * The default forward direction in Z-up space (X = right, Y = forward, Z = up).
932
1087
  */
933
1088
  defaultForward: THREE.Vector3;
1089
+ /**
1090
+ * When true, lockMovement and lockRotation are bypassed.
1091
+ * Set temporarily to position the camera while ignoring user-configured constraints.
1092
+ */
1093
+ ignoreConstraints: boolean;
934
1094
  /**
935
1095
  * Interface for instantaneously moving the camera.
936
- * @param {boolean} [force=false] - Set to true to ignore locked axis and rotation.
937
1096
  * @returns {ICameraMovement} The camera movement api.
938
1097
  */
939
- snap(force?: boolean): ICameraMovement;
1098
+ snap(): ICameraMovement;
940
1099
  /**
941
1100
  * Interface for smoothly moving the camera over time.
942
1101
  * @param {number} [duration=1] - The duration of the camera movement animation.
943
- * @param {boolean} [force=false] - Set to true to ignore locked axis and rotation.
944
1102
  * @returns {ICameraMovement} The camera movement api.
945
1103
  */
946
- lerp(duration: number, force?: boolean): ICameraMovement;
1104
+ lerp(duration: number): ICameraMovement;
947
1105
  /**
948
1106
  * Calculates the frustum size at a given point in the scene.
949
1107
  * @param {THREE.Vector3} point - The point in the scene to calculate the frustum size at.
@@ -1093,7 +1251,7 @@ type MeasureStage = 'ready' | 'active' | 'done' | 'failed';
1093
1251
  */
1094
1252
  interface IWebglSectionBox {
1095
1253
  /** Dispatches when active, visible, or interactive change. */
1096
- readonly onStateChanged: ISignal;
1254
+ readonly onStateChanged: ISignal$1;
1097
1255
  /** Dispatches when the user finishes manipulating the box. */
1098
1256
  readonly onBoxConfirm: ISimpleEvent<THREE.Box3>;
1099
1257
  /** Dispatches boolean indicating pointer hover state on box handles. */
@@ -1230,9 +1388,9 @@ interface IWebglViewport {
1230
1388
  /** Triggers a resize to match parent dimensions. */
1231
1389
  resizeToParent(): void;
1232
1390
  /** Signal dispatched when the canvas is reparented. */
1233
- readonly onReparent: ISignal;
1391
+ readonly onReparent: ISignal$1;
1234
1392
  /** Signal dispatched when the canvas is resized. */
1235
- readonly onResize: ISignal;
1393
+ readonly onResize: ISignal$1;
1236
1394
  }
1237
1395
 
1238
1396
  /**
@@ -1459,13 +1617,13 @@ interface IInputHandler {
1459
1617
  /** Temporary pointer mode during drag (e.g., right-drag = LOOK). Read-only. */
1460
1618
  readonly pointerOverride: PointerMode | undefined;
1461
1619
  /** Fires when {@link pointerMode} or {@link pointerOverride} changes. */
1462
- readonly onPointerModeChanged: ISignal;
1620
+ readonly onPointerModeChanged: ISignal$1;
1463
1621
  /** WASD move speed. Exponential scale: actual speed = 1.25^moveSpeed. Range: [-10, +10]. */
1464
1622
  moveSpeed: number;
1465
1623
  /** Scroll wheel zoom speed. Higher = faster zoom per scroll tick. */
1466
1624
  scrollSpeed: number;
1467
1625
  /** Fires when any speed setting changes (moveSpeed, scrollSpeed). */
1468
- readonly onSettingsChanged: ISignal;
1626
+ readonly onSettingsChanged: ISignal$1;
1469
1627
  /** Fires when a right-click context menu should be shown. Payload is client-space position. */
1470
1628
  readonly onContextMenu: ISimpleEvent<THREE.Vector2 | undefined>;
1471
1629
  }
@@ -1523,9 +1681,9 @@ interface IWebglRenderer {
1523
1681
  /** Scale factor for outline/selection render target resolution (0-1). */
1524
1682
  outlineScale: number;
1525
1683
  /** Signal dispatched once per render frame if the scene was updated. */
1526
- readonly onSceneUpdated: ISignal;
1684
+ readonly onSceneUpdated: ISignal$1;
1527
1685
  /** Signal dispatched when bounding box is updated. */
1528
- readonly onBoxUpdated: ISignal;
1686
+ readonly onBoxUpdated: ISignal$1;
1529
1687
  /** Whether text rendering is enabled. */
1530
1688
  textEnabled: boolean;
1531
1689
  /** Instance count below which ghosted meshes are hidden entirely. */
@@ -1534,6 +1692,10 @@ interface IWebglRenderer {
1534
1692
  getBoundingBox(target?: THREE.Box3): THREE.Box3 | undefined;
1535
1693
  /** When true (default), only renders when dirty (`requestRender()` was called). When false, renders every frame. */
1536
1694
  autoRender: boolean;
1695
+ /** Whether selection outlines are enabled. */
1696
+ outlineEnabled: boolean;
1697
+ /** Selection fill mode for the rendering pipeline. */
1698
+ selectionFillMode: SelectionFillMode;
1537
1699
  }
1538
1700
 
1539
1701
  /**
@@ -1571,7 +1733,7 @@ interface IWebglViewer {
1571
1733
  readonly camera: IWebglCamera;
1572
1734
  readonly gizmos: IGizmos;
1573
1735
  /** Fires when a vim finishes loading and is added to the scene. */
1574
- readonly onVimLoaded: ISignal;
1736
+ readonly onVimLoaded: ISignal$1;
1575
1737
  /** All loaded VIM models. Auto-populated on load, auto-removed on unload. */
1576
1738
  readonly vims: IWebglVim[];
1577
1739
  /** Loads a VIM file. The resulting vim is added to `vims` on success. */
@@ -1600,7 +1762,7 @@ declare function createCoreWebglViewer(settings?: PartialViewerSettings): IWebgl
1600
1762
 
1601
1763
  declare namespace Core_Webgl {
1602
1764
  export { MaterialSet, createCoreWebglViewer as createViewer, isElement3D };
1603
- export type { AxesSettings, ICameraMovement, IElement3D, IGizmoAxes, IGizmoMarkers, IGizmoOrbit, IGizmos, IMarker, IMaterials, IMeasure, IRenderingSection, IScene, ISelectable, ISubset, IWebglCamera, IWebglLoadRequest, IWebglRaycastResult, IWebglRaycaster, IWebglRenderer, IWebglSectionBox, IWebglSelection, IWebglViewport, IWebglVim, MaterialSettings, MeasureStage, PartialViewerSettings, RequestSource, SubsetFilter, TransparencyMode, IWebglViewer as Viewer, ViewerSettings, VimPartialSettings, VimSettings };
1765
+ export type { AxesSettings, ICameraMovement, IElement3D, IGizmoAxes, IGizmoMarkers, IGizmoOrbit, IGizmos, IMarker, IMaterials, IMeasure, IRenderingSection, IScene, ISelectable, ISubset, IWebglCamera, IWebglLoadRequest, IWebglRaycastResult, IWebglRaycaster, IWebglRenderer, IWebglSectionBox, IWebglSelection, IWebglViewport, IWebglVim, MaterialSettings, MeasureStage, PartialViewerSettings, RequestSource, SelectionFillMode, SubsetFilter, TransparencyMode, IWebglViewer as Viewer, ViewerSettings, VimPartialSettings, VimSettings };
1604
1766
  }
1605
1767
 
1606
1768
  /**
@@ -1646,7 +1808,7 @@ type VimLoadingState = {
1646
1808
  */
1647
1809
  status: VimLoadingStatus;
1648
1810
  /**
1649
- * Loading progress as a percentage from 0 to 100.
1811
+ * Loading progress as a fraction from 0 to 1.
1650
1812
  */
1651
1813
  progress: number;
1652
1814
  };
@@ -1906,7 +2068,7 @@ declare const defaultRenderSettings: RenderSettings;
1906
2068
  * Interface defining the basic renderer capabilities
1907
2069
  */
1908
2070
  interface IUltraRenderer {
1909
- onSceneUpdated: ISignal;
2071
+ onSceneUpdated: ISignal$1;
1910
2072
  ghostColor: THREE.Color;
1911
2073
  ghostOpacity: number;
1912
2074
  hdrScale: number;
@@ -1914,7 +2076,7 @@ interface IUltraRenderer {
1914
2076
  hdrBackgroundScale: number;
1915
2077
  hdrBackgroundSaturation: number;
1916
2078
  backgroundBlur: number;
1917
- backgroundColor: THREE.Color;
2079
+ background: THREE.Color;
1918
2080
  getBoundingBox(): Promise<THREE.Box3 | undefined>;
1919
2081
  }
1920
2082
 
@@ -1931,7 +2093,7 @@ interface IUltraRenderer {
1931
2093
  * ```
1932
2094
  */
1933
2095
  interface IUltraSectionBox {
1934
- readonly onUpdate: ISignal;
2096
+ readonly onUpdate: ISignal$1;
1935
2097
  visible: boolean;
1936
2098
  interactive: boolean;
1937
2099
  active: boolean;
@@ -2099,7 +2261,7 @@ declare namespace Core_Ultra {
2099
2261
 
2100
2262
  declare namespace Core {
2101
2263
  export { PointerMode, Core_Ultra as Ultra, Core_Webgl as Webgl, authHeaders };
2102
- export type { ClickHandler, ContextMenuHandler, DoubleClickHandler, DragCallback, DragHandler, IInputHandler, IKeyboardInput, ILoadError, ILoadRequest, ILoadSuccess, IMouseInput, IProgress, ISignal, ISimpleEvent, ITouchInput, IVim, IVimElement, LoadResult, MouseOverrides, MoveHandler, PinchHandler, PinchStartHandler, PointerButtonHandler, ProgressType, TapHandler, TouchOverrides, WheelHandler };
2264
+ export type { ClickHandler, ContextMenuHandler, DoubleClickHandler, DragCallback, DragHandler, IInputHandler, IKeyboardInput, ILoadError, ILoadRequest, ILoadSuccess, IMouseInput, IProgress, ISignal$1 as ISignal, ISimpleEvent, ITouchInput, IVim, IVimElement, LoadResult, MouseOverrides, MoveHandler, PinchHandler, PinchStartHandler, PointerButtonHandler, ProgressType, TapHandler, TouchOverrides, WheelHandler };
2103
2265
  }
2104
2266
 
2105
2267
  /**
@@ -2148,10 +2310,6 @@ interface StateRef<T> {
2148
2310
  * @param value - The new state value.
2149
2311
  */
2150
2312
  set(value: T): void;
2151
- /**
2152
- * Confirms the current state (potentially applying a confirmation transformation).
2153
- */
2154
- confirm(): void;
2155
2313
  onChange: ISimpleEvent<T>;
2156
2314
  }
2157
2315
  /**
@@ -2202,74 +2360,137 @@ interface FuncRef<TArg, TReturn> {
2202
2360
  }
2203
2361
 
2204
2362
  /**
2205
- * Controls the section box clipping volume.
2206
- * Shared between WebGL and Ultra viewers.
2207
- *
2208
- * @example
2209
- * viewer.sectionBox.active.set(true)
2210
- * viewer.sectionBox.sectionSelection.call() // Fit to selection
2211
- * viewer.sectionBox.sectionScene.call() // Fit to scene
2363
+ * A boolean setting that can be locked by the host application.
2364
+ * - `true` / `false` user-toggleable default value, shown in settings UI.
2365
+ * - `"AlwaysTrue"` / `"AlwaysFalse"` — locked value, hidden from settings UI.
2212
2366
  */
2213
- interface SectionBoxApi {
2214
- active: StateRef<boolean>;
2215
- visible: StateRef<boolean>;
2216
- auto: StateRef<boolean>;
2217
- sectionSelection: FuncRef<void, Promise<void>>;
2218
- sectionScene: FuncRef<void, Promise<void>>;
2219
- sectionBox: FuncRef<THREE.Box3, void>;
2220
- getBox: () => THREE.Box3;
2221
- showOffsetPanel: StateRef<boolean>;
2222
- topOffset: StateRef<number>;
2223
- sideOffset: StateRef<number>;
2224
- bottomOffset: StateRef<number>;
2225
- getSelectionBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2226
- getSceneBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2227
- }
2228
-
2367
+ type UserBoolean = boolean | 'AlwaysTrue' | 'AlwaysFalse';
2229
2368
  /**
2230
- * @module viw-webgl-react
2369
+ * Checks if a UserBoolean value is effectively true
2370
+ * @param {UserBoolean | boolean} value - The value to check
2371
+ * @returns {boolean} True if the value is true or 'AlwaysTrue'
2372
+ */
2373
+ declare function isTrue(value: UserBoolean | boolean): value is true | "AlwaysTrue";
2374
+ /**
2375
+ * Checks if a UserBoolean value is effectively false
2376
+ * @param {UserBoolean | boolean} value - The value to check
2377
+ * @returns {boolean} True if the value is false or 'AlwaysFalse'
2231
2378
  */
2379
+ declare function isFalse(value: UserBoolean | boolean): value is false | "AlwaysFalse";
2232
2380
 
2233
2381
  /**
2234
- * High-level framing controls for the React viewer.
2235
- * Provides semantic operations like "frame selection" and "frame scene".
2236
- *
2237
- * For low-level camera movement (orbit, pan, zoom, snap/lerp), use
2238
- * `viewer.core.camera` which exposes {@link IWebglCamera}.
2239
- *
2240
- * @example
2241
- * // Frame the current selection with animation
2242
- * viewer.framing.frameSelection.call()
2243
- *
2244
- * // For direct camera manipulation, use the core camera:
2245
- * viewer.core.camera.lerp(1).frame('all')
2246
- * viewer.core.camera.snap().set(position, target)
2382
+ * @module icons
2247
2383
  */
2248
- interface FramingApi {
2249
- /** When true, automatically frames the camera on the selection whenever it changes. */
2250
- autoCamera: StateRef<boolean>;
2251
- /** Resets the camera to its last saved position. */
2252
- reset: FuncRef<void, void>;
2253
- /** Frames the camera on the current selection (or scene if nothing selected). */
2254
- frameSelection: FuncRef<void, Promise<void>>;
2255
- /** Frames the camera to show all loaded geometry. */
2256
- frameScene: FuncRef<void, Promise<void>>;
2257
- /** Returns the bounding box of the current selection, or undefined if nothing selected. */
2258
- getSelectionBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2259
- /** Returns the bounding box of all loaded geometry. */
2260
- getSceneBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2384
+ /**
2385
+ * Common Icon Options.
2386
+ */
2387
+ type IconOptions = {
2388
+ height?: number | string;
2389
+ width?: number | string;
2390
+ fill?: string;
2391
+ className?: string;
2392
+ };
2393
+ declare function pointer({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2394
+ declare function filter({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2395
+ declare function slidersHoriz({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2396
+ declare function settings({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2397
+ declare function help({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2398
+ declare function trash({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2399
+ declare function checkmark({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2400
+ declare function undo({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2401
+ declare function closeIcon({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2402
+ declare function home({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2403
+ declare function fullScreen({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2404
+ declare function minimize({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2405
+ declare function treeView({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2406
+ declare function more({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2407
+ declare function collapse({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2408
+ declare function arrowLeft({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2409
+ declare function fullArrowLeft({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2410
+ declare function visible({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2411
+ declare function hidden({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2412
+ declare function frameScene({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2413
+ declare function autoCamera({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2414
+ declare function orbit({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2415
+ declare function look({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2416
+ declare function perspective({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2417
+ declare function orthographic({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2418
+ declare function camera({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2419
+ declare function pan({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2420
+ declare function zoom({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2421
+ declare function frameRect({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2422
+ declare function frameSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2423
+ declare function showAll({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2424
+ declare function showSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2425
+ declare function hideSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2426
+ declare function isolateSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2427
+ declare function autoIsolate({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2428
+ declare function toggleIsolation({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2429
+ declare function measure({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2430
+ declare function sectionBoxSettings({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2431
+ declare function sectionBoxAuto({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2432
+ declare function sectionBoxVisible({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2433
+ declare function sectionBox({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2434
+ declare function sectionBoxDisable({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2435
+ declare function sectionBoxClip({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2436
+ declare function sectionBoxIgnore({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2437
+ declare function sectionBoxReset({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2438
+ declare function sectionBoxShrink({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2439
+ declare function sectionBoxShrink2({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2440
+ declare function ghost({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2441
+ declare function ghostDead({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2442
+
2443
+ declare namespace React_Icons {
2444
+ export { arrowLeft, autoCamera, autoIsolate, camera, checkmark, closeIcon, collapse, filter, frameRect, frameScene, frameSelection, fullArrowLeft, fullScreen, ghost, ghostDead, help, hidden, hideSelection, home, isolateSelection, look, measure, minimize, more, orbit, orthographic, pan, perspective, pointer, sectionBox, sectionBoxAuto, sectionBoxClip, sectionBoxDisable, sectionBoxIgnore, sectionBoxReset, sectionBoxSettings, sectionBoxShrink, sectionBoxShrink2, sectionBoxVisible, settings, showAll, showSelection, slidersHoriz, toggleIsolation, trash, treeView, undo, visible, zoom };
2445
+ export type { IconOptions };
2261
2446
  }
2262
2447
 
2448
+ type MessageBoxProps = {
2449
+ title: string;
2450
+ body: string | JSX.Element;
2451
+ icon?: JSX.Element;
2452
+ footer?: string | JSX.Element;
2453
+ canClose?: boolean;
2454
+ minimize?: boolean;
2455
+ onClose?: () => void;
2456
+ };
2457
+ type MessageBoxPropsTyped = MessageBoxProps & {
2458
+ type: 'message';
2459
+ };
2460
+
2461
+ type ProgressMode = 'percent' | 'bytes';
2462
+ /**
2463
+ * Interface for message information displayed in the LoadingBox.
2464
+ * @property message - Optional main message text.
2465
+ * @property info - Optional additional information or tooltip text.
2466
+ * @property progress - The progress of an operation.
2467
+ */
2468
+ type LoadingBoxProps = {
2469
+ message?: string;
2470
+ progress?: number;
2471
+ mode?: ProgressMode;
2472
+ more?: ReactNode;
2473
+ };
2474
+ type LoadingBoxPropsTyped = LoadingBoxProps & {
2475
+ type: 'loading';
2476
+ };
2477
+
2263
2478
  /**
2264
2479
  * @module viw-webgl-react
2265
2480
  */
2481
+ type HelpPropsTyped = {
2482
+ type: 'help';
2483
+ };
2266
2484
 
2267
- type AugmentedElement = BIM.IElement & {
2268
- bimDocumentName: string;
2269
- categoryName: string;
2270
- familyTypeName: string;
2271
- levelName: string;
2272
- worksetName: string;
2485
+ type ModalProps = (MessageBoxPropsTyped | LoadingBoxPropsTyped | HelpPropsTyped) & {
2486
+ canClose?: boolean;
2487
+ onClose?: () => void;
2488
+ };
2489
+ type ModalApi = {
2490
+ getActiveState(): ModalProps | undefined;
2491
+ loading(content: LoadingBoxProps | undefined): void;
2492
+ message(content: MessageBoxProps | undefined): void;
2493
+ help(show: boolean): void;
2273
2494
  };
2274
2495
 
2275
2496
  type VisibilityStatus = 'all' | 'allButSelection' | 'onlySelection' | 'some' | 'none';
@@ -2295,6 +2516,16 @@ interface IsolationApi {
2295
2516
  ghostOpacity: StateRef<number>;
2296
2517
  /** Whether transparent materials are rendered (observable). */
2297
2518
  transparency: StateRef<boolean>;
2519
+ /** Whether selection outlines are enabled (observable). */
2520
+ outlineEnabled: StateRef<boolean>;
2521
+ /** Outline quality: 'low' (0.5x) | 'medium' (1x) | 'high' (2x) render target scale. */
2522
+ outlineQuality: StateRef<string>;
2523
+ /** Outline thickness in screen pixels (1-5). */
2524
+ outlineThickness: StateRef<number>;
2525
+ /** Selection fill mode: 'none' | 'default' | 'xray' | 'seethrough' (observable). */
2526
+ selectionFillMode: StateRef<string>;
2527
+ /** Opacity of the overlay pass in 'xray' and 'seethrough' modes (0-1). */
2528
+ selectionOverlayOpacity: StateRef<number>;
2298
2529
  /** Whether room elements are shown (observable). */
2299
2530
  showRooms: StateRef<boolean>;
2300
2531
  /** Hook called when auto-isolate triggers. Use `update()` to add middleware. */
@@ -2327,54 +2558,236 @@ interface IsolationApi {
2327
2558
  showAll(): void;
2328
2559
  }
2329
2560
 
2330
- type MessageBoxProps = {
2331
- title: string;
2332
- body: string | JSX.Element;
2333
- icon?: JSX.Element;
2334
- footer?: string | JSX.Element;
2335
- canClose?: boolean;
2336
- minimize?: boolean;
2337
- onClose?: () => void;
2338
- };
2339
- type MessageBoxPropsTyped = MessageBoxProps & {
2340
- type: 'message';
2341
- };
2561
+ type ButtonVariant = 'default' | 'expand' | 'disabled' | 'disabled-default' | 'blue';
2562
+ type SectionVariant = 'default' | 'blue';
2563
+ declare const buttonDefaultStyle: ButtonVariant;
2564
+ declare const buttonExpandStyle: ButtonVariant;
2565
+ declare const buttonDisableStyle: ButtonVariant;
2566
+ declare const buttonDisableDefaultStyle: ButtonVariant;
2567
+ declare const buttonBlueStyle: ButtonVariant;
2568
+ declare const sectionDefaultStyle: SectionVariant;
2569
+ declare const sectionBlueStyle: SectionVariant;
2570
+ declare const sectionNoPadStyle: SectionVariant;
2342
2571
 
2343
- type ProgressMode = 'percent' | 'bytes';
2344
- /**
2345
- * Interface for message information displayed in the LoadingBox.
2346
- * @property message - Optional main message text.
2347
- * @property info - Optional additional information or tooltip text.
2348
- * @property progress - The progress of an operation.
2572
+ declare namespace React_ControlBar_Style {
2573
+ export { buttonBlueStyle, buttonDefaultStyle, buttonDisableDefaultStyle, buttonDisableStyle, buttonExpandStyle, sectionBlueStyle, sectionDefaultStyle, sectionNoPadStyle };
2574
+ export type { ButtonVariant, SectionVariant };
2575
+ }
2576
+
2577
+ interface IControlBarButton {
2578
+ id: string;
2579
+ enabled?: (() => boolean) | undefined;
2580
+ tip: string;
2581
+ action: () => void;
2582
+ icon: (options?: IconOptions) => JSX.Element;
2583
+ isOn?: () => boolean;
2584
+ variant?: ButtonVariant;
2585
+ }
2586
+
2587
+ interface IControlBarSection {
2588
+ id: string;
2589
+ enable?: (() => boolean) | undefined;
2590
+ buttons: (IControlBarButton)[];
2591
+ variant?: SectionVariant;
2592
+ }
2593
+
2594
+ type PartialUltraSettings = RecursivePartial<UltraSettings>;
2595
+ /**
2596
+ * React UI feature toggles for the Ultra viewer, passed to `React.Ultra.createViewer(container, settings)`.
2597
+ * Controls which UI panels and toolbar buttons are shown.
2598
+ * Access at runtime via `viewer.ui.controlBar.set(false)`.
2599
+ *
2600
+ * @example
2601
+ * const viewer = await React.Ultra.createViewer(div, {
2602
+ * ui: { panelControlBar: true, miscHelp: false }
2603
+ * })
2349
2604
  */
2350
- type LoadingBoxProps = {
2351
- message?: string;
2352
- progress?: number;
2353
- mode?: ProgressMode;
2354
- more?: ReactNode;
2605
+ type UltraSettings = {
2606
+ capacity: CapacitySettings;
2607
+ isolation: IsolationSettings;
2608
+ sectionBox: SectionBoxSettings;
2609
+ cursor: CursorSettings;
2610
+ camera: CameraSettings;
2611
+ ui: ControlBarCameraSettings & ControlBarCursorSettings & ControlBarSectionBoxSettings & ControlBarVisibilitySettings & {
2612
+ panelLogo: UserBoolean;
2613
+ panelControlBar: UserBoolean;
2614
+ miscSettings: UserBoolean;
2615
+ miscHelp: UserBoolean;
2616
+ };
2355
2617
  };
2356
- type LoadingBoxPropsTyped = LoadingBoxProps & {
2357
- type: 'loading';
2618
+ declare function getDefaultUltraSettings(): UltraSettings;
2619
+
2620
+ type ControlBarSectionBoxSettings = {
2621
+ sectioningEnable: UserBoolean;
2622
+ sectioningFitToSelection: UserBoolean;
2623
+ sectioningReset: UserBoolean;
2624
+ sectioningShow: UserBoolean;
2625
+ sectioningAuto: UserBoolean;
2626
+ sectioningSettings: UserBoolean;
2627
+ };
2628
+ type ControlBarCursorSettings = {
2629
+ cursorOrbit: UserBoolean;
2630
+ cursorLookAround: UserBoolean;
2631
+ cursorPan: UserBoolean;
2632
+ cursorZoom: UserBoolean;
2633
+ };
2634
+ type ControlBarMeasureSettings = {
2635
+ measureEnable: UserBoolean;
2636
+ };
2637
+ type ControlBarCameraSettings = {
2638
+ cameraAuto: UserBoolean;
2639
+ cameraFrameSelection: UserBoolean;
2640
+ cameraFrameScene: UserBoolean;
2641
+ };
2642
+ type ControlBarVisibilitySettings = {
2643
+ visibilityClearSelection: UserBoolean;
2644
+ visibilityShowAll: UserBoolean;
2645
+ visibilityToggle: UserBoolean;
2646
+ visibilityIsolate: UserBoolean;
2647
+ visibilityAutoIsolate: UserBoolean;
2648
+ visibilitySettings: UserBoolean;
2358
2649
  };
2359
2650
 
2651
+ type PartialWebglSettings = RecursivePartial<WebglSettings>;
2360
2652
  /**
2361
- * @module viw-webgl-react
2653
+ * React UI feature toggles, passed to `React.Webgl.createViewer(container, settings)`.
2654
+ * Controls which UI panels and toolbar buttons are shown.
2655
+ * Access at runtime via `viewer.ui.bimTree.set(false)`.
2656
+ * Not to be confused with {@link ViewerSettings} (renderer config) or {@link VimSettings} (per-model transform).
2657
+ *
2658
+ * @example
2659
+ * const viewer = await React.Webgl.createViewer(div, {
2660
+ * ui: { panelBimTree: false, miscHelp: false }
2661
+ * })
2362
2662
  */
2363
- type HelpPropsTyped = {
2364
- type: 'help';
2663
+ type IsolationSettings = {
2664
+ autoIsolate: boolean;
2665
+ showGhost: boolean;
2666
+ transparency: boolean;
2667
+ showRooms: boolean;
2365
2668
  };
2366
-
2367
- type ModalProps = (MessageBoxPropsTyped | LoadingBoxPropsTyped | HelpPropsTyped) & {
2368
- canClose?: boolean;
2369
- onClose?: () => void;
2669
+ type SectionBoxSettings = {
2670
+ active: boolean;
2671
+ auto: boolean;
2672
+ topOffset: number;
2673
+ sideOffset: number;
2674
+ bottomOffset: number;
2370
2675
  };
2371
- type ModalApi = {
2372
- getActiveState(): ModalProps | undefined;
2373
- loading(content: LoadingBoxProps | undefined): void;
2374
- message(content: MessageBoxProps | undefined): void;
2375
- help(show: boolean): void;
2676
+ type CursorSettings = {
2677
+ default: PointerMode;
2678
+ };
2679
+ type CameraSettings = {
2680
+ autoCamera: boolean;
2681
+ };
2682
+ type CapacitySettings = {
2683
+ canFollowUrl: boolean;
2684
+ canGoFullScreen: boolean;
2685
+ canDownload: boolean;
2686
+ canReadLocalStorage: boolean;
2687
+ };
2688
+ type WebglSettings = {
2689
+ capacity: CapacitySettings;
2690
+ isolation: IsolationSettings;
2691
+ sectionBox: SectionBoxSettings;
2692
+ cursor: CursorSettings;
2693
+ camera: CameraSettings;
2694
+ ui: ControlBarCameraSettings & ControlBarCursorSettings & ControlBarSectionBoxSettings & ControlBarVisibilitySettings & ControlBarMeasureSettings & {
2695
+ panelLogo: UserBoolean;
2696
+ panelBimTree: UserBoolean;
2697
+ panelBimInfo: UserBoolean;
2698
+ panelPerformance: UserBoolean;
2699
+ panelAxes: UserBoolean;
2700
+ panelControlBar: UserBoolean;
2701
+ axesOrthographic: UserBoolean;
2702
+ axesHome: UserBoolean;
2703
+ miscProjectInspector: UserBoolean;
2704
+ miscSettings: UserBoolean;
2705
+ miscHelp: UserBoolean;
2706
+ miscMaximise: UserBoolean;
2707
+ };
2708
+ };
2709
+ /**
2710
+ * Default settings configuration for the React Webgl Vim viewer
2711
+ * @constant
2712
+ * @type {WebglSettings}
2713
+ */
2714
+ declare function getDefaultSettings(): WebglSettings;
2715
+
2716
+ /**
2717
+ * Controls the section box clipping volume.
2718
+ * Shared between WebGL and Ultra viewers.
2719
+ *
2720
+ * @example
2721
+ * viewer.sectionBox.active.set(true)
2722
+ * viewer.sectionBox.sectionSelection.call() // Fit to selection
2723
+ * viewer.sectionBox.sectionScene.call() // Fit to scene
2724
+ */
2725
+ interface SectionBoxApi {
2726
+ active: StateRef<boolean>;
2727
+ visible: StateRef<boolean>;
2728
+ auto: StateRef<boolean>;
2729
+ sectionSelection: FuncRef<void, Promise<void>>;
2730
+ sectionScene: FuncRef<void, Promise<void>>;
2731
+ sectionBox: FuncRef<THREE.Box3, void>;
2732
+ getBox: () => THREE.Box3;
2733
+ showOffsetPanel: StateRef<boolean>;
2734
+ topOffset: StateRef<number>;
2735
+ sideOffset: StateRef<number>;
2736
+ bottomOffset: StateRef<number>;
2737
+ getSelectionBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2738
+ getSceneBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2739
+ }
2740
+
2741
+ /**
2742
+ * @module viw-webgl-react
2743
+ */
2744
+
2745
+ /**
2746
+ * High-level framing controls for the React viewer.
2747
+ * Provides semantic operations like "frame selection" and "frame scene".
2748
+ *
2749
+ * For low-level camera movement (orbit, pan, zoom, snap/lerp), use
2750
+ * `viewer.core.camera` which exposes {@link IWebglCamera}.
2751
+ *
2752
+ * @example
2753
+ * // Frame the current selection with animation
2754
+ * viewer.framing.frameSelection.call()
2755
+ *
2756
+ * // For direct camera manipulation, use the core camera:
2757
+ * viewer.core.camera.lerp(1).frame('all')
2758
+ * viewer.core.camera.snap().set(position, target)
2759
+ */
2760
+ interface FramingApi {
2761
+ /** When true, automatically frames the camera on the selection whenever it changes. */
2762
+ autoCamera: StateRef<boolean>;
2763
+ /** Resets the camera to its last saved position. */
2764
+ reset: FuncRef<void, void>;
2765
+ /** Frames the camera on the current selection (or scene if nothing selected). */
2766
+ frameSelection: FuncRef<void, Promise<void>>;
2767
+ /** Frames the camera to show all loaded geometry. */
2768
+ frameScene: FuncRef<void, Promise<void>>;
2769
+ /** Returns the bounding box of the current selection, or undefined if nothing selected. */
2770
+ getSelectionBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2771
+ /** Returns the bounding box of all loaded geometry. */
2772
+ getSceneBox: FuncRef<void, Promise<THREE.Box3 | undefined>>;
2773
+ }
2774
+
2775
+ /**
2776
+ * @module viw-webgl-react
2777
+ */
2778
+
2779
+ type AugmentedElement = BIM.IElement & {
2780
+ bimDocumentName: string;
2781
+ categoryName: string;
2782
+ familyTypeName: string;
2783
+ levelName: string;
2784
+ worksetName: string;
2376
2785
  };
2377
2786
 
2787
+ /**
2788
+ * @module viw-webgl-react
2789
+ */
2790
+
2378
2791
  /**
2379
2792
  * Reference to manage context menu functionality in the viewer.
2380
2793
  */
@@ -2393,7 +2806,7 @@ interface IContextMenuButton {
2393
2806
  id: string;
2394
2807
  label: string;
2395
2808
  keyboard?: string;
2396
- action: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
2809
+ action: (e: React__default.MouseEvent<HTMLDivElement, MouseEvent>) => void;
2397
2810
  enabled: boolean;
2398
2811
  }
2399
2812
  /**
@@ -2547,90 +2960,6 @@ type BimInfoPanelApi = {
2547
2960
  onRenderBodyEntryValue: DataRender<Entry>;
2548
2961
  };
2549
2962
 
2550
- /**
2551
- * @module icons
2552
- */
2553
- /**
2554
- * Common Icon Options.
2555
- */
2556
- type IconOptions = {
2557
- height?: number | string;
2558
- width?: number | string;
2559
- fill?: string;
2560
- className?: string;
2561
- };
2562
- declare function pointer({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2563
- declare function filter({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2564
- declare function slidersHoriz({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2565
- declare function settings({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2566
- declare function help({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2567
- declare function trash({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2568
- declare function checkmark({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2569
- declare function undo({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2570
- declare function closeIcon({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2571
- declare function home({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2572
- declare function fullScreen({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2573
- declare function minimize({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2574
- declare function treeView({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2575
- declare function more({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2576
- declare function collapse({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2577
- declare function arrowLeft({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2578
- declare function fullArrowLeft({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2579
- declare function visible({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2580
- declare function hidden({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2581
- declare function frameScene({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2582
- declare function autoCamera({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2583
- declare function orbit({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2584
- declare function look({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2585
- declare function perspective({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2586
- declare function orthographic({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2587
- declare function camera({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2588
- declare function pan({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2589
- declare function zoom({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2590
- declare function frameRect({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2591
- declare function frameSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2592
- declare function showAll({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2593
- declare function showSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2594
- declare function hideSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2595
- declare function isolateSelection({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2596
- declare function autoIsolate({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2597
- declare function toggleIsolation({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2598
- declare function measure({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2599
- declare function sectionBoxSettings({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2600
- declare function sectionBoxAuto({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2601
- declare function sectionBoxVisible({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2602
- declare function sectionBox({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2603
- declare function sectionBoxDisable({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2604
- declare function sectionBoxClip({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2605
- declare function sectionBoxIgnore({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2606
- declare function sectionBoxReset({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2607
- declare function sectionBoxShrink({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2608
- declare function sectionBoxShrink2({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2609
- declare function ghost({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2610
- declare function ghostDead({ height, width, fill, className }?: IconOptions): react_jsx_runtime.JSX.Element;
2611
-
2612
- declare namespace React_Icons {
2613
- export { arrowLeft, autoCamera, autoIsolate, camera, checkmark, closeIcon, collapse, filter, frameRect, frameScene, frameSelection, fullArrowLeft, fullScreen, ghost, ghostDead, help, hidden, hideSelection, home, isolateSelection, look, measure, minimize, more, orbit, orthographic, pan, perspective, pointer, sectionBox, sectionBoxAuto, sectionBoxClip, sectionBoxDisable, sectionBoxIgnore, sectionBoxReset, sectionBoxSettings, sectionBoxShrink, sectionBoxShrink2, sectionBoxVisible, settings, showAll, showSelection, slidersHoriz, toggleIsolation, trash, treeView, undo, visible, zoom };
2614
- export type { IconOptions };
2615
- }
2616
-
2617
- interface IControlBarButton {
2618
- id: string;
2619
- enabled?: (() => boolean) | undefined;
2620
- tip: string;
2621
- action: () => void;
2622
- icon: (options?: IconOptions) => JSX.Element;
2623
- isOn?: () => boolean;
2624
- style?: (on: boolean) => string;
2625
- }
2626
-
2627
- interface IControlBarSection {
2628
- id: string;
2629
- enable?: (() => boolean) | undefined;
2630
- buttons: (IControlBarButton)[];
2631
- style?: string;
2632
- }
2633
-
2634
2963
  /**
2635
2964
  * Reference to manage control bar functionality in the viewer.
2636
2965
  */
@@ -2646,144 +2975,6 @@ type ControlBarApi = {
2646
2975
  */
2647
2976
  type ControlBarCustomization = (e: IControlBarSection[]) => IControlBarSection[];
2648
2977
 
2649
- /**
2650
- * A boolean setting that can be locked by the host application.
2651
- * - `true` / `false` — user-toggleable default value, shown in settings UI.
2652
- * - `"AlwaysTrue"` / `"AlwaysFalse"` — locked value, hidden from settings UI.
2653
- */
2654
- type UserBoolean = boolean | 'AlwaysTrue' | 'AlwaysFalse';
2655
- /**
2656
- * Checks if a UserBoolean value is effectively true
2657
- * @param {UserBoolean | boolean} value - The value to check
2658
- * @returns {boolean} True if the value is true or 'AlwaysTrue'
2659
- */
2660
- declare function isTrue(value: UserBoolean | boolean): value is true | "AlwaysTrue";
2661
- /**
2662
- * Checks if a UserBoolean value is effectively false
2663
- * @param {UserBoolean | boolean} value - The value to check
2664
- * @returns {boolean} True if the value is false or 'AlwaysFalse'
2665
- */
2666
- declare function isFalse(value: UserBoolean | boolean): value is false | "AlwaysFalse";
2667
-
2668
- declare const baseSectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-shadow-md";
2669
- declare const sectionDefaultStyle: string;
2670
- declare const sectionBlueStyle: string;
2671
- declare const sectionNoPadStyle: string;
2672
- declare const buttonBaseStyle = "vim-control-bar-button vc-rounded-full vc-items-center vc-justify-center vc-flex vc-transition-all hover:vc-scale-110";
2673
- declare function buttonDefaultStyle(on: boolean): string;
2674
- declare function buttonExpandStyle(on: boolean): string;
2675
- declare function buttonDisableStyle(on: boolean): string;
2676
- declare function buttonDisableDefaultStyle(on: boolean): string;
2677
- declare function buttonBlueStyle(on: boolean): string;
2678
-
2679
- declare namespace React_ControlBar_Style {
2680
- export {
2681
- baseSectionStyle,
2682
- buttonBaseStyle,
2683
- buttonBlueStyle,
2684
- buttonDefaultStyle,
2685
- buttonDisableDefaultStyle,
2686
- buttonDisableStyle,
2687
- buttonExpandStyle,
2688
- sectionBlueStyle,
2689
- sectionDefaultStyle,
2690
- sectionNoPadStyle,
2691
- };
2692
- }
2693
-
2694
- type PartialUltraSettings = RecursivePartial<UltraSettings>;
2695
- /**
2696
- * React UI feature toggles for the Ultra viewer, passed to `React.Ultra.createViewer(container, settings)`.
2697
- * Controls which UI panels and toolbar buttons are shown.
2698
- * Access at runtime via `viewer.settings.update(s => { s.ui.panelControlBar = false })`.
2699
- *
2700
- * @example
2701
- * const viewer = await React.Ultra.createViewer(div, {
2702
- * ui: { panelControlBar: true, miscHelp: false }
2703
- * })
2704
- */
2705
- type UltraSettings = {
2706
- ui: ControlBarCameraSettings & ControlBarCursorSettings & ControlBarSectionBoxSettings & ControlBarVisibilitySettings & {
2707
- panelLogo: UserBoolean;
2708
- panelControlBar: UserBoolean;
2709
- miscSettings: UserBoolean;
2710
- miscHelp: UserBoolean;
2711
- };
2712
- };
2713
- declare function getDefaultUltraSettings(): UltraSettings;
2714
-
2715
- type ControlBarSectionBoxSettings = {
2716
- sectioningEnable: UserBoolean;
2717
- sectioningFitToSelection: UserBoolean;
2718
- sectioningReset: UserBoolean;
2719
- sectioningShow: UserBoolean;
2720
- sectioningAuto: UserBoolean;
2721
- sectioningSettings: UserBoolean;
2722
- };
2723
- type ControlBarCursorSettings = {
2724
- cursorOrbit: UserBoolean;
2725
- cursorLookAround: UserBoolean;
2726
- cursorPan: UserBoolean;
2727
- cursorZoom: UserBoolean;
2728
- };
2729
- type ControlBarMeasureSettings = {
2730
- measureEnable: UserBoolean;
2731
- };
2732
- type ControlBarCameraSettings = {
2733
- cameraAuto: UserBoolean;
2734
- cameraFrameSelection: UserBoolean;
2735
- cameraFrameScene: UserBoolean;
2736
- };
2737
- type ControlBarVisibilitySettings = {
2738
- visibilityClearSelection: UserBoolean;
2739
- visibilityShowAll: UserBoolean;
2740
- visibilityToggle: UserBoolean;
2741
- visibilityIsolate: UserBoolean;
2742
- visibilityAutoIsolate: UserBoolean;
2743
- visibilitySettings: UserBoolean;
2744
- };
2745
-
2746
- type PartialWebglSettings = RecursivePartial<WebglSettings>;
2747
- /**
2748
- * React UI feature toggles, passed to `React.Webgl.createViewer(container, settings)`.
2749
- * Controls which UI panels and toolbar buttons are shown.
2750
- * Access at runtime via `viewer.settings.update(s => { s.ui.panelBimTree = false })`.
2751
- * Not to be confused with {@link ViewerSettings} (renderer config) or {@link VimSettings} (per-model transform).
2752
- *
2753
- * @example
2754
- * const viewer = await React.Webgl.createViewer(div, {
2755
- * ui: { panelBimTree: false, miscHelp: false }
2756
- * })
2757
- */
2758
- type WebglSettings = {
2759
- capacity: {
2760
- canFollowUrl: boolean;
2761
- canGoFullScreen: boolean;
2762
- canDownload: boolean;
2763
- canReadLocalStorage: boolean;
2764
- };
2765
- ui: ControlBarCameraSettings & ControlBarCursorSettings & ControlBarSectionBoxSettings & ControlBarVisibilitySettings & ControlBarMeasureSettings & {
2766
- panelLogo: UserBoolean;
2767
- panelBimTree: UserBoolean;
2768
- panelBimInfo: UserBoolean;
2769
- panelPerformance: UserBoolean;
2770
- panelAxes: UserBoolean;
2771
- panelControlBar: UserBoolean;
2772
- axesOrthographic: UserBoolean;
2773
- axesHome: UserBoolean;
2774
- miscProjectInspector: UserBoolean;
2775
- miscSettings: UserBoolean;
2776
- miscHelp: UserBoolean;
2777
- miscMaximise: UserBoolean;
2778
- };
2779
- };
2780
- /**
2781
- * Default settings configuration for the React Webgl Vim viewer
2782
- * @constant
2783
- * @type {WebglSettings}
2784
- */
2785
- declare function getDefaultSettings(): WebglSettings;
2786
-
2787
2978
  /**
2788
2979
  * @module viw-webgl-react
2789
2980
  */
@@ -2815,6 +3006,8 @@ interface GenericNumberEntry {
2815
3006
  min?: number;
2816
3007
  max?: number;
2817
3008
  step?: number;
3009
+ info?: string;
3010
+ transform?: (n: number) => number;
2818
3011
  }
2819
3012
  interface GenericBoolEntry {
2820
3013
  type: "bool";
@@ -2824,67 +3017,117 @@ interface GenericBoolEntry {
2824
3017
  visible?: () => boolean;
2825
3018
  state: StateRef<boolean>;
2826
3019
  }
2827
- type GenericEntryType = GenericTextEntry | GenericBoolEntry | GenericNumberEntry;
3020
+ interface GenericSelectEntry {
3021
+ type: "select";
3022
+ id: string;
3023
+ label: string;
3024
+ enabled?: () => boolean;
3025
+ visible?: () => boolean;
3026
+ options: {
3027
+ label: string;
3028
+ value: string;
3029
+ }[];
3030
+ state: StateRef<string>;
3031
+ }
3032
+ interface GenericSubtitleEntry {
3033
+ type: 'section';
3034
+ id: string;
3035
+ label: string;
3036
+ }
3037
+ interface GenericGroupEntry {
3038
+ type: 'group';
3039
+ id: string;
3040
+ label: string;
3041
+ }
3042
+ interface GenericReadonlyEntry {
3043
+ type: 'readonly';
3044
+ id: string;
3045
+ label: string;
3046
+ value: string;
3047
+ visible?: () => boolean;
3048
+ renderValue?: () => React__default.ReactNode;
3049
+ }
3050
+ interface GenericElementEntry {
3051
+ type: 'element';
3052
+ id: string;
3053
+ element: JSX.Element;
3054
+ }
3055
+ type GenericEntryType = GenericTextEntry | GenericBoolEntry | GenericNumberEntry | GenericSelectEntry | GenericSubtitleEntry | GenericGroupEntry | GenericReadonlyEntry | GenericElementEntry;
2828
3056
 
2829
3057
  type GenericPanelApi = {
2830
3058
  customize(fn: (entries: GenericEntryType[]) => GenericEntryType[]): void;
2831
3059
  };
2832
3060
 
2833
3061
  /**
2834
- * @module viw-webgl-react
2835
- * Contains settings and type definitions for the Vim web viewer
2836
- */
2837
-
2838
- type AnySettings = WebglSettings | UltraSettings;
2839
-
2840
- type SettingsCustomization<T extends AnySettings> = (items: SettingsItem<T>[]) => SettingsItem<T>[];
2841
- type SettingsItem<T extends AnySettings> = SettingsSubtitle | SettingsToggle<T> | SettingsBox<T> | SettingsElement;
2842
- type SettingsSubtitle = {
2843
- type: 'subtitle';
2844
- key: string;
2845
- title: string;
2846
- };
2847
- type SettingsToggle<T extends AnySettings> = {
2848
- type: 'toggle';
2849
- key: string;
2850
- label: string;
2851
- getter: (settings: T) => UserBoolean;
2852
- setter: (settings: T, b: boolean) => void;
2853
- };
2854
- type SettingsBox<T extends AnySettings> = {
2855
- type: 'box';
2856
- key: string;
2857
- label: string;
2858
- info: string;
2859
- transform: (value: number) => number;
2860
- getter: (settings: T) => number;
2861
- setter: (settings: T, b: number) => void;
2862
- };
2863
- type SettingsElement = {
2864
- type: 'element';
2865
- key: string;
2866
- element: JSX.Element;
3062
+ * Reactive UI visibility API for the WebGL viewer.
3063
+ * Each member is a `StateRef<boolean>` that can be read, written, and subscribed to.
3064
+ *
3065
+ * @example
3066
+ * viewer.ui.bimTree.set(false) // Hide BIM tree
3067
+ * viewer.ui.controlBar.get() // Read current state
3068
+ * viewer.ui.axes.onChange.subscribe() // Subscribe to changes
3069
+ */
3070
+ type WebglUiApi = {
3071
+ logo: StateRef<boolean>;
3072
+ controlBar: StateRef<boolean>;
3073
+ bimTree: StateRef<boolean>;
3074
+ bimInfo: StateRef<boolean>;
3075
+ axes: StateRef<boolean>;
3076
+ performance: StateRef<boolean>;
3077
+ axesOrthographic: StateRef<boolean>;
3078
+ axesHome: StateRef<boolean>;
3079
+ cursorOrbit: StateRef<boolean>;
3080
+ cursorLookAround: StateRef<boolean>;
3081
+ cursorPan: StateRef<boolean>;
3082
+ cursorZoom: StateRef<boolean>;
3083
+ cameraAuto: StateRef<boolean>;
3084
+ cameraFrameScene: StateRef<boolean>;
3085
+ cameraFrameSelection: StateRef<boolean>;
3086
+ sectioningEnable: StateRef<boolean>;
3087
+ sectioningFitToSelection: StateRef<boolean>;
3088
+ sectioningReset: StateRef<boolean>;
3089
+ sectioningShow: StateRef<boolean>;
3090
+ sectioningAuto: StateRef<boolean>;
3091
+ sectioningSettings: StateRef<boolean>;
3092
+ measureEnable: StateRef<boolean>;
3093
+ visibilityClearSelection: StateRef<boolean>;
3094
+ visibilityShowAll: StateRef<boolean>;
3095
+ visibilityToggle: StateRef<boolean>;
3096
+ visibilityIsolate: StateRef<boolean>;
3097
+ visibilityAutoIsolate: StateRef<boolean>;
3098
+ visibilitySettings: StateRef<boolean>;
3099
+ miscProjectInspector: StateRef<boolean>;
3100
+ miscSettings: StateRef<boolean>;
3101
+ miscHelp: StateRef<boolean>;
3102
+ miscMaximise: StateRef<boolean>;
2867
3103
  };
2868
-
2869
3104
  /**
2870
- * Settings API managing settings applied to the viewer.
2871
- */
2872
- type SettingsApi<T extends AnySettings> = {
2873
- /**
2874
- * Allows updating settings by providing a callback function.
2875
- * @param updater A function that updates the current settings.
2876
- */
2877
- update: (updater: (settings: T) => void) => void;
2878
- /**
2879
- * Registers a callback function to be notified when settings are updated.
2880
- * @param callback A function to be called when settings are updated, receiving the updated settings.
2881
- */
2882
- register: (callback: (settings: T) => void) => void;
2883
- /**
2884
- * Customizes the settings panel by providing a customizer function.
2885
- * @param customizer A function that modifies the settings items.
2886
- */
2887
- customize: (customizer: (items: SettingsItem<T>[]) => SettingsItem<T>[]) => void;
3105
+ * Reactive UI visibility API for the Ultra viewer.
3106
+ */
3107
+ type UltraUiApi = {
3108
+ logo: StateRef<boolean>;
3109
+ controlBar: StateRef<boolean>;
3110
+ cursorOrbit: StateRef<boolean>;
3111
+ cursorLookAround: StateRef<boolean>;
3112
+ cursorPan: StateRef<boolean>;
3113
+ cursorZoom: StateRef<boolean>;
3114
+ cameraAuto: StateRef<boolean>;
3115
+ cameraFrameScene: StateRef<boolean>;
3116
+ cameraFrameSelection: StateRef<boolean>;
3117
+ sectioningEnable: StateRef<boolean>;
3118
+ sectioningFitToSelection: StateRef<boolean>;
3119
+ sectioningReset: StateRef<boolean>;
3120
+ sectioningShow: StateRef<boolean>;
3121
+ sectioningAuto: StateRef<boolean>;
3122
+ sectioningSettings: StateRef<boolean>;
3123
+ visibilityClearSelection: StateRef<boolean>;
3124
+ visibilityShowAll: StateRef<boolean>;
3125
+ visibilityToggle: StateRef<boolean>;
3126
+ visibilityIsolate: StateRef<boolean>;
3127
+ visibilityAutoIsolate: StateRef<boolean>;
3128
+ visibilitySettings: StateRef<boolean>;
3129
+ miscSettings: StateRef<boolean>;
3130
+ miscHelp: StateRef<boolean>;
2888
3131
  };
2889
3132
 
2890
3133
  /**
@@ -2954,10 +3197,6 @@ type WebglViewerApi = {
2954
3197
  * Control bar API managing the content and behavior of the control bar.
2955
3198
  */
2956
3199
  controlBar: ControlBarApi;
2957
- /**
2958
- * Settings API managing settings applied to the viewer.
2959
- */
2960
- settings: SettingsApi<WebglSettings>;
2961
3200
  /**
2962
3201
  * Message API to interact with the loading box.
2963
3202
  */
@@ -2980,6 +3219,16 @@ type WebglViewerApi = {
2980
3219
  * API to interact with the section box panel.
2981
3220
  */
2982
3221
  sectionBoxPanel: GenericPanelApi;
3222
+ /**
3223
+ * Reactive UI visibility controls. Each key from the settings `ui` block
3224
+ * is a `StateRef<boolean>` that can be read, written, and subscribed to.
3225
+ *
3226
+ * @example
3227
+ * viewer.ui.bimTree.set(false) // Hide BIM tree
3228
+ * viewer.ui.controlBar.get() // Read current state
3229
+ * viewer.ui.axes.onChange.subscribe(…) // Subscribe to changes
3230
+ */
3231
+ ui: WebglUiApi;
2983
3232
  /**
2984
3233
  * Cleans up and releases resources used by the viewer.
2985
3234
  */
@@ -2993,10 +3242,10 @@ type WebglViewerApi = {
2993
3242
  * @param container An optional container or DOM element. If none is provided, one will be created.
2994
3243
  * @param settings React UI feature toggles (panels, buttons). See {@link WebglSettings}.
2995
3244
  * @param coreSettings Core renderer config (camera, materials, lighting). See {@link ViewerSettings}.
2996
- * @returns A promise resolving to the viewer API.
3245
+ * @returns The viewer API.
2997
3246
  *
2998
3247
  * @example
2999
- * const viewer = await React.Webgl.createViewer(document.getElementById('app'))
3248
+ * const viewer = React.Webgl.createViewer(document.getElementById('app'))
3000
3249
  * const vim = await viewer.load({ url: 'model.vim' }).getVim()
3001
3250
  * viewer.framing.frameScene.call()
3002
3251
  */
@@ -3008,12 +3257,11 @@ declare function createWebglViewer(container?: Container | HTMLElement, settings
3008
3257
  * @param onMount A callback function triggered when the viewer is mounted. Receives a reference to the Vim viewer.
3009
3258
  * @param settings Optional settings for configuring the Vim viewer's behavior.
3010
3259
  */
3011
- declare function WebglViewerComponent(props: {
3260
+ declare const WebglViewerComponent: React.ForwardRefExoticComponent<{
3012
3261
  container: Container;
3013
3262
  viewer: IWebglViewer;
3014
- onMount: (viewer: WebglViewerApi) => void;
3015
3263
  settings?: PartialWebglSettings;
3016
- }): react_jsx_runtime.JSX.Element;
3264
+ } & React.RefAttributes<WebglViewerApi>>;
3017
3265
 
3018
3266
  declare namespace React_Webgl {
3019
3267
  export { WebglViewerComponent as ViewerComponent, createWebglViewer as createViewer, getDefaultSettings };
@@ -3065,11 +3313,6 @@ type UltraViewerApi = {
3065
3313
  * @see {@link IsolationApi}
3066
3314
  */
3067
3315
  isolation: IsolationApi;
3068
- /**
3069
- * Settings API managing UI feature toggles applied to the viewer.
3070
- * Use `update()` to modify settings at runtime.
3071
- */
3072
- settings: SettingsApi<UltraSettings>;
3073
3316
  /**
3074
3317
  * API to interact with the isolation panel.
3075
3318
  */
@@ -3078,6 +3321,15 @@ type UltraViewerApi = {
3078
3321
  * API to interact with the section box panel.
3079
3322
  */
3080
3323
  sectionBoxPanel: GenericPanelApi;
3324
+ /**
3325
+ * Reactive UI visibility controls. Each key from the settings `ui` block
3326
+ * is a `StateRef<boolean>` that can be read, written, and subscribed to.
3327
+ *
3328
+ * @example
3329
+ * viewer.ui.logo.set(false) // Hide logo
3330
+ * viewer.ui.controlBar.get() // Read current state
3331
+ */
3332
+ ui: UltraUiApi;
3081
3333
  /**
3082
3334
  * Disposes of the viewer and its resources.
3083
3335
  */
@@ -3103,10 +3355,10 @@ type UltraViewerApi = {
3103
3355
  *
3104
3356
  * @param container An optional container or DOM element. If none is provided, one will be created.
3105
3357
  * @param settings React UI feature toggles (panels, buttons). See {@link UltraSettings}.
3106
- * @returns A promise resolving to the viewer API.
3358
+ * @returns The viewer API.
3107
3359
  *
3108
3360
  * @example
3109
- * const viewer = await React.Ultra.createViewer(document.getElementById('app'))
3361
+ * const viewer = React.Ultra.createViewer(document.getElementById('app'))
3110
3362
  * await viewer.core.connect({ url: 'wss://server:8080' })
3111
3363
  * viewer.load({ url: 'model.vim' })
3112
3364
  */
@@ -3118,12 +3370,11 @@ declare function createUltraViewer(container?: Container | HTMLElement, settings
3118
3370
  * @param onMount A callback function triggered when the viewer is mounted. Receives a reference to the Vim viewer.
3119
3371
  * @param settings Optional settings for configuring the Vim viewer's behavior.
3120
3372
  */
3121
- declare function UltraViewerComponent(props: {
3373
+ declare const UltraViewerComponent: React.ForwardRefExoticComponent<{
3122
3374
  container: Container;
3123
3375
  core: IUltraViewer;
3124
3376
  settings?: PartialUltraSettings;
3125
- onMount: (viewer: UltraViewerApi) => void;
3126
- }): react_jsx_runtime.JSX.Element;
3377
+ } & React.RefAttributes<UltraViewerApi>>;
3127
3378
 
3128
3379
  declare namespace React_Ultra {
3129
3380
  export { UltraViewerComponent as ViewerComponent, createUltraViewer as createViewer, getDefaultUltraSettings };
@@ -3170,18 +3421,13 @@ declare namespace React_ControlBar {
3170
3421
  export type { ControlBarApi, ControlBarCustomization, IControlBarButton, IControlBarSection };
3171
3422
  }
3172
3423
 
3424
+ type SettingsCustomization = (items: GenericEntryType[]) => GenericEntryType[];
3425
+
3173
3426
  declare namespace React_Settings {
3174
3427
  export { isFalse, isTrue };
3175
- export type { SettingsBox, SettingsCustomization, SettingsElement, SettingsItem, SettingsSubtitle, SettingsToggle, UserBoolean };
3428
+ export type { SettingsCustomization, GenericEntryType as SettingsItem, UserBoolean };
3176
3429
  }
3177
3430
 
3178
- declare const vcColorPrimary = "vc-text-[#212733]";
3179
- declare const vcColorSecondary = "vc-text-[#787C83]";
3180
- declare const vcColorLink = "vc-text-[#0590CC]";
3181
- declare const vcLink = "vc-text-[#0590CC] vc-underline";
3182
- declare const vcLabel = "vc-text-[#3F444F]";
3183
- declare const vcRoboto = "vc-font-['Roboto',sans-serif]";
3184
- declare function footer(): react_jsx_runtime.JSX.Element;
3185
3431
  declare function mainText(text: JSX.Element): react_jsx_runtime.JSX.Element;
3186
3432
  declare function detailText(text: string): react_jsx_runtime.JSX.Element;
3187
3433
  declare function bold(text: string): react_jsx_runtime.JSX.Element;
@@ -3190,6 +3436,7 @@ declare function dotList(elements: (JSX.Element | string)[]): react_jsx_runtime.
3190
3436
  declare function numList(elements: (JSX.Element | string)[]): react_jsx_runtime.JSX.Element;
3191
3437
  declare function bullet(label: string, value: string): react_jsx_runtime.JSX.Element;
3192
3438
  declare function link(url: string, text: string): react_jsx_runtime.JSX.Element;
3439
+ declare function footer(): react_jsx_runtime.JSX.Element;
3193
3440
 
3194
3441
  declare namespace React_Errors_Style {
3195
3442
  export {
@@ -3202,12 +3449,6 @@ declare namespace React_Errors_Style {
3202
3449
  mainText,
3203
3450
  numList,
3204
3451
  subTitle,
3205
- vcColorLink,
3206
- vcColorPrimary,
3207
- vcColorSecondary,
3208
- vcLabel,
3209
- vcLink,
3210
- vcRoboto,
3211
3452
  };
3212
3453
  }
3213
3454
 
@@ -3252,6 +3493,11 @@ declare const IsolationPanel: {
3252
3493
  showGhost: string;
3253
3494
  ghostOpacity: string;
3254
3495
  transparency: string;
3496
+ outlineEnabled: string;
3497
+ outlineQuality: string;
3498
+ outlineThickness: string;
3499
+ selectionFillMode: string;
3500
+ selectionOverlayOpacity: string;
3255
3501
  };
3256
3502
  };
3257
3503
 
@@ -3259,8 +3505,8 @@ type ViewerApi = WebglViewerApi | UltraViewerApi;
3259
3505
 
3260
3506
  declare namespace React {
3261
3507
  export { React_ContextMenu as ContextMenu, React_ControlBar as ControlBar, React_Errors as Errors, React_Icons as Icons, IsolationPanel, SectionBoxPanel, React_Settings as Settings, React_Ultra as Ultra, React_Webgl as Webgl, createContainer, createState };
3262
- export type { AugmentedElement, BimInfoPanelApi, Container, Data, DataCustomization, DataRender, Entry, FramingApi, FuncRef, GenericBoolEntry, GenericEntryType, GenericNumberEntry, GenericPanelApi, GenericTextEntry, Group, IsolationApi, LoadingBoxProps, MessageBoxProps, ModalApi, ModalProps, ProgressMode, Section, SectionBoxApi, SettingsApi, StateRef, ViewerApi, VisibilityStatus };
3508
+ export type { AugmentedElement, BimInfoPanelApi, Container, Data, DataCustomization, DataRender, Entry, FramingApi, FuncRef, GenericBoolEntry, GenericEntryType, GenericNumberEntry, GenericPanelApi, GenericTextEntry, Group, IsolationApi, LoadingBoxProps, MessageBoxProps, ModalApi, ModalProps, ProgressMode, Section, SectionBoxApi, StateRef, UltraUiApi, ViewerApi, VisibilityStatus, WebglUiApi };
3263
3509
  }
3264
3510
 
3265
3511
  export { Core as Core, React as React };
3266
- export type { ISignal, ISimpleEvent };
3512
+ export type { ISignal$1 as ISignal, ISimpleEvent };