vim-web 0.3.44-dev.45 → 0.3.44-dev.46
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/types/react-viewers/controlbar/controlBarIds.d.ts +4 -3
- package/dist/types/react-viewers/panels/icons.d.ts +1 -0
- package/dist/types/react-viewers/settings/settings.d.ts +3 -1
- package/dist/types/react-viewers/state/controlBarState.d.ts +1 -25
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +2 -14
- package/dist/vim-web.iife.js +86 -41
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +86 -41
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ export declare const ids: {
|
|
|
6
6
|
sectionSettings: string;
|
|
7
7
|
sectionMeasure: string;
|
|
8
8
|
sectionSectionBox: string;
|
|
9
|
+
buttonCameraFrameSelection: string;
|
|
10
|
+
buttonCameraFrameScene: string;
|
|
9
11
|
buttonCameraAuto: string;
|
|
10
12
|
buttonCameraOrbit: string;
|
|
11
13
|
buttonCameraLook: string;
|
|
@@ -17,13 +19,12 @@ export declare const ids: {
|
|
|
17
19
|
buttonHelp: string;
|
|
18
20
|
buttonMaximize: string;
|
|
19
21
|
buttonToggleIsolation: string;
|
|
20
|
-
buttonZoomToFit: string;
|
|
21
22
|
buttonSectionBox: string;
|
|
22
23
|
buttonMeasure: string;
|
|
23
24
|
buttonSectionBoxEnable: string;
|
|
24
25
|
buttonSectionBoxVisible: string;
|
|
25
|
-
|
|
26
|
+
buttonSectionBoxToSelection: string;
|
|
27
|
+
buttonSectionBoxToScene: string;
|
|
26
28
|
buttonSectionBoxAuto: string;
|
|
27
|
-
buttonSectionBoxReset: string;
|
|
28
29
|
buttonSectionBoxSettings: string;
|
|
29
30
|
};
|
|
@@ -27,6 +27,7 @@ export declare function arrowLeft({ height, width, fill, className }: IconOption
|
|
|
27
27
|
export declare function fullArrowLeft({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export declare function visible({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export declare function hidden({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function frameScene({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export declare function autoCamera({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
31
32
|
export declare function orbit({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
export declare function look({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -61,7 +61,9 @@ export type ComponentSettings = {
|
|
|
61
61
|
pan: UserBoolean;
|
|
62
62
|
zoom: UserBoolean;
|
|
63
63
|
zoomWindow: UserBoolean;
|
|
64
|
-
|
|
64
|
+
autoCamera: UserBoolean;
|
|
65
|
+
frameSelection: UserBoolean;
|
|
66
|
+
frameScene: UserBoolean;
|
|
65
67
|
sectioningMode: UserBoolean;
|
|
66
68
|
measuringMode: UserBoolean;
|
|
67
69
|
toggleIsolation: UserBoolean;
|
|
@@ -35,19 +35,7 @@ export declare function controlBarActions(camera: CameraRef, settings: Component
|
|
|
35
35
|
style: typeof ControlBar.buttonDefaultStyle;
|
|
36
36
|
})[];
|
|
37
37
|
};
|
|
38
|
-
export declare function controlBarCamera(camera: CameraRef):
|
|
39
|
-
id: string;
|
|
40
|
-
enable: () => boolean;
|
|
41
|
-
style: string;
|
|
42
|
-
buttons: {
|
|
43
|
-
id: string;
|
|
44
|
-
tip: string;
|
|
45
|
-
isOn: () => boolean;
|
|
46
|
-
action: () => void;
|
|
47
|
-
icon: typeof Icons.autoCamera;
|
|
48
|
-
style: typeof ControlBar.buttonDefaultStyle;
|
|
49
|
-
}[];
|
|
50
|
-
};
|
|
38
|
+
export declare function controlBarCamera(camera: CameraRef): ControlBar.IControlBarSection;
|
|
51
39
|
/**
|
|
52
40
|
* Combines all control bar sections into one control bar.
|
|
53
41
|
*/
|
|
@@ -72,16 +60,4 @@ export declare function useControlBar(viewer: VIM.Viewer, camera: CameraRef, mod
|
|
|
72
60
|
icon: typeof Icons.measure;
|
|
73
61
|
style: typeof ControlBar.buttonDefaultStyle;
|
|
74
62
|
})[];
|
|
75
|
-
} | {
|
|
76
|
-
id: string;
|
|
77
|
-
enable: () => boolean;
|
|
78
|
-
style: string;
|
|
79
|
-
buttons: {
|
|
80
|
-
id: string;
|
|
81
|
-
tip: string;
|
|
82
|
-
isOn: () => boolean;
|
|
83
|
-
action: () => void;
|
|
84
|
-
icon: typeof Icons.autoCamera;
|
|
85
|
-
style: typeof ControlBar.buttonDefaultStyle;
|
|
86
|
-
}[];
|
|
87
63
|
})[];
|
|
@@ -2,19 +2,7 @@ import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
|
2
2
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
3
3
|
import * as Ultra from '../../core-viewers/ultra/index';
|
|
4
4
|
import { CameraRef } from '../state/cameraState';
|
|
5
|
-
import { ControlBar
|
|
5
|
+
import { ControlBar } from '..';
|
|
6
6
|
export { buttonDefaultStyle, buttonBlueStyle } from '../controlbar/controlBarButton';
|
|
7
7
|
export { sectionDefaultStyle, sectionBlueStyle } from '../controlbar/controlBarSection';
|
|
8
|
-
export declare function useUltraControlBar(viewer: Ultra.UltraCoreViewer, section: SectionBoxRef, camera: CameraRef, customization: ControlBarCustomization | undefined):
|
|
9
|
-
id: string;
|
|
10
|
-
enable: () => boolean;
|
|
11
|
-
style: string;
|
|
12
|
-
buttons: {
|
|
13
|
-
id: string;
|
|
14
|
-
tip: string;
|
|
15
|
-
isOn: () => boolean;
|
|
16
|
-
action: () => void;
|
|
17
|
-
icon: typeof Icons.autoCamera;
|
|
18
|
-
style: typeof ControlBar.buttonDefaultStyle;
|
|
19
|
-
}[];
|
|
20
|
-
})[];
|
|
8
|
+
export declare function useUltraControlBar(viewer: Ultra.UltraCoreViewer, section: SectionBoxRef, camera: CameraRef, customization: ControlBarCustomization | undefined): ControlBar.IControlBarSection[];
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -66382,6 +66382,55 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
66382
66382
|
}
|
|
66383
66383
|
);
|
|
66384
66384
|
}
|
|
66385
|
+
function frameScene({ height, width, fill: fill2, className }) {
|
|
66386
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
66387
|
+
"svg",
|
|
66388
|
+
{
|
|
66389
|
+
className,
|
|
66390
|
+
height,
|
|
66391
|
+
width,
|
|
66392
|
+
viewBox: "0 0 256 256",
|
|
66393
|
+
children: [
|
|
66394
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
66395
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66396
|
+
"path",
|
|
66397
|
+
{
|
|
66398
|
+
fill: fill2,
|
|
66399
|
+
d: "M236,12H20C9,12,0,21,0,32V224c0,11,9,20,20,20H236c11,0,20-9,20-20V32c0-11-9-20-20-20Zm-4,200c0,4.418-3.582,8-8,8H32c-4.418,0-8-3.582-8-8V44c0-4.418,3.582-8,8-8H224c4.418,0,8,3.582,8,8V212Z"
|
|
66400
|
+
}
|
|
66401
|
+
),
|
|
66402
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66403
|
+
"path",
|
|
66404
|
+
{
|
|
66405
|
+
fill: fill2,
|
|
66406
|
+
d: "M210,204h-42c-6.627,0-12-5.373-12-12h0c0-6.627,5.373-12,12-12h24s0-24,0-24c0-6.627,5.373-12,12-12h0\r\n c6.627,0,12,5.373,12,12v42c0,3.314-2.686,6-6,6Z"
|
|
66407
|
+
}
|
|
66408
|
+
),
|
|
66409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66410
|
+
"path",
|
|
66411
|
+
{
|
|
66412
|
+
fill: fill2,
|
|
66413
|
+
d: "M40,198v-42c0-6.627,5.373-12,12-12h0c6.627,0,12,5.373,12,12v24s24,0,24,0\r\n c6.627,0,12,5.373,12,12h0c0,6.627-5.373,12-12,12H46c-3.314,0-6-2.686-6-6Z"
|
|
66414
|
+
}
|
|
66415
|
+
),
|
|
66416
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66417
|
+
"path",
|
|
66418
|
+
{
|
|
66419
|
+
fill: fill2,
|
|
66420
|
+
d: "M46,52h42c6.627,0,12,5.373,12,12h0c0,6.627-5.373,12-12,12h-24s0,24,0,24\r\n c0,6.627-5.373,12-12,12h0c-6.627,0-12-5.373-12-12V58c0-3.314,2.686-6,6-6Z"
|
|
66421
|
+
}
|
|
66422
|
+
),
|
|
66423
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66424
|
+
"path",
|
|
66425
|
+
{
|
|
66426
|
+
fill: fill2,
|
|
66427
|
+
d: "M216,58v42c0,6.627-5.373,12-12,12h0c-6.627,0-12-5.373-12-12v-24s-24,0-24,0\r\n c-6.627,0-12-5.373-12-12h0c0-6.627,5.373-12,12-12h42c3.314,0,6,2.686,6,6Z"
|
|
66428
|
+
}
|
|
66429
|
+
)
|
|
66430
|
+
]
|
|
66431
|
+
}
|
|
66432
|
+
);
|
|
66433
|
+
}
|
|
66385
66434
|
function autoCamera({ height, width, fill: fill2 = "", className }) {
|
|
66386
66435
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
66387
66436
|
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
@@ -66930,6 +66979,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
66930
66979
|
close,
|
|
66931
66980
|
collapse,
|
|
66932
66981
|
frameRect,
|
|
66982
|
+
frameScene,
|
|
66933
66983
|
frameSelection,
|
|
66934
66984
|
fullArrowLeft,
|
|
66935
66985
|
fullsScreen,
|
|
@@ -66975,7 +67025,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
66975
67025
|
return settings2.ui.orthographic || settings2.ui.resetCamera || settings2.ui.enableGhost;
|
|
66976
67026
|
}
|
|
66977
67027
|
function anyUiCursorButton(settings2) {
|
|
66978
|
-
return isTrue(settings2.ui.orbit) || isTrue(settings2.ui.lookAround) || isTrue(settings2.ui.pan) || isTrue(settings2.ui.zoom) || isTrue(settings2.ui.zoomWindow)
|
|
67028
|
+
return isTrue(settings2.ui.orbit) || isTrue(settings2.ui.lookAround) || isTrue(settings2.ui.pan) || isTrue(settings2.ui.zoom) || isTrue(settings2.ui.zoomWindow);
|
|
66979
67029
|
}
|
|
66980
67030
|
function anyUiSettingButton(settings2) {
|
|
66981
67031
|
return isTrue(settings2.ui.projectInspector) || isTrue(settings2.ui.settings) || isTrue(settings2.ui.help) || isTrue(settings2.ui.maximise);
|
|
@@ -67013,7 +67063,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67013
67063
|
pan: true,
|
|
67014
67064
|
zoom: true,
|
|
67015
67065
|
zoomWindow: true,
|
|
67016
|
-
|
|
67066
|
+
// Control bar - camera
|
|
67067
|
+
autoCamera: true,
|
|
67068
|
+
frameScene: true,
|
|
67069
|
+
frameSelection: true,
|
|
67017
67070
|
// Control bar - tools
|
|
67018
67071
|
sectioningMode: true,
|
|
67019
67072
|
measuringMode: true,
|
|
@@ -67172,7 +67225,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67172
67225
|
sectionMeasure: "controlBar.sectionMeasure",
|
|
67173
67226
|
sectionSectionBox: "controlBar.sectionSectionBox",
|
|
67174
67227
|
// Camera buttons
|
|
67228
|
+
buttonCameraFrameSelection: "controlBar.camera.frameSelection",
|
|
67229
|
+
buttonCameraFrameScene: "controlBar.camera.frameScene",
|
|
67175
67230
|
buttonCameraAuto: "controlBar.camera.auto",
|
|
67231
|
+
// Camera Control buttons
|
|
67176
67232
|
buttonCameraOrbit: "controlBar.camera.orbit",
|
|
67177
67233
|
buttonCameraLook: "controlBarcamera.look",
|
|
67178
67234
|
buttonCameraPan: "controlBar.camera.pan",
|
|
@@ -67185,16 +67241,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67185
67241
|
buttonMaximize: "controlBar.maximize",
|
|
67186
67242
|
// Action Buttons
|
|
67187
67243
|
buttonToggleIsolation: "controlBar.action.toggleIsolation",
|
|
67188
|
-
buttonZoomToFit: "controlBar.action.zoomToFit",
|
|
67189
67244
|
// Tools buttons
|
|
67190
67245
|
buttonSectionBox: "controlBar.sectionBox",
|
|
67191
67246
|
buttonMeasure: "controlBar.measure",
|
|
67192
67247
|
// Section box buttons
|
|
67193
67248
|
buttonSectionBoxEnable: "controlBar.sectionBox.enable",
|
|
67194
67249
|
buttonSectionBoxVisible: "controlBar.sectionBox.visible",
|
|
67195
|
-
|
|
67250
|
+
buttonSectionBoxToSelection: "controlBar.sectionBox.sectionSelection",
|
|
67251
|
+
buttonSectionBoxToScene: "controlBar.sectionBox.sectionScene",
|
|
67196
67252
|
buttonSectionBoxAuto: "controlBar.sectionBox.auto",
|
|
67197
|
-
buttonSectionBoxReset: "controlBar.sectionBox.reset",
|
|
67198
67253
|
buttonSectionBoxSettings: "controlBar.sectionBox.settings"
|
|
67199
67254
|
};
|
|
67200
67255
|
function ControlBar(props) {
|
|
@@ -67427,7 +67482,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67427
67482
|
icon: sectionBox
|
|
67428
67483
|
},
|
|
67429
67484
|
{
|
|
67430
|
-
id: ids.
|
|
67485
|
+
id: ids.buttonSectionBoxToSelection,
|
|
67431
67486
|
tip: "Fit Section",
|
|
67432
67487
|
enabled: () => section.enable.get(),
|
|
67433
67488
|
isOn: () => hasSelection,
|
|
@@ -67436,7 +67491,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67436
67491
|
icon: sectionBoxShrink
|
|
67437
67492
|
},
|
|
67438
67493
|
{
|
|
67439
|
-
id: ids.
|
|
67494
|
+
id: ids.buttonSectionBoxToScene,
|
|
67440
67495
|
tip: "Reset Section",
|
|
67441
67496
|
enabled: () => section.enable.get(),
|
|
67442
67497
|
style: (on) => buttonDefaultStyle(on),
|
|
@@ -67536,15 +67591,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67536
67591
|
enable: () => true,
|
|
67537
67592
|
style: sectionDefaultStyle,
|
|
67538
67593
|
buttons: [
|
|
67539
|
-
{
|
|
67540
|
-
id: ids.buttonZoomToFit,
|
|
67541
|
-
enabled: () => isTrue(settings2.ui.zoomToFit),
|
|
67542
|
-
tip: "Frame Camera",
|
|
67543
|
-
action: () => camera2.frameSelection.call(),
|
|
67544
|
-
icon: frameSelection,
|
|
67545
|
-
isOn: () => false,
|
|
67546
|
-
style: buttonDefaultStyle
|
|
67547
|
-
},
|
|
67548
67594
|
{
|
|
67549
67595
|
id: ids.buttonToggleIsolation,
|
|
67550
67596
|
enabled: () => isTrue(settings2.ui.toggleIsolation),
|
|
@@ -67620,6 +67666,24 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67620
67666
|
action: () => camera2.autoCamera.set(!camera2.autoCamera.get()),
|
|
67621
67667
|
icon: autoCamera,
|
|
67622
67668
|
style: buttonDefaultStyle
|
|
67669
|
+
},
|
|
67670
|
+
{
|
|
67671
|
+
id: ids.buttonCameraFrameSelection,
|
|
67672
|
+
// enabled: () => isTrue(settings.ui.zoomToFit), TODO: Implement ui toggles in Ultra
|
|
67673
|
+
tip: "Frame Selection",
|
|
67674
|
+
action: () => camera2.frameSelection.call(),
|
|
67675
|
+
icon: frameSelection,
|
|
67676
|
+
isOn: () => false,
|
|
67677
|
+
style: buttonDefaultStyle
|
|
67678
|
+
},
|
|
67679
|
+
{
|
|
67680
|
+
id: ids.buttonCameraFrameScene,
|
|
67681
|
+
// enabled: () => isTrue(settings.ui.zoomToFit), TODO: Implement ui toggles in Ultra
|
|
67682
|
+
tip: "Frame All",
|
|
67683
|
+
action: () => camera2.frameScene.call(),
|
|
67684
|
+
icon: frameScene,
|
|
67685
|
+
isOn: () => false,
|
|
67686
|
+
style: buttonDefaultStyle
|
|
67623
67687
|
}
|
|
67624
67688
|
]
|
|
67625
67689
|
};
|
|
@@ -74039,9 +74103,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74039
74103
|
(settings2, value) => settings2.ui.zoomWindow = value
|
|
74040
74104
|
),
|
|
74041
74105
|
settingsToggle(
|
|
74042
|
-
"Show Zoom
|
|
74043
|
-
(settings2) => settings2.ui.
|
|
74044
|
-
(settings2, value) => settings2.ui.
|
|
74106
|
+
"Show Zoom Frame Selection Button",
|
|
74107
|
+
(settings2) => settings2.ui.frameSelection,
|
|
74108
|
+
(settings2, value) => settings2.ui.frameSelection = value
|
|
74045
74109
|
),
|
|
74046
74110
|
settingsSubtitle("Control Bar - Tools"),
|
|
74047
74111
|
settingsToggle(
|
|
@@ -75538,7 +75602,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75538
75602
|
const box = await getSelectionBox.call() ?? await getSceneBox.call();
|
|
75539
75603
|
frame(adapter, section, box);
|
|
75540
75604
|
});
|
|
75541
|
-
const
|
|
75605
|
+
const frameScene2 = useAsyncFuncRef(async () => {
|
|
75542
75606
|
const box = await getSceneBox.call();
|
|
75543
75607
|
frame(adapter, section, box);
|
|
75544
75608
|
});
|
|
@@ -75548,7 +75612,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75548
75612
|
autoCamera: autoCamera2,
|
|
75549
75613
|
reset,
|
|
75550
75614
|
frameSelection: frameSelection2,
|
|
75551
|
-
frameScene
|
|
75615
|
+
frameScene: frameScene2
|
|
75552
75616
|
};
|
|
75553
75617
|
}
|
|
75554
75618
|
function frame(adapter, section, box) {
|
|
@@ -76074,29 +76138,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76074
76138
|
function useUltraControlBar(viewer, section, camera2, customization) {
|
|
76075
76139
|
const sectionSectionBox = controlBarSectionBox(section, viewer.selection.count > 0);
|
|
76076
76140
|
const sectionCamera = controlBarCamera(camera2);
|
|
76077
|
-
|
|
76078
|
-
let bar = [sectionCamera, frame2, sectionSectionBox];
|
|
76141
|
+
let bar = [sectionCamera, sectionSectionBox];
|
|
76079
76142
|
bar = (customization == null ? void 0 : customization(bar)) ?? bar;
|
|
76080
76143
|
return bar;
|
|
76081
76144
|
}
|
|
76082
|
-
function frameSection(camera2) {
|
|
76083
|
-
return {
|
|
76084
|
-
id: ids.sectionActions,
|
|
76085
|
-
enable: () => true,
|
|
76086
|
-
style: sectionDefaultStyle,
|
|
76087
|
-
buttons: [
|
|
76088
|
-
{
|
|
76089
|
-
id: ids.buttonZoomToFit,
|
|
76090
|
-
enabled: () => true,
|
|
76091
|
-
tip: "Frame Camera",
|
|
76092
|
-
action: () => camera2.frameSelection.call(),
|
|
76093
|
-
icon: frameSelection,
|
|
76094
|
-
isOn: () => false,
|
|
76095
|
-
style: buttonDefaultStyle
|
|
76096
|
-
}
|
|
76097
|
-
]
|
|
76098
|
-
};
|
|
76099
|
-
}
|
|
76100
76145
|
function useUltraCamera(viewer, section) {
|
|
76101
76146
|
return useCamera({
|
|
76102
76147
|
onSelectionChanged: viewer.selection.onValueChanged,
|