vim-web 0.3.44-dev.2 → 0.3.44-dev.4

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 (36) hide show
  1. package/dist/style.css +38 -1
  2. package/dist/types/core-viewers/ultra/index.d.ts +1 -0
  3. package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +0 -1
  4. package/dist/types/core-viewers/ultra/viewer/rpcClient.d.ts +1 -0
  5. package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +1 -0
  6. package/dist/types/core-viewers/ultra/viewer/sectionBox.d.ts +2 -5
  7. package/dist/types/core-viewers/ultra/viewer/selection.d.ts +2 -0
  8. package/dist/types/core-viewers/ultra/viewer/viewer.d.ts +2 -0
  9. package/dist/types/core-viewers/ultra/viewer/vimCollection.d.ts +4 -0
  10. package/dist/types/core-viewers/webgl/utils/threeUtils.d.ts +3 -0
  11. package/dist/types/core-viewers/webgl/viewer/gizmos/gizmos.d.ts +1 -1
  12. package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +1 -1
  13. package/dist/types/react-viewers/controlbar/controlBar.d.ts +6 -44
  14. package/dist/types/react-viewers/controlbar/controlBarButton.d.ts +3 -1
  15. package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +27 -0
  16. package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -1
  17. package/dist/types/react-viewers/panels/icons.d.ts +6 -0
  18. package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +4 -0
  19. package/dist/types/react-viewers/state/controlBarState.d.ts +39 -0
  20. package/dist/types/react-viewers/state/sectionBoxState.d.ts +33 -0
  21. package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +6 -0
  22. package/dist/types/react-viewers/ultra/ultraModal.d.ts +4 -0
  23. package/dist/types/react-viewers/ultra/ultraSectionBoxState.d.ts +3 -0
  24. package/dist/types/react-viewers/webgl/index.d.ts +0 -1
  25. package/dist/types/react-viewers/webgl/webglSectionBoxState.d.ts +3 -0
  26. package/dist/vim-web.iife.js +705 -307
  27. package/dist/vim-web.iife.js.map +1 -1
  28. package/dist/vim-web.js +706 -308
  29. package/dist/vim-web.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/types/react-viewers/controlbar/controlBarCommands.d.ts +0 -4
  32. package/dist/types/react-viewers/controlbar/sectionBoxState.d.ts +0 -15
  33. /package/dist/types/react-viewers/{controlbar → panels}/restOfScreen.d.ts +0 -0
  34. /package/dist/types/react-viewers/{controlbar → state}/fullScreenState.d.ts +0 -0
  35. /package/dist/types/react-viewers/{controlbar → state}/measureState.d.ts +0 -0
  36. /package/dist/types/react-viewers/{controlbar → state}/pointerState.d.ts +0 -0
package/dist/vim-web.js CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import * as React from "react";
5
- import React__default, { useState, useRef, useEffect, useMemo, useCallback, useImperativeHandle, useContext, Component } from "react";
5
+ import React__default, { useState, useRef, useEffect, useMemo, useCallback, useImperativeHandle, useContext, Component, useLayoutEffect } from "react";
6
6
  import ReactDOM, { flushSync as flushSync$1 } from "react-dom";
7
7
  function getDefaultExportFromCjs(x) {
8
8
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -52237,7 +52237,7 @@ class DefaultInputScheme {
52237
52237
  }
52238
52238
  }
52239
52239
  onIdleAction(hit) {
52240
- if (!this._viewer.gizmos.section.interactive) {
52240
+ if (!this._viewer.gizmos.sectionBox.interactive) {
52241
52241
  this._viewer.selection.focus(hit == null ? void 0 : hit.object);
52242
52242
  }
52243
52243
  }
@@ -54795,12 +54795,12 @@ class MeasureGizmo {
54795
54795
  const xz = this.screenDist(this._lineX.position, this._lineZ.position);
54796
54796
  const yz = this.screenDist(this._lineY.position, this._lineZ.position);
54797
54797
  let conflicts = 0;
54798
- if (lx !== void 0 && lx < 0.1) conflicts++;
54799
- if (ly !== void 0 && ly < 0.1) conflicts++;
54800
- if (lz !== void 0 && lz < 0.1) conflicts++;
54801
- if (xy !== void 0 && xy < 0.1) conflicts++;
54802
- if (xz !== void 0 && xz < 0.1) conflicts++;
54803
- if (yz !== void 0 && yz < 0.1) conflicts++;
54798
+ if (lx !== void 0 && lx < 0.3) conflicts++;
54799
+ if (ly !== void 0 && ly < 0.3) conflicts++;
54800
+ if (lz !== void 0 && lz < 0.3) conflicts++;
54801
+ if (xy !== void 0 && xy < 0.3) conflicts++;
54802
+ if (xz !== void 0 && xz < 0.3) conflicts++;
54803
+ if (yz !== void 0 && yz < 0.3) conflicts++;
54804
54804
  const collapse2 = conflicts > 1;
54805
54805
  this._label.visible = collapse2;
54806
54806
  this._line.label.visible = !collapse2;
@@ -54830,6 +54830,7 @@ class MeasureGizmo {
54830
54830
  this._line.mesh.visible = false;
54831
54831
  this._line.label.visible = false;
54832
54832
  }
54833
+ this._label.visible = false;
54833
54834
  this._viewer.renderer.needsUpdate = true;
54834
54835
  }
54835
54836
  /**
@@ -54879,7 +54880,9 @@ class MeasureGizmo {
54879
54880
  * Disposes all resources.
54880
54881
  */
54881
54882
  dispose() {
54883
+ console.log("dispose");
54882
54884
  if (this._animId !== void 0) cancelAnimationFrame(this._animId);
54885
+ this._html.div.remove();
54883
54886
  this._viewer.renderer.remove(this._group);
54884
54887
  this._startMarker.dispose();
54885
54888
  this._endMarker.dispose();
@@ -55464,7 +55467,7 @@ class SectionBoxHandle extends Mesh {
55464
55467
  trackCamera(camera2) {
55465
55468
  const rescale = () => {
55466
55469
  const size = camera2.frustrumSizeAt(this.position);
55467
- this.scale.set(size.x * 5e-3, size.x * 5e-3, size.x * 5e-3);
55470
+ this.scale.set(size.x * 3e-3, size.x * 3e-3, size.x * 3e-3);
55468
55471
  };
55469
55472
  this._camSub = camera2.onMoved.subscribe(() => rescale());
55470
55473
  rescale();
@@ -55628,6 +55631,9 @@ let SectionBox$1 = class SectionBox {
55628
55631
  this.update();
55629
55632
  };
55630
55633
  this._inputs.onBoxConfirm = (box) => this._onBoxConfirm.dispatch(box);
55634
+ viewer.renderer.onBoxUpdated.subscribe(() => {
55635
+ this.fitBox(viewer.renderer.getBoundingBox());
55636
+ });
55631
55637
  this.clip = false;
55632
55638
  this.visible = false;
55633
55639
  this.interactive = false;
@@ -55728,6 +55734,7 @@ let SectionBox$1 = class SectionBox {
55728
55734
  set visible(value) {
55729
55735
  if (value === this._visible) return;
55730
55736
  this._gizmos.visible = value;
55737
+ this._visible = value;
55731
55738
  if (value) {
55732
55739
  this.update();
55733
55740
  }
@@ -55744,11 +55751,10 @@ let SectionBox$1 = class SectionBox {
55744
55751
  * @param box - The bounding box to match (required).
55745
55752
  * @param padding - The scalar amount by which to expand the bounding box. Default is `1`.
55746
55753
  */
55747
- fitBox(box, padding = 1) {
55754
+ fitBox(box) {
55748
55755
  if (!box) return;
55749
- const b = box.expandByScalar(padding);
55750
- this._gizmos.fitBox(b);
55751
- this.renderer.section.fitBox(b);
55756
+ this._gizmos.fitBox(box);
55757
+ this.renderer.section.fitBox(box);
55752
55758
  this._onBoxConfirm.dispatch(this.box);
55753
55759
  this.renderer.needsUpdate = true;
55754
55760
  }
@@ -55758,7 +55764,7 @@ let SectionBox$1 = class SectionBox {
55758
55764
  * Call this if the renderer's section box is changed by code outside this class.
55759
55765
  */
55760
55766
  update() {
55761
- this.fitBox(this.section.box, 0);
55767
+ this.fitBox(this.section.box);
55762
55768
  this.renderer.needsUpdate = true;
55763
55769
  }
55764
55770
  /**
@@ -55780,7 +55786,7 @@ class Gizmos {
55780
55786
  /**
55781
55787
  * The section box gizmo.
55782
55788
  */
55783
- __publicField(this, "section");
55789
+ __publicField(this, "sectionBox");
55784
55790
  /**
55785
55791
  * The loading indicator gizmo.
55786
55792
  */
@@ -55804,7 +55810,7 @@ class Gizmos {
55804
55810
  var _a2;
55805
55811
  this.viewer = viewer;
55806
55812
  this._measure = new Measure(viewer);
55807
- this.section = new SectionBox$1(viewer);
55813
+ this.sectionBox = new SectionBox$1(viewer);
55808
55814
  this.loading = new GizmoLoading(viewer);
55809
55815
  this.orbit = new GizmoOrbit(
55810
55816
  viewer.renderer,
@@ -55833,7 +55839,7 @@ class Gizmos {
55833
55839
  var _a2;
55834
55840
  (_a2 = this.viewer.viewport.canvas.parentElement) == null ? void 0 : _a2.removeChild(this.axes.canvas);
55835
55841
  this._measure.clear();
55836
- this.section.dispose();
55842
+ this.sectionBox.dispose();
55837
55843
  this.loading.dispose();
55838
55844
  this.orbit.dispose();
55839
55845
  this.rectangle.dispose();
@@ -57993,7 +57999,6 @@ class Marshal {
57993
57999
  }
57994
58000
  // -------------------- SectionBox -------------------
57995
58001
  writeSectionBoxState(data2) {
57996
- this.writeBoolean(data2.enabled);
57997
58002
  this.writeBoolean(data2.visible);
57998
58003
  this.writeBoolean(data2.interactible);
57999
58004
  this.writeBoolean(data2.clip);
@@ -58149,13 +58154,11 @@ class ReadMarshal {
58149
58154
  return new Segment(position, target);
58150
58155
  }
58151
58156
  readSectionBoxState() {
58152
- const enabled = this.readBoolean();
58153
58157
  const visible2 = this.readBoolean();
58154
58158
  const interactible = this.readBoolean();
58155
58159
  const clip = this.readBoolean();
58156
58160
  const box = this.readBox3();
58157
58161
  return {
58158
- enabled,
58159
58162
  visible: visible2,
58160
58163
  interactible,
58161
58164
  clip,
@@ -58274,6 +58277,12 @@ class RpcClient {
58274
58277
  marshal.writeUInt(componentHandle);
58275
58278
  this._socket.sendRPC(marshal);
58276
58279
  }
58280
+ RPCEnableSectionBox(value) {
58281
+ const marshal = new Marshal();
58282
+ marshal.writeString("RPCEnableSectionBox");
58283
+ marshal.writeBoolean(value);
58284
+ this._socket.sendRPC(marshal);
58285
+ }
58277
58286
  async RPCFrameAll(blendTime) {
58278
58287
  const marshal = new Marshal();
58279
58288
  marshal.writeString("RPCFrameAll");
@@ -59117,6 +59126,9 @@ class RpcSafeClient {
59117
59126
  * SECTION BOX METHODS
59118
59127
  * Methods for controlling section box visibility and position.
59119
59128
  ******************************************************************************/
59129
+ RPCEnableSectionBox(enable) {
59130
+ this.rpc.RPCEnableSectionBox(enable);
59131
+ }
59120
59132
  RPCSetSectionBox(state) {
59121
59133
  this.rpc.RPCSetSectionBox(state);
59122
59134
  }
@@ -61267,10 +61279,14 @@ class ViewerSelection {
61267
61279
  __publicField(this, "_rpc");
61268
61280
  __publicField(this, "_vims");
61269
61281
  __publicField(this, "_selectedNodes");
61282
+ __publicField(this, "_onValueChanged", new distExports$1.SignalDispatcher());
61270
61283
  this._rpc = rpc;
61271
61284
  this._vims = vims;
61272
61285
  this._selectedNodes = /* @__PURE__ */ new Map();
61273
61286
  }
61287
+ get onValueChanged() {
61288
+ return this._onValueChanged.asEvent();
61289
+ }
61274
61290
  /**
61275
61291
  * Gets the total number of selected nodes across all VIMs.
61276
61292
  * @returns The total count of selected nodes.
@@ -61339,12 +61355,17 @@ class ViewerSelection {
61339
61355
  nodeSet = /* @__PURE__ */ new Set();
61340
61356
  this._selectedNodes.set(vim, nodeSet);
61341
61357
  }
61358
+ let changed = false;
61342
61359
  nodes.forEach((n) => {
61343
61360
  if (!nodeSet.has(n)) {
61344
61361
  nodeSet.add(n);
61345
61362
  vim.highlight([n]);
61363
+ changed = true;
61346
61364
  }
61347
61365
  });
61366
+ if (changed) {
61367
+ this._onValueChanged.dispatch();
61368
+ }
61348
61369
  }
61349
61370
  /**
61350
61371
  * Removes the specified node(s) from the current selection.
@@ -61356,27 +61377,37 @@ class ViewerSelection {
61356
61377
  const nodeSet = this._selectedNodes.get(vim);
61357
61378
  if (!nodeSet) return;
61358
61379
  const nodes = Array.isArray(node) ? node : [node];
61380
+ let changed = false;
61359
61381
  nodes.forEach((n) => {
61360
61382
  if (nodeSet.has(n)) {
61361
61383
  nodeSet.delete(n);
61362
61384
  vim.removeHighlight([n], "visible");
61385
+ changed = true;
61363
61386
  }
61364
61387
  });
61365
61388
  if (nodeSet.size === 0) {
61366
61389
  this._selectedNodes.delete(vim);
61367
61390
  }
61391
+ if (changed) {
61392
+ this._onValueChanged.dispatch();
61393
+ }
61368
61394
  }
61369
61395
  /**
61370
61396
  * Clears all selections across all VIMs or for a specific VIM.
61371
61397
  * @param vim - Optional. If provided, only clears selections for the specified VIM.
61372
61398
  */
61373
61399
  clear(vim) {
61400
+ let changed = false;
61374
61401
  this._selectedNodes.forEach((nodes, v) => {
61375
61402
  if (vim === void 0 || v === vim) {
61376
61403
  v.removeHighlight(Array.from(nodes), "visible");
61404
+ changed = true;
61377
61405
  }
61378
61406
  });
61379
61407
  this._selectedNodes.clear();
61408
+ if (changed) {
61409
+ this._onValueChanged.dispatch();
61410
+ }
61380
61411
  }
61381
61412
  /**
61382
61413
  * Calculates the bounding box encompassing all selected nodes.
@@ -61405,8 +61436,12 @@ class ViewerSelection {
61405
61436
  class VimCollection {
61406
61437
  constructor() {
61407
61438
  __publicField(this, "_vims");
61439
+ __publicField(this, "_onChanged", new distExports$1.SignalDispatcher());
61408
61440
  this._vims = [];
61409
61441
  }
61442
+ get onChanged() {
61443
+ return this._onChanged.asEvent();
61444
+ }
61410
61445
  get count() {
61411
61446
  return this._vims.length;
61412
61447
  }
@@ -61417,6 +61452,7 @@ class VimCollection {
61417
61452
  add(vim) {
61418
61453
  if (!this._vims.some((v) => v.handle === vim.handle)) {
61419
61454
  this._vims.push(vim);
61455
+ this._onChanged.dispatch();
61420
61456
  }
61421
61457
  }
61422
61458
  /**
@@ -61424,7 +61460,11 @@ class VimCollection {
61424
61460
  * @param vim - The Vim instance to remove.
61425
61461
  */
61426
61462
  remove(vim) {
61463
+ const count = this._vims.length;
61427
61464
  this._vims = this._vims.filter((v) => v.handle !== vim.handle);
61465
+ if (this._vims.length !== count) {
61466
+ this._onChanged.dispatch();
61467
+ }
61428
61468
  }
61429
61469
  /**
61430
61470
  * Gets a Vim instance by its handle.
@@ -61687,7 +61727,6 @@ class Renderer2 {
61687
61727
  }
61688
61728
  class SectionBox2 {
61689
61729
  constructor(rpc) {
61690
- __publicField(this, "_enabled", false);
61691
61730
  __publicField(this, "_visible", true);
61692
61731
  __publicField(this, "_interactible", true);
61693
61732
  __publicField(this, "_clip", true);
@@ -61706,6 +61745,7 @@ class SectionBox2 {
61706
61745
  return this._animationFrame > 0;
61707
61746
  }
61708
61747
  async onConnect() {
61748
+ this._rpc.RPCEnableSectionBox(true);
61709
61749
  this.push();
61710
61750
  this._interval = setInterval(() => this.pull(), 1e3);
61711
61751
  }
@@ -61720,10 +61760,9 @@ class SectionBox2 {
61720
61760
  if (this.needUpdate) return;
61721
61761
  const state = await this._rpc.RPCGetSectionBox();
61722
61762
  let changed = false;
61723
- if (state.enabled !== this._enabled || state.visible !== this._visible || state.interactible !== this._interactible || state.clip !== this._clip || state.box !== this._box) {
61763
+ if (state.visible !== this._visible || state.interactible !== this._interactible || state.clip !== this._clip || state.box !== this._box) {
61724
61764
  changed = true;
61725
61765
  }
61726
- this._enabled = state.enabled;
61727
61766
  this._visible = state.visible;
61728
61767
  this._interactible = state.interactible;
61729
61768
  this._clip = state.clip;
@@ -61734,20 +61773,12 @@ class SectionBox2 {
61734
61773
  }
61735
61774
  async push() {
61736
61775
  await this._rpc.RPCSetSectionBox({
61737
- enabled: this._enabled,
61738
61776
  visible: this._visible,
61739
61777
  interactible: this._interactible,
61740
61778
  clip: this._clip,
61741
61779
  box: this._box
61742
61780
  });
61743
61781
  }
61744
- get enabled() {
61745
- return this._enabled;
61746
- }
61747
- set enabled(value) {
61748
- this._enabled = value;
61749
- this.scheduleUpdate();
61750
- }
61751
61782
  get visible() {
61752
61783
  return this._visible;
61753
61784
  }
@@ -61755,10 +61786,10 @@ class SectionBox2 {
61755
61786
  this._visible = value;
61756
61787
  this.scheduleUpdate();
61757
61788
  }
61758
- get interactible() {
61789
+ get interactive() {
61759
61790
  return this._interactible;
61760
61791
  }
61761
- set interactible(value) {
61792
+ set interactive(value) {
61762
61793
  this._interactible = value;
61763
61794
  this.scheduleUpdate();
61764
61795
  }
@@ -61868,6 +61899,9 @@ class Viewer2 {
61868
61899
  get decoder() {
61869
61900
  return this._decoder;
61870
61901
  }
61902
+ get selection() {
61903
+ return this._selection;
61904
+ }
61871
61905
  /**
61872
61906
  * Gets the current URL to which the viewer is connected.
61873
61907
  * @returns The URL as a string, or undefined if not connected.
@@ -66498,6 +66532,31 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
66498
66532
  wrapper: "div",
66499
66533
  clickable: false
66500
66534
  }), _defineProperty(_class2, "supportedWrappers", ["div", "span"]), _defineProperty(_class2, "displayName", "ReactTooltip"), _class2)) || _class) || _class) || _class) || _class) || _class) || _class) || _class;
66535
+ function slidersHoriz({ height, width, fill: fill2, className }) {
66536
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
66537
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66538
+ "path",
66539
+ {
66540
+ fill: fill2,
66541
+ d: "M24,74h111.163c6.293,15.258,21.308,26,38.837,26s32.543-10.742,38.837-26h19.163c8.836,0,16-7.164,16-16s-7.164-16-16-16h-19.163c-6.293-15.258-21.308-26-38.837-26s-32.543,10.742-38.837,26H24c-8.836,0-16,7.164-16,16s7.164,16,16,16Zm132.083-17.637c.014-.151,.031-.301,.048-.451,.05-.435,.116-.864,.197-1.289,.021-.11,.037-.222,.06-.331,.106-.503,.236-.998,.383-1.484,.046-.153,.1-.303,.15-.455,.116-.35,.242-.694,.379-1.033,.067-.167,.132-.336,.204-.5,.189-.433,.393-.859,.615-1.273,.092-.173,.196-.339,.294-.508,.15-.26,.305-.517,.467-.768,.133-.205,.268-.409,.409-.608,.147-.208,.302-.41,.458-.611,.28-.362,.572-.713,.878-1.053,.13-.146,.259-.293,.395-.435,.212-.221,.432-.435,.656-.645,.116-.109,.234-.215,.354-.321,.787-.703,1.634-1.338,2.535-1.896,.1-.062,.199-.123,.3-.182,.304-.181,.612-.356,.928-.519,2.464-1.27,5.25-2,8.208-2s5.744,.73,8.208,2c.315,.163,.624,.338,.928,.519,.101,.06,.201,.121,.3,.182,.901,.558,1.749,1.193,2.535,1.896,.119,.106,.238,.212,.354,.321,.224,.21,.443,.424,.656,.645,.135,.142,.264,.289,.395,.435,.306,.34,.599,.691,.878,1.053,.155,.202,.311,.403,.458,.611,.141,.199,.276,.403,.409,.608,.163,.251,.317,.508,.467,.768,.098,.169,.202,.335,.294,.508,.222,.415,.425,.84,.615,1.273,.072,.165,.137,.333,.204,.5,.137,.339,.263,.684,.379,1.033,.05,.151,.104,.301,.15,.455,.147,.487,.277,.981,.383,1.484,.023,.109,.039,.221,.06,.331,.081,.425,.147,.854,.197,1.289,.018,.15,.035,.3,.048,.451,.049,.54,.083,1.084,.083,1.637s-.034,1.097-.083,1.637c-.014,.151-.031,.301-.048,.451-.05,.435-.116,.864-.197,1.289-.021,.11-.037,.222-.06,.331-.106,.503-.236,.998-.383,1.484-.046,.153-.1,.303-.15,.455-.116,.35-.242,.694-.379,1.033-.067,.167-.132,.336-.204,.5-.189,.433-.393,.859-.615,1.273-.092,.173-.196,.339-.294,.508-.15,.26-.305,.517-.467,.768-.133,.205-.268,.409-.409,.608-.147,.208-.302,.41-.458,.611-.28,.362-.572,.713-.878,1.053-.13,.146-.259,.293-.395,.435-.212,.221-.432,.435-.656,.645-.116,.109-.234,.215-.354,.321-.787,.703-1.634,1.338-2.535,1.896-.1,.062-.199,.123-.3,.182-.304,.181-.612,.356-.928,.519-2.464,1.27-5.25,2-8.208,2s-5.744-.73-8.208-2c-.315-.163-.624-.338-.928-.519-.101-.06-.201-.121-.3-.182-.901-.558-1.749-1.193-2.535-1.896-.119-.106-.238-.212-.354-.321-.224-.21-.443-.424-.656-.645-.135-.142-.264-.289-.395-.435-.306-.34-.599-.691-.878-1.053-.155-.202-.311-.403-.458-.611-.141-.199-.276-.403-.409-.608-.163-.251-.317-.508-.467-.768-.098-.169-.202-.335-.294-.508-.222-.415-.425-.84-.615-1.273-.072-.165-.137-.333-.204-.5-.137-.339-.263-.684-.379-1.033-.05-.151-.104-.301-.15-.455-.147-.487-.277-.981-.383-1.484-.023-.109-.039-.221-.06-.331-.081-.425-.147-.854-.197-1.289-.018-.15-.035-.3-.048-.451-.049-.54-.083-1.084-.083-1.637s.034-1.097,.083-1.637Z"
66542
+ }
66543
+ ),
66544
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66545
+ "path",
66546
+ {
66547
+ fill: fill2,
66548
+ d: "M232,112H120.837c-6.293-15.258-21.308-26-38.837-26s-32.543,10.742-38.837,26H24c-8.836,0-16,7.164-16,16s7.164,16,16,16h19.163c6.293,15.258,21.308,26,38.837,26s32.543-10.742,38.837-26h111.163c8.836,0,16-7.164,16-16s-7.164-16-16-16Zm-132.083,17.637c-.014,.151-.031,.301-.048,.451-.05,.435-.116,.864-.197,1.289-.021,.11-.037,.222-.06,.331-.106,.503-.236,.998-.383,1.484-.046,.153-.1,.303-.15,.455-.116,.35-.242,.694-.379,1.033-.067,.167-.132,.336-.204,.5-.189,.433-.393,.859-.615,1.273-.092,.173-.196,.339-.294,.508-.15,.26-.305,.517-.467,.768-.133,.205-.268,.409-.409,.608-.147,.208-.302,.41-.458,.611-.28,.362-.572,.713-.878,1.053-.13,.146-.259,.293-.395,.435-.212,.221-.432,.435-.656,.645-.116,.109-.234,.215-.354,.321-.787,.703-1.634,1.338-2.535,1.896-.1,.062-.199,.123-.3,.182-.304,.181-.612,.356-.928,.519-2.464,1.27-5.25,2-8.208,2s-5.744-.73-8.208-2c-.315-.163-.624-.338-.928-.519-.101-.06-.201-.121-.3-.182-.901-.558-1.749-1.193-2.535-1.896-.119-.106-.238-.212-.354-.321-.224-.21-.443-.424-.656-.645-.135-.142-.264-.289-.395-.435-.306-.34-.599-.691-.878-1.053-.155-.202-.311-.403-.458-.611-.141-.199-.276-.403-.409-.608-.163-.251-.317-.508-.467-.768-.098-.169-.202-.335-.294-.508-.222-.415-.425-.84-.615-1.273-.072-.165-.137-.333-.204-.5-.137-.339-.263-.684-.379-1.033-.05-.151-.104-.301-.15-.455-.147-.487-.277-.981-.383-1.484-.023-.109-.039-.221-.06-.331-.081-.425-.147-.854-.197-1.289-.018-.15-.035-.3-.048-.451-.049-.54-.083-1.084-.083-1.637s.034-1.097,.083-1.637c.014-.151,.031-.301,.048-.451,.05-.435,.116-.864,.197-1.289,.021-.11,.037-.222,.06-.331,.106-.503,.236-.998,.383-1.484,.046-.153,.1-.303,.15-.455,.116-.35,.242-.694,.379-1.033,.067-.167,.132-.336,.204-.5,.189-.433,.393-.859,.615-1.273,.092-.173,.196-.339,.294-.508,.15-.26,.305-.517,.467-.768,.133-.205,.268-.409,.409-.608,.147-.208,.302-.41,.458-.611,.28-.362,.572-.713,.878-1.053,.13-.146,.259-.293,.395-.435,.212-.221,.432-.435,.656-.645,.116-.109,.234-.215,.354-.321,.787-.703,1.634-1.338,2.535-1.896,.1-.062,.199-.123,.3-.182,.304-.181,.612-.356,.928-.519,2.464-1.27,5.25-2,8.208-2s5.744,.73,8.208,2c.315,.163,.624,.338,.928,.519,.101,.06,.201,.121,.3,.182,.901,.558,1.749,1.193,2.535,1.896,.119,.106,.238,.212,.354,.321,.224,.21,.443,.424,.656,.645,.135,.142,.264,.289,.395,.435,.306,.34,.599,.691,.878,1.053,.155,.202,.311,.403,.458,.611,.141,.199,.276,.403,.409,.608,.163,.251,.317,.508,.467,.768,.098,.169,.202,.335,.294,.508,.222,.415,.425,.84,.615,1.273,.072,.165,.137,.333,.204,.5,.137,.339,.263,.684,.379,1.033,.05,.151,.104,.301,.15,.455,.147,.487,.277,.981,.383,1.484,.023,.109,.039,.221,.06,.331,.081,.425,.147,.854,.197,1.289,.018,.15,.035,.3,.048,.451,.049,.54,.083,1.084,.083,1.637s-.034,1.097-.083,1.637Z"
66549
+ }
66550
+ ),
66551
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66552
+ "path",
66553
+ {
66554
+ fill: fill2,
66555
+ d: "M232,182h-19.163c-6.293-15.258-21.308-26-38.837-26s-32.543,10.742-38.837,26H24c-8.836,0-16,7.164-16,16s7.164,16,16,16h111.163c6.293,15.258,21.308,26,38.837,26s32.543-10.742,38.837-26h19.163c8.836,0,16-7.164,16-16s-7.164-16-16-16Zm-40.083,17.637c-.014,.151-.031,.301-.048,.451-.05,.435-.116,.864-.197,1.289-.021,.11-.037,.222-.06,.331-.106,.503-.236,.998-.383,1.484-.046,.153-.1,.303-.15,.455-.116,.35-.242,.694-.379,1.033-.067,.167-.132,.336-.204,.5-.189,.433-.393,.859-.615,1.273-.092,.173-.196,.339-.294,.508-.15,.26-.305,.517-.467,.768-.133,.205-.268,.409-.409,.608-.147,.208-.302,.41-.458,.611-.28,.362-.572,.713-.878,1.053-.13,.146-.259,.293-.395,.435-.212,.221-.432,.435-.656,.645-.116,.109-.234,.215-.354,.321-.787,.703-1.634,1.338-2.535,1.896-.1,.062-.199,.123-.3,.182-.304,.181-.612,.356-.928,.519-2.464,1.27-5.25,2-8.208,2s-5.744-.73-8.208-2c-.315-.163-.624-.338-.928-.519-.101-.06-.201-.121-.3-.182-.901-.558-1.749-1.193-2.535-1.896-.119-.106-.238-.212-.354-.321-.224-.21-.443-.424-.656-.645-.135-.142-.264-.289-.395-.435-.306-.34-.599-.691-.878-1.053-.155-.202-.311-.403-.458-.611-.141-.199-.276-.403-.409-.608-.163-.251-.317-.508-.467-.768-.098-.169-.202-.335-.294-.508-.222-.415-.425-.84-.615-1.273-.072-.165-.137-.333-.204-.5-.137-.339-.263-.684-.379-1.033-.05-.151-.104-.301-.15-.455-.147-.487-.277-.981-.383-1.484-.023-.109-.039-.221-.06-.331-.081-.425-.147-.854-.197-1.289-.018-.15-.035-.3-.048-.451-.049-.54-.083-1.084-.083-1.637s.034-1.097,.083-1.637c.014-.151,.031-.301,.048-.451,.05-.435,.116-.864,.197-1.289,.021-.11,.037-.222,.06-.331,.106-.503,.236-.998,.383-1.484,.046-.153,.1-.303,.15-.455,.116-.35,.242-.694,.379-1.033,.067-.167,.132-.336,.204-.5,.189-.433,.393-.859,.615-1.273,.092-.173,.196-.339,.294-.508,.15-.26,.305-.517,.467-.768,.133-.205,.268-.409,.409-.608,.147-.208,.302-.41,.458-.611,.28-.362,.572-.713,.878-1.053,.13-.146,.259-.293,.395-.435,.212-.221,.432-.435,.656-.645,.116-.109,.234-.215,.354-.321,.787-.703,1.634-1.338,2.535-1.896,.1-.062,.199-.123,.3-.182,.304-.181,.612-.356,.928-.519,2.464-1.27,5.25-2,8.208-2s5.744,.73,8.208,2c.315,.163,.624,.338,.928,.519,.101,.06,.201,.121,.3,.182,.901,.558,1.749,1.193,2.535,1.896,.119,.106,.238,.212,.354,.321,.224,.21,.443,.424,.656,.645,.135,.142,.264,.289,.395,.435,.306,.34,.599,.691,.878,1.053,.155,.202,.311,.403,.458,.611,.141,.199,.276,.403,.409,.608,.163,.251,.317,.508,.467,.768,.098,.169,.202,.335,.294,.508,.222,.415,.425,.84,.615,1.273,.072,.165,.137,.333,.204,.5,.137,.339,.263,.684,.379,1.033,.05,.151,.104,.301,.15,.455,.147,.487,.277,.981,.383,1.484,.023,.109,.039,.221,.06,.331,.081,.425,.147,.854,.197,1.289,.018,.15,.035,.3,.048,.451,.049,.54,.083,1.084,.083,1.637s-.034,1.097-.083,1.637Z"
66556
+ }
66557
+ )
66558
+ ] });
66559
+ }
66501
66560
  function settings({ height, width, fill: fill2, className }) {
66502
66561
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, height, width, viewBox: "0 0 256 256", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
66503
66562
  "path",
@@ -67032,6 +67091,60 @@ function measure({ height, width, fill: fill2, className }) {
67032
67091
  )
67033
67092
  ] });
67034
67093
  }
67094
+ function sectionBoxSettings({ height, width, fill: fill2, className }) {
67095
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67096
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67097
+ "path",
67098
+ {
67099
+ fill: fill2,
67100
+ d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
67101
+ }
67102
+ ),
67103
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67104
+ "path",
67105
+ {
67106
+ fill: fill2,
67107
+ d: "m 175.57713,226.38215 c -1.28316,3.98514 -5.40414,6.14971 -9.13315,4.86244 l -3.60809,-1.24739 c -3.76004,-1.29737 -5.86799,-5.60846 -4.70379,-9.64145 l 0.42438,-1.46966 c 0.96925,-3.3572 -0.3989,-7.74539 -3.07521,-9.81798 l -0.73032,-0.56682 c -2.66882,-2.0641 -7.02118,-2.10184 -9.7235,-0.0863 l -1.1842,0.8837 c -3.23919,2.42089 -7.76901,1.59565 -10.07644,-1.77642 l -2.23242,-3.26259 c -2.3254,-3.40131 -1.6226,-8.22657 1.51812,-10.73784 l 1.15669,-0.92571 c 2.63933,-2.1082 3.9555,-6.51288 2.93126,-9.86426 l -0.27844,-0.91558 c -1.01877,-3.33861 -4.52035,-6.09072 -7.821,-6.14815 l -1.44661,-0.0253 c -3.95551,-0.0693 -7.1652,-3.56724 -7.1652,-7.7374 v -4.03725 c 0,-4.20531 3.2372,-7.66991 7.1652,-7.73745 l 1.44661,-0.0251 c 3.30016,-0.0568 6.79826,-2.79894 7.821,-6.14974 l 0.27844,-0.91348 c 1.02023,-3.33859 -0.29193,-7.75605 -2.93126,-9.86586 l -1.15669,-0.9241 c -3.16419,-2.52987 -3.82354,-7.3652 -1.51812,-10.73784 l 2.23242,-3.2647 c 2.32739,-3.39921 6.86326,-4.17603 10.07644,-1.77645 l 1.1842,0.88372 c 2.70232,2.01782 7.04471,1.98645 9.7235,-0.086 l 0.73032,-0.56467 c 2.66683,-2.06414 4.04446,-6.46083 3.07521,-9.81803 l -0.42438,-1.47176 c -1.1627,-4.02504 0.97525,-8.35208 4.70379,-9.63935 l 3.60809,-1.24738 c 3.76004,-1.299493 7.84798,0.87146 9.13315,4.86086 l 0.46987,1.4569 c 1.07175,3.32157 4.60331,6.0152 7.91546,6.0152 h 0.90232 c 3.30011,0 6.84321,-2.69363 7.91345,-6.0152 l 0.46988,-1.4569 c 1.28517,-3.98301 5.40663,-6.148123 9.13516,-4.86033 l 3.60808,1.24739 c 3.76006,1.29738 5.86803,5.60632 4.70383,9.63932 l -0.42441,1.47179 c -0.96925,3.35722 0.39893,7.7454 3.07522,9.81798 l 0.73029,0.56467 c 2.66883,2.06622 7.02122,2.10401 9.72154,0.0862 l 1.1842,-0.88369 c 3.23916,-2.41874 7.77099,-1.59353 10.0764,1.77644 l 2.23444,3.26469 c 2.32542,3.40132 1.62261,8.22656 -1.51812,10.73784 l -1.15667,0.92409 c -2.63936,2.11036 -3.95552,6.51504 -2.93328,9.86586 l 0.28043,0.91346 c 1.01873,3.34022 4.52035,6.09284 7.82101,6.14975 l 1.44514,0.0251 c 3.95749,0.0671 7.16516,3.56725 7.16516,7.73741 v 4.03729 c 0,4.20314 -3.23717,7.66987 -7.16516,7.73739 l -1.44514,0.0254 c -3.30016,0.0568 -6.79828,2.79678 -7.82101,6.14812 l -0.28043,0.91562 c -1.01872,3.33856 0.29392,7.75601 2.93328,9.86424 l 1.15667,0.92571 c 3.16422,2.52985 3.82355,7.36522 1.51812,10.73786 l -2.23444,3.26254 c -2.32537,3.40135 -6.86123,4.17815 -10.0764,1.77645 l -1.1842,-0.88373 c -2.70032,-2.01569 -7.04322,-1.98646 -9.72154,0.086 l -0.73029,0.56681 c -2.66683,2.06412 -4.04447,6.46079 -3.07522,9.81801 l 0.42441,1.46964 c 1.1627,4.02717 -0.97526,8.3542 -4.70383,9.64146 l -3.60808,1.24739 c -3.76002,1.29736 -7.84798,-0.87146 -9.13516,-4.86248 l -0.46988,-1.45474 c -1.06973,-3.32157 -4.60133,-6.01523 -7.91345,-6.01523 h -0.90232 c -3.30013,0 -6.84323,2.69366 -7.91546,6.01523 l -0.46987,1.45474 z m 8.83473,-24.33631 c 18.77473,0 33.99232,-16.18681 33.99232,-36.15723 0,-19.97043 -15.21759,-36.1551 -33.99232,-36.1551 -18.77467,0 -33.9903,16.18681 -33.9903,36.1551 0,19.96828 15.21761,36.15723 33.9903,36.15723 z"
67108
+ }
67109
+ )
67110
+ ] });
67111
+ }
67112
+ function sectionBoxAuto({ height, width, fill: fill2, className }) {
67113
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67114
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67115
+ "path",
67116
+ {
67117
+ fill: fill2,
67118
+ d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
67119
+ }
67120
+ ),
67121
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67122
+ "path",
67123
+ {
67124
+ fill: fill2,
67125
+ d: "M 221.207314 217.240532 L 214.827314 200.469532 L 160.504314 200.469532 L 154.124314 217.604532 C 151.632314 224.288532 149.506314 228.815532 147.744314 231.186532 C 145.981314 233.494532 143.095314 234.649532 139.085314 234.649532 C 135.682314 234.649532 132.674314 233.403532 130.061314 230.912532 C 127.448314 228.420532 126.142314 225.595532 126.142314 222.435532 C 126.142314 220.612532 126.446314 218.729532 127.053314 216.784532 C 127.661314 214.840532 128.664314 212.137532 130.061314 208.672532 L 164.241314 121.901532 C 165.213314 119.410532 166.368314 116.432532 167.704314 112.969532 C 169.102314 109.444532 170.560314 106.528532 172.079314 104.219532 C 173.659314 101.911532 175.695314 100.057532 178.186314 98.660532 C 180.738314 97.201532 183.868314 96.471532 187.574314 96.471532 C 191.342314 96.471532 194.471314 97.201532 196.962314 98.660532 C 199.514314 100.057532 201.550314 101.879532 203.069314 104.128532 C 204.649314 106.376532 205.955314 108.807532 206.988314 111.419532 C 208.082314 113.971532 209.449314 117.405532 211.090314 121.719532 L 245.999314 207.943532 C 248.733314 214.505532 250.100314 219.275532 250.100314 222.253532 C 250.100314 225.352532 248.794314 228.209532 246.181314 230.822532 C 243.629314 233.373532 240.530314 234.649532 236.884314 234.649532 C 234.758314 234.649532 232.935314 234.254532 231.416314 233.464532 C 229.896314 232.735532 228.620314 231.732532 227.587314 230.456532 C 226.554314 229.119532 225.430314 227.115532 224.215314 224.440532 C 223.060314 221.706532 222.058314 219.306532 221.207314 217.240532 Z M 167.613314 180.143532 L 207.535314 180.143532 L 187.392314 125.000532 Z"
67126
+ }
67127
+ )
67128
+ ] });
67129
+ }
67130
+ function sectionBoxVisible({ height, width, fill: fill2, className }) {
67131
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67132
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67133
+ "path",
67134
+ {
67135
+ fill: fill2,
67136
+ d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
67137
+ }
67138
+ ),
67139
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67140
+ "path",
67141
+ {
67142
+ fill: fill2,
67143
+ d: "m 186.05204,115.30607 c -37.93016,0 -68.67906,39.581 -68.67906,59.64313 0,21.35677 30.7489,59.64312 68.67906,59.64312 37.93016,0 68.67906,-38.28635 68.67906,-59.64312 0,-20.06213 -30.7489,-59.64313 -68.67906,-59.64313 z m 40.42729,85.41349 c -6.9441,6.83951 -21.43002,18.31368 -40.42729,18.31368 -18.99727,0 -33.48265,-11.47417 -40.42728,-18.31368 -11.61642,-11.4411 -15.37445,-22.30263 -15.37445,-25.77036 0,-0.0305 0.0381,-3.14164 3.35186,-9.36916 2.8652,-5.38603 7.15818,-11.06056 12.08697,-15.97917 3.66628,-3.65833 9.40099,-8.61065 16.72067,-12.50626 -6.58514,7.55977 -10.6973,18.2333 -10.6973,30.07505 0,22.91463 15.37445,41.49087 34.33953,41.49087 18.96508,0 34.33953,-18.57624 34.33953,-41.49087 0,-5.71277 -0.95614,-11.15521 -2.68492,-16.10818 -0.0445,9.9792 -6.75148,18.05306 -15.0214,18.05306 -8.26992,0 -15.02354,-8.12702 -15.02354,-18.15225 0,-8.97953 5.39774,-16.43168 12.48617,-17.88905 11.9346,3.73548 21.13062,11.40091 26.2676,16.52763 4.92879,4.91861 9.22177,10.59379 12.08697,15.97917 3.31377,6.22752 3.35186,9.33869 3.35186,9.36916 0,3.46773 -3.75803,14.32926 -15.37445,25.77036 z"
67144
+ }
67145
+ )
67146
+ ] });
67147
+ }
67035
67148
  function sectionBox({ height, width, fill: fill2, className }) {
67036
67149
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67037
67150
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -67050,6 +67163,31 @@ function sectionBox({ height, width, fill: fill2, className }) {
67050
67163
  )
67051
67164
  ] });
67052
67165
  }
67166
+ function sectionBoxDisable({ height, width, fill: fill2, className }) {
67167
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67168
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67169
+ "path",
67170
+ {
67171
+ fill: fill2,
67172
+ d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
67173
+ }
67174
+ ),
67175
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67176
+ "path",
67177
+ {
67178
+ fill: fill2,
67179
+ d: "m 185.61601,192.28388 v -44.0883 c 0,-2.52838 -1.97182,-4.91709 -4.84542,-5.26996 -3.49833,-0.42965 -6.4956,1.9253 -6.4956,4.89027 v 44.08783 c 0,2.52885 1.97182,4.91756 4.84542,5.27043 3.49833,0.42965 6.4956,-1.92531 6.4956,-4.89027 z m 22.68149,0 v -44.0883 c 0,-2.52838 -1.97182,-4.91709 -4.84542,-5.26996 -3.49832,-0.42965 -6.49559,1.9253 -6.49559,4.89027 v 44.08783 c 0,2.52885 1.97182,4.91756 4.84542,5.27043 3.49832,0.42965 6.49559,-1.92531 6.49559,-4.89027 z m 38.18908,-71.6429 H 225.42553 V 105.9623 c 0,-2.80818 -2.61299,-5.08498 -5.83584,-5.08498 h -56.43703 c -3.22285,0 -5.83585,2.2768 -5.83585,5.08498 v 14.67868 h -21.23089 c -4.69044,0 -8.49236,3.31275 -8.49236,7.39969 v 0.0231 c 0,4.08694 3.80192,7.39969 8.49236,7.39969 h 110.40066 c 4.69044,0 8.49236,-3.31275 8.49236,-7.39969 v -0.0231 c 0,-4.08694 -3.80192,-7.39969 -8.49236,-7.39969 z m -35.23745,-6.4863 v 6.4863 h -39.75592 v -6.4863 a 1.0615448,0.92496161 0 0 1 1.06155,-0.92496 h 37.63282 a 1.0615448,0.92496161 0 0 1 1.06155,0.92496 z"
67180
+ }
67181
+ ),
67182
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67183
+ "path",
67184
+ {
67185
+ fill: fill2,
67186
+ d: "m 227.42894,215.76405 c 0,5.6549 -4.47215,10.23953 -9.98832,10.23953 h -49.76957 c -5.51617,0 -9.98832,-4.58463 -9.98832,-10.23953 v -69.72083 a 4.9863693,5.1117785 0 0 0 -4.98637,-5.11178 h -10.00391 a 4.9863693,5.1117785 0 0 0 -4.98637,5.11178 v 73.13422 c 0,15.08038 11.92553,27.30584 26.63594,27.30584 h 56.42825 c 14.71041,0 26.63594,-12.22546 26.63594,-27.30584 v -73.13422 a 4.9863693,5.1117785 0 0 0 -4.98637,-5.11178 h -10.0039 a 4.9863693,5.1117785 0 0 0 -4.98637,5.11178 v 69.72147 z"
67187
+ }
67188
+ )
67189
+ ] });
67190
+ }
67053
67191
  function sectionBoxClip({ height, width, fill: fill2, className }) {
67054
67192
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67055
67193
  /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
@@ -67131,6 +67269,24 @@ function sectionBoxShrink({ height, width, fill: fill2, className }) {
67131
67269
  ) })
67132
67270
  ] });
67133
67271
  }
67272
+ function sectionBoxShrink2({ height, width, fill: fill2, className }) {
67273
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67274
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67275
+ "path",
67276
+ {
67277
+ fill: fill2,
67278
+ d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
67279
+ }
67280
+ ),
67281
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67282
+ "path",
67283
+ {
67284
+ fill: fill2,
67285
+ d: "m 223.41166,231.92815 -50.05,-51.82677 -21.39562,22.15515 -21.52251,-81.36695 78.57748,22.28655 -21.39561,22.15516 50.05002,51.82676 z"
67286
+ }
67287
+ )
67288
+ ] });
67289
+ }
67134
67290
  function ghost({ height, width, fill: fill2, className }) {
67135
67291
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, width: height, height: width, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { "data-name": "ICONS", children: [
67136
67292
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -67190,11 +67346,17 @@ const icons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
67190
67346
  pan,
67191
67347
  perspective,
67192
67348
  sectionBox,
67349
+ sectionBoxAuto,
67193
67350
  sectionBoxClip,
67351
+ sectionBoxDisable,
67194
67352
  sectionBoxIgnore,
67195
67353
  sectionBoxReset,
67354
+ sectionBoxSettings,
67196
67355
  sectionBoxShrink,
67356
+ sectionBoxShrink2,
67357
+ sectionBoxVisible,
67197
67358
  settings,
67359
+ slidersHoriz,
67198
67360
  toggleIsolation,
67199
67361
  trash,
67200
67362
  treeView,
@@ -67214,9 +67376,6 @@ function anyUiAxesButton(settings2) {
67214
67376
  function anyUiCursorButton(settings2) {
67215
67377
  return isTrue(settings2.ui.orbit) || isTrue(settings2.ui.lookAround) || isTrue(settings2.ui.pan) || isTrue(settings2.ui.zoom) || isTrue(settings2.ui.zoomWindow) || isTrue(settings2.ui.zoomToFit);
67216
67378
  }
67217
- function anyUiToolButton(settings2) {
67218
- return isTrue(settings2.ui.sectioningMode) || isTrue(settings2.ui.measuringMode) || isTrue(settings2.ui.toggleIsolation);
67219
- }
67220
67379
  function anyUiSettingButton(settings2) {
67221
67380
  return isTrue(settings2.ui.projectInspector) || isTrue(settings2.ui.settings) || isTrue(settings2.ui.help) || isTrue(settings2.ui.maximise);
67222
67381
  }
@@ -67348,7 +67507,7 @@ function AxesPanel(props) {
67348
67507
  }
67349
67508
  );
67350
67509
  const hidden2 = isTrue(props.settings.value.ui.axesPanel) ? "" : " vc-hidden";
67351
- const createBar2 = () => {
67510
+ const createBar = () => {
67352
67511
  if (!anyUiAxesButton(props.settings.value)) {
67353
67512
  return (
67354
67513
  // Keeps layout when all buttons are disabled.
@@ -67370,7 +67529,7 @@ function AxesPanel(props) {
67370
67529
  className: "vim-axes-panel vc-pointer-events-none vc-absolute vc-overflow-hidden vc-z-20 vc-flex vc-flex-col vc-border vc-border-white vc-opacity-50 vc-shadow-lg vc-saturate-0 vc-transition-all hover:vc-opacity-100 hover:vc-saturate-100" + hidden2,
67371
67530
  children: [
67372
67531
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gizmoDiv, className: "vim-axes-panel-gizmo vc-absolute vc-pointer-events-auto" }),
67373
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children: createBar2() })
67532
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children: createBar() })
67374
67533
  ]
67375
67534
  }
67376
67535
  );
@@ -67379,22 +67538,96 @@ const btnStyle = "vim-control-bar-button vc-rounded-full vc-items-center vc-just
67379
67538
  function buttonDefaultStyle(on) {
67380
67539
  return on ? btnStyle + " vc-text-primary" : btnStyle + " vc-text-gray-medium";
67381
67540
  }
67541
+ function buttonExpandStyle(on) {
67542
+ return on ? btnStyle + " vc-text-white vc-bg-primary" : btnStyle + " vc-text-gray-medium";
67543
+ }
67544
+ function buttonDisableStyle(on) {
67545
+ return on ? btnStyle + " vc-text-gray-medium" : btnStyle + " vc-text-gray vc-pointer-events-none";
67546
+ }
67382
67547
  function buttonBlueStyle(on) {
67383
67548
  return btnStyle + " vc-text-white";
67384
67549
  }
67385
67550
  function createButton(button) {
67386
67551
  var _a2;
67387
67552
  if (button.enabled !== void 0 && !button.enabled()) return null;
67388
- const style = button.style((_a2 = button.isOn) == null ? void 0 : _a2.call(button));
67389
- return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { "data-tip": button.tip, onClick: button.action, className: style, type: "button", children: button.icon({ height: "20", width: "20", fill: "currentColor", className: "vc-max-h-[80%]" }) }, button.id);
67553
+ const style = (button.style ?? buttonDefaultStyle)((_a2 = button.isOn) == null ? void 0 : _a2.call(button));
67554
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { id: button.id, "data-tip": button.tip, onClick: button.action, className: style, type: "button", children: button.icon({ height: "20", width: "20", fill: "currentColor", className: "vc-max-h-[80%]" }) }, button.id);
67390
67555
  }
67391
- const sectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-px-2 vc-shadow-md";
67556
+ const sectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-shadow-md";
67392
67557
  const sectionDefaultStyle = sectionStyle + " vc-bg-white";
67393
67558
  const sectionBlueStyle = sectionStyle + " vc-bg-primary";
67559
+ const sectionNoPadStyle = sectionStyle.replace("vc-px-2", "") + " vc-bg-white";
67394
67560
  function createSection$1(section) {
67395
67561
  if (section.enable !== void 0 && !section.enable()) return null;
67396
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-control-bar-section ${section.style}`, children: section.buttons.map((b) => createButton(b)) }, section.id);
67562
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-control-bar-section ${section.style ?? sectionDefaultStyle}`, children: section.buttons.map((b) => createButton(b)) }, section.id);
67397
67563
  }
67564
+ const elementIds = {
67565
+ // Sections
67566
+ sectionCamera: "controlBar.sectionCamera",
67567
+ sectionActions: "controlBar.sectionActions",
67568
+ sectionTools: "controlBar.sectionTools",
67569
+ sectionSettings: "controlBar.sectionSettings",
67570
+ sectionMeasure: "controlBar.sectionMeasure",
67571
+ sectionSectionBox: "controlBar.sectionSectionBox",
67572
+ // Camera buttons
67573
+ buttonCameraOrbit: "controlBar.camera.orbit",
67574
+ buttonCameraLook: "controlBarcamera.look",
67575
+ buttonCameraPan: "controlBar.camera.pan",
67576
+ buttonCameraZoom: "controlBar.camera.zoom",
67577
+ buttonCameraZoomWindow: "controlBar.camera.zoomWindow",
67578
+ // Settings buttons
67579
+ buttonProjectInspector: "controlBar.projectInspector",
67580
+ buttonSettings: "controlBar.settings",
67581
+ buttonHelp: "controlBar.help",
67582
+ buttonMaximize: "controlBar.maximize",
67583
+ // Action Buttons
67584
+ buttonToggleIsolation: "controlBar.action.toggleIsolation",
67585
+ buttonZoomToFit: "controlBar.action.zoomToFit",
67586
+ // Tools buttons
67587
+ buttonSectionBox: "controlBar.sectionBox",
67588
+ buttonMeasure: "controlBar.measure",
67589
+ // Section box buttons
67590
+ buttonSectionBoxEnable: "controlBar.sectionBox.enable",
67591
+ buttonSectionBoxVisible: "controlBar.sectionBox.visible",
67592
+ buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
67593
+ buttonSectionBoxAuto: "controlBar.sectionBox.auto",
67594
+ buttonSectionBoxClip: "controlBar.sectionBox.clip",
67595
+ buttonSectionBoxSettings: "controlBar.sectionBox.settings"
67596
+ };
67597
+ function ControlBar(props) {
67598
+ useEffect(() => {
67599
+ ReactTooltip.rebuild();
67600
+ });
67601
+ if (!props.show) {
67602
+ return null;
67603
+ }
67604
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
67605
+ "div",
67606
+ {
67607
+ style: {
67608
+ gap: "min(10px, 2%)",
67609
+ bottom: "min(36px, 10%)"
67610
+ },
67611
+ id: "vim-control-bar",
67612
+ className: "vim-control-bar vc-pointer-events-auto vc-flex-wrap vc-mx-2 vc-min-w-0 vc-absolute vc-left-0 vc-right-0 vc-z-20 vc-flex vc-items-center vc-justify-center transition-all",
67613
+ children: props.content.map(createSection$1)
67614
+ }
67615
+ );
67616
+ }
67617
+ const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67618
+ __proto__: null,
67619
+ ControlBar,
67620
+ buttonBlueStyle,
67621
+ buttonDefaultStyle,
67622
+ buttonDisableStyle,
67623
+ buttonExpandStyle,
67624
+ createButton,
67625
+ createSection: createSection$1,
67626
+ elementIds,
67627
+ sectionBlueStyle,
67628
+ sectionDefaultStyle,
67629
+ sectionNoPadStyle
67630
+ }, Symbol.toStringTag, { value: "Module" }));
67398
67631
  function getPointerState(viewer) {
67399
67632
  const [mode, setMode] = useState(viewer.inputs.pointerActive);
67400
67633
  useEffect(() => {
@@ -67456,52 +67689,6 @@ function getFullScreenState() {
67456
67689
  }
67457
67690
  };
67458
67691
  }
67459
- function getSectionBoxState(viewer) {
67460
- const sectionGizmo = viewer.gizmos.section;
67461
- const first = useRef(true);
67462
- const [section, setSection] = useState({
67463
- clip: sectionGizmo.clip,
67464
- active: sectionGizmo.visible && sectionGizmo.interactive
67465
- });
67466
- useEffect(() => {
67467
- const subSection = sectionGizmo.onStateChanged.subscribe(
67468
- () => setSection({
67469
- clip: sectionGizmo.clip,
67470
- active: sectionGizmo.visible && sectionGizmo.interactive
67471
- })
67472
- );
67473
- return () => subSection();
67474
- }, []);
67475
- const toggle = () => {
67476
- ReactTooltip.hide();
67477
- if (viewer.inputs.pointerActive === "rect") {
67478
- viewer.inputs.pointerActive = viewer.inputs.pointerFallback;
67479
- }
67480
- const next = !(sectionGizmo.visible && sectionGizmo.interactive);
67481
- sectionGizmo.interactive = next;
67482
- sectionGizmo.visible = next;
67483
- if (next && first.current) {
67484
- sectionGizmo.clip = true;
67485
- sectionGizmo.fitBox(viewer.renderer.getBoundingBox());
67486
- first.current = false;
67487
- }
67488
- };
67489
- return {
67490
- clip: section.clip,
67491
- active: section.active,
67492
- set: setSection,
67493
- toggle,
67494
- hide: () => {
67495
- sectionGizmo.visible = false;
67496
- sectionGizmo.interactive = false;
67497
- },
67498
- reset: () => sectionGizmo.fitBox(viewer.renderer.getBoundingBox()),
67499
- shrinkToSelection: () => sectionGizmo.fitBox(viewer.selection.getBoundingBox()),
67500
- toggleClip: () => {
67501
- sectionGizmo.clip = !section.clip;
67502
- }
67503
- };
67504
- }
67505
67692
  function pointerToCursor(pointer) {
67506
67693
  switch (pointer) {
67507
67694
  case "orbit":
@@ -67553,13 +67740,13 @@ class CursorManager {
67553
67740
  const sub2 = this._viewer.inputs.onPointerOverrideChanged.subscribe(
67554
67741
  () => this._updateCursor()
67555
67742
  );
67556
- const sub3 = this._viewer.gizmos.section.onStateChanged.subscribe(() => {
67557
- if (!this._viewer.gizmos.section.visible) {
67743
+ const sub3 = this._viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
67744
+ if (!this._viewer.gizmos.sectionBox.visible) {
67558
67745
  this._boxHover = false;
67559
67746
  this._updateCursor();
67560
67747
  }
67561
67748
  });
67562
- const sub4 = this._viewer.gizmos.section.onHover.subscribe((hover) => {
67749
+ const sub4 = this._viewer.gizmos.sectionBox.onHover.subscribe((hover) => {
67563
67750
  this._boxHover = hover;
67564
67751
  this._updateCursor();
67565
67752
  });
@@ -67622,59 +67809,77 @@ function getMeasureState(viewer, cursor) {
67622
67809
  clear
67623
67810
  };
67624
67811
  }
67625
- const elementIds = {
67626
- // Sections
67627
- sectionCamera: "controlBar.sectionCamera",
67628
- sectionTools: "controlBar.sectionTools",
67629
- sectionSettings: "controlBar.sectionSettings",
67630
- sectionMeasure: "controlBar.sectionMeasure",
67631
- sectionSectionBox: "controlBar.sectionSectionBox",
67632
- // Camera buttons
67633
- buttonCameraOrbit: "controlBar.camera.orbit",
67634
- buttonCameraLook: "controlBarcamera.look",
67635
- buttonCameraPan: "controlBar.camera.pan",
67636
- buttonCameraZoom: "controlBar.camera.zoom",
67637
- buttonCameraZoomWindow: "controlBar.camera.zoomWindow",
67638
- buttonCameraZoomToFit: "controlBar.camera.zoomToFit",
67639
- // Settings buttons
67640
- buttonProjectInspector: "controlBar.projectInspector",
67641
- buttonSettings: "controlBar.settings",
67642
- buttonHelp: "controlBar.help",
67643
- buttonMaximize: "controlBar.maximize",
67644
- // Tools buttons
67645
- buttonSectionBox: "controlBar.sectionBox",
67646
- buttonMeasure: "controlBar.measure",
67647
- buttonToggleIsolation: "controlBar.toggleIsolation",
67648
- // Measure buttons
67649
- buttonMeasureDelete: "controlBar.measure.delete",
67650
- buttonMeasureDone: "controlBar.measure.done",
67651
- // Section box buttons
67652
- buttonSectionBoxReset: "controlBar.sectionBox.reset",
67653
- buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
67654
- buttonSectionBoxClip: "controlBar.sectionBox.clip",
67655
- buttonSectionBoxIgnore: "controlBar.sectionBox.ignore",
67656
- buttonSectionBoxDone: "controlBar.sectionBox.done"
67657
- };
67658
- function ControlBar(props) {
67659
- var _a2;
67660
- const pointer = getPointerState(props.viewer);
67661
- const fullScreen = getFullScreenState();
67662
- const section = getSectionBoxState(props.viewer);
67663
- const measure$1 = getMeasureState(props.viewer, props.cursor);
67664
- useEffect(() => {
67665
- ReactTooltip.rebuild();
67666
- });
67667
- if (isFalse(props.settings.ui.controlBar)) {
67668
- return null;
67669
- }
67670
- const cameraSection = {
67812
+ function controlBarSectionBox(section, hasSelection) {
67813
+ return {
67814
+ id: elementIds.sectionSectionBox,
67815
+ style: section.getEnable() ? sectionNoPadStyle : sectionDefaultStyle,
67816
+ //enable: () => section.getEnable(),
67817
+ buttons: [
67818
+ {
67819
+ id: elementIds.buttonSectionBoxEnable,
67820
+ tip: "Enable Section Box",
67821
+ isOn: () => section.getEnable(),
67822
+ style: (on) => buttonExpandStyle(on),
67823
+ action: () => section.setEnable(!section.getEnable()),
67824
+ icon: sectionBox
67825
+ },
67826
+ {
67827
+ id: elementIds.buttonSectionBoxShrinkToSelection,
67828
+ tip: "Fit Section",
67829
+ enabled: () => section.getEnable(),
67830
+ isOn: () => hasSelection,
67831
+ style: (on) => buttonDisableStyle(on),
67832
+ action: () => section.sectionSelection(),
67833
+ icon: sectionBoxShrink
67834
+ },
67835
+ {
67836
+ id: elementIds.buttonSectionBoxClip,
67837
+ tip: "Reset Section",
67838
+ enabled: () => section.getEnable(),
67839
+ style: (on) => buttonDefaultStyle(on),
67840
+ action: () => section.sectionReset(),
67841
+ icon: sectionBoxReset
67842
+ },
67843
+ {
67844
+ id: elementIds.buttonSectionBoxVisible,
67845
+ tip: "Show Section Box",
67846
+ enabled: () => section.getEnable(),
67847
+ isOn: () => section.getVisible(),
67848
+ style: (on) => buttonDefaultStyle(on),
67849
+ action: () => section.setVisible(!section.getVisible()),
67850
+ icon: visible
67851
+ },
67852
+ {
67853
+ id: elementIds.buttonSectionBoxAuto,
67854
+ tip: "Auto Section",
67855
+ enabled: () => section.getEnable(),
67856
+ isOn: () => section.getAuto(),
67857
+ style: (on) => buttonDefaultStyle(on),
67858
+ action: () => section.setAuto(!section.getAuto()),
67859
+ icon: sectionBoxAuto
67860
+ },
67861
+ {
67862
+ id: elementIds.buttonSectionBoxSettings,
67863
+ tip: "Section Settings",
67864
+ enabled: () => section.getEnable(),
67865
+ isOn: () => section.getOffsetVisible(),
67866
+ style: (on) => buttonDefaultStyle(on),
67867
+ action: () => section.setOffsetsVisible(!section.getOffsetVisible()),
67868
+ icon: slidersHoriz
67869
+ }
67870
+ ]
67871
+ };
67872
+ }
67873
+ function controlBarPointer(viewer, camera2, settings2, section) {
67874
+ const pointer = getPointerState(viewer);
67875
+ return {
67671
67876
  id: elementIds.sectionCamera,
67672
- enable: () => anyUiCursorButton(props.settings),
67877
+ enable: () => anyUiCursorButton(settings2),
67673
67878
  style: sectionDefaultStyle,
67674
67879
  buttons: [
67675
67880
  {
67676
67881
  id: elementIds.buttonCameraOrbit,
67677
- enabled: () => isTrue(props.settings.ui.orbit),
67882
+ enabled: () => isTrue(settings2.ui.orbit),
67678
67883
  tip: "Orbit",
67679
67884
  action: () => pointer.onButton("orbit"),
67680
67885
  icon: orbit,
@@ -67683,7 +67888,7 @@ function ControlBar(props) {
67683
67888
  },
67684
67889
  {
67685
67890
  id: elementIds.buttonCameraLook,
67686
- enabled: () => isTrue(props.settings.ui.lookAround),
67891
+ enabled: () => isTrue(settings2.ui.lookAround),
67687
67892
  tip: "Look Around",
67688
67893
  action: () => pointer.onButton("look"),
67689
67894
  icon: look,
@@ -67692,7 +67897,7 @@ function ControlBar(props) {
67692
67897
  },
67693
67898
  {
67694
67899
  id: elementIds.buttonCameraPan,
67695
- enabled: () => isTrue(props.settings.ui.pan),
67900
+ enabled: () => isTrue(settings2.ui.pan),
67696
67901
  tip: "Pan",
67697
67902
  action: () => pointer.onButton("pan"),
67698
67903
  icon: pan,
@@ -67701,7 +67906,7 @@ function ControlBar(props) {
67701
67906
  },
67702
67907
  {
67703
67908
  id: elementIds.buttonCameraZoom,
67704
- enabled: () => isTrue(props.settings.ui.zoom),
67909
+ enabled: () => isTrue(settings2.ui.zoom),
67705
67910
  tip: "Zoom",
67706
67911
  action: () => pointer.onButton("zoom"),
67707
67912
  icon: zoom,
@@ -67710,59 +67915,87 @@ function ControlBar(props) {
67710
67915
  },
67711
67916
  {
67712
67917
  id: elementIds.buttonCameraZoomWindow,
67713
- enabled: () => isTrue(props.settings.ui.zoomWindow),
67918
+ enabled: () => isTrue(settings2.ui.zoomWindow),
67714
67919
  tip: "Zoom Window",
67715
67920
  action: () => {
67716
67921
  pointer.onButton("rect");
67717
- section.hide();
67718
67922
  },
67719
67923
  icon: frameRect,
67720
67924
  isOn: () => pointer.mode === "rect",
67721
67925
  style: buttonDefaultStyle
67722
- },
67926
+ }
67927
+ ]
67928
+ };
67929
+ }
67930
+ function controlBarActions(camera2, settings2, isolation, measure$1) {
67931
+ return {
67932
+ id: elementIds.sectionActions,
67933
+ enable: () => true,
67934
+ style: sectionDefaultStyle,
67935
+ buttons: [
67723
67936
  {
67724
- id: elementIds.buttonCameraZoomToFit,
67725
- enabled: () => isTrue(props.settings.ui.zoomToFit),
67937
+ id: elementIds.buttonZoomToFit,
67938
+ enabled: () => isTrue(settings2.ui.zoomToFit),
67726
67939
  tip: "Zoom to Fit",
67727
- action: () => props.camera.frameContext(),
67940
+ action: () => camera2.frameContext(),
67728
67941
  icon: frameSelection,
67729
67942
  isOn: () => false,
67730
67943
  style: buttonDefaultStyle
67944
+ },
67945
+ {
67946
+ id: elementIds.buttonToggleIsolation,
67947
+ enabled: () => isTrue(settings2.ui.toggleIsolation),
67948
+ tip: "Toggle Isolation",
67949
+ action: () => isolation.toggle("controlBar"),
67950
+ icon: toggleIsolation,
67951
+ style: buttonDefaultStyle
67952
+ },
67953
+ {
67954
+ id: elementIds.buttonMeasure,
67955
+ enabled: () => isTrue(settings2.ui.measuringMode),
67956
+ isOn: () => measure$1.active,
67957
+ tip: "Measuring Mode",
67958
+ action: () => measure$1.toggle(),
67959
+ icon: measure,
67960
+ style: buttonDefaultStyle
67731
67961
  }
67732
67962
  ]
67733
67963
  };
67734
- const settingsSection = {
67964
+ }
67965
+ function controlBarSettings(modal, side, settings$1) {
67966
+ const fullScreen = getFullScreenState();
67967
+ return {
67735
67968
  id: elementIds.sectionSettings,
67736
- enable: () => anyUiSettingButton(props.settings),
67969
+ enable: () => anyUiSettingButton(settings$1),
67737
67970
  style: sectionDefaultStyle,
67738
67971
  buttons: [
67739
67972
  {
67740
67973
  id: elementIds.buttonProjectInspector,
67741
- enabled: () => isTrue(props.settings.ui.projectInspector) && (isTrue(props.settings.ui.bimTreePanel) || isTrue(props.settings.ui.bimInfoPanel)),
67974
+ enabled: () => isTrue(settings$1.ui.projectInspector) && (isTrue(settings$1.ui.bimTreePanel) || isTrue(settings$1.ui.bimInfoPanel)),
67742
67975
  tip: "Project Inspector",
67743
- action: () => props.side.toggleContent("bim"),
67976
+ action: () => side.toggleContent("bim"),
67744
67977
  icon: treeView,
67745
67978
  style: buttonDefaultStyle
67746
67979
  },
67747
67980
  {
67748
67981
  id: elementIds.buttonSettings,
67749
- enabled: () => isTrue(props.settings.ui.settings),
67982
+ enabled: () => isTrue(settings$1.ui.settings),
67750
67983
  tip: "Settings",
67751
- action: () => props.side.toggleContent("settings"),
67984
+ action: () => side.toggleContent("settings"),
67752
67985
  icon: settings,
67753
67986
  style: buttonDefaultStyle
67754
67987
  },
67755
67988
  {
67756
67989
  id: elementIds.buttonHelp,
67757
- enabled: () => isTrue(props.settings.ui.help),
67990
+ enabled: () => isTrue(settings$1.ui.help),
67758
67991
  tip: "Help",
67759
- action: () => props.modal.help(true),
67992
+ action: () => modal.help(true),
67760
67993
  icon: help,
67761
67994
  style: buttonDefaultStyle
67762
67995
  },
67763
67996
  {
67764
67997
  id: elementIds.buttonMaximize,
67765
- enabled: () => isTrue(props.settings.ui.maximise) && props.settings.capacity.canGoFullScreen,
67998
+ enabled: () => isTrue(settings$1.ui.maximise) && settings$1.capacity.canGoFullScreen,
67766
67999
  tip: fullScreen.get() ? "Minimize" : "Fullscreen",
67767
68000
  action: () => fullScreen.toggle(),
67768
68001
  icon: fullScreen.get() ? minimize : fullsScreen,
@@ -67770,112 +68003,23 @@ function ControlBar(props) {
67770
68003
  }
67771
68004
  ]
67772
68005
  };
67773
- const sectionBoxSection = {
67774
- id: elementIds.sectionSectionBox,
67775
- enable: () => !measure$1.active && section.active,
67776
- style: sectionBlueStyle,
67777
- buttons: [
67778
- {
67779
- id: elementIds.buttonSectionBoxReset,
67780
- tip: "Reset Section Box",
67781
- action: () => section.reset(),
67782
- icon: sectionBoxReset,
67783
- style: buttonBlueStyle
67784
- },
67785
- {
67786
- id: elementIds.buttonSectionBoxShrinkToSelection,
67787
- tip: "Shrink to Selection",
67788
- action: () => section.shrinkToSelection(),
67789
- icon: sectionBoxShrink,
67790
- style: buttonBlueStyle
67791
- },
67792
- {
67793
- id: elementIds.buttonSectionBoxClip,
67794
- tip: section.clip ? "Ignore Section Box" : "Clip Section Box",
67795
- action: () => section.toggleClip(),
67796
- icon: section.clip ? sectionBoxIgnore : sectionBoxClip,
67797
- style: buttonBlueStyle
67798
- },
67799
- {
67800
- id: elementIds.buttonSectionBoxDone,
67801
- tip: "Done",
67802
- action: () => section.toggle(),
67803
- icon: checkmark,
67804
- style: buttonBlueStyle
67805
- }
67806
- ]
67807
- };
67808
- const measureSection = {
67809
- id: elementIds.sectionMeasure,
67810
- enable: () => measure$1.active && !section.active,
67811
- style: sectionBlueStyle,
67812
- buttons: [
67813
- {
67814
- id: elementIds.buttonMeasureDelete,
67815
- tip: "Delete",
67816
- action: () => measure$1.clear(),
67817
- icon: trash,
67818
- style: buttonBlueStyle
67819
- },
67820
- {
67821
- id: elementIds.buttonMeasureDone,
67822
- tip: "Done",
67823
- action: () => measure$1.toggle(),
67824
- icon: checkmark,
67825
- style: buttonBlueStyle
67826
- }
67827
- ]
67828
- };
67829
- const toolSections = {
67830
- id: elementIds.sectionTools,
67831
- enable: () => anyUiToolButton(props.settings) && !measure$1.active && !section.active,
67832
- style: measure$1.active || section.active ? sectionBlueStyle : sectionDefaultStyle,
67833
- buttons: [
67834
- {
67835
- id: elementIds.buttonSectionBox,
67836
- enabled: () => isTrue(props.settings.ui.sectioningMode),
67837
- tip: "Sectioning Mode",
67838
- action: () => section.toggle(),
67839
- icon: sectionBox,
67840
- style: buttonDefaultStyle
67841
- },
67842
- {
67843
- id: elementIds.buttonMeasure,
67844
- enabled: () => isTrue(props.settings.ui.measuringMode),
67845
- tip: "Measuring Mode",
67846
- action: () => measure$1.toggle(),
67847
- icon: measure,
67848
- style: buttonDefaultStyle
67849
- },
67850
- {
67851
- id: elementIds.buttonToggleIsolation,
67852
- enabled: () => isTrue(props.settings.ui.toggleIsolation),
67853
- tip: "Toggle Isolation",
67854
- action: () => props.isolation.toggle("controlBar"),
67855
- icon: toggleIsolation,
67856
- style: buttonDefaultStyle
67857
- }
67858
- ]
67859
- };
67860
- let controlBar2 = [cameraSection, toolSections, measureSection, sectionBoxSection, settingsSection];
67861
- controlBar2 = ((_a2 = props.customization) == null ? void 0 : _a2.call(props, controlBar2)) ?? controlBar2;
67862
- return createBar(controlBar2);
67863
68006
  }
67864
- function createBar(sections) {
67865
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
67866
- gap: "min(10px, 2%)",
67867
- bottom: "min(36px, 10%)"
67868
- }, className: "vim-control-bar vc-pointer-events-auto vc-flex-wrap vc-mx-2 vc-min-w-0 vc-absolute vc-left-0 vc-right-0 vc-z-20 vc-flex vc-items-center vc-justify-center transition-all", children: sections.map(createSection$1) });
68007
+ function useControlBar(viewer, camera2, modal, side, isolation, cursor, settings2, section, customization) {
68008
+ const measure2 = getMeasureState(viewer, cursor);
68009
+ const pointerSection = controlBarPointer(viewer, camera2, settings2);
68010
+ const actionSection = controlBarActions(camera2, settings2, isolation, measure2);
68011
+ const sectionBoxSection = controlBarSectionBox(section, viewer.selection.count > 0);
68012
+ const settingsSection = controlBarSettings(modal, side, settings2);
68013
+ let controlBarSections = [
68014
+ pointerSection,
68015
+ actionSection,
68016
+ sectionBoxSection,
68017
+ // Optional section
68018
+ settingsSection
68019
+ ];
68020
+ controlBarSections = (customization == null ? void 0 : customization(controlBarSections)) ?? controlBarSections;
68021
+ return controlBarSections;
67869
68022
  }
67870
- const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67871
- __proto__: null,
67872
- ControlBar,
67873
- buttonBlueStyle,
67874
- buttonDefaultStyle,
67875
- elementIds,
67876
- sectionBlueStyle,
67877
- sectionDefaultStyle
67878
- }, Symbol.toStringTag, { value: "Module" }));
67879
68023
  function RestOfScreen(props) {
67880
68024
  const [, setVersion] = useState(0);
67881
68025
  const resizeObserver = useRef();
@@ -71864,23 +72008,23 @@ function VimContextMenu(props) {
71864
72008
  const viewer = props.viewer;
71865
72009
  const camera2 = props.camera;
71866
72010
  const [section, setSection] = useState({
71867
- visible: viewer.gizmos.section.visible,
71868
- clip: viewer.gizmos.section.clip
72011
+ visible: viewer.gizmos.sectionBox.visible,
72012
+ clip: viewer.gizmos.sectionBox.clip
71869
72013
  });
71870
72014
  const isClipping = () => {
71871
- return !viewer.gizmos.section.box.containsBox(viewer.renderer.getBoundingBox());
72015
+ return !viewer.gizmos.sectionBox.box.containsBox(viewer.renderer.getBoundingBox());
71872
72016
  };
71873
72017
  const [clipping, setClipping] = useState(isClipping());
71874
72018
  const [, setVersion] = useState(0);
71875
72019
  const hidden2 = props.isolation.isActive();
71876
72020
  useEffect(() => {
71877
- const subState = viewer.gizmos.section.onStateChanged.subscribe(() => {
72021
+ const subState = viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
71878
72022
  setSection({
71879
- visible: viewer.gizmos.section.visible,
71880
- clip: viewer.gizmos.section.clip
72023
+ visible: viewer.gizmos.sectionBox.visible,
72024
+ clip: viewer.gizmos.sectionBox.clip
71881
72025
  });
71882
72026
  });
71883
- const subConfirm = viewer.gizmos.section.onBoxConfirm.subscribe(
72027
+ const subConfirm = viewer.gizmos.sectionBox.onBoxConfirm.subscribe(
71884
72028
  () => setClipping(isClipping())
71885
72029
  );
71886
72030
  props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
@@ -71932,10 +72076,10 @@ function VimContextMenu(props) {
71932
72076
  e.stopPropagation();
71933
72077
  };
71934
72078
  const onSectionToggleBtn = (e) => {
71935
- viewer.gizmos.section.clip = !viewer.gizmos.section.clip;
72079
+ viewer.gizmos.sectionBox.clip = !viewer.gizmos.sectionBox.clip;
71936
72080
  };
71937
72081
  const onSectionResetBtn = (e) => {
71938
- viewer.gizmos.section.fitBox(viewer.renderer.getBoundingBox());
72082
+ viewer.gizmos.sectionBox.fitBox(viewer.renderer.getBoundingBox());
71939
72083
  e.stopPropagation();
71940
72084
  };
71941
72085
  const onMeasureDeleteBtn = (e) => {
@@ -71944,7 +72088,7 @@ function VimContextMenu(props) {
71944
72088
  const onFitSectionToSelectionBtn = (e) => {
71945
72089
  const box = viewer.selection.getBoundingBox();
71946
72090
  if (box) {
71947
- viewer.gizmos.section.fitBox(box);
72091
+ viewer.gizmos.sectionBox.fitBox(box);
71948
72092
  }
71949
72093
  };
71950
72094
  const createButton2 = (button) => {
@@ -74902,7 +75046,7 @@ class ComponentCamera {
74902
75046
  frameSelection(duration = 1) {
74903
75047
  if (this._viewer.selection.count === 0) return;
74904
75048
  const box = this._viewer.selection.getBoundingBox();
74905
- if (box && this._viewer.gizmos.section.box.intersectsBox(box)) {
75049
+ if (box && this._viewer.gizmos.sectionBox.box.intersectsBox(box)) {
74906
75050
  const movement = duration === 0 ? this._viewer.camera.snap() : this._viewer.camera.lerp(duration);
74907
75051
  movement.frame(box);
74908
75052
  }
@@ -75551,6 +75695,223 @@ function setComponentBehind(value) {
75551
75695
  component.classList.remove("behind");
75552
75696
  }
75553
75697
  }
75698
+ function SectionBoxPanel(props) {
75699
+ const [panelPosition, setPanelPosition] = useState({
75700
+ top: 0,
75701
+ left: 0
75702
+ });
75703
+ const panelRef = useRef(null);
75704
+ useLayoutEffect(() => {
75705
+ const updatePosition = () => {
75706
+ const { top, left } = computePosition(panelRef);
75707
+ setPanelPosition({ top, left });
75708
+ };
75709
+ updatePosition();
75710
+ let resizeObserver = null;
75711
+ if (panelRef.current) {
75712
+ resizeObserver = new ResizeObserver(updatePosition);
75713
+ resizeObserver.observe(panelRef.current.parentElement);
75714
+ }
75715
+ return () => {
75716
+ if (resizeObserver) {
75717
+ resizeObserver.disconnect();
75718
+ }
75719
+ };
75720
+ }, [props.state.getOffsetVisible()]);
75721
+ if (!props.state.getOffsetVisible()) return null;
75722
+ const renderField = (id2, label, field) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-center vc-justify-between vc-my-2", children: [
75723
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: label }),
75724
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
75725
+ "input",
75726
+ {
75727
+ id: id2,
75728
+ type: "text",
75729
+ value: props.state.getText(field),
75730
+ onChange: (e) => props.state.setText(field, e.target.value),
75731
+ className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
75732
+ onBlur: () => props.state.validate(field)
75733
+ }
75734
+ ) })
75735
+ ] });
75736
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
75737
+ "div",
75738
+ {
75739
+ className: "vc-fixed vc-inset-0 vc-flex vc-pointer-events-none",
75740
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
75741
+ "div",
75742
+ {
75743
+ ref: panelRef,
75744
+ style: { position: "absolute", top: panelPosition.top, left: panelPosition.left, width: "min(200px, 60%)" },
75745
+ className: "vim-sectionbox-offsets vc-pointer-events-auto vc-bg-white vc-relative",
75746
+ onClick: (e) => e.stopPropagation(),
75747
+ children: [
75748
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-sectionbox-header vc-px-2 vc-bg-gray-light vc-flex vc-items-center vc-justify-between ", children: [
75749
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "vc-flex vim-sectionbox-offsets-title vc-title vc-block", children: "Section Box Offsets" }),
75750
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
75751
+ "button",
75752
+ {
75753
+ className: "vc-flex vc-border-none vc-bg-transparent vc-text-sm vc-cursor-pointer",
75754
+ onClick: () => props.state.setOffsetsVisible(false),
75755
+ children: close({ height: 12, width: 12, fill: "currentColor" })
75756
+ }
75757
+ )
75758
+ ] }),
75759
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("dl", { className: "vc-text-xl vc-text-gray-darker vc-mb-2 vc-mx-2 ", children: [
75760
+ renderField("topOffset", "Top Offset", "topOffset"),
75761
+ renderField("sideOffseet", "Side Offset", "sideOffset"),
75762
+ renderField("bottomOffset", "Bottom Offset", "bottomOffset")
75763
+ ] })
75764
+ ]
75765
+ }
75766
+ )
75767
+ }
75768
+ );
75769
+ }
75770
+ function computePosition(panelRef) {
75771
+ const origin = document.getElementById("vim-control-bar");
75772
+ if (origin && panelRef.current) {
75773
+ const originRect = origin.getBoundingClientRect();
75774
+ const panelRect = panelRef.current.getBoundingClientRect();
75775
+ let left = originRect.left + originRect.width / 2 - panelRect.width / 2;
75776
+ let top = originRect.top - 10 - panelRect.height;
75777
+ if (top < 10) {
75778
+ top = originRect.bottom + 10;
75779
+ }
75780
+ if (left < 10) {
75781
+ left = 10;
75782
+ }
75783
+ if (left + panelRect.width > window.innerWidth - 10) {
75784
+ left = window.innerWidth - panelRect.width - 10;
75785
+ }
75786
+ return { top, left };
75787
+ }
75788
+ return { top: 0, left: 0 };
75789
+ }
75790
+ function addBox(b1, b2) {
75791
+ const r = b1.clone();
75792
+ r.min.x += b2.min.x;
75793
+ r.min.y += b2.min.y;
75794
+ r.min.z += b2.min.z;
75795
+ r.max.x += b2.max.x;
75796
+ r.max.y += b2.max.y;
75797
+ r.max.z += b2.max.z;
75798
+ return r;
75799
+ }
75800
+ function useSectionBox(adapter) {
75801
+ const [enable, setEnable] = useState(false);
75802
+ const [visible2, setVisible] = useState(false);
75803
+ const [offsetsVisible, setOffsetsVisible] = useState(false);
75804
+ const [auto, setAuto] = useState(false);
75805
+ const [offsets, setOffsets] = useState({
75806
+ topOffset: "1",
75807
+ sideOffset: "1",
75808
+ bottomOffset: "1"
75809
+ });
75810
+ const boxRef = useRef(adapter.getBox());
75811
+ const offsetBox = useMemo(() => offsetsToBox3(offsets), [offsets]);
75812
+ useEffect(() => {
75813
+ setVisible(enable);
75814
+ setAuto(false);
75815
+ setOffsetsVisible(false);
75816
+ setOffsets({
75817
+ topOffset: "1",
75818
+ sideOffset: "1",
75819
+ bottomOffset: "1"
75820
+ });
75821
+ void resetBox();
75822
+ }, [enable]);
75823
+ useEffect(() => {
75824
+ if (auto) sectionSelection();
75825
+ return auto ? adapter.onSelectionChanged.sub(sectionSelection) : () => {
75826
+ };
75827
+ }, [auto]);
75828
+ useEffect(() => {
75829
+ setBox(boxRef.current);
75830
+ }, [offsets]);
75831
+ useEffect(() => {
75832
+ adapter.setVisible(visible2);
75833
+ }, [visible2]);
75834
+ const setText = (field, value) => {
75835
+ const result = sanitize(value, false);
75836
+ if (result !== void 0) {
75837
+ setOffsets((prev) => ({ ...prev, [field]: result }));
75838
+ }
75839
+ };
75840
+ const validate = (field) => {
75841
+ const result = sanitize(offsets[field], true);
75842
+ if (result !== void 0) {
75843
+ setOffsets((prev) => ({ ...prev, [field]: result }));
75844
+ }
75845
+ };
75846
+ const setBox = (baseBox) => {
75847
+ boxRef.current = baseBox;
75848
+ const newBox = addBox(baseBox, offsetBox);
75849
+ adapter.fitBox(newBox);
75850
+ };
75851
+ const sectionSelection = async () => {
75852
+ try {
75853
+ const box = await adapter.getSelectionBox() ?? await adapter.getRendererBox();
75854
+ setBox(box);
75855
+ } catch (e) {
75856
+ console.error(e);
75857
+ }
75858
+ };
75859
+ const resetBox = async () => {
75860
+ const box = await adapter.getRendererBox();
75861
+ setBox(box);
75862
+ };
75863
+ return {
75864
+ setEnable,
75865
+ getEnable: () => enable,
75866
+ getVisible: () => visible2,
75867
+ setVisible,
75868
+ sectionSelection,
75869
+ sectionReset: resetBox,
75870
+ getOffsetVisible: () => offsetsVisible,
75871
+ setOffsetsVisible,
75872
+ getText: (field) => offsets[field],
75873
+ setText,
75874
+ getAuto: () => auto,
75875
+ setAuto,
75876
+ validate
75877
+ };
75878
+ }
75879
+ const sanitize = (value, strict) => {
75880
+ if (!strict) {
75881
+ if (value === "" || value === "-") return value;
75882
+ }
75883
+ const num = parseFloat(value);
75884
+ if (isNaN(num)) {
75885
+ return strict ? "1" : void 0;
75886
+ }
75887
+ return String(num);
75888
+ };
75889
+ function offsetsToBox3(offsets) {
75890
+ const getNumber = (field) => {
75891
+ const num = parseFloat(offsets[field]);
75892
+ return isNaN(num) ? 0 : num;
75893
+ };
75894
+ return new Box3(
75895
+ new Vector3(-getNumber("sideOffset"), -getNumber("sideOffset"), -getNumber("bottomOffset")),
75896
+ new Vector3(getNumber("sideOffset"), getNumber("sideOffset"), getNumber("topOffset"))
75897
+ );
75898
+ }
75899
+ function useWebglSectionBox(viewer) {
75900
+ const vimAdapter = {
75901
+ setVisible: (b) => {
75902
+ viewer.gizmos.sectionBox.visible = b;
75903
+ viewer.gizmos.sectionBox.interactive = b;
75904
+ },
75905
+ getBox: () => viewer.gizmos.sectionBox.box.clone(),
75906
+ fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
75907
+ getSelectionBox: () => Promise.resolve(viewer.selection.getBoundingBox()),
75908
+ getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
75909
+ onSceneChanged: viewer.renderer.onBoxUpdated,
75910
+ onSelectionChanged: viewer.selection.onValueChanged
75911
+ };
75912
+ viewer.gizmos.sectionBox.clip = true;
75913
+ return useSectionBox(vimAdapter);
75914
+ }
75554
75915
  function createWebglComponent(container, componentSettings = {}, viewerSettings = {}) {
75555
75916
  const promise2 = new DeferredPromise2();
75556
75917
  const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
@@ -75592,11 +75953,13 @@ function VimComponent(props) {
75592
75953
  Math.min(props.container.root.clientWidth * 0.25, 340)
75593
75954
  );
75594
75955
  const [contextMenu2, setcontextMenu] = useState();
75595
- const [controlBar2, setControlBar] = useState();
75956
+ const [controlBarCustom, setControlBarCustom] = useState();
75596
75957
  const bimInfoRef = useBimInfo();
75597
75958
  const viewerState = useViewerState(props.viewer);
75598
75959
  const treeRef = useRef();
75599
75960
  const performanceRef = useRef(null);
75961
+ const sectionBox2 = useWebglSectionBox(props.viewer);
75962
+ const controlBar2 = useControlBar(props.viewer, camera2, modal, side, isolation, cursor, settings2.value, sectionBox2, controlBarCustom);
75600
75963
  useEffect(() => {
75601
75964
  var _a3;
75602
75965
  side.setHasBim(((_a3 = viewerState.vim) == null ? void 0 : _a3.bim) !== void 0);
@@ -75625,7 +75988,7 @@ function VimComponent(props) {
75625
75988
  customize: (v) => setcontextMenu(() => v)
75626
75989
  },
75627
75990
  controlBar: {
75628
- customize: (v) => setControlBar(() => v)
75991
+ customize: (v) => setControlBarCustom(() => v)
75629
75992
  },
75630
75993
  modal,
75631
75994
  bimInfo: bimInfoRef,
@@ -75679,16 +76042,11 @@ function VimComponent(props) {
75679
76042
  /* @__PURE__ */ jsxRuntimeExports.jsx(
75680
76043
  ControlBar,
75681
76044
  {
75682
- viewer: props.viewer,
75683
- camera: camera2,
75684
- modal,
75685
- side,
75686
- isolation,
75687
- cursor,
75688
- settings: settings2.value,
75689
- customization: controlBar2
76045
+ content: controlBar2,
76046
+ show: isTrue(settings2.value.ui.controlBar)
75690
76047
  }
75691
76048
  ),
76049
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 }),
75692
76050
  /* @__PURE__ */ jsxRuntimeExports.jsx(
75693
76051
  AxesPanelMemo,
75694
76052
  {
@@ -76014,12 +76372,53 @@ function getRequestErrorMessage(source, error) {
76014
76372
  return serverConnectionError(source.url);
76015
76373
  }
76016
76374
  }
76375
+ function updateModal(modal, state) {
76376
+ if (state.status === "connected") {
76377
+ modal.loading(void 0);
76378
+ modal.message(void 0);
76379
+ }
76380
+ if (state.status === "connecting") {
76381
+ if (modal.current === void 0 || modal.current.type === "loading") {
76382
+ modal.loading({ message: "Connecting to VIM Ultra server..." });
76383
+ }
76384
+ }
76385
+ if (state.status === "error") {
76386
+ console.log("Error loading vim", state);
76387
+ modal.message(getErrorMessage(state));
76388
+ }
76389
+ }
76390
+ async function updateProgress(request2, modal) {
76391
+ for await (const progress of request2.getProgress()) {
76392
+ if (request2.isCompleted) break;
76393
+ modal.loading({ message: "Loading File in VIM Ultra mode", progress });
76394
+ }
76395
+ }
76396
+ function useUltraSectionBox(viewer) {
76397
+ const ultraAdapter = {
76398
+ setVisible: (b) => {
76399
+ viewer.sectionBox.visible = b;
76400
+ viewer.sectionBox.interactive = b;
76401
+ },
76402
+ getBox: () => viewer.sectionBox.getBox().clone(),
76403
+ fitBox: (box) => viewer.sectionBox.fitBox(box),
76404
+ getSelectionBox: () => viewer.selection.getBoundingBox(),
76405
+ getRendererBox: () => viewer.renderer.getBoundingBox(),
76406
+ onSelectionChanged: viewer.selection.onValueChanged,
76407
+ onSceneChanged: viewer.vims.onChanged
76408
+ };
76409
+ return useSectionBox(ultraAdapter);
76410
+ }
76411
+ function useUltraControlBar(viewer, section, customization) {
76412
+ let controlBar2 = [controlBarSectionBox(section, viewer.selection.count > 0)];
76413
+ controlBar2 = (customization == null ? void 0 : customization(controlBar2)) ?? controlBar2;
76414
+ return controlBar2;
76415
+ }
76017
76416
  function createUltraComponent(container) {
76018
76417
  const promise2 = new DeferredPromise2();
76019
76418
  const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
76020
76419
  const viewer = Viewer2.createWithCanvas(cmpContainer.gfx);
76021
76420
  const reactRoot = clientExports.createRoot(cmpContainer.ui);
76022
- const patchRef = (cmp) => {
76421
+ const attachDispose = (cmp) => {
76023
76422
  cmp.dispose = () => {
76024
76423
  viewer.dispose();
76025
76424
  cmpContainer.dispose();
@@ -76033,7 +76432,7 @@ function createUltraComponent(container) {
76033
76432
  {
76034
76433
  container: cmpContainer,
76035
76434
  viewer,
76036
- onMount: (cmp) => promise2.resolve(patchRef(cmp))
76435
+ onMount: (cmp) => promise2.resolve(attachDispose(cmp))
76037
76436
  }
76038
76437
  )
76039
76438
  );
@@ -76041,31 +76440,36 @@ function createUltraComponent(container) {
76041
76440
  }
76042
76441
  function UltraComponent(props) {
76043
76442
  const modal = useModal(true);
76443
+ const sectionBox2 = useUltraSectionBox(props.viewer);
76444
+ const controlBar2 = useUltraControlBar(props.viewer, sectionBox2, (_2) => _2);
76445
+ const side = useSideState(true, 400);
76446
+ const [_, setSelectState] = useState(0);
76044
76447
  useEffect(() => {
76045
76448
  props.viewer.onStateChanged.subscribe((state) => updateModal(modal, state));
76046
- props.onMount(ToRef(props.viewer, modal));
76449
+ props.viewer.selection.onValueChanged.subscribe(() => {
76450
+ setSelectState((i) => (i + 1) % 2);
76451
+ });
76452
+ props.onMount(createComponentRef(props.viewer, modal));
76047
76453
  }, []);
76048
76454
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76049
- /* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
76455
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
76456
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76457
+ whenTrue(true, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
76458
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
76459
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
76460
+ ControlBar,
76461
+ {
76462
+ content: controlBar2,
76463
+ show: true
76464
+ }
76465
+ ),
76466
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 })
76467
+ ] });
76468
+ } }),
76050
76469
  /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { state: modal })
76051
76470
  ] });
76052
76471
  }
76053
- function updateModal(modal, state) {
76054
- if (state.status === "connected") {
76055
- modal.loading(void 0);
76056
- modal.message(void 0);
76057
- }
76058
- if (state.status === "connecting") {
76059
- if (modal.current === void 0 || modal.current.type === "loading") {
76060
- modal.loading({ message: "Connecting to VIM Ultra server..." });
76061
- }
76062
- }
76063
- if (state.status === "error") {
76064
- console.log("Error loading vim", state);
76065
- modal.message(getErrorMessage(state));
76066
- }
76067
- }
76068
- function ToRef(viewer, modal) {
76472
+ function createComponentRef(viewer, modal) {
76069
76473
  function load(source) {
76070
76474
  const request2 = viewer.loadVim(source);
76071
76475
  void updateProgress(request2, modal);
@@ -76090,12 +76494,6 @@ function ToRef(viewer, modal) {
76090
76494
  load
76091
76495
  };
76092
76496
  }
76093
- async function updateProgress(request2, modal) {
76094
- for await (const progress of request2.getProgress()) {
76095
- if (request2.isCompleted) break;
76096
- modal.loading({ message: "Loading File in VIM Ultra mode", progress });
76097
- }
76098
- }
76099
76497
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
76100
76498
  __proto__: null,
76101
76499
  UltraComponent,