vim-web 0.3.44-dev.2 → 0.3.44-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +38 -1
- package/dist/types/core-viewers/ultra/index.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +0 -1
- package/dist/types/core-viewers/ultra/viewer/rpcClient.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/sectionBox.d.ts +2 -5
- package/dist/types/core-viewers/ultra/viewer/selection.d.ts +2 -0
- package/dist/types/core-viewers/ultra/viewer/viewer.d.ts +2 -0
- package/dist/types/core-viewers/ultra/viewer/vimCollection.d.ts +4 -0
- package/dist/types/core-viewers/webgl/utils/threeUtils.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmos.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +1 -1
- package/dist/types/react-viewers/controlbar/controlBar.d.ts +5 -44
- package/dist/types/react-viewers/controlbar/controlBarButton.d.ts +3 -1
- package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -1
- package/dist/types/react-viewers/panels/icons.d.ts +6 -0
- package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +4 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +66 -0
- package/dist/types/react-viewers/state/sectionBoxState.d.ts +33 -0
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +6 -0
- package/dist/types/react-viewers/ultra/ultraModal.d.ts +4 -0
- package/dist/types/react-viewers/ultra/ultraSectionBoxState.d.ts +3 -0
- package/dist/types/react-viewers/webgl/index.d.ts +0 -1
- package/dist/types/react-viewers/webgl/webglSectionBoxState.d.ts +3 -0
- package/dist/vim-web.iife.js +679 -282
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +680 -283
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/controlbar/controlBarCommands.d.ts +0 -4
- package/dist/types/react-viewers/controlbar/sectionBoxState.d.ts +0 -15
- /package/dist/types/react-viewers/{controlbar → panels}/restOfScreen.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/fullScreenState.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/measureState.d.ts +0 -0
- /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.
|
|
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.
|
|
54799
|
-
if (ly !== void 0 && ly < 0.
|
|
54800
|
-
if (lz !== void 0 && lz < 0.
|
|
54801
|
-
if (xy !== void 0 && xy < 0.
|
|
54802
|
-
if (xz !== void 0 && xz < 0.
|
|
54803
|
-
if (yz !== void 0 && yz < 0.
|
|
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 *
|
|
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
|
|
55754
|
+
fitBox(box) {
|
|
55748
55755
|
if (!box) return;
|
|
55749
|
-
|
|
55750
|
-
this.
|
|
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
|
|
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, "
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
61789
|
+
get interactive() {
|
|
61759
61790
|
return this._interactible;
|
|
61760
61791
|
}
|
|
61761
|
-
set
|
|
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
|
|
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:
|
|
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,62 @@ 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-
|
|
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);
|
|
67563
|
+
}
|
|
67564
|
+
function ControlBar(props) {
|
|
67565
|
+
useEffect(() => {
|
|
67566
|
+
ReactTooltip.rebuild();
|
|
67567
|
+
});
|
|
67568
|
+
if (!props.show) {
|
|
67569
|
+
return null;
|
|
67570
|
+
}
|
|
67571
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67572
|
+
"div",
|
|
67573
|
+
{
|
|
67574
|
+
style: {
|
|
67575
|
+
gap: "min(10px, 2%)",
|
|
67576
|
+
bottom: "min(36px, 10%)"
|
|
67577
|
+
},
|
|
67578
|
+
id: "vim-control-bar",
|
|
67579
|
+
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",
|
|
67580
|
+
children: props.content.map(createSection$1)
|
|
67581
|
+
}
|
|
67582
|
+
);
|
|
67397
67583
|
}
|
|
67584
|
+
const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
67585
|
+
__proto__: null,
|
|
67586
|
+
ControlBar,
|
|
67587
|
+
buttonBlueStyle,
|
|
67588
|
+
buttonDefaultStyle,
|
|
67589
|
+
buttonDisableStyle,
|
|
67590
|
+
buttonExpandStyle,
|
|
67591
|
+
createButton,
|
|
67592
|
+
createSection: createSection$1,
|
|
67593
|
+
sectionBlueStyle,
|
|
67594
|
+
sectionDefaultStyle,
|
|
67595
|
+
sectionNoPadStyle
|
|
67596
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
67398
67597
|
function getPointerState(viewer) {
|
|
67399
67598
|
const [mode, setMode] = useState(viewer.inputs.pointerActive);
|
|
67400
67599
|
useEffect(() => {
|
|
@@ -67456,52 +67655,6 @@ function getFullScreenState() {
|
|
|
67456
67655
|
}
|
|
67457
67656
|
};
|
|
67458
67657
|
}
|
|
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
67658
|
function pointerToCursor(pointer) {
|
|
67506
67659
|
switch (pointer) {
|
|
67507
67660
|
case "orbit":
|
|
@@ -67553,13 +67706,13 @@ class CursorManager {
|
|
|
67553
67706
|
const sub2 = this._viewer.inputs.onPointerOverrideChanged.subscribe(
|
|
67554
67707
|
() => this._updateCursor()
|
|
67555
67708
|
);
|
|
67556
|
-
const sub3 = this._viewer.gizmos.
|
|
67557
|
-
if (!this._viewer.gizmos.
|
|
67709
|
+
const sub3 = this._viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
|
|
67710
|
+
if (!this._viewer.gizmos.sectionBox.visible) {
|
|
67558
67711
|
this._boxHover = false;
|
|
67559
67712
|
this._updateCursor();
|
|
67560
67713
|
}
|
|
67561
67714
|
});
|
|
67562
|
-
const sub4 = this._viewer.gizmos.
|
|
67715
|
+
const sub4 = this._viewer.gizmos.sectionBox.onHover.subscribe((hover) => {
|
|
67563
67716
|
this._boxHover = hover;
|
|
67564
67717
|
this._updateCursor();
|
|
67565
67718
|
});
|
|
@@ -67625,6 +67778,7 @@ function getMeasureState(viewer, cursor) {
|
|
|
67625
67778
|
const elementIds = {
|
|
67626
67779
|
// Sections
|
|
67627
67780
|
sectionCamera: "controlBar.sectionCamera",
|
|
67781
|
+
sectionActions: "controlBar.sectionActions",
|
|
67628
67782
|
sectionTools: "controlBar.sectionTools",
|
|
67629
67783
|
sectionSettings: "controlBar.sectionSettings",
|
|
67630
67784
|
sectionMeasure: "controlBar.sectionMeasure",
|
|
@@ -67635,46 +67789,96 @@ const elementIds = {
|
|
|
67635
67789
|
buttonCameraPan: "controlBar.camera.pan",
|
|
67636
67790
|
buttonCameraZoom: "controlBar.camera.zoom",
|
|
67637
67791
|
buttonCameraZoomWindow: "controlBar.camera.zoomWindow",
|
|
67638
|
-
buttonCameraZoomToFit: "controlBar.camera.zoomToFit",
|
|
67639
67792
|
// Settings buttons
|
|
67640
67793
|
buttonProjectInspector: "controlBar.projectInspector",
|
|
67641
67794
|
buttonSettings: "controlBar.settings",
|
|
67642
67795
|
buttonHelp: "controlBar.help",
|
|
67643
67796
|
buttonMaximize: "controlBar.maximize",
|
|
67797
|
+
// Action Buttons
|
|
67798
|
+
buttonToggleIsolation: "controlBar.action.toggleIsolation",
|
|
67799
|
+
buttonZoomToFit: "controlBar.action.zoomToFit",
|
|
67644
67800
|
// Tools buttons
|
|
67645
67801
|
buttonSectionBox: "controlBar.sectionBox",
|
|
67646
67802
|
buttonMeasure: "controlBar.measure",
|
|
67647
|
-
buttonToggleIsolation: "controlBar.toggleIsolation",
|
|
67648
|
-
// Measure buttons
|
|
67649
|
-
buttonMeasureDelete: "controlBar.measure.delete",
|
|
67650
|
-
buttonMeasureDone: "controlBar.measure.done",
|
|
67651
67803
|
// Section box buttons
|
|
67652
|
-
|
|
67804
|
+
buttonSectionBoxEnable: "controlBar.sectionBox.enable",
|
|
67805
|
+
buttonSectionBoxVisible: "controlBar.sectionBox.visible",
|
|
67653
67806
|
buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
|
|
67807
|
+
buttonSectionBoxAuto: "controlBar.sectionBox.auto",
|
|
67654
67808
|
buttonSectionBoxClip: "controlBar.sectionBox.clip",
|
|
67655
|
-
|
|
67656
|
-
buttonSectionBoxDone: "controlBar.sectionBox.done"
|
|
67809
|
+
buttonSectionBoxSettings: "controlBar.sectionBox.settings"
|
|
67657
67810
|
};
|
|
67658
|
-
function
|
|
67659
|
-
|
|
67660
|
-
|
|
67661
|
-
|
|
67662
|
-
|
|
67663
|
-
|
|
67664
|
-
|
|
67665
|
-
|
|
67666
|
-
|
|
67667
|
-
|
|
67668
|
-
|
|
67669
|
-
|
|
67670
|
-
|
|
67811
|
+
function controlBarSectionBox(section, hasSelection) {
|
|
67812
|
+
return {
|
|
67813
|
+
id: elementIds.sectionSectionBox,
|
|
67814
|
+
style: section.getEnable() ? sectionNoPadStyle : sectionDefaultStyle,
|
|
67815
|
+
//enable: () => section.getEnable(),
|
|
67816
|
+
buttons: [
|
|
67817
|
+
{
|
|
67818
|
+
id: elementIds.buttonSectionBoxEnable,
|
|
67819
|
+
tip: "Enable Section Box",
|
|
67820
|
+
isOn: () => section.getEnable(),
|
|
67821
|
+
style: (on) => buttonExpandStyle(on),
|
|
67822
|
+
action: () => section.setEnable(!section.getEnable()),
|
|
67823
|
+
icon: sectionBox
|
|
67824
|
+
},
|
|
67825
|
+
{
|
|
67826
|
+
id: elementIds.buttonSectionBoxShrinkToSelection,
|
|
67827
|
+
tip: "Fit Section",
|
|
67828
|
+
enabled: () => section.getEnable(),
|
|
67829
|
+
isOn: () => hasSelection,
|
|
67830
|
+
style: (on) => buttonDisableStyle(on),
|
|
67831
|
+
action: () => section.sectionSelection(),
|
|
67832
|
+
icon: sectionBoxShrink
|
|
67833
|
+
},
|
|
67834
|
+
{
|
|
67835
|
+
id: elementIds.buttonSectionBoxClip,
|
|
67836
|
+
tip: "Reset Section",
|
|
67837
|
+
enabled: () => section.getEnable(),
|
|
67838
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67839
|
+
action: () => section.sectionReset(),
|
|
67840
|
+
icon: sectionBoxReset
|
|
67841
|
+
},
|
|
67842
|
+
{
|
|
67843
|
+
id: elementIds.buttonSectionBoxVisible,
|
|
67844
|
+
tip: "Show Section Box",
|
|
67845
|
+
enabled: () => section.getEnable(),
|
|
67846
|
+
isOn: () => section.getVisible(),
|
|
67847
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67848
|
+
action: () => section.setVisible(!section.getVisible()),
|
|
67849
|
+
icon: visible
|
|
67850
|
+
},
|
|
67851
|
+
{
|
|
67852
|
+
id: elementIds.buttonSectionBoxAuto,
|
|
67853
|
+
tip: "Auto Section",
|
|
67854
|
+
enabled: () => section.getEnable(),
|
|
67855
|
+
isOn: () => section.getAuto(),
|
|
67856
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67857
|
+
action: () => section.setAuto(!section.getAuto()),
|
|
67858
|
+
icon: sectionBoxAuto
|
|
67859
|
+
},
|
|
67860
|
+
{
|
|
67861
|
+
id: elementIds.buttonSectionBoxSettings,
|
|
67862
|
+
tip: "Section Settings",
|
|
67863
|
+
enabled: () => section.getEnable(),
|
|
67864
|
+
isOn: () => section.getOffsetVisible(),
|
|
67865
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67866
|
+
action: () => section.setOffsetsVisible(!section.getOffsetVisible()),
|
|
67867
|
+
icon: slidersHoriz
|
|
67868
|
+
}
|
|
67869
|
+
]
|
|
67870
|
+
};
|
|
67871
|
+
}
|
|
67872
|
+
function controlBarPointer(viewer, camera2, settings2, section) {
|
|
67873
|
+
const pointer = getPointerState(viewer);
|
|
67874
|
+
return {
|
|
67671
67875
|
id: elementIds.sectionCamera,
|
|
67672
|
-
enable: () => anyUiCursorButton(
|
|
67876
|
+
enable: () => anyUiCursorButton(settings2),
|
|
67673
67877
|
style: sectionDefaultStyle,
|
|
67674
67878
|
buttons: [
|
|
67675
67879
|
{
|
|
67676
67880
|
id: elementIds.buttonCameraOrbit,
|
|
67677
|
-
enabled: () => isTrue(
|
|
67881
|
+
enabled: () => isTrue(settings2.ui.orbit),
|
|
67678
67882
|
tip: "Orbit",
|
|
67679
67883
|
action: () => pointer.onButton("orbit"),
|
|
67680
67884
|
icon: orbit,
|
|
@@ -67683,7 +67887,7 @@ function ControlBar(props) {
|
|
|
67683
67887
|
},
|
|
67684
67888
|
{
|
|
67685
67889
|
id: elementIds.buttonCameraLook,
|
|
67686
|
-
enabled: () => isTrue(
|
|
67890
|
+
enabled: () => isTrue(settings2.ui.lookAround),
|
|
67687
67891
|
tip: "Look Around",
|
|
67688
67892
|
action: () => pointer.onButton("look"),
|
|
67689
67893
|
icon: look,
|
|
@@ -67692,7 +67896,7 @@ function ControlBar(props) {
|
|
|
67692
67896
|
},
|
|
67693
67897
|
{
|
|
67694
67898
|
id: elementIds.buttonCameraPan,
|
|
67695
|
-
enabled: () => isTrue(
|
|
67899
|
+
enabled: () => isTrue(settings2.ui.pan),
|
|
67696
67900
|
tip: "Pan",
|
|
67697
67901
|
action: () => pointer.onButton("pan"),
|
|
67698
67902
|
icon: pan,
|
|
@@ -67701,7 +67905,7 @@ function ControlBar(props) {
|
|
|
67701
67905
|
},
|
|
67702
67906
|
{
|
|
67703
67907
|
id: elementIds.buttonCameraZoom,
|
|
67704
|
-
enabled: () => isTrue(
|
|
67908
|
+
enabled: () => isTrue(settings2.ui.zoom),
|
|
67705
67909
|
tip: "Zoom",
|
|
67706
67910
|
action: () => pointer.onButton("zoom"),
|
|
67707
67911
|
icon: zoom,
|
|
@@ -67710,59 +67914,87 @@ function ControlBar(props) {
|
|
|
67710
67914
|
},
|
|
67711
67915
|
{
|
|
67712
67916
|
id: elementIds.buttonCameraZoomWindow,
|
|
67713
|
-
enabled: () => isTrue(
|
|
67917
|
+
enabled: () => isTrue(settings2.ui.zoomWindow),
|
|
67714
67918
|
tip: "Zoom Window",
|
|
67715
67919
|
action: () => {
|
|
67716
67920
|
pointer.onButton("rect");
|
|
67717
|
-
section.hide();
|
|
67718
67921
|
},
|
|
67719
67922
|
icon: frameRect,
|
|
67720
67923
|
isOn: () => pointer.mode === "rect",
|
|
67721
67924
|
style: buttonDefaultStyle
|
|
67722
|
-
}
|
|
67925
|
+
}
|
|
67926
|
+
]
|
|
67927
|
+
};
|
|
67928
|
+
}
|
|
67929
|
+
function controlBarActions(camera2, settings2, isolation, measure$1) {
|
|
67930
|
+
return {
|
|
67931
|
+
id: elementIds.sectionActions,
|
|
67932
|
+
enable: () => true,
|
|
67933
|
+
style: sectionDefaultStyle,
|
|
67934
|
+
buttons: [
|
|
67723
67935
|
{
|
|
67724
|
-
id: elementIds.
|
|
67725
|
-
enabled: () => isTrue(
|
|
67936
|
+
id: elementIds.buttonZoomToFit,
|
|
67937
|
+
enabled: () => isTrue(settings2.ui.zoomToFit),
|
|
67726
67938
|
tip: "Zoom to Fit",
|
|
67727
|
-
action: () =>
|
|
67939
|
+
action: () => camera2.frameContext(),
|
|
67728
67940
|
icon: frameSelection,
|
|
67729
67941
|
isOn: () => false,
|
|
67730
67942
|
style: buttonDefaultStyle
|
|
67943
|
+
},
|
|
67944
|
+
{
|
|
67945
|
+
id: elementIds.buttonToggleIsolation,
|
|
67946
|
+
enabled: () => isTrue(settings2.ui.toggleIsolation),
|
|
67947
|
+
tip: "Toggle Isolation",
|
|
67948
|
+
action: () => isolation.toggle("controlBar"),
|
|
67949
|
+
icon: toggleIsolation,
|
|
67950
|
+
style: buttonDefaultStyle
|
|
67951
|
+
},
|
|
67952
|
+
{
|
|
67953
|
+
id: elementIds.buttonMeasure,
|
|
67954
|
+
enabled: () => isTrue(settings2.ui.measuringMode),
|
|
67955
|
+
isOn: () => measure$1.active,
|
|
67956
|
+
tip: "Measuring Mode",
|
|
67957
|
+
action: () => measure$1.toggle(),
|
|
67958
|
+
icon: measure,
|
|
67959
|
+
style: buttonDefaultStyle
|
|
67731
67960
|
}
|
|
67732
67961
|
]
|
|
67733
67962
|
};
|
|
67734
|
-
|
|
67963
|
+
}
|
|
67964
|
+
function controlBarSettings(modal, side, settings$1) {
|
|
67965
|
+
const fullScreen = getFullScreenState();
|
|
67966
|
+
return {
|
|
67735
67967
|
id: elementIds.sectionSettings,
|
|
67736
|
-
enable: () => anyUiSettingButton(
|
|
67968
|
+
enable: () => anyUiSettingButton(settings$1),
|
|
67737
67969
|
style: sectionDefaultStyle,
|
|
67738
67970
|
buttons: [
|
|
67739
67971
|
{
|
|
67740
67972
|
id: elementIds.buttonProjectInspector,
|
|
67741
|
-
enabled: () => isTrue(
|
|
67973
|
+
enabled: () => isTrue(settings$1.ui.projectInspector) && (isTrue(settings$1.ui.bimTreePanel) || isTrue(settings$1.ui.bimInfoPanel)),
|
|
67742
67974
|
tip: "Project Inspector",
|
|
67743
|
-
action: () =>
|
|
67975
|
+
action: () => side.toggleContent("bim"),
|
|
67744
67976
|
icon: treeView,
|
|
67745
67977
|
style: buttonDefaultStyle
|
|
67746
67978
|
},
|
|
67747
67979
|
{
|
|
67748
67980
|
id: elementIds.buttonSettings,
|
|
67749
|
-
enabled: () => isTrue(
|
|
67981
|
+
enabled: () => isTrue(settings$1.ui.settings),
|
|
67750
67982
|
tip: "Settings",
|
|
67751
|
-
action: () =>
|
|
67983
|
+
action: () => side.toggleContent("settings"),
|
|
67752
67984
|
icon: settings,
|
|
67753
67985
|
style: buttonDefaultStyle
|
|
67754
67986
|
},
|
|
67755
67987
|
{
|
|
67756
67988
|
id: elementIds.buttonHelp,
|
|
67757
|
-
enabled: () => isTrue(
|
|
67989
|
+
enabled: () => isTrue(settings$1.ui.help),
|
|
67758
67990
|
tip: "Help",
|
|
67759
|
-
action: () =>
|
|
67991
|
+
action: () => modal.help(true),
|
|
67760
67992
|
icon: help,
|
|
67761
67993
|
style: buttonDefaultStyle
|
|
67762
67994
|
},
|
|
67763
67995
|
{
|
|
67764
67996
|
id: elementIds.buttonMaximize,
|
|
67765
|
-
enabled: () => isTrue(
|
|
67997
|
+
enabled: () => isTrue(settings$1.ui.maximise) && settings$1.capacity.canGoFullScreen,
|
|
67766
67998
|
tip: fullScreen.get() ? "Minimize" : "Fullscreen",
|
|
67767
67999
|
action: () => fullScreen.toggle(),
|
|
67768
68000
|
icon: fullScreen.get() ? minimize : fullsScreen,
|
|
@@ -67770,112 +68002,23 @@ function ControlBar(props) {
|
|
|
67770
68002
|
}
|
|
67771
68003
|
]
|
|
67772
68004
|
};
|
|
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
68005
|
}
|
|
67864
|
-
function
|
|
67865
|
-
|
|
67866
|
-
|
|
67867
|
-
|
|
67868
|
-
|
|
68006
|
+
function useControlBar(viewer, camera2, modal, side, isolation, cursor, settings2, section, customization) {
|
|
68007
|
+
const measure2 = getMeasureState(viewer, cursor);
|
|
68008
|
+
const pointerSection = controlBarPointer(viewer, camera2, settings2);
|
|
68009
|
+
const actionSection = controlBarActions(camera2, settings2, isolation, measure2);
|
|
68010
|
+
const sectionBoxSection = controlBarSectionBox(section, viewer.selection.count > 0);
|
|
68011
|
+
const settingsSection = controlBarSettings(modal, side, settings2);
|
|
68012
|
+
let controlBarSections = [
|
|
68013
|
+
pointerSection,
|
|
68014
|
+
actionSection,
|
|
68015
|
+
sectionBoxSection,
|
|
68016
|
+
// Optional section
|
|
68017
|
+
settingsSection
|
|
68018
|
+
];
|
|
68019
|
+
controlBarSections = (customization == null ? void 0 : customization(controlBarSections)) ?? controlBarSections;
|
|
68020
|
+
return controlBarSections;
|
|
67869
68021
|
}
|
|
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
68022
|
function RestOfScreen(props) {
|
|
67880
68023
|
const [, setVersion] = useState(0);
|
|
67881
68024
|
const resizeObserver = useRef();
|
|
@@ -71864,23 +72007,23 @@ function VimContextMenu(props) {
|
|
|
71864
72007
|
const viewer = props.viewer;
|
|
71865
72008
|
const camera2 = props.camera;
|
|
71866
72009
|
const [section, setSection] = useState({
|
|
71867
|
-
visible: viewer.gizmos.
|
|
71868
|
-
clip: viewer.gizmos.
|
|
72010
|
+
visible: viewer.gizmos.sectionBox.visible,
|
|
72011
|
+
clip: viewer.gizmos.sectionBox.clip
|
|
71869
72012
|
});
|
|
71870
72013
|
const isClipping = () => {
|
|
71871
|
-
return !viewer.gizmos.
|
|
72014
|
+
return !viewer.gizmos.sectionBox.box.containsBox(viewer.renderer.getBoundingBox());
|
|
71872
72015
|
};
|
|
71873
72016
|
const [clipping, setClipping] = useState(isClipping());
|
|
71874
72017
|
const [, setVersion] = useState(0);
|
|
71875
72018
|
const hidden2 = props.isolation.isActive();
|
|
71876
72019
|
useEffect(() => {
|
|
71877
|
-
const subState = viewer.gizmos.
|
|
72020
|
+
const subState = viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
|
|
71878
72021
|
setSection({
|
|
71879
|
-
visible: viewer.gizmos.
|
|
71880
|
-
clip: viewer.gizmos.
|
|
72022
|
+
visible: viewer.gizmos.sectionBox.visible,
|
|
72023
|
+
clip: viewer.gizmos.sectionBox.clip
|
|
71881
72024
|
});
|
|
71882
72025
|
});
|
|
71883
|
-
const subConfirm = viewer.gizmos.
|
|
72026
|
+
const subConfirm = viewer.gizmos.sectionBox.onBoxConfirm.subscribe(
|
|
71884
72027
|
() => setClipping(isClipping())
|
|
71885
72028
|
);
|
|
71886
72029
|
props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
|
|
@@ -71932,10 +72075,10 @@ function VimContextMenu(props) {
|
|
|
71932
72075
|
e.stopPropagation();
|
|
71933
72076
|
};
|
|
71934
72077
|
const onSectionToggleBtn = (e) => {
|
|
71935
|
-
viewer.gizmos.
|
|
72078
|
+
viewer.gizmos.sectionBox.clip = !viewer.gizmos.sectionBox.clip;
|
|
71936
72079
|
};
|
|
71937
72080
|
const onSectionResetBtn = (e) => {
|
|
71938
|
-
viewer.gizmos.
|
|
72081
|
+
viewer.gizmos.sectionBox.fitBox(viewer.renderer.getBoundingBox());
|
|
71939
72082
|
e.stopPropagation();
|
|
71940
72083
|
};
|
|
71941
72084
|
const onMeasureDeleteBtn = (e) => {
|
|
@@ -71944,7 +72087,7 @@ function VimContextMenu(props) {
|
|
|
71944
72087
|
const onFitSectionToSelectionBtn = (e) => {
|
|
71945
72088
|
const box = viewer.selection.getBoundingBox();
|
|
71946
72089
|
if (box) {
|
|
71947
|
-
viewer.gizmos.
|
|
72090
|
+
viewer.gizmos.sectionBox.fitBox(box);
|
|
71948
72091
|
}
|
|
71949
72092
|
};
|
|
71950
72093
|
const createButton2 = (button) => {
|
|
@@ -74902,7 +75045,7 @@ class ComponentCamera {
|
|
|
74902
75045
|
frameSelection(duration = 1) {
|
|
74903
75046
|
if (this._viewer.selection.count === 0) return;
|
|
74904
75047
|
const box = this._viewer.selection.getBoundingBox();
|
|
74905
|
-
if (box && this._viewer.gizmos.
|
|
75048
|
+
if (box && this._viewer.gizmos.sectionBox.box.intersectsBox(box)) {
|
|
74906
75049
|
const movement = duration === 0 ? this._viewer.camera.snap() : this._viewer.camera.lerp(duration);
|
|
74907
75050
|
movement.frame(box);
|
|
74908
75051
|
}
|
|
@@ -75551,6 +75694,223 @@ function setComponentBehind(value) {
|
|
|
75551
75694
|
component.classList.remove("behind");
|
|
75552
75695
|
}
|
|
75553
75696
|
}
|
|
75697
|
+
function SectionBoxPanel(props) {
|
|
75698
|
+
const [panelPosition, setPanelPosition] = useState({
|
|
75699
|
+
top: 0,
|
|
75700
|
+
left: 0
|
|
75701
|
+
});
|
|
75702
|
+
const panelRef = useRef(null);
|
|
75703
|
+
useLayoutEffect(() => {
|
|
75704
|
+
const updatePosition = () => {
|
|
75705
|
+
const { top, left } = computePosition(panelRef);
|
|
75706
|
+
setPanelPosition({ top, left });
|
|
75707
|
+
};
|
|
75708
|
+
updatePosition();
|
|
75709
|
+
let resizeObserver = null;
|
|
75710
|
+
if (panelRef.current) {
|
|
75711
|
+
resizeObserver = new ResizeObserver(updatePosition);
|
|
75712
|
+
resizeObserver.observe(panelRef.current.parentElement);
|
|
75713
|
+
}
|
|
75714
|
+
return () => {
|
|
75715
|
+
if (resizeObserver) {
|
|
75716
|
+
resizeObserver.disconnect();
|
|
75717
|
+
}
|
|
75718
|
+
};
|
|
75719
|
+
}, [props.state.getOffsetVisible()]);
|
|
75720
|
+
if (!props.state.getOffsetVisible()) return null;
|
|
75721
|
+
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: [
|
|
75722
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: label }),
|
|
75723
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75724
|
+
"input",
|
|
75725
|
+
{
|
|
75726
|
+
id: id2,
|
|
75727
|
+
type: "text",
|
|
75728
|
+
value: props.state.getText(field),
|
|
75729
|
+
onChange: (e) => props.state.setText(field, e.target.value),
|
|
75730
|
+
className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
|
|
75731
|
+
onBlur: () => props.state.validate(field)
|
|
75732
|
+
}
|
|
75733
|
+
) })
|
|
75734
|
+
] });
|
|
75735
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75736
|
+
"div",
|
|
75737
|
+
{
|
|
75738
|
+
className: "vc-fixed vc-inset-0 vc-flex vc-pointer-events-none",
|
|
75739
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
75740
|
+
"div",
|
|
75741
|
+
{
|
|
75742
|
+
ref: panelRef,
|
|
75743
|
+
style: { position: "absolute", top: panelPosition.top, left: panelPosition.left, width: "min(200px, 60%)" },
|
|
75744
|
+
className: "vim-sectionbox-offsets vc-pointer-events-auto vc-bg-white vc-relative",
|
|
75745
|
+
onClick: (e) => e.stopPropagation(),
|
|
75746
|
+
children: [
|
|
75747
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-sectionbox-header vc-px-2 vc-bg-gray-light vc-flex vc-items-center vc-justify-between ", children: [
|
|
75748
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "vc-flex vim-sectionbox-offsets-title vc-title vc-block", children: "Section Box Offsets" }),
|
|
75749
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75750
|
+
"button",
|
|
75751
|
+
{
|
|
75752
|
+
className: "vc-flex vc-border-none vc-bg-transparent vc-text-sm vc-cursor-pointer",
|
|
75753
|
+
onClick: () => props.state.setOffsetsVisible(false),
|
|
75754
|
+
children: close({ height: 12, width: 12, fill: "currentColor" })
|
|
75755
|
+
}
|
|
75756
|
+
)
|
|
75757
|
+
] }),
|
|
75758
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("dl", { className: "vc-text-xl vc-text-gray-darker vc-mb-2 vc-mx-2 ", children: [
|
|
75759
|
+
renderField("topOffset", "Top Offset", "topOffset"),
|
|
75760
|
+
renderField("sideOffseet", "Side Offset", "sideOffset"),
|
|
75761
|
+
renderField("bottomOffset", "Bottom Offset", "bottomOffset")
|
|
75762
|
+
] })
|
|
75763
|
+
]
|
|
75764
|
+
}
|
|
75765
|
+
)
|
|
75766
|
+
}
|
|
75767
|
+
);
|
|
75768
|
+
}
|
|
75769
|
+
function computePosition(panelRef) {
|
|
75770
|
+
const origin = document.getElementById("vim-control-bar");
|
|
75771
|
+
if (origin && panelRef.current) {
|
|
75772
|
+
const originRect = origin.getBoundingClientRect();
|
|
75773
|
+
const panelRect = panelRef.current.getBoundingClientRect();
|
|
75774
|
+
let left = originRect.left + originRect.width / 2 - panelRect.width / 2;
|
|
75775
|
+
let top = originRect.top - 10 - panelRect.height;
|
|
75776
|
+
if (top < 10) {
|
|
75777
|
+
top = originRect.bottom + 10;
|
|
75778
|
+
}
|
|
75779
|
+
if (left < 10) {
|
|
75780
|
+
left = 10;
|
|
75781
|
+
}
|
|
75782
|
+
if (left + panelRect.width > window.innerWidth - 10) {
|
|
75783
|
+
left = window.innerWidth - panelRect.width - 10;
|
|
75784
|
+
}
|
|
75785
|
+
return { top, left };
|
|
75786
|
+
}
|
|
75787
|
+
return { top: 0, left: 0 };
|
|
75788
|
+
}
|
|
75789
|
+
function addBox(b1, b2) {
|
|
75790
|
+
const r = b1.clone();
|
|
75791
|
+
r.min.x += b2.min.x;
|
|
75792
|
+
r.min.y += b2.min.y;
|
|
75793
|
+
r.min.z += b2.min.z;
|
|
75794
|
+
r.max.x += b2.max.x;
|
|
75795
|
+
r.max.y += b2.max.y;
|
|
75796
|
+
r.max.z += b2.max.z;
|
|
75797
|
+
return r;
|
|
75798
|
+
}
|
|
75799
|
+
function useSectionBox(adapter) {
|
|
75800
|
+
const [enable, setEnable] = useState(false);
|
|
75801
|
+
const [visible2, setVisible] = useState(false);
|
|
75802
|
+
const [offsetsVisible, setOffsetsVisible] = useState(false);
|
|
75803
|
+
const [auto, setAuto] = useState(false);
|
|
75804
|
+
const [offsets, setOffsets] = useState({
|
|
75805
|
+
topOffset: "1",
|
|
75806
|
+
sideOffset: "1",
|
|
75807
|
+
bottomOffset: "1"
|
|
75808
|
+
});
|
|
75809
|
+
const boxRef = useRef(adapter.getBox());
|
|
75810
|
+
const offsetBox = useMemo(() => offsetsToBox3(offsets), [offsets]);
|
|
75811
|
+
useEffect(() => {
|
|
75812
|
+
setVisible(enable);
|
|
75813
|
+
setAuto(false);
|
|
75814
|
+
setOffsetsVisible(false);
|
|
75815
|
+
setOffsets({
|
|
75816
|
+
topOffset: "1",
|
|
75817
|
+
sideOffset: "1",
|
|
75818
|
+
bottomOffset: "1"
|
|
75819
|
+
});
|
|
75820
|
+
void resetBox();
|
|
75821
|
+
}, [enable]);
|
|
75822
|
+
useEffect(() => {
|
|
75823
|
+
if (auto) sectionSelection();
|
|
75824
|
+
return auto ? adapter.onSelectionChanged.sub(sectionSelection) : () => {
|
|
75825
|
+
};
|
|
75826
|
+
}, [auto]);
|
|
75827
|
+
useEffect(() => {
|
|
75828
|
+
setBox(boxRef.current);
|
|
75829
|
+
}, [offsets]);
|
|
75830
|
+
useEffect(() => {
|
|
75831
|
+
adapter.setVisible(visible2);
|
|
75832
|
+
}, [visible2]);
|
|
75833
|
+
const setText = (field, value) => {
|
|
75834
|
+
const result = sanitize(value, false);
|
|
75835
|
+
if (result !== void 0) {
|
|
75836
|
+
setOffsets((prev) => ({ ...prev, [field]: result }));
|
|
75837
|
+
}
|
|
75838
|
+
};
|
|
75839
|
+
const validate = (field) => {
|
|
75840
|
+
const result = sanitize(offsets[field], true);
|
|
75841
|
+
if (result !== void 0) {
|
|
75842
|
+
setOffsets((prev) => ({ ...prev, [field]: result }));
|
|
75843
|
+
}
|
|
75844
|
+
};
|
|
75845
|
+
const setBox = (baseBox) => {
|
|
75846
|
+
boxRef.current = baseBox;
|
|
75847
|
+
const newBox = addBox(baseBox, offsetBox);
|
|
75848
|
+
adapter.fitBox(newBox);
|
|
75849
|
+
};
|
|
75850
|
+
const sectionSelection = async () => {
|
|
75851
|
+
try {
|
|
75852
|
+
const box = await adapter.getSelectionBox() ?? await adapter.getRendererBox();
|
|
75853
|
+
setBox(box);
|
|
75854
|
+
} catch (e) {
|
|
75855
|
+
console.error(e);
|
|
75856
|
+
}
|
|
75857
|
+
};
|
|
75858
|
+
const resetBox = async () => {
|
|
75859
|
+
const box = await adapter.getRendererBox();
|
|
75860
|
+
setBox(box);
|
|
75861
|
+
};
|
|
75862
|
+
return {
|
|
75863
|
+
setEnable,
|
|
75864
|
+
getEnable: () => enable,
|
|
75865
|
+
getVisible: () => visible2,
|
|
75866
|
+
setVisible,
|
|
75867
|
+
sectionSelection,
|
|
75868
|
+
sectionReset: resetBox,
|
|
75869
|
+
getOffsetVisible: () => offsetsVisible,
|
|
75870
|
+
setOffsetsVisible,
|
|
75871
|
+
getText: (field) => offsets[field],
|
|
75872
|
+
setText,
|
|
75873
|
+
getAuto: () => auto,
|
|
75874
|
+
setAuto,
|
|
75875
|
+
validate
|
|
75876
|
+
};
|
|
75877
|
+
}
|
|
75878
|
+
const sanitize = (value, strict) => {
|
|
75879
|
+
if (!strict) {
|
|
75880
|
+
if (value === "" || value === "-") return value;
|
|
75881
|
+
}
|
|
75882
|
+
const num = parseFloat(value);
|
|
75883
|
+
if (isNaN(num)) {
|
|
75884
|
+
return strict ? "1" : void 0;
|
|
75885
|
+
}
|
|
75886
|
+
return String(num);
|
|
75887
|
+
};
|
|
75888
|
+
function offsetsToBox3(offsets) {
|
|
75889
|
+
const getNumber = (field) => {
|
|
75890
|
+
const num = parseFloat(offsets[field]);
|
|
75891
|
+
return isNaN(num) ? 0 : num;
|
|
75892
|
+
};
|
|
75893
|
+
return new Box3(
|
|
75894
|
+
new Vector3(-getNumber("sideOffset"), -getNumber("sideOffset"), -getNumber("bottomOffset")),
|
|
75895
|
+
new Vector3(getNumber("sideOffset"), getNumber("sideOffset"), getNumber("topOffset"))
|
|
75896
|
+
);
|
|
75897
|
+
}
|
|
75898
|
+
function useWebglSectionBox(viewer) {
|
|
75899
|
+
const vimAdapter = {
|
|
75900
|
+
setVisible: (b) => {
|
|
75901
|
+
viewer.gizmos.sectionBox.visible = b;
|
|
75902
|
+
viewer.gizmos.sectionBox.interactive = b;
|
|
75903
|
+
},
|
|
75904
|
+
getBox: () => viewer.gizmos.sectionBox.box.clone(),
|
|
75905
|
+
fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
|
|
75906
|
+
getSelectionBox: () => Promise.resolve(viewer.selection.getBoundingBox()),
|
|
75907
|
+
getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
|
|
75908
|
+
onSceneChanged: viewer.renderer.onBoxUpdated,
|
|
75909
|
+
onSelectionChanged: viewer.selection.onValueChanged
|
|
75910
|
+
};
|
|
75911
|
+
viewer.gizmos.sectionBox.clip = true;
|
|
75912
|
+
return useSectionBox(vimAdapter);
|
|
75913
|
+
}
|
|
75554
75914
|
function createWebglComponent(container, componentSettings = {}, viewerSettings = {}) {
|
|
75555
75915
|
const promise2 = new DeferredPromise2();
|
|
75556
75916
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
@@ -75592,11 +75952,13 @@ function VimComponent(props) {
|
|
|
75592
75952
|
Math.min(props.container.root.clientWidth * 0.25, 340)
|
|
75593
75953
|
);
|
|
75594
75954
|
const [contextMenu2, setcontextMenu] = useState();
|
|
75595
|
-
const [
|
|
75955
|
+
const [controlBarCustom, setControlBarCustom] = useState();
|
|
75596
75956
|
const bimInfoRef = useBimInfo();
|
|
75597
75957
|
const viewerState = useViewerState(props.viewer);
|
|
75598
75958
|
const treeRef = useRef();
|
|
75599
75959
|
const performanceRef = useRef(null);
|
|
75960
|
+
const sectionBox2 = useWebglSectionBox(props.viewer);
|
|
75961
|
+
const controlBar2 = useControlBar(props.viewer, camera2, modal, side, isolation, cursor, settings2.value, sectionBox2, controlBarCustom);
|
|
75600
75962
|
useEffect(() => {
|
|
75601
75963
|
var _a3;
|
|
75602
75964
|
side.setHasBim(((_a3 = viewerState.vim) == null ? void 0 : _a3.bim) !== void 0);
|
|
@@ -75625,7 +75987,7 @@ function VimComponent(props) {
|
|
|
75625
75987
|
customize: (v) => setcontextMenu(() => v)
|
|
75626
75988
|
},
|
|
75627
75989
|
controlBar: {
|
|
75628
|
-
customize: (v) =>
|
|
75990
|
+
customize: (v) => setControlBarCustom(() => v)
|
|
75629
75991
|
},
|
|
75630
75992
|
modal,
|
|
75631
75993
|
bimInfo: bimInfoRef,
|
|
@@ -75679,16 +76041,11 @@ function VimComponent(props) {
|
|
|
75679
76041
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75680
76042
|
ControlBar,
|
|
75681
76043
|
{
|
|
75682
|
-
|
|
75683
|
-
|
|
75684
|
-
modal,
|
|
75685
|
-
side,
|
|
75686
|
-
isolation,
|
|
75687
|
-
cursor,
|
|
75688
|
-
settings: settings2.value,
|
|
75689
|
-
customization: controlBar2
|
|
76044
|
+
content: controlBar2,
|
|
76045
|
+
show: isTrue(settings2.value.ui.controlBar)
|
|
75690
76046
|
}
|
|
75691
76047
|
),
|
|
76048
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 }),
|
|
75692
76049
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75693
76050
|
AxesPanelMemo,
|
|
75694
76051
|
{
|
|
@@ -76014,12 +76371,53 @@ function getRequestErrorMessage(source, error) {
|
|
|
76014
76371
|
return serverConnectionError(source.url);
|
|
76015
76372
|
}
|
|
76016
76373
|
}
|
|
76374
|
+
function updateModal(modal, state) {
|
|
76375
|
+
if (state.status === "connected") {
|
|
76376
|
+
modal.loading(void 0);
|
|
76377
|
+
modal.message(void 0);
|
|
76378
|
+
}
|
|
76379
|
+
if (state.status === "connecting") {
|
|
76380
|
+
if (modal.current === void 0 || modal.current.type === "loading") {
|
|
76381
|
+
modal.loading({ message: "Connecting to VIM Ultra server..." });
|
|
76382
|
+
}
|
|
76383
|
+
}
|
|
76384
|
+
if (state.status === "error") {
|
|
76385
|
+
console.log("Error loading vim", state);
|
|
76386
|
+
modal.message(getErrorMessage(state));
|
|
76387
|
+
}
|
|
76388
|
+
}
|
|
76389
|
+
async function updateProgress(request2, modal) {
|
|
76390
|
+
for await (const progress of request2.getProgress()) {
|
|
76391
|
+
if (request2.isCompleted) break;
|
|
76392
|
+
modal.loading({ message: "Loading File in VIM Ultra mode", progress });
|
|
76393
|
+
}
|
|
76394
|
+
}
|
|
76395
|
+
function useUltraSectionBox(viewer) {
|
|
76396
|
+
const ultraAdapter = {
|
|
76397
|
+
setVisible: (b) => {
|
|
76398
|
+
viewer.sectionBox.visible = b;
|
|
76399
|
+
viewer.sectionBox.interactive = b;
|
|
76400
|
+
},
|
|
76401
|
+
getBox: () => viewer.sectionBox.getBox().clone(),
|
|
76402
|
+
fitBox: (box) => viewer.sectionBox.fitBox(box),
|
|
76403
|
+
getSelectionBox: () => viewer.selection.getBoundingBox(),
|
|
76404
|
+
getRendererBox: () => viewer.renderer.getBoundingBox(),
|
|
76405
|
+
onSelectionChanged: viewer.selection.onValueChanged,
|
|
76406
|
+
onSceneChanged: viewer.vims.onChanged
|
|
76407
|
+
};
|
|
76408
|
+
return useSectionBox(ultraAdapter);
|
|
76409
|
+
}
|
|
76410
|
+
function useUltraControlBar(viewer, section, customization) {
|
|
76411
|
+
let controlBar2 = [controlBarSectionBox(section, viewer.selection.count > 0)];
|
|
76412
|
+
controlBar2 = (customization == null ? void 0 : customization(controlBar2)) ?? controlBar2;
|
|
76413
|
+
return controlBar2;
|
|
76414
|
+
}
|
|
76017
76415
|
function createUltraComponent(container) {
|
|
76018
76416
|
const promise2 = new DeferredPromise2();
|
|
76019
76417
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
76020
76418
|
const viewer = Viewer2.createWithCanvas(cmpContainer.gfx);
|
|
76021
76419
|
const reactRoot = clientExports.createRoot(cmpContainer.ui);
|
|
76022
|
-
const
|
|
76420
|
+
const attachDispose = (cmp) => {
|
|
76023
76421
|
cmp.dispose = () => {
|
|
76024
76422
|
viewer.dispose();
|
|
76025
76423
|
cmpContainer.dispose();
|
|
@@ -76033,7 +76431,7 @@ function createUltraComponent(container) {
|
|
|
76033
76431
|
{
|
|
76034
76432
|
container: cmpContainer,
|
|
76035
76433
|
viewer,
|
|
76036
|
-
onMount: (cmp) => promise2.resolve(
|
|
76434
|
+
onMount: (cmp) => promise2.resolve(attachDispose(cmp))
|
|
76037
76435
|
}
|
|
76038
76436
|
)
|
|
76039
76437
|
);
|
|
@@ -76041,31 +76439,36 @@ function createUltraComponent(container) {
|
|
|
76041
76439
|
}
|
|
76042
76440
|
function UltraComponent(props) {
|
|
76043
76441
|
const modal = useModal(true);
|
|
76442
|
+
const sectionBox2 = useUltraSectionBox(props.viewer);
|
|
76443
|
+
const controlBar2 = useUltraControlBar(props.viewer, sectionBox2, (_2) => _2);
|
|
76444
|
+
const side = useSideState(true, 400);
|
|
76445
|
+
const [_, setSelectState] = useState(0);
|
|
76044
76446
|
useEffect(() => {
|
|
76045
76447
|
props.viewer.onStateChanged.subscribe((state) => updateModal(modal, state));
|
|
76046
|
-
props.
|
|
76448
|
+
props.viewer.selection.onValueChanged.subscribe(() => {
|
|
76449
|
+
setSelectState((i) => (i + 1) % 2);
|
|
76450
|
+
});
|
|
76451
|
+
props.onMount(createComponentRef(props.viewer, modal));
|
|
76047
76452
|
}, []);
|
|
76048
76453
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76049
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76454
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
|
|
76455
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76456
|
+
whenTrue(true, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
|
|
76457
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
|
|
76458
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76459
|
+
ControlBar,
|
|
76460
|
+
{
|
|
76461
|
+
content: controlBar2,
|
|
76462
|
+
show: true
|
|
76463
|
+
}
|
|
76464
|
+
),
|
|
76465
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 })
|
|
76466
|
+
] });
|
|
76467
|
+
} }),
|
|
76050
76468
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { state: modal })
|
|
76051
76469
|
] });
|
|
76052
76470
|
}
|
|
76053
|
-
function
|
|
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) {
|
|
76471
|
+
function createComponentRef(viewer, modal) {
|
|
76069
76472
|
function load(source) {
|
|
76070
76473
|
const request2 = viewer.loadVim(source);
|
|
76071
76474
|
void updateProgress(request2, modal);
|
|
@@ -76090,12 +76493,6 @@ function ToRef(viewer, modal) {
|
|
|
76090
76493
|
load
|
|
76091
76494
|
};
|
|
76092
76495
|
}
|
|
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
76496
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76100
76497
|
__proto__: null,
|
|
76101
76498
|
UltraComponent,
|