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/vim-web.js CHANGED
@@ -66366,6 +66366,55 @@ function hidden({ height, width, fill: fill2, className = "" }) {
66366
66366
  }
66367
66367
  );
66368
66368
  }
66369
+ function frameScene({ height, width, fill: fill2, className }) {
66370
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
66371
+ "svg",
66372
+ {
66373
+ className,
66374
+ height,
66375
+ width,
66376
+ viewBox: "0 0 256 256",
66377
+ children: [
66378
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
66379
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66380
+ "path",
66381
+ {
66382
+ fill: fill2,
66383
+ 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"
66384
+ }
66385
+ ),
66386
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66387
+ "path",
66388
+ {
66389
+ fill: fill2,
66390
+ 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"
66391
+ }
66392
+ ),
66393
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66394
+ "path",
66395
+ {
66396
+ fill: fill2,
66397
+ 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"
66398
+ }
66399
+ ),
66400
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66401
+ "path",
66402
+ {
66403
+ fill: fill2,
66404
+ 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"
66405
+ }
66406
+ ),
66407
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66408
+ "path",
66409
+ {
66410
+ fill: fill2,
66411
+ 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"
66412
+ }
66413
+ )
66414
+ ]
66415
+ }
66416
+ );
66417
+ }
66369
66418
  function autoCamera({ height, width, fill: fill2 = "", className }) {
66370
66419
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
66371
66420
  /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
@@ -66914,6 +66963,7 @@ const icons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
66914
66963
  close,
66915
66964
  collapse,
66916
66965
  frameRect,
66966
+ frameScene,
66917
66967
  frameSelection,
66918
66968
  fullArrowLeft,
66919
66969
  fullsScreen,
@@ -66959,7 +67009,7 @@ function anyUiAxesButton(settings2) {
66959
67009
  return settings2.ui.orthographic || settings2.ui.resetCamera || settings2.ui.enableGhost;
66960
67010
  }
66961
67011
  function anyUiCursorButton(settings2) {
66962
- 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);
67012
+ return isTrue(settings2.ui.orbit) || isTrue(settings2.ui.lookAround) || isTrue(settings2.ui.pan) || isTrue(settings2.ui.zoom) || isTrue(settings2.ui.zoomWindow);
66963
67013
  }
66964
67014
  function anyUiSettingButton(settings2) {
66965
67015
  return isTrue(settings2.ui.projectInspector) || isTrue(settings2.ui.settings) || isTrue(settings2.ui.help) || isTrue(settings2.ui.maximise);
@@ -66997,7 +67047,10 @@ const defaultSettings = {
66997
67047
  pan: true,
66998
67048
  zoom: true,
66999
67049
  zoomWindow: true,
67000
- zoomToFit: true,
67050
+ // Control bar - camera
67051
+ autoCamera: true,
67052
+ frameScene: true,
67053
+ frameSelection: true,
67001
67054
  // Control bar - tools
67002
67055
  sectioningMode: true,
67003
67056
  measuringMode: true,
@@ -67156,7 +67209,10 @@ const ids = {
67156
67209
  sectionMeasure: "controlBar.sectionMeasure",
67157
67210
  sectionSectionBox: "controlBar.sectionSectionBox",
67158
67211
  // Camera buttons
67212
+ buttonCameraFrameSelection: "controlBar.camera.frameSelection",
67213
+ buttonCameraFrameScene: "controlBar.camera.frameScene",
67159
67214
  buttonCameraAuto: "controlBar.camera.auto",
67215
+ // Camera Control buttons
67160
67216
  buttonCameraOrbit: "controlBar.camera.orbit",
67161
67217
  buttonCameraLook: "controlBarcamera.look",
67162
67218
  buttonCameraPan: "controlBar.camera.pan",
@@ -67169,16 +67225,15 @@ const ids = {
67169
67225
  buttonMaximize: "controlBar.maximize",
67170
67226
  // Action Buttons
67171
67227
  buttonToggleIsolation: "controlBar.action.toggleIsolation",
67172
- buttonZoomToFit: "controlBar.action.zoomToFit",
67173
67228
  // Tools buttons
67174
67229
  buttonSectionBox: "controlBar.sectionBox",
67175
67230
  buttonMeasure: "controlBar.measure",
67176
67231
  // Section box buttons
67177
67232
  buttonSectionBoxEnable: "controlBar.sectionBox.enable",
67178
67233
  buttonSectionBoxVisible: "controlBar.sectionBox.visible",
67179
- buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
67234
+ buttonSectionBoxToSelection: "controlBar.sectionBox.sectionSelection",
67235
+ buttonSectionBoxToScene: "controlBar.sectionBox.sectionScene",
67180
67236
  buttonSectionBoxAuto: "controlBar.sectionBox.auto",
67181
- buttonSectionBoxReset: "controlBar.sectionBox.reset",
67182
67237
  buttonSectionBoxSettings: "controlBar.sectionBox.settings"
67183
67238
  };
67184
67239
  function ControlBar(props) {
@@ -67411,7 +67466,7 @@ function controlBarSectionBox(section, hasSelection) {
67411
67466
  icon: sectionBox
67412
67467
  },
67413
67468
  {
67414
- id: ids.buttonSectionBoxShrinkToSelection,
67469
+ id: ids.buttonSectionBoxToSelection,
67415
67470
  tip: "Fit Section",
67416
67471
  enabled: () => section.enable.get(),
67417
67472
  isOn: () => hasSelection,
@@ -67420,7 +67475,7 @@ function controlBarSectionBox(section, hasSelection) {
67420
67475
  icon: sectionBoxShrink
67421
67476
  },
67422
67477
  {
67423
- id: ids.buttonSectionBoxReset,
67478
+ id: ids.buttonSectionBoxToScene,
67424
67479
  tip: "Reset Section",
67425
67480
  enabled: () => section.enable.get(),
67426
67481
  style: (on) => buttonDefaultStyle(on),
@@ -67520,15 +67575,6 @@ function controlBarActions(camera2, settings2, isolation, measure$1) {
67520
67575
  enable: () => true,
67521
67576
  style: sectionDefaultStyle,
67522
67577
  buttons: [
67523
- {
67524
- id: ids.buttonZoomToFit,
67525
- enabled: () => isTrue(settings2.ui.zoomToFit),
67526
- tip: "Frame Camera",
67527
- action: () => camera2.frameSelection.call(),
67528
- icon: frameSelection,
67529
- isOn: () => false,
67530
- style: buttonDefaultStyle
67531
- },
67532
67578
  {
67533
67579
  id: ids.buttonToggleIsolation,
67534
67580
  enabled: () => isTrue(settings2.ui.toggleIsolation),
@@ -67604,6 +67650,24 @@ function controlBarCamera(camera2) {
67604
67650
  action: () => camera2.autoCamera.set(!camera2.autoCamera.get()),
67605
67651
  icon: autoCamera,
67606
67652
  style: buttonDefaultStyle
67653
+ },
67654
+ {
67655
+ id: ids.buttonCameraFrameSelection,
67656
+ // enabled: () => isTrue(settings.ui.zoomToFit), TODO: Implement ui toggles in Ultra
67657
+ tip: "Frame Selection",
67658
+ action: () => camera2.frameSelection.call(),
67659
+ icon: frameSelection,
67660
+ isOn: () => false,
67661
+ style: buttonDefaultStyle
67662
+ },
67663
+ {
67664
+ id: ids.buttonCameraFrameScene,
67665
+ // enabled: () => isTrue(settings.ui.zoomToFit), TODO: Implement ui toggles in Ultra
67666
+ tip: "Frame All",
67667
+ action: () => camera2.frameScene.call(),
67668
+ icon: frameScene,
67669
+ isOn: () => false,
67670
+ style: buttonDefaultStyle
67607
67671
  }
67608
67672
  ]
67609
67673
  };
@@ -74023,9 +74087,9 @@ function MenuSettings(props) {
74023
74087
  (settings2, value) => settings2.ui.zoomWindow = value
74024
74088
  ),
74025
74089
  settingsToggle(
74026
- "Show Zoom To Fit Button",
74027
- (settings2) => settings2.ui.zoomToFit,
74028
- (settings2, value) => settings2.ui.zoomToFit = value
74090
+ "Show Zoom Frame Selection Button",
74091
+ (settings2) => settings2.ui.frameSelection,
74092
+ (settings2, value) => settings2.ui.frameSelection = value
74029
74093
  ),
74030
74094
  settingsSubtitle("Control Bar - Tools"),
74031
74095
  settingsToggle(
@@ -75522,7 +75586,7 @@ function useCamera(adapter, section) {
75522
75586
  const box = await getSelectionBox.call() ?? await getSceneBox.call();
75523
75587
  frame(adapter, section, box);
75524
75588
  });
75525
- const frameScene = useAsyncFuncRef(async () => {
75589
+ const frameScene2 = useAsyncFuncRef(async () => {
75526
75590
  const box = await getSceneBox.call();
75527
75591
  frame(adapter, section, box);
75528
75592
  });
@@ -75532,7 +75596,7 @@ function useCamera(adapter, section) {
75532
75596
  autoCamera: autoCamera2,
75533
75597
  reset,
75534
75598
  frameSelection: frameSelection2,
75535
- frameScene
75599
+ frameScene: frameScene2
75536
75600
  };
75537
75601
  }
75538
75602
  function frame(adapter, section, box) {
@@ -76058,29 +76122,10 @@ function useUltraSectionBox(viewer) {
76058
76122
  function useUltraControlBar(viewer, section, camera2, customization) {
76059
76123
  const sectionSectionBox = controlBarSectionBox(section, viewer.selection.count > 0);
76060
76124
  const sectionCamera = controlBarCamera(camera2);
76061
- const frame2 = frameSection(camera2);
76062
- let bar = [sectionCamera, frame2, sectionSectionBox];
76125
+ let bar = [sectionCamera, sectionSectionBox];
76063
76126
  bar = (customization == null ? void 0 : customization(bar)) ?? bar;
76064
76127
  return bar;
76065
76128
  }
76066
- function frameSection(camera2) {
76067
- return {
76068
- id: ids.sectionActions,
76069
- enable: () => true,
76070
- style: sectionDefaultStyle,
76071
- buttons: [
76072
- {
76073
- id: ids.buttonZoomToFit,
76074
- enabled: () => true,
76075
- tip: "Frame Camera",
76076
- action: () => camera2.frameSelection.call(),
76077
- icon: frameSelection,
76078
- isOn: () => false,
76079
- style: buttonDefaultStyle
76080
- }
76081
- ]
76082
- };
76083
- }
76084
76129
  function useUltraCamera(viewer, section) {
76085
76130
  return useCamera({
76086
76131
  onSelectionChanged: viewer.selection.onValueChanged,