@bimdata/viewer 2.0.0-alpha.1 → 2.0.0-alpha.2

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.
@@ -32044,7 +32044,6 @@ const pluginFactory = (cfg) => {
32044
32044
  };
32045
32045
  const LiWrapper = {
32046
32046
  name: "LiWrapper",
32047
- emits: ["click"],
32048
32047
  render() {
32049
32048
  return h$3("li", this.$slots.default());
32050
32049
  }
@@ -34836,7 +34835,7 @@ function makeGlobalContext($viewer, initLayout) {
34836
34835
  const designSystem = "";
34837
34836
  const name$4 = "@bimdata/viewer";
34838
34837
  const type = "module";
34839
- const version = "2.0.0-alpha.1";
34838
+ const version = "2.0.0-alpha.2";
34840
34839
  const description$c = "A customizable BIM viewer.";
34841
34840
  const keywords = [
34842
34841
  "bim",
@@ -118833,7 +118832,7 @@ const viewer2dPlugin = {
118833
118832
  engine2dCreated: false,
118834
118833
  modelHeaderShown: ((_a2 = this.$options.$cfg) == null ? void 0 : _a2.modelLoader) !== "hidden",
118835
118834
  annotationMode: false,
118836
- helpShown: true
118835
+ helpShown: this.$options.$cfg.help !== false
118837
118836
  };
118838
118837
  },
118839
118838
  computed: {
@@ -118843,7 +118842,6 @@ const viewer2dPlugin = {
118843
118842
  }
118844
118843
  },
118845
118844
  created() {
118846
- this.helpShown = this.$options.$cfg.help !== false;
118847
118845
  this.helpModal = helpModal$1;
118848
118846
  this.queue = makeQueue$1(
118849
118847
  new Promise((res) => {
@@ -199239,7 +199237,7 @@ function _sfc_render$m(_ctx, _cache) {
199239
199237
  ]);
199240
199238
  }
199241
199239
  const helpModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
199242
- const BIMDataViewer3D_vue_vue_type_style_index_0_scoped_dd88417a_lang = "";
199240
+ const BIMDataViewer3D_vue_vue_type_style_index_0_scoped_8432d02e_lang = "";
199243
199241
  const BIMDataViewer3D_vue_vue_type_style_index_1_lang = "";
199244
199242
  const viewer3d = {
199245
199243
  name: "Viewer3D",
@@ -199248,6 +199246,7 @@ const viewer3d = {
199248
199246
  Help
199249
199247
  },
199250
199248
  data() {
199249
+ var _a2;
199251
199250
  return {
199252
199251
  xeokitCreated: false,
199253
199252
  edgesDisplayed: this.$options.$cfg.edges !== false,
@@ -199264,24 +199263,21 @@ const viewer3d = {
199264
199263
  localContextSubscriptions: [],
199265
199264
  loadedIfcIds: [],
199266
199265
  loadingProcesses: 0,
199267
- annotationMode: false
199266
+ annotationMode: false,
199267
+ modelHeaderShown: ((_a2 = this.$options.$cfg) == null ? void 0 : _a2.modelLoader) !== "hidden",
199268
+ helpShown: true,
199269
+ navCubeVisible: this.$options.$cfg.navCube !== false,
199270
+ enableOffsets: this.$options.$cfg.enableOffsets === true,
199271
+ enableDynamicLOD: this.$options.$cfg.enableDynamicLOD === true
199268
199272
  };
199269
199273
  },
199270
199274
  computed: {
199271
199275
  loading() {
199272
199276
  return this.loadingProcesses > 0;
199273
- },
199274
- navCubeVisible() {
199275
- return this.$options.$cfg.navCube !== false;
199276
- },
199277
- enableOffsets() {
199278
- return this.$options.$cfg.enableOffsets === true;
199279
- },
199280
- enableDynamicLOD() {
199281
- return this.$options.$cfg.enableDynamicLOD === true;
199282
199277
  }
199283
199278
  },
199284
199279
  created() {
199280
+ this.helpShown = this.$options.$cfg.help !== false;
199285
199281
  this.helpModal = helpModal;
199286
199282
  this.xeokitSdk = xeokitSdk;
199287
199283
  this.registerShortcuts();
@@ -200084,15 +200080,23 @@ const viewer3d = {
200084
200080
  this.$viewer.globalContext.hub.emit("annotation-clear");
200085
200081
  },
200086
200082
  // ---
200087
- showUI() {
200088
- this.getUIElements().forEach((elem) => {
200089
- elem.style.visibility = "";
200090
- });
200091
- },
200083
+ /**
200084
+ * @param { Object } cfg
200085
+ * @param { string[] } cfg.exceptions plugin names that will not be hidden.
200086
+ */
200092
200087
  hideUI({ exceptions = [] } = {}) {
200093
- this.getUIElements({ exceptions }).forEach((elem) => {
200094
- elem.style.visibility = "hidden";
200095
- });
200088
+ exceptions.push("viewer3d");
200089
+ [...this.$viewer.localContext.plugins.entries()].filter(([name2]) => !exceptions.includes(name2)).forEach(([, plugin]) => plugin.$hide());
200090
+ this.modelHeaderShown = false;
200091
+ this.helpShown = false;
200092
+ this.navCubeVisible = false;
200093
+ },
200094
+ showUI() {
200095
+ var _a2;
200096
+ this.$viewer.localContext.plugins.forEach((plugin) => plugin.$show());
200097
+ this.modelHeaderShown = ((_a2 = this.$options.$cfg) == null ? void 0 : _a2.modelLoader) !== "hidden";
200098
+ this.helpShown = this.$options.$cfg.help !== false;
200099
+ this.navCubeVisible = this.$options.$cfg.navCube !== false;
200096
200100
  },
200097
200101
  getUIElements({ exceptions = [] } = {}) {
200098
200102
  const uiElements = [];
@@ -200140,9 +200144,9 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
200140
200144
  onLoadModels: _ctx.loadModels,
200141
200145
  onUnloadModels: _ctx.unloadModels
200142
200146
  }, null, 8, ["onLoadModels", "onUnloadModels"])), [
200143
- [vShow, _ctx.$options.$cfg.modelLoader !== "hidden"]
200147
+ [vShow, _ctx.modelHeaderShown]
200144
200148
  ]) : createCommentVNode("", true),
200145
- _ctx.$options.$cfg.help !== false ? (openBlock(), createBlock(_component_Help, {
200149
+ _ctx.helpShown ? (openBlock(), createBlock(_component_Help, {
200146
200150
  key: 1,
200147
200151
  modal: _ctx.helpModal
200148
200152
  }, null, 8, ["modal"])) : createCommentVNode("", true)
@@ -200152,15 +200156,16 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
200152
200156
  class: "bimdata-viewer3d__viewer"
200153
200157
  }, null, 8, _hoisted_2$k),
200154
200158
  _ctx.xeokitCreated ? (openBlock(), createBlock(_component_Annotations, { key: 1 })) : createCommentVNode("", true),
200155
- _ctx.navCubeVisible ? (openBlock(), createElementBlock("canvas", {
200156
- key: 2,
200159
+ withDirectives(createBaseVNode("canvas", {
200157
200160
  id: _ctx.navCubeCanvasId,
200158
200161
  class: "bimdata-viewer3d__overview"
200159
- }, null, 8, _hoisted_3$h)) : createCommentVNode("", true),
200162
+ }, null, 8, _hoisted_3$h), [
200163
+ [vShow, _ctx.navCubeVisible]
200164
+ ]),
200160
200165
  createBaseVNode("div", { id: _ctx.spinnerCanvasId }, null, 8, _hoisted_4$g)
200161
200166
  ], 32);
200162
200167
  }
200163
- const BIMDataViewer3D = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$l], ["__scopeId", "data-v-dd88417a"]]);
200168
+ const BIMDataViewer3D = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$l], ["__scopeId", "data-v-8432d02e"]]);
200164
200169
  const window_label$9 = "3D-Viewer";
200165
200170
  const de$6 = {
200166
200171
  window_label: window_label$9
@@ -209790,7 +209795,7 @@ function(t10) {
209790
209795
  */
209791
209796
  function(t10) {
209792
209797
  function e10() {
209793
- return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-d4bae79c.js")).catch(function(t11) {
209798
+ return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-001fceff.js")).catch(function(t11) {
209794
209799
  return Promise.reject(new Error("Could not load canvg: " + t11));
209795
209800
  }).then(function(t11) {
209796
209801
  return t11.default ? t11.default : t11;
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, _ as _typeof$1 } from "./index-b987e57f.js";
1
+ import { c as commonjsGlobal, _ as _typeof$1 } from "./index-11c0752d.js";
2
2
  var check = function(it) {
3
3
  return it && it.Math == Math && it;
4
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bimdata/viewer",
3
3
  "type": "module",
4
- "version": "2.0.0-alpha.1",
4
+ "version": "2.0.0-alpha.2",
5
5
  "description": "A customizable BIM viewer.",
6
6
  "keywords": [
7
7
  "bim",