@vertexvis/viewer 0.15.2-testing.4 → 0.15.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.
Files changed (273) hide show
  1. package/dist/cjs/_commonjsHelpers-dcc4cf71.js +1 -1
  2. package/dist/cjs/app-globals-2035678d.js +1 -1
  3. package/dist/cjs/browser.esm-5d246754.js +1 -1
  4. package/dist/cjs/bundle.esm-22b6f2d6.js +1 -1
  5. package/dist/cjs/bundle.esm-b43c197a.js +38280 -0
  6. package/dist/cjs/{config-4a86ae0b.js → config-3fc1c093.js} +2 -2
  7. package/dist/cjs/{cursors-85d403e9.js → cursors-02a06ec9.js} +7 -1
  8. package/dist/cjs/dom-8d90bfaf.js +1 -1
  9. package/dist/cjs/dom-92728e58.js +1 -1
  10. package/dist/cjs/dom-d1bbd67c.js +1 -1
  11. package/dist/cjs/dom-d57d3c3b.js +1 -1
  12. package/dist/cjs/elementRectObserver-9b28f182.js +1 -1
  13. package/dist/cjs/entities-9eb7e608.js +1 -1
  14. package/dist/cjs/{entities-496b61cd.js → entities-c1c3c6a3.js} +3 -3
  15. package/dist/cjs/errors-1b37642b.js +97 -0
  16. package/dist/cjs/grpc-web-client.umd-2af20c1b.js +1 -1
  17. package/dist/cjs/index-70db349e.js +1 -1
  18. package/dist/cjs/index-b9d13137.js +1 -1
  19. package/dist/cjs/index.cjs.js +9 -6
  20. package/dist/cjs/loader.cjs.js +2 -2
  21. package/dist/cjs/{mapper-216603b0.js → mapper-d4145b72.js} +2 -2
  22. package/dist/cjs/markup-4a2fc281.js +1 -1
  23. package/dist/cjs/{model-b61f4d20.js → model-19fb560a.js} +27 -6
  24. package/dist/cjs/model-20a70d27.js +1 -1
  25. package/dist/cjs/overlays-b03ec80b.js +1 -1
  26. package/dist/cjs/png-decoder-ef097f37.js +1 -1
  27. package/dist/cjs/results-178e89a3.js +1 -1
  28. package/dist/cjs/{scene-0ce59b26.js → scene-a94e6fa5.js} +276 -225
  29. package/dist/cjs/shadow-css-6b9daa41.js +1 -1
  30. package/dist/cjs/stencil-fc92b387.js +1 -1
  31. package/dist/cjs/{streamAttributes-7725f5c4.js → streamAttributes-cf0c513d.js} +5408 -39951
  32. package/dist/cjs/templates-e57b3741.js +1 -1
  33. package/dist/cjs/utils-2c8e2aa3.js +1 -1
  34. package/dist/cjs/utils-ea359796.js +1 -1
  35. package/dist/cjs/vertex-scene-tree-search_3.cjs.entry.js +1 -1
  36. package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
  37. package/dist/cjs/vertex-scene-tree-table-column.cjs.entry.js +1 -1
  38. package/dist/cjs/vertex-scene-tree-table-header.cjs.entry.js +1 -1
  39. package/dist/cjs/vertex-scene-tree-table-resize-divider.cjs.entry.js +1 -1
  40. package/dist/cjs/vertex-scene-tree-toolbar-group.cjs.entry.js +1 -1
  41. package/dist/cjs/vertex-scene-tree.cjs.entry.js +158 -37
  42. package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js +229 -49
  43. package/dist/cjs/vertex-viewer-button_3.cjs.entry.js +1 -1
  44. package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js +1 -1
  45. package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +3 -2
  46. package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js +1 -1
  47. package/dist/cjs/vertex-viewer-icon.cjs.entry.js +1 -1
  48. package/dist/cjs/vertex-viewer-layer.cjs.entry.js +1 -1
  49. package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +1 -1
  50. package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +1 -1
  51. package/dist/cjs/vertex-viewer-markup.cjs.entry.js +1 -1
  52. package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -2
  53. package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +5 -4
  54. package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +4 -3
  55. package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +7 -6
  56. package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +10 -5
  57. package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js +15 -13
  58. package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js +20 -9
  59. package/dist/cjs/vertex-viewer-spinner.cjs.entry.js +1 -1
  60. package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +6 -4
  61. package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +5 -4
  62. package/dist/cjs/vertex-viewer.cjs.entry.js +80 -53
  63. package/dist/cjs/viewer.cjs.js +2 -2
  64. package/dist/cjs/viewport-5ca619f7.js +1 -1
  65. package/dist/collection/components/scene-tree/lib/controller.js +108 -28
  66. package/dist/collection/components/scene-tree/lib/errors.js +35 -2
  67. package/dist/collection/components/scene-tree/scene-tree.js +12 -5
  68. package/dist/collection/components/viewer/viewer.js +17 -15
  69. package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.css +7 -2
  70. package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.js +105 -18
  71. package/dist/collection/components/viewer-pin-group/viewer-pin-group.js +5 -1
  72. package/dist/collection/components/viewer-pin-label/viewer-pin-label.css +1 -1
  73. package/dist/collection/components/viewer-pin-label/viewer-pin-label.js +14 -12
  74. package/dist/collection/components/viewer-pin-tool/utils.js +25 -4
  75. package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.css +12 -0
  76. package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.js +9 -2
  77. package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.js +3 -2
  78. package/dist/collection/components/viewer-view-cube/viewer-view-cube.js +5 -5
  79. package/dist/collection/lib/cursors.js +6 -1
  80. package/dist/collection/lib/interactions/baseInteractionHandler.js +12 -2
  81. package/dist/collection/lib/interactions/mouseInteractions.js +5 -4
  82. package/dist/collection/lib/mappers/frameStreaming.js +11 -11
  83. package/dist/collection/lib/pins/interactions.js +9 -5
  84. package/dist/collection/lib/pins/model.js +2 -2
  85. package/dist/collection/lib/rendering/matrices.js +2 -4
  86. package/dist/collection/lib/scenes/camera.js +4 -2
  87. package/dist/collection/lib/scenes/mapper.js +98 -36
  88. package/dist/collection/lib/scenes/queries.js +89 -50
  89. package/dist/collection/lib/scenes/scene.js +15 -7
  90. package/dist/collection/lib/stream/stream.js +24 -12
  91. package/dist/collection/lib/transforms/drawable.js +2 -2
  92. package/dist/collection/lib/types/frame.js +4 -3
  93. package/dist/collection/lib/types/frameCamera.js +6 -1
  94. package/dist/collection/lib/types/index.js +3 -2
  95. package/dist/collection/lib/types/loadableResource.js +24 -4
  96. package/dist/collection/lib/types/sceneViewStateIdentifier.js +7 -0
  97. package/dist/collection/lib/volume-intersection/controller.js +71 -15
  98. package/dist/collection/lib/volume-intersection/interactions.js +54 -9
  99. package/dist/collection/lib/volume-intersection/model.js +27 -10
  100. package/dist/custom-elements/index.js +20207 -15976
  101. package/dist/custom-elements/png-decoder.js +1 -1
  102. package/dist/esm/_commonjsHelpers-11ca3be1.js +1 -1
  103. package/dist/esm/app-globals-40df99a0.js +1 -1
  104. package/dist/esm/{browser.esm-ae4ca1f1.js → browser.esm-07e7db8f.js} +2 -2
  105. package/dist/esm/bundle.esm-91404853.js +38273 -0
  106. package/dist/esm/{bundle.esm-ce2c7ad3.js → bundle.esm-92e615bf.js} +2 -2
  107. package/dist/esm/{config-6cdeb6ca.js → config-25384fe6.js} +3 -3
  108. package/dist/esm/{cursors-a8d4b3f4.js → cursors-127a3bb7.js} +8 -3
  109. package/dist/esm/dom-0440435d.js +1 -1
  110. package/dist/esm/dom-be140992.js +1 -1
  111. package/dist/esm/dom-e19ee80b.js +1 -1
  112. package/dist/esm/{dom-5b164305.js → dom-e436f0c0.js} +2 -2
  113. package/dist/esm/elementRectObserver-39cf7b95.js +1 -1
  114. package/dist/esm/{entities-6f3c5437.js → entities-0e325765.js} +4 -4
  115. package/dist/esm/entities-ce81dd7f.js +1 -1
  116. package/dist/esm/errors-a4cc9caa.js +85 -0
  117. package/dist/esm/grpc-web-client.umd-5409853c.js +1 -1
  118. package/dist/esm/index-26dfb2d0.js +1 -1
  119. package/dist/esm/index-e841d91b.js +1 -1
  120. package/dist/esm/index.js +15 -13
  121. package/dist/esm/index.mjs +15 -13
  122. package/dist/esm/loader.js +2 -2
  123. package/dist/esm/loader.mjs +2 -2
  124. package/dist/esm/{mapper-941ff03c.js → mapper-dd937684.js} +3 -3
  125. package/dist/esm/{markup-3c2900f3.js → markup-2dde1f10.js} +3 -3
  126. package/dist/esm/{model-fa9af61a.js → model-3cd8cd47.js} +2 -2
  127. package/dist/esm/{model-40bd1711.js → model-bfe1c4d8.js} +29 -8
  128. package/dist/esm/{overlays-cc3efc30.js → overlays-8f195eb3.js} +3 -3
  129. package/dist/esm/{png-decoder-d4b65417.js → png-decoder-45f38ea3.js} +2 -2
  130. package/dist/esm/{results-3b4df2cf.js → results-38baef59.js} +2 -2
  131. package/dist/esm/{scene-970f5000.js → scene-2543b3bd.js} +237 -178
  132. package/dist/esm/shadow-css-51dd7708.js +1 -1
  133. package/dist/esm/stencil-bfbf099f.js +1 -1
  134. package/dist/esm/{streamAttributes-24bd7b3a.js → streamAttributes-23270e27.js} +5419 -39956
  135. package/dist/esm/templates-022199c1.js +1 -1
  136. package/dist/esm/{utils-81347571.js → utils-2306c744.js} +2 -2
  137. package/dist/esm/{utils-559e1632.js → utils-f03802ef.js} +2 -2
  138. package/dist/esm/vertex-scene-tree-search_3.entry.js +3 -3
  139. package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
  140. package/dist/esm/vertex-scene-tree-table-column.entry.js +1 -1
  141. package/dist/esm/vertex-scene-tree-table-header.entry.js +1 -1
  142. package/dist/esm/vertex-scene-tree-table-resize-divider.entry.js +1 -1
  143. package/dist/esm/vertex-scene-tree-toolbar-group.entry.js +1 -1
  144. package/dist/esm/vertex-scene-tree.entry.js +160 -39
  145. package/dist/esm/vertex-viewer-box-query-tool.entry.js +229 -49
  146. package/dist/esm/vertex-viewer-button_3.entry.js +1 -1
  147. package/dist/esm/vertex-viewer-default-toolbar.entry.js +1 -1
  148. package/dist/esm/vertex-viewer-dom-element_2.entry.js +6 -5
  149. package/dist/esm/vertex-viewer-dom-group.entry.js +3 -3
  150. package/dist/esm/vertex-viewer-icon.entry.js +1 -1
  151. package/dist/esm/vertex-viewer-layer.entry.js +1 -1
  152. package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +4 -4
  153. package/dist/esm/vertex-viewer-markup-tool.entry.js +5 -5
  154. package/dist/esm/vertex-viewer-markup.entry.js +5 -5
  155. package/dist/esm/vertex-viewer-measurement-details.entry.js +5 -4
  156. package/dist/esm/vertex-viewer-measurement-distance.entry.js +13 -12
  157. package/dist/esm/vertex-viewer-measurement-line_2.entry.js +8 -7
  158. package/dist/esm/vertex-viewer-measurement-precise.entry.js +12 -11
  159. package/dist/esm/vertex-viewer-pin-group.entry.js +13 -8
  160. package/dist/esm/vertex-viewer-pin-label_2.entry.js +18 -16
  161. package/dist/esm/vertex-viewer-pin-tool.entry.js +23 -12
  162. package/dist/esm/vertex-viewer-spinner.entry.js +1 -1
  163. package/dist/esm/vertex-viewer-transform-widget.entry.js +9 -7
  164. package/dist/esm/vertex-viewer-view-cube.entry.js +7 -6
  165. package/dist/esm/vertex-viewer.entry.js +65 -38
  166. package/dist/esm/viewer.js +2 -2
  167. package/dist/esm/{viewport-e39e2eba.js → viewport-f19fc583.js} +2 -2
  168. package/dist/types/components/scene-tree/lib/controller.d.ts +18 -3
  169. package/dist/types/components/scene-tree/lib/errors.d.ts +17 -2
  170. package/dist/types/components/viewer/viewer.d.ts +2 -0
  171. package/dist/types/components/viewer-box-query-tool/viewer-box-query-tool.d.ts +36 -2
  172. package/dist/types/components/viewer-pin-tool/utils.d.ts +1 -1
  173. package/dist/types/components.d.ts +11 -3
  174. package/dist/types/lib/cursors.d.ts +5 -0
  175. package/dist/types/lib/interactions/baseInteractionHandler.d.ts +1 -0
  176. package/dist/types/lib/interactions/mouseInteractions.d.ts +2 -1
  177. package/dist/types/lib/pins/interactions.d.ts +4 -2
  178. package/dist/types/lib/pins/model.d.ts +1 -1
  179. package/dist/types/lib/scenes/camera.d.ts +1 -1
  180. package/dist/types/lib/scenes/mapper.d.ts +5 -1
  181. package/dist/types/lib/scenes/queries.d.ts +45 -30
  182. package/dist/types/lib/scenes/scene.d.ts +10 -1
  183. package/dist/types/lib/types/frame.d.ts +1 -1
  184. package/dist/types/lib/types/index.d.ts +2 -1
  185. package/dist/types/lib/types/loadableResource.d.ts +8 -2
  186. package/dist/types/lib/types/sceneViewStateIdentifier.d.ts +15 -0
  187. package/dist/types/lib/volume-intersection/controller.d.ts +33 -5
  188. package/dist/types/lib/volume-intersection/interactions.d.ts +12 -1
  189. package/dist/types/lib/volume-intersection/model.d.ts +7 -0
  190. package/dist/viewer/index.esm.js +2 -2
  191. package/dist/viewer/{p-ad09c92e.entry.js → p-029fba92.entry.js} +1 -1
  192. package/dist/viewer/p-07aeee89.js +1 -1
  193. package/dist/viewer/{p-29986489.js → p-0a017be7.js} +2 -2
  194. package/dist/viewer/p-0c583cad.entry.js +4 -0
  195. package/dist/viewer/p-0d494d01.js +4 -0
  196. package/dist/viewer/p-0fdad1a5.js +1 -1
  197. package/dist/viewer/{p-3ca4a7c1.js → p-1812c82d.js} +2 -2
  198. package/dist/viewer/{p-7663a603.entry.js → p-191156ad.entry.js} +1 -1
  199. package/dist/viewer/{p-a57dc6e4.entry.js → p-1998284a.entry.js} +2 -2
  200. package/dist/viewer/p-27f715f8.entry.js +4 -0
  201. package/dist/viewer/{p-7f6251da.js → p-283aeac4.js} +2 -2
  202. package/dist/viewer/p-298b63c2.entry.js +4 -0
  203. package/dist/viewer/p-2ace066b.entry.js +4 -0
  204. package/dist/viewer/{p-597cc9b5.js → p-2b60a8b0.js} +2 -2
  205. package/dist/viewer/{p-050f912b.entry.js → p-2fd123c8.entry.js} +1 -1
  206. package/dist/viewer/p-305a8be6.entry.js +4 -0
  207. package/dist/viewer/p-31724d24.js +4 -0
  208. package/dist/viewer/p-32cc2209.js +4 -0
  209. package/dist/viewer/p-3829dd99.entry.js +4 -0
  210. package/dist/viewer/{p-6da8a28f.entry.js → p-3aae4bf1.entry.js} +2 -2
  211. package/dist/viewer/{p-99352cf0.js → p-42760392.js} +2 -2
  212. package/dist/viewer/p-440c8174.js +4 -0
  213. package/dist/viewer/{p-e422deaf.entry.js → p-4f25e367.entry.js} +2 -2
  214. package/dist/viewer/{p-a107b65e.entry.js → p-507b5aeb.entry.js} +2 -2
  215. package/dist/viewer/{p-52ab9ec0.js → p-51401063.js} +2 -2
  216. package/dist/viewer/{p-426970b3.entry.js → p-533b1c63.entry.js} +1 -1
  217. package/dist/viewer/{p-dcb9804c.entry.js → p-569ed94a.entry.js} +2 -2
  218. package/dist/viewer/p-5809b400.js +1 -1
  219. package/dist/viewer/p-6072cf84.js +4 -0
  220. package/dist/viewer/{p-e4a26a32.entry.js → p-6406a70a.entry.js} +1 -1
  221. package/dist/viewer/p-6bf0594b.entry.js +4 -0
  222. package/dist/viewer/p-72c59115.entry.js +4 -0
  223. package/dist/viewer/{p-d71652b0.entry.js → p-8ac7290a.entry.js} +1 -1
  224. package/dist/viewer/{p-f184bcab.entry.js → p-8afcbd99.entry.js} +1 -1
  225. package/dist/viewer/p-92fe4417.js +1 -1
  226. package/dist/viewer/{p-5746931d.entry.js → p-952a217d.entry.js} +1 -1
  227. package/dist/viewer/p-98e6a50e.js +1 -1
  228. package/dist/viewer/{p-99fd27e0.entry.js → p-9cb99ea8.entry.js} +1 -1
  229. package/dist/viewer/p-a2e9e8a5.js +4 -0
  230. package/dist/viewer/p-a380f0c2.js +1 -1
  231. package/dist/viewer/{p-661b5234.js → p-acfc5c50.js} +2 -2
  232. package/dist/viewer/{p-82bd25e8.entry.js → p-b3540dce.entry.js} +1 -1
  233. package/dist/viewer/p-b5ca30cd.js +4 -0
  234. package/dist/viewer/p-b74242dc.js +1 -1
  235. package/dist/viewer/p-bc1160cf.entry.js +4 -0
  236. package/dist/viewer/{p-c5e67a1e.entry.js → p-bd5a302c.entry.js} +2 -2
  237. package/dist/viewer/p-c738296e.js +1 -1
  238. package/dist/viewer/p-c8c4343b.js +1 -1
  239. package/dist/viewer/p-cd9ccb9e.entry.js +4 -0
  240. package/dist/viewer/{p-9e1384c9.js → p-cf689bbd.js} +2 -2
  241. package/dist/viewer/{p-70e5e8a8.js → p-d216a866.js} +2 -2
  242. package/dist/viewer/p-d4ed7b8d.js +4 -0
  243. package/dist/viewer/p-d6d5d5de.entry.js +4 -0
  244. package/dist/viewer/p-d6fce4c1.js +1 -1
  245. package/dist/viewer/p-df8fbe56.js +1 -1
  246. package/dist/viewer/p-dfe5a97d.js +1 -1
  247. package/dist/viewer/{p-00ce31a0.js → p-e1896ce4.js} +2 -2
  248. package/dist/viewer/p-e23af70c.js +4 -0
  249. package/dist/viewer/p-e4aa9cdb.js +1 -1
  250. package/dist/viewer/p-e929dd63.entry.js +4 -0
  251. package/dist/viewer/{p-65af7a89.js → p-fc7d8c03.js} +3 -3
  252. package/dist/viewer/viewer.esm.js +2 -2
  253. package/package.json +9 -9
  254. package/readme.md +4 -4
  255. package/dist/viewer/p-096e60bd.js +0 -4
  256. package/dist/viewer/p-0cf4f05d.entry.js +0 -4
  257. package/dist/viewer/p-0fcafbf9.js +0 -4
  258. package/dist/viewer/p-10145045.js +0 -4
  259. package/dist/viewer/p-1abfe4bf.js +0 -4
  260. package/dist/viewer/p-1bba9ade.entry.js +0 -4
  261. package/dist/viewer/p-24cda14a.entry.js +0 -4
  262. package/dist/viewer/p-27dbc865.js +0 -4
  263. package/dist/viewer/p-2b58afc3.entry.js +0 -4
  264. package/dist/viewer/p-51966cef.entry.js +0 -4
  265. package/dist/viewer/p-608925c5.entry.js +0 -4
  266. package/dist/viewer/p-68e192b9.js +0 -4
  267. package/dist/viewer/p-69a3fce8.entry.js +0 -4
  268. package/dist/viewer/p-74c772bb.entry.js +0 -4
  269. package/dist/viewer/p-990f98c2.js +0 -4
  270. package/dist/viewer/p-9dfe0b43.entry.js +0 -4
  271. package/dist/viewer/p-bb425931.entry.js +0 -4
  272. package/dist/viewer/p-bfacbaa8.entry.js +0 -4
  273. package/dist/viewer/p-c72da0fb.entry.js +0 -4
@@ -1,21 +1,22 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { r as registerInstance, h, H as Host } from './index-26dfb2d0.js';
5
- import { s as scene_view_api_pb } from './mapper-941ff03c.js';
5
+ import { s as scene_view_api_pb } from './mapper-dd937684.js';
6
6
  import { g as grpcWebClient_umd } from './grpc-web-client.umd-5409853c.js';
7
- import { p as parseConfig } from './config-6cdeb6ca.js';
8
- import { a as MeasurementEntity, M as MeasurementController } from './entities-6f3c5437.js';
9
- import './streamAttributes-24bd7b3a.js';
10
- import { M as MeasurementModel } from './model-fa9af61a.js';
11
- import { M as MeasurementOverlayManager } from './overlays-cc3efc30.js';
12
- import { p as point } from './bundle.esm-ce2c7ad3.js';
13
- import { a as measurementWithArrowCursor } from './cursors-a8d4b3f4.js';
14
- import { g as getMouseClientPosition } from './dom-5b164305.js';
7
+ import { p as parseConfig } from './config-25384fe6.js';
8
+ import { a as MeasurementEntity, M as MeasurementController } from './entities-0e325765.js';
9
+ import './streamAttributes-23270e27.js';
10
+ import { M as MeasurementModel } from './model-3cd8cd47.js';
11
+ import { M as MeasurementOverlayManager } from './overlays-8f195eb3.js';
12
+ import { p as point } from './bundle.esm-92e615bf.js';
13
+ import { a as measurementWithArrowCursor } from './cursors-127a3bb7.js';
14
+ import { g as getMouseClientPosition } from './dom-e436f0c0.js';
15
15
  import { E as ElementRectObserver } from './elementRectObserver-39cf7b95.js';
16
16
  import { E as EntityType } from './entities-ce81dd7f.js';
17
17
  import './_commonjsHelpers-11ca3be1.js';
18
- import './browser.esm-ae4ca1f1.js';
18
+ import './browser.esm-07e7db8f.js';
19
+ import './bundle.esm-91404853.js';
19
20
 
20
21
  // package: vertexvis.protobuf.sceneview.v1
21
22
  // file: sceneview/protos/scene_view_api.proto
@@ -1,18 +1,19 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { h, F as Fragment, r as registerInstance } from './index-26dfb2d0.js';
5
- import { p as point, m as matrix4, v as vector3 } from './bundle.esm-ce2c7ad3.js';
6
- import './cursors-a8d4b3f4.js';
7
- import './mapper-941ff03c.js';
5
+ import { p as point, m as matrix4, v as vector3 } from './bundle.esm-92e615bf.js';
6
+ import './cursors-127a3bb7.js';
7
+ import './mapper-dd937684.js';
8
8
  import './grpc-web-client.umd-5409853c.js';
9
- import './streamAttributes-24bd7b3a.js';
9
+ import './streamAttributes-23270e27.js';
10
10
  import './entities-ce81dd7f.js';
11
- import { V as Viewport } from './viewport-e39e2eba.js';
12
- import { g as getPinColors, i as isIconPin, b as isTextPin, P as PinModel, a as PinController, c as translatePointToScreen } from './model-40bd1711.js';
11
+ import { V as Viewport } from './viewport-f19fc583.js';
12
+ import { g as getPinColors, i as isIconPin, b as isTextPin, P as PinModel, a as PinController, c as translatePointToScreen } from './model-bfe1c4d8.js';
13
13
  import { c as classnames } from './index-e841d91b.js';
14
- import './browser.esm-ae4ca1f1.js';
14
+ import './browser.esm-07e7db8f.js';
15
15
  import './_commonjsHelpers-11ca3be1.js';
16
+ import './bundle.esm-91404853.js';
16
17
 
17
18
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
19
  const PinRenderer = ({ pin, selected, }) => {
@@ -76,10 +77,14 @@ const ViewerPinGroup = class {
76
77
  };
77
78
  }
78
79
  componentDidLoad() {
80
+ var _a;
79
81
  this.setLabelObserver();
80
82
  if (this.pinController == null) {
81
83
  this.pinController = new PinController(this.pinModel);
82
84
  }
85
+ if (this.selected) {
86
+ (_a = this.labelEl) === null || _a === void 0 ? void 0 : _a.setFocus();
87
+ }
83
88
  }
84
89
  disconnectedCallback() {
85
90
  var _a, _b;
@@ -1,14 +1,14 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-26dfb2d0.js';
5
- import { p as point } from './bundle.esm-ce2c7ad3.js';
5
+ import { p as point } from './bundle.esm-92e615bf.js';
6
6
  import { c as classnames } from './index-e841d91b.js';
7
- import { g as getMouseClientPosition } from './dom-5b164305.js';
8
- import { t as translatePointToRelative, c as translatePointToScreen, a as PinController, P as PinModel, g as getPinColors, b as isTextPin } from './model-40bd1711.js';
7
+ import { g as getMouseClientPosition } from './dom-e436f0c0.js';
8
+ import { t as translatePointToRelative, c as translatePointToScreen, a as PinController, P as PinModel, g as getPinColors, b as isTextPin } from './model-bfe1c4d8.js';
9
9
  import { r as readDOM } from './stencil-bfbf099f.js';
10
10
  import './_commonjsHelpers-11ca3be1.js';
11
- import './browser.esm-ae4ca1f1.js';
11
+ import './browser.esm-07e7db8f.js';
12
12
 
13
13
  function getComputedStyle(el) {
14
14
  return window.getComputedStyle(el);
@@ -36,12 +36,15 @@ const VertexPinLabel = class {
36
36
  });
37
37
  };
38
38
  this.handleInputKeyDown = (event) => {
39
- if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
40
- event.preventDefault();
41
- this.submit();
39
+ event.stopPropagation();
40
+ if (event.key === 'Enter' &&
41
+ (event.ctrlKey || event.metaKey || event.shiftKey)) {
42
+ this.textareaRows += 1;
43
+ this.value += '\n';
42
44
  }
43
45
  else if (event.key === 'Enter') {
44
- this.textareaRows += 1;
46
+ event.preventDefault();
47
+ this.submit();
45
48
  }
46
49
  };
47
50
  this.handlePointerDown = (event) => {
@@ -60,6 +63,8 @@ const VertexPinLabel = class {
60
63
  if (this.elementBounds != null &&
61
64
  this.relativePointerDownPosition &&
62
65
  this.pinPointerDownPosition != null) {
66
+ // Prevent selection of any text while interacting with the label
67
+ event.preventDefault();
63
68
  const point$1 = getMouseClientPosition(event, this.elementBounds);
64
69
  const relative = translatePointToRelative(point$1, this.elementBounds);
65
70
  const relativeDelta = point.subtract(relative, this.relativePointerDownPosition);
@@ -104,12 +109,9 @@ const VertexPinLabel = class {
104
109
  var _a, _b, _c;
105
110
  // HTMLInputElement.focus() doesn't exist in tests.
106
111
  if (typeof ((_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus) === 'function') {
107
- if (this.focused) {
108
- (_b = this.inputEl) === null || _b === void 0 ? void 0 : _b.focus();
109
- }
110
- else {
111
- (_c = this.inputEl) === null || _c === void 0 ? void 0 : _c.blur();
112
- }
112
+ this.focused = true;
113
+ this.labelFocused.emit((_b = this.pin) === null || _b === void 0 ? void 0 : _b.id);
114
+ (_c = this.inputEl) === null || _c === void 0 ? void 0 : _c.focus();
113
115
  }
114
116
  }
115
117
  watchFocusChange() {
@@ -186,7 +188,7 @@ const VertexPinLabel = class {
186
188
  }
187
189
  computeMinWidth() {
188
190
  if (this.contentElBounds != null) {
189
- const expected = `${this.contentElBounds.width + 16}px`;
191
+ const expected = `${this.contentElBounds.width + 8}px`;
190
192
  return `min(${expected}, ${this.computeMaxWidth()})`;
191
193
  }
192
194
  else {
@@ -1,18 +1,18 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { r as registerInstance, h, H as Host, g as getElement } from './index-26dfb2d0.js';
5
- import { t as translatePointToRelative, P as PinModel, a as PinController } from './model-40bd1711.js';
6
- import { p as point } from './bundle.esm-ce2c7ad3.js';
7
- import { b as uuid } from './browser.esm-ae4ca1f1.js';
8
- import { l as labelPinCursor, p as pinCursor } from './cursors-a8d4b3f4.js';
9
- import { g as getMouseClientPosition } from './dom-5b164305.js';
5
+ import { t as translatePointToRelative, P as PinModel, a as PinController } from './model-bfe1c4d8.js';
6
+ import { p as point } from './bundle.esm-92e615bf.js';
7
+ import { b as uuid } from './browser.esm-07e7db8f.js';
8
+ import { l as labelPinCursor, p as pinCursor } from './cursors-127a3bb7.js';
9
+ import { g as getMouseClientPosition } from './dom-e436f0c0.js';
10
10
  import { E as ElementRectObserver } from './elementRectObserver-39cf7b95.js';
11
11
  import { E as EntityType } from './entities-ce81dd7f.js';
12
12
  import { g as getMarkupBoundingClientRect } from './dom-be140992.js';
13
13
 
14
14
  class PinsInteractionHandler {
15
- constructor(controller) {
15
+ constructor(controller, xOffset, yOffset) {
16
16
  this.rectObserver = new ElementRectObserver();
17
17
  this.droppableSurfaces = [
18
18
  EntityType.PRECISE_SURFACE,
@@ -28,7 +28,7 @@ class PinsInteractionHandler {
28
28
  if (this.controller.getDraggable() == null &&
29
29
  this.controller.getToolMode() === 'edit' &&
30
30
  isDroppableSurface) {
31
- this.addCursor(this.getCusorType());
31
+ this.addCursor(this.getCursorType());
32
32
  }
33
33
  else {
34
34
  this.clearCursor();
@@ -82,6 +82,8 @@ class PinsInteractionHandler {
82
82
  }
83
83
  };
84
84
  this.controller = controller;
85
+ this.xOffset = xOffset;
86
+ this.yOffset = yOffset;
85
87
  }
86
88
  get elementRect() {
87
89
  return this.rectObserver.rect;
@@ -115,7 +117,6 @@ class PinsInteractionHandler {
115
117
  var _a, _b, _c, _d, _e, _f;
116
118
  const [hit] = await api.hitItems(pt);
117
119
  if ((hit === null || hit === void 0 ? void 0 : hit.hitPoint) != null && this.elementRect != null) {
118
- const relativePoint = translatePointToRelative(pt, this.elementRect);
119
120
  if ((hit === null || hit === void 0 ? void 0 : hit.hitPoint) != null &&
120
121
  (hit === null || hit === void 0 ? void 0 : hit.hitPoint.x) != null &&
121
122
  (hit === null || hit === void 0 ? void 0 : hit.hitPoint.y) != null &&
@@ -141,6 +142,8 @@ class PinsInteractionHandler {
141
142
  });
142
143
  break;
143
144
  case 'pin-text':
145
+ const isNewPin = existingPin == null;
146
+ const relativePoint = translatePointToRelative(pt, this.elementRect, isNewPin, this.xOffset, this.yOffset);
144
147
  this.controller.setPin({
145
148
  type: 'text',
146
149
  id: pinId,
@@ -155,6 +158,7 @@ class PinsInteractionHandler {
155
158
  },
156
159
  attributes,
157
160
  });
161
+ this.controller.setSelectedPinId(pinId);
158
162
  break;
159
163
  }
160
164
  }
@@ -164,7 +168,7 @@ class PinsInteractionHandler {
164
168
  }
165
169
  });
166
170
  }
167
- getCusorType() {
171
+ getCursorType() {
168
172
  switch (this.controller.getToolType()) {
169
173
  case 'pin-icon':
170
174
  return pinCursor;
@@ -197,7 +201,7 @@ class PinsInteractionHandler {
197
201
  }
198
202
  }
199
203
 
200
- const viewerPinToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none}";
204
+ const viewerPinToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none;--viewer-pin-tool-initial-label-offset-x:20;--viewer-pin-tool-initial-label-offset-y:20}";
201
205
 
202
206
  const ViewerPinTool = class {
203
207
  constructor(hostRef) {
@@ -321,10 +325,17 @@ const ViewerPinTool = class {
321
325
  }
322
326
  setupInteractionHandler() {
323
327
  var _a;
328
+ const hostStyles = window.getComputedStyle(this.hostEl);
329
+ const xOffset = hostStyles
330
+ .getPropertyValue('--viewer-pin-tool-initial-label-offset-x')
331
+ .trim();
332
+ const yOffset = hostStyles
333
+ .getPropertyValue('--viewer-pin-tool-initial-label-offset-y')
334
+ .trim();
324
335
  this.clearInteractionHandler();
325
336
  if (this.pinController != null) {
326
337
  this.registeredInteractionHandler =
327
- (_a = this.viewer) === null || _a === void 0 ? void 0 : _a.registerInteractionHandler(new PinsInteractionHandler(this.pinController));
338
+ (_a = this.viewer) === null || _a === void 0 ? void 0 : _a.registerInteractionHandler(new PinsInteractionHandler(this.pinController, parseInt(xOffset), parseInt(yOffset)));
328
339
  }
329
340
  }
330
341
  clearModelListeners() {
@@ -1,5 +1,5 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { r as registerInstance, h } from './index-26dfb2d0.js';
5
5
  import { c as classnames } from './index-e841d91b.js';
@@ -1,15 +1,16 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-26dfb2d0.js';
5
- import { m as matrix4, p as point, v as vector3, r as ray, j as plane, q as quaternion, i as rectangle, h as angle, b as boundingBox } from './bundle.esm-ce2c7ad3.js';
5
+ import { m as matrix4, p as point, v as vector3, r as ray, f as plane, q as quaternion, e as rectangle, c as angle, b as boundingBox } from './bundle.esm-92e615bf.js';
6
6
  import { c as classnames } from './index-e841d91b.js';
7
7
  import { w as writeDOM, r as readDOM } from './stencil-bfbf099f.js';
8
- import { c as color, E as EventDispatcher } from './browser.esm-ae4ca1f1.js';
8
+ import { c as color, E as EventDispatcher } from './browser.esm-07e7db8f.js';
9
9
  import { c as createCommonjsModule, a as commonjsGlobal, g as getAugmentedNamespace, b as getDefaultExportFromCjs } from './_commonjsHelpers-11ca3be1.js';
10
- import './streamAttributes-24bd7b3a.js';
10
+ import './streamAttributes-23270e27.js';
11
11
  import './entities-ce81dd7f.js';
12
- import { V as Viewport } from './viewport-e39e2eba.js';
12
+ import { V as Viewport } from './viewport-f19fc583.js';
13
+ import './bundle.esm-91404853.js';
13
14
 
14
15
  class TransformController {
15
16
  constructor(stream) {
@@ -12494,7 +12495,7 @@ function computeDrawable2dBounds(viewport, ...elements) {
12494
12495
  let max = point.create();
12495
12496
  elements
12496
12497
  .filter((m) => m.points.valid)
12497
- .map((m) => {
12498
+ .forEach((m) => {
12498
12499
  m.points
12499
12500
  .toArray()
12500
12501
  .map((pt) => viewport.transformNdcPointToViewport(pt))
@@ -13127,6 +13128,7 @@ const ViewerTransformWidget = class {
13127
13128
  });
13128
13129
  if (this.position != null) {
13129
13130
  this.currentTransform = matrix4.makeTranslation(this.position);
13131
+ this.startingTransform = this.currentTransform;
13130
13132
  this.widget.updateTransform(this.currentTransform);
13131
13133
  }
13132
13134
  if (((_b = this.viewer) === null || _b === void 0 ? void 0 : _b.frame) != null) {
@@ -13231,7 +13233,7 @@ const ViewerTransformWidget = class {
13231
13233
  var _a, _b;
13232
13234
  this.currentTransform = this.getTransform(oldPosition, newPosition);
13233
13235
  this.startingTransform = this.currentTransform;
13234
- console.debug(`Updating widget position [previous=${JSON.stringify(newPosition)}, current=${JSON.stringify(oldPosition)}]`);
13236
+ console.debug(`Updating widget position [previous=${JSON.stringify(oldPosition)}, current=${JSON.stringify(newPosition)}]`);
13235
13237
  (_a = this.widget) === null || _a === void 0 ? void 0 : _a.updateTransform(this.currentTransform);
13236
13238
  if (newPosition == null) {
13237
13239
  (_b = this.controller) === null || _b === void 0 ? void 0 : _b.clearTransform();
@@ -1,13 +1,14 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { h, F as Fragment, r as registerInstance, H as Host } from './index-26dfb2d0.js';
5
- import { v as vector3, q as quaternion, u as euler } from './bundle.esm-ce2c7ad3.js';
5
+ import { v as vector3, q as quaternion, u as euler } from './bundle.esm-92e615bf.js';
6
6
  import { r as readDOM } from './stencil-bfbf099f.js';
7
- import { O as Orientation, e as FramePerspectiveCamera, G as StandardView } from './streamAttributes-24bd7b3a.js';
7
+ import { O as Orientation, e as FramePerspectiveCamera, S as StandardView } from './streamAttributes-23270e27.js';
8
8
  import './entities-ce81dd7f.js';
9
9
  import { c as classnames } from './index-e841d91b.js';
10
- import './browser.esm-ae4ca1f1.js';
10
+ import './bundle.esm-91404853.js';
11
+ import './browser.esm-07e7db8f.js';
11
12
  import './_commonjsHelpers-11ca3be1.js';
12
13
 
13
14
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -101,11 +102,11 @@ const ViewerViewCube = class {
101
102
  /**
102
103
  * The label for the side of the cube on the positive x-axis.
103
104
  */
104
- this.xPositiveLabel = 'Left';
105
+ this.xPositiveLabel = 'Right';
105
106
  /**
106
107
  * The label for the side of the cube on the negative x-axis.
107
108
  */
108
- this.xNegativeLabel = 'Right';
109
+ this.xNegativeLabel = 'Left';
109
110
  /**
110
111
  * The label for the side of the cube on the positive y-axis.
111
112
  */
@@ -1,17 +1,19 @@
1
1
  /**!
2
- * Copyright (c) 2022 Vertex Software LLC. All rights reserved.
2
+ * Copyright (c) 2023 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-26dfb2d0.js';
5
- import { p as point, v as vector3, h as angle, j as plane, r as ray, b as boundingBox, s as matrix2, d as dimensions } from './bundle.esm-ce2c7ad3.js';
6
- import { l as fromPbStencilBufferOrThrow, m as decodePng, n as DepthBuffer, t as toProtoDuration, g as toProtobuf, p as protoToDate, o as toPbStreamAttributes, q as toPbRGBi, S as StreamApi, r as StreamRequestError, s as fromPbFrameOrThrow, u as fromPbStartStreamResponseOrThrow, x as fromPbReconnectResponseOrThrow, y as fromPbSyncTimeResponseOrThrow, z as currentDateAsProtoTimestamp, B as fromPbRefreshTokenResponseOrThrow, W as WebSocketClientImpl, C as toOrthographic, E as toPerspective } from './streamAttributes-24bd7b3a.js';
7
- import { E as EventDispatcher, m as mapper, c as color, o as objects, u as uri, a as async, b as uuid } from './browser.esm-ae4ca1f1.js';
5
+ import { p as point, v as vector3, c as angle, f as plane, r as ray, b as boundingBox, s as matrix2, d as dimensions } from './bundle.esm-92e615bf.js';
6
+ import { t as toProtoDuration, p as protoToDate, S as StreamApi, a as StreamRequestError, c as currentDateAsProtoTimestamp, W as WebSocketClientImpl } from './bundle.esm-91404853.js';
7
+ import { E as EventDispatcher, m as mapper, c as color, o as objects, u as uri, a as async, b as uuid } from './browser.esm-07e7db8f.js';
8
8
  import { c as classnames } from './index-e841d91b.js';
9
- import { p as parseConfig } from './config-6cdeb6ca.js';
10
- import { C as CursorManager } from './cursors-a8d4b3f4.js';
11
- import { g as getMouseClientPosition, c as cssCursor } from './dom-5b164305.js';
12
- import { I as ImageLoadError, f as fromUrn, C as CustomError, W as WebsocketConnectionError, a as SynchronizedClock, b as SceneRenderError, d as defaultSelectionMaterial, V as ViewerInitializationError, e as InteractionHandlerError, g as ComponentInitializationError, h as IllegalStateError, i as fromHex, S as Scene } from './scene-970f5000.js';
9
+ import { p as parseConfig } from './config-25384fe6.js';
10
+ import { C as CursorManager } from './cursors-127a3bb7.js';
11
+ import { g as getMouseClientPosition, c as cssCursor } from './dom-e436f0c0.js';
12
+ import { c as ImageLoadError, C as CustomError, W as WebsocketConnectionError, S as SceneRenderError, V as ViewerInitializationError, d as InteractionHandlerError, e as ComponentInitializationError, f as IllegalStateError } from './errors-a4cc9caa.js';
13
+ import { k as fromPbStencilBufferOrThrow, l as decodePng, m as DepthBuffer, t as toProtobuf, n as toPbStreamAttributes, o as toPbRGBi, p as fromPbFrameOrThrow, q as fromPbStartStreamResponseOrThrow, r as fromPbReconnectResponseOrThrow, s as fromPbSyncTimeResponseOrThrow, u as fromPbRefreshTokenResponseOrThrow, x as toOrthographic, y as toPerspective } from './streamAttributes-23270e27.js';
13
14
  import { E as EntityType } from './entities-ce81dd7f.js';
14
- import { V as Viewport } from './viewport-e39e2eba.js';
15
+ import { V as Viewport } from './viewport-f19fc583.js';
16
+ import { f as fromUrn, a as SynchronizedClock, d as defaultSelectionMaterial, b as fromHex, S as Scene } from './scene-2543b3bd.js';
15
17
  import './_commonjsHelpers-11ca3be1.js';
16
18
 
17
19
  /**
@@ -1021,9 +1023,11 @@ class BaseInteractionHandler {
1021
1023
  switch (type) {
1022
1024
  case 'rotate':
1023
1025
  this.primaryInteraction = this.rotateInteraction;
1026
+ this.lastPrimaryRotateInteraction = this.rotateInteraction;
1024
1027
  break;
1025
1028
  case 'rotate-point':
1026
1029
  this.primaryInteraction = this.rotatePointInteraction;
1030
+ this.lastPrimaryRotateInteraction = this.rotatePointInteraction;
1027
1031
  break;
1028
1032
  case 'zoom':
1029
1033
  this.primaryInteraction = this.zoomInteraction;
@@ -1098,9 +1102,13 @@ class BaseInteractionHandler {
1098
1102
  }
1099
1103
  }
1100
1104
  beginDrag(event) {
1105
+ var _a;
1101
1106
  if (this.keyboardControls && event.metaKey && event.shiftKey) {
1102
1107
  this.currentInteraction = this.rotatePointInteraction;
1103
1108
  }
1109
+ else if (this.keyboardControls && event.shiftKey && event.altKey) {
1110
+ this.currentInteraction = this.twistInteraction;
1111
+ }
1104
1112
  else if (this.keyboardControls && event.shiftKey) {
1105
1113
  this.currentInteraction = this.zoomInteraction;
1106
1114
  }
@@ -1110,13 +1118,17 @@ class BaseInteractionHandler {
1110
1118
  else if (this.keyboardControls && event.altKey) {
1111
1119
  this.currentInteraction = this.rotateInteraction;
1112
1120
  }
1113
- if (event.buttons === 1 || event.buttons === 4) {
1121
+ if (event.buttons === 1) {
1114
1122
  this.draggingInteraction =
1115
1123
  this.currentInteraction || this.primaryInteraction;
1116
1124
  }
1117
1125
  else if (event.buttons === 2) {
1118
1126
  this.draggingInteraction = this.panInteraction;
1119
1127
  }
1128
+ else if (event.buttons === 4) {
1129
+ this.draggingInteraction =
1130
+ (_a = this.lastPrimaryRotateInteraction) !== null && _a !== void 0 ? _a : this.rotateInteraction;
1131
+ }
1120
1132
  if (this.draggingInteraction != null &&
1121
1133
  this.interactionApi != null &&
1122
1134
  this.element != null) {
@@ -1385,12 +1397,13 @@ class TwistInteraction extends MouseInteraction {
1385
1397
  super(...arguments);
1386
1398
  this.type = 'twist';
1387
1399
  }
1388
- beginDrag(event, canvasPosition, api) {
1389
- this.currentPosition = point.create(event.clientX, event.clientY);
1400
+ beginDrag(event, canvasPosition, api, element) {
1401
+ this.currentPosition = point.create(event.offsetX, event.offsetY);
1402
+ this.canvasRect = element.getBoundingClientRect();
1390
1403
  api.beginInteraction();
1391
1404
  }
1392
1405
  drag(event, api) {
1393
- const position = point.create(event.clientX, event.clientY);
1406
+ const position = getMouseClientPosition(event, this.canvasRect);
1394
1407
  this.currentPosition = position;
1395
1408
  api.twistCamera(position);
1396
1409
  }
@@ -2156,21 +2169,27 @@ class ViewerStream extends StreamApi {
2156
2169
  }
2157
2170
  }
2158
2171
  async loadIfConnectingOrConnected(urn, state) {
2159
- const { resource: pResource, queries: pQueries } = state.resource;
2172
+ var _a;
2173
+ const { resource: pResource, subResource: pSubResource } = state.resource;
2160
2174
  const resource = fromUrn(urn);
2161
2175
  const hasResourceChanged = !objects.isEqual(pResource, resource.resource);
2162
- const hasQueryChanged = !objects.isEqual(pQueries, resource.queries);
2163
- const hasQuery = resource.queries[0] != null;
2176
+ const hasSubResourceChanged = !objects.isEqual(pSubResource, resource.subResource);
2164
2177
  const isConnecting = state.type === 'connecting' || state.type === 'reconnecting';
2165
2178
  const isConnected = state.type === 'connected';
2166
- if (hasResourceChanged || (isConnecting && hasQueryChanged)) {
2179
+ const suppliedIdQuery = resource.queries.find((q) => q.type === 'supplied-id');
2180
+ if (hasResourceChanged || (isConnecting && hasSubResourceChanged)) {
2167
2181
  this.disconnect();
2168
2182
  return this.loadIfDisconnected(urn);
2169
2183
  }
2170
- else if (isConnected && hasQuery && hasQueryChanged) {
2171
- await this.loadSceneViewState({
2172
- sceneViewStateId: { hex: resource.queries[0].id },
2173
- });
2184
+ else if (isConnected &&
2185
+ hasSubResourceChanged &&
2186
+ ((_a = resource.subResource) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state') {
2187
+ const payload = Object.assign(Object.assign({}, (resource.subResource.id != null
2188
+ ? { sceneViewStateId: { hex: resource.subResource.id } }
2189
+ : {})), (suppliedIdQuery != null
2190
+ ? { sceneViewStateSuppliedId: { value: suppliedIdQuery.id } }
2191
+ : {}));
2192
+ await this.loadSceneViewState(payload);
2174
2193
  this.updateState(Object.assign(Object.assign({}, state), { resource }));
2175
2194
  }
2176
2195
  }
@@ -2281,14 +2300,20 @@ class ViewerStream extends StreamApi {
2281
2300
  });
2282
2301
  }
2283
2302
  async requestNewStream(resource) {
2284
- var _a;
2303
+ var _a, _b;
2304
+ const suppliedIdQuery = resource.queries.find((q) => q.type === 'supplied-id');
2285
2305
  const res = fromPbStartStreamResponseOrThrow(await this.startStream({
2286
2306
  streamKey: { value: resource.resource.id },
2287
2307
  dimensions: this.dimensions,
2288
2308
  frameBackgroundColor: toPbColorOrThrow(this.frameBgColor),
2289
2309
  streamAttributes: toPbStreamAttributesOrThrow(this.streamAttributes),
2290
- sceneViewStateId: ((_a = resource.queries[0]) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state'
2291
- ? { hex: resource.queries[0].id }
2310
+ sceneViewStateId: ((_a = resource.subResource) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state' &&
2311
+ resource.subResource.id != null
2312
+ ? { hex: resource.subResource.id }
2313
+ : undefined,
2314
+ sceneViewStateSuppliedId: ((_b = resource.subResource) === null || _b === void 0 ? void 0 : _b.type) === 'scene-view-state' &&
2315
+ suppliedIdQuery != null
2316
+ ? { value: suppliedIdQuery.id }
2292
2317
  : undefined,
2293
2318
  }));
2294
2319
  return {
@@ -2599,13 +2624,9 @@ const Viewer = class {
2599
2624
  (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.containerElement);
2600
2625
  }
2601
2626
  if (this.src != null) {
2602
- try {
2603
- this.load(this.src);
2604
- }
2605
- catch (e) {
2606
- // Consumer cannot handle this error. Just log it.
2627
+ this.load(this.src).catch((e) => {
2607
2628
  console.error('Error loading scene', e);
2608
- }
2629
+ });
2609
2630
  }
2610
2631
  this.initializeDefaultInteractionHandlers();
2611
2632
  this.injectViewerApi();
@@ -2925,7 +2946,7 @@ const Viewer = class {
2925
2946
  this.connectionChange.emit(status);
2926
2947
  }
2927
2948
  handleElementResize(entries) {
2928
- const dimensionsHaveChanged = entries.length >= 0 &&
2949
+ const dimensionsHaveChanged = entries.length > 0 &&
2929
2950
  this.dimensions != null &&
2930
2951
  !dimensions.isEqual(entries[0].contentRect, this.viewport);
2931
2952
  if (dimensionsHaveChanged) {
@@ -3104,6 +3125,7 @@ const Viewer = class {
3104
3125
  async initializeDefaultInteractionHandlers() {
3105
3126
  var _a;
3106
3127
  await this.initializeDefaultCameraInteractionHandlers();
3128
+ await this.initializeDefaultTapInteractionHandler();
3107
3129
  this.initializeDefaultKeyboardInteractionHandlers();
3108
3130
  if (this.rotateAroundTapPoint) {
3109
3131
  (_a = this.baseInteractionHandler) === null || _a === void 0 ? void 0 : _a.setPrimaryInteractionType('rotate-point');
@@ -3126,32 +3148,25 @@ const Viewer = class {
3126
3148
  var _a, _b;
3127
3149
  this.clearDefaultCameraInteractionHandlers();
3128
3150
  if (this.cameraControls) {
3129
- // default to pointer events if allowed by browser.
3130
3151
  if (window.PointerEvent != null) {
3131
- const tapInteractionHandler = new TapInteractionHandler('pointerdown', 'pointerup', 'pointermove', () => this.getResolvedConfig());
3132
3152
  this.baseInteractionHandler =
3133
3153
  (_a = this.baseInteractionHandler) !== null && _a !== void 0 ? _a : new PointerInteractionHandler(() => this.getResolvedConfig());
3134
3154
  const baseDisposable = await this.registerInteractionHandler(this.baseInteractionHandler);
3135
3155
  const multiPointerDisposable = await this.registerInteractionHandler(new MultiPointerInteractionHandler());
3136
- const tapDisposable = await this.registerInteractionHandler(tapInteractionHandler);
3137
3156
  this.defaultInteractionHandlerDisposables = [
3138
3157
  baseDisposable,
3139
3158
  multiPointerDisposable,
3140
- tapDisposable,
3141
3159
  ];
3142
3160
  }
3143
3161
  else {
3144
- const tapInteractionHandler = new TapInteractionHandler('mousedown', 'mouseup', 'mousemove', () => this.getResolvedConfig());
3145
3162
  // fallback to touch events and mouse events as a default
3146
3163
  this.baseInteractionHandler =
3147
3164
  (_b = this.baseInteractionHandler) !== null && _b !== void 0 ? _b : new MouseInteractionHandler(() => this.getResolvedConfig());
3148
3165
  const baseDisposable = await this.registerInteractionHandler(this.baseInteractionHandler);
3149
3166
  const touchDisposable = await this.registerInteractionHandler(new TouchInteractionHandler());
3150
- const tapDisposable = await this.registerInteractionHandler(tapInteractionHandler);
3151
3167
  this.defaultInteractionHandlerDisposables = [
3152
3168
  baseDisposable,
3153
3169
  touchDisposable,
3154
- tapDisposable,
3155
3170
  ];
3156
3171
  }
3157
3172
  }
@@ -3168,6 +3183,18 @@ const Viewer = class {
3168
3183
  this.defaultTapKeyInteractions = [flyToPart, flyToPosition];
3169
3184
  }
3170
3185
  }
3186
+ async initializeDefaultTapInteractionHandler() {
3187
+ if (this.tapHandlerDisposable == null) {
3188
+ if (window.PointerEvent != null) {
3189
+ const tapInteractionHandler = new TapInteractionHandler('pointerdown', 'pointerup', 'pointermove', () => this.getResolvedConfig());
3190
+ this.tapHandlerDisposable = await this.registerInteractionHandler(tapInteractionHandler);
3191
+ }
3192
+ else {
3193
+ const tapInteractionHandler = new TapInteractionHandler('mousedown', 'mouseup', 'mousemove', () => this.getResolvedConfig());
3194
+ this.tapHandlerDisposable = await this.registerInteractionHandler(tapInteractionHandler);
3195
+ }
3196
+ }
3197
+ }
3171
3198
  initializeInteractionHandler(handler) {
3172
3199
  if (this.stateMap.interactionTarget == null) {
3173
3200
  throw new InteractionHandlerError('Cannot initialize interaction handler. Interaction target is undefined.');