@3cr/viewer-browser 0.0.196 → 0.0.220

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 (370) hide show
  1. package/.circleci/config.yml +46 -22
  2. package/.prettierrc +6 -0
  3. package/components.d.ts +23 -10
  4. package/dist/Viewer3CR.js +37 -46
  5. package/dist/Viewer3CR.mjs +22640 -20897
  6. package/dist/Viewer3CR.umd.js +37 -46
  7. package/dist/android-chrome-192x192.png +0 -0
  8. package/dist/android-chrome-512x512.png +0 -0
  9. package/dist/apple-touch-icon.png +0 -0
  10. package/dist/browserconfig.xml +9 -0
  11. package/dist/favicon-16x16.png +0 -0
  12. package/dist/favicon-32x32.png +0 -0
  13. package/dist/favicon.ico +0 -0
  14. package/dist/mstile-144x144.png +0 -0
  15. package/dist/mstile-150x150.png +0 -0
  16. package/dist/mstile-310x150.png +0 -0
  17. package/dist/mstile-310x310.png +0 -0
  18. package/dist/mstile-70x70.png +0 -0
  19. package/dist/safari-pinned-tab.svg +50 -0
  20. package/dist/site.webmanifest +19 -0
  21. package/index.html +34 -41
  22. package/package.json +23 -20
  23. package/playground/android-chrome-192x192.png +0 -0
  24. package/playground/android-chrome-512x512.png +0 -0
  25. package/playground/apple-touch-icon.png +0 -0
  26. package/playground/browserconfig.xml +9 -0
  27. package/playground/favicon-16x16.png +0 -0
  28. package/playground/favicon-32x32.png +0 -0
  29. package/playground/favicon.ico +0 -0
  30. package/playground/index.html +26 -29
  31. package/playground/mstile-144x144.png +0 -0
  32. package/playground/mstile-150x150.png +0 -0
  33. package/playground/mstile-310x150.png +0 -0
  34. package/playground/mstile-310x310.png +0 -0
  35. package/playground/mstile-70x70.png +0 -0
  36. package/playground/safari-pinned-tab.svg +50 -0
  37. package/playground/site.webmanifest +19 -0
  38. package/playground/sw.js +15 -1
  39. package/public/android-chrome-192x192.png +0 -0
  40. package/public/android-chrome-512x512.png +0 -0
  41. package/public/apple-touch-icon.png +0 -0
  42. package/public/browserconfig.xml +9 -0
  43. package/public/favicon-16x16.png +0 -0
  44. package/public/favicon-32x32.png +0 -0
  45. package/public/favicon.ico +0 -0
  46. package/public/mstile-144x144.png +0 -0
  47. package/public/mstile-150x150.png +0 -0
  48. package/public/mstile-310x150.png +0 -0
  49. package/public/mstile-310x310.png +0 -0
  50. package/public/mstile-70x70.png +0 -0
  51. package/public/safari-pinned-tab.svg +50 -0
  52. package/public/site.webmanifest +19 -0
  53. package/src/App.vue +35 -45
  54. package/src/__tests__/app.spec.ts +7 -8
  55. package/{__tests__/index.spec.ts → src/__tests__/main.spec.ts} +5 -6
  56. package/src/assets/logos/3dicom/white-mini.svg +20 -0
  57. package/src/assets/logos/3dicom/white.svg +30 -0
  58. package/src/assets/styles.scss +14 -4
  59. package/src/components/demo/__tests__/DemoModal.spec.ts +9 -8
  60. package/src/components/demo/__tests__/DemoPatientModal.spec.ts +11 -10
  61. package/src/components/demo/__tests__/options.spec.ts +1 -1
  62. package/src/components/demo/licence/__tests__/DemoLicenceEnableCloudStorageModal.spec.ts +11 -10
  63. package/src/components/demo/licence/__tests__/DemoLicenceInfoModal.spec.ts +21 -11
  64. package/src/components/demo/licence/__tests__/DemoLicenceSendToPartyModal.spec.ts +10 -10
  65. package/src/components/demo/licence/__tests__/DemoLicenceShareToMobileModal.spec.ts +14 -13
  66. package/src/components/demo/options.ts +54 -59
  67. package/src/components/demo/patient/__tests__/DemoPatientEnableCloudStorageModal.spec.ts +11 -10
  68. package/src/components/demo/patient/__tests__/DemoPatientInfoModal.spec.ts +12 -11
  69. package/src/components/demo/patient/__tests__/DemoPatientSendToPartyModal.spec.ts +10 -10
  70. package/src/components/demo/patient/__tests__/DemoPatientShareToMobileModal.spec.ts +14 -13
  71. package/src/components/modal/ActionRail.vue +7 -11
  72. package/src/components/modal/AskAI.vue +35 -50
  73. package/src/components/modal/CloseViewerModal.vue +22 -57
  74. package/src/components/modal/MftpWebGL3DRModal.vue +152 -570
  75. package/src/components/modal/ViewerActionRail.vue +50 -39
  76. package/src/components/modal/ViewerNavigationDrawer.vue +10 -8
  77. package/src/components/modal/ViewerNavigationDrawerContent.vue +82 -49
  78. package/src/components/modal/ViewerNavigationDrawerFooter.vue +57 -60
  79. package/src/components/modal/ViewerNavigationDrawerHeader.vue +13 -48
  80. package/src/components/modal/ViewerScanView.vue +114 -0
  81. package/src/components/modal/WebGL3DR.vue +84 -0
  82. package/src/components/modal/__tests__/ActionRail.spec.ts +10 -0
  83. package/src/components/modal/__tests__/AskAI.spec.ts +33 -0
  84. package/src/components/modal/__tests__/CloseViewerModal.spec.ts +24 -14
  85. package/src/components/modal/__tests__/MftpWebGL3DRModal.spec.ts +147 -176
  86. package/src/components/modal/__tests__/ViewerActionRail.spec.ts +11 -0
  87. package/src/components/modal/__tests__/ViewerNavigationDrawer.spec.ts +10 -12
  88. package/src/components/modal/__tests__/ViewerNavigationDrawerContent.spec.ts +4 -22
  89. package/src/components/modal/__tests__/ViewerNavigationDrawerFooter.spec.ts +35 -32
  90. package/src/components/modal/__tests__/ViewerNavigationDrawerHeader.spec.ts +11 -9
  91. package/src/components/modal/__tests__/ViewerScanView.spec.ts +60 -0
  92. package/src/components/modal/__tests__/WebGL3DR.spec.ts +57 -0
  93. package/src/components/modal/actions/Flip3dAction.vue +1 -1
  94. package/src/components/modal/actions/FlipHorizontalAction.vue +5 -10
  95. package/src/components/modal/actions/FlipVerticalAction.vue +5 -10
  96. package/src/components/modal/actions/FullscreenAction.vue +6 -11
  97. package/src/components/modal/actions/HideViewAction.vue +38 -0
  98. package/src/components/modal/actions/NavigationCubeAction.vue +7 -14
  99. package/src/components/modal/actions/PanAction.vue +4 -4
  100. package/src/components/modal/actions/ResetViewAction.vue +1 -1
  101. package/src/components/modal/actions/Rotate2dAction.vue +8 -20
  102. package/src/components/modal/actions/Slice3dAction.vue +10 -32
  103. package/src/components/modal/actions/ZoomAction.vue +1 -1
  104. package/src/components/modal/actions/__tests__/Action.spec.ts +8 -9
  105. package/src/components/modal/actions/__tests__/Flip3dAction.spec.ts +6 -8
  106. package/src/components/modal/actions/__tests__/FlipHorizontalAction.spec.ts +6 -7
  107. package/src/components/modal/actions/__tests__/FlipVerticalAction.spec.ts +6 -7
  108. package/src/components/modal/actions/__tests__/FullscreenAction.spec.ts +9 -10
  109. package/src/components/modal/actions/__tests__/NavigationCubeAction.spec.ts +11 -11
  110. package/src/components/modal/actions/__tests__/PanAction.spec.ts +9 -10
  111. package/src/components/modal/actions/__tests__/ResetViewAction.spec.ts +7 -7
  112. package/src/components/modal/actions/__tests__/Rotate2dAction.spec.ts +6 -8
  113. package/src/components/modal/actions/__tests__/Slice3dAction.spec.ts +23 -5
  114. package/src/components/modal/actions/__tests__/ZoomAction.spec.ts +8 -10
  115. package/src/components/modal/buttons/AutoAnnotateBtn.vue +29 -0
  116. package/src/components/modal/buttons/__tests__/AutoAnnotateBtn.spec.ts +28 -0
  117. package/src/components/modal/menus/FileMenu.vue +80 -0
  118. package/src/components/modal/menus/SettingsMenu.vue +111 -0
  119. package/src/components/modal/menus/__tests__/FileMenu.spec.ts +110 -0
  120. package/src/components/modal/menus/__tests__/SettingsMenu.spec.ts +71 -0
  121. package/src/components/shared/DoubleSliderSelector.vue +142 -0
  122. package/src/components/shared/UpdateSnackbar.vue +72 -0
  123. package/src/components/{selectors → shared}/ValueSelector.vue +9 -12
  124. package/src/components/shared/__tests__/DoubleSliderSelector.spec.ts +83 -0
  125. package/src/components/shared/__tests__/LoadingSpinner.spec.ts +9 -0
  126. package/src/components/shared/__tests__/UpdateSnackbar.spec.ts +116 -0
  127. package/src/components/shared/__tests__/ValueSelector.spec.ts +39 -0
  128. package/src/components/shared/__tests__/VerticalSliderSelector.spec.ts +50 -0
  129. package/src/components/views/AnnotationTreeView.vue +234 -0
  130. package/src/components/{modal/ViewerDisplaySettings.vue → views/DisplaySettings.vue} +7 -15
  131. package/src/components/views/MarkupTreeView.vue +199 -0
  132. package/src/components/views/McadObjectTreeView.vue +119 -0
  133. package/src/components/views/__tests__/AnnotationTreeView.spec.ts +62 -0
  134. package/src/components/{modal/__tests__/ViewerDisplaySettings.spec.ts → views/__tests__/DisplaySettings.spec.ts} +24 -20
  135. package/src/components/views/__tests__/MarkupTreeView.spec.ts +41 -0
  136. package/src/components/views/__tests__/McadObjectTreeView.spec.ts +47 -0
  137. package/src/components/views/modals/DataOverlayModal.vue +89 -0
  138. package/src/components/views/modals/DataOverlayModalManager.vue +104 -0
  139. package/src/components/views/modals/__tests__/DataOverlayModal.spec.ts +33 -0
  140. package/src/components/views/modals/__tests__/DataOverlayModalManager.spec.ts +93 -0
  141. package/src/components/views/shared/MaskIcon.vue +44 -0
  142. package/src/components/views/shared/ObjectColor.vue +31 -0
  143. package/src/components/views/shared/ObjectLabel.vue +30 -0
  144. package/src/components/views/shared/Opacity.vue +66 -0
  145. package/src/components/views/shared/VisibilityBtn.vue +25 -0
  146. package/src/components/views/shared/__tests__/MaskIcon.spec.ts +10 -0
  147. package/src/components/views/shared/__tests__/ObjectColor.spec.ts +10 -0
  148. package/src/components/views/shared/__tests__/ObjectLabel.spec.ts +10 -0
  149. package/src/components/views/shared/__tests__/Opacity.spec.ts +24 -0
  150. package/src/components/views/shared/__tests__/VisibilityBtn.spec.ts +11 -0
  151. package/src/components/views/types/annotation-tree-view-item-child-action.ts +6 -0
  152. package/src/components/views/types/annotation-tree-view-item-child.ts +9 -0
  153. package/src/components/views/types/annotation-tree-view-item.ts +13 -0
  154. package/src/components/views/types/markup-tree-view-item-child.ts +6 -0
  155. package/src/components/views/types/markup-tree-view-item.ts +14 -0
  156. package/src/components/views/types/mcad-object-tree-view-item.ts +13 -0
  157. package/src/composables/__tests__/useAnnotations.spec.ts +35 -0
  158. package/src/composables/__tests__/useEventListener.spec.ts +32 -0
  159. package/src/composables/__tests__/useIntroJs.spec.ts +51 -0
  160. package/src/composables/__tests__/useMarkups.spec.ts +39 -0
  161. package/src/composables/__tests__/useMcadObjects.spec.ts +36 -0
  162. package/src/composables/__tests__/useMouse.spec.ts +20 -0
  163. package/src/{components/modal/composables → composables}/__tests__/useNavigationCubeObserver.spec.ts +17 -12
  164. package/src/{dataLayer → composables}/__tests__/useViewer3cr.spec.ts +1 -2
  165. package/src/composables/useAnnotations.ts +37 -0
  166. package/src/composables/useEventListener.ts +25 -0
  167. package/src/composables/useIntroJs.ts +125 -0
  168. package/src/composables/useMarkups.ts +41 -0
  169. package/src/composables/useMcadObjects.ts +32 -0
  170. package/src/composables/useMouse.ts +14 -0
  171. package/src/{components/modal/composables → composables}/useNavigationCubeObserver.ts +35 -25
  172. package/src/composables/useScanMovement.ts +25 -0
  173. package/src/composables/useScanSliders.ts +36 -0
  174. package/src/composables/useVersion3cr.ts +7 -0
  175. package/src/composables/useViewer3cr.ts +7 -0
  176. package/src/composables/useViewerOptions.ts +35 -0
  177. package/src/{dataLayer → functions}/__tests__/clamp.spec.ts +1 -2
  178. package/src/functions/__tests__/layoutOverlayStyle.spec.ts +325 -0
  179. package/src/{helpers/__tests__/model-helper.spec.ts → functions/__tests__/modelHelper.spec.ts} +77 -40
  180. package/src/{notifications → functions}/__tests__/notification.spec.ts +19 -29
  181. package/src/functions/__tests__/parseAction.spec.ts +9 -0
  182. package/src/functions/__tests__/parseCallToAction.spec.ts +11 -0
  183. package/src/functions/__tests__/parseDataOverlay.spec.ts +15 -0
  184. package/src/functions/__tests__/parseDataOverlayData.spec.ts +9 -0
  185. package/src/functions/__tests__/parseDataOverlayEvent.spec.ts +10 -0
  186. package/src/functions/__tests__/parseMcadEvent.spec.ts +10 -0
  187. package/src/functions/layoutOverlayStyle.ts +84 -0
  188. package/src/{helpers → functions}/modelHelper.ts +79 -18
  189. package/src/{notifications → functions}/notification.ts +12 -14
  190. package/src/functions/parseAction.ts +9 -0
  191. package/src/functions/parseCallToAction.ts +9 -0
  192. package/src/functions/parseDataOverlay.ts +10 -0
  193. package/src/functions/parseDataOverlayData.ts +10 -0
  194. package/src/functions/parseDataOverlayEvent.ts +17 -0
  195. package/src/functions/parseMcadEvent.ts +10 -0
  196. package/src/functions/rgbaToCss.ts +13 -0
  197. package/src/main.ts +48 -9
  198. package/src/{dataLayer → models}/__tests__/eventHandlers.spec.ts +2 -3
  199. package/src/models/__tests__/loadViewerOptions.spec.ts +72 -0
  200. package/src/models/__tests__/loadViewerPayload.spec.ts +10 -0
  201. package/src/models/__tests__/scanState.spec.ts +190 -0
  202. package/src/models/callbacks.ts +4 -0
  203. package/src/models/loadViewerOptions.ts +40 -0
  204. package/src/models/loadViewerPayload.ts +24 -0
  205. package/src/{dataLayer → models}/scanState.ts +63 -74
  206. package/src/plugins/__tests__/usePlugins.spec.ts +12 -0
  207. package/src/plugins/__tests__/vuetify.spec.ts +3 -4
  208. package/src/plugins/usePlugins.ts +8 -0
  209. package/src/plugins/vuetify.ts +31 -65
  210. package/src/services/{gpt/__tests__ → __tests__}/gpt.service.spec.ts +2 -2
  211. package/src/services/__tests__/service-worker.service.spec.ts +32 -0
  212. package/src/{dataLayer/__tests__/viewer3cr.spec.ts → services/__tests__/viewer-3cr.service.spec.ts} +97 -36
  213. package/src/services/gpt.service.ts +17 -0
  214. package/src/services/service-worker.service.ts +16 -0
  215. package/src/{dataLayer/viewer3cr.ts → services/viewer-3cr.service.ts} +269 -150
  216. package/src/types/action.ts +13 -0
  217. package/src/types/call-to-action.ts +9 -0
  218. package/src/types/colour.ts +6 -0
  219. package/src/types/data-overlay-angle.ts +16 -0
  220. package/src/types/data-overlay-annotation.ts +18 -0
  221. package/src/types/data-overlay-data.ts +15 -0
  222. package/src/types/data-overlay-info.ts +14 -0
  223. package/src/types/data-overlay-interaction.ts +15 -0
  224. package/src/types/data-overlay-length.ts +16 -0
  225. package/src/types/data-overlay-markup.ts +7 -0
  226. package/src/types/data-overlay-mcad.ts +20 -0
  227. package/src/types/data-overlay-polygon.ts +18 -0
  228. package/src/types/data-overlay.ts +16 -0
  229. package/src/types/gpt-question.ts +4 -0
  230. package/src/types/gpt-response-payload.ts +6 -0
  231. package/src/types/mcad-object-interaction.ts +15 -0
  232. package/src/types/segment-angle.ts +5 -0
  233. package/src/types/vector2.ts +4 -0
  234. package/src/types/vector3.ts +5 -0
  235. package/test/fakers/action-data.faker.ts +11 -0
  236. package/test/fakers/action.faker.ts +19 -0
  237. package/test/fakers/call-to-action.faker.ts +17 -0
  238. package/test/fakers/colour.faker.ts +17 -0
  239. package/test/fakers/data-overlay-angle.faker.ts +37 -0
  240. package/test/fakers/data-overlay-annotation.faker.ts +41 -0
  241. package/test/fakers/data-overlay-data.faker.ts +97 -0
  242. package/test/fakers/data-overlay-info.faker.ts +29 -0
  243. package/test/fakers/data-overlay-interaction.faker.ts +62 -0
  244. package/test/fakers/data-overlay-length.faker.ts +37 -0
  245. package/test/fakers/data-overlay-mcad.faker.ts +40 -0
  246. package/test/fakers/data-overlay-polygon.faker.ts +39 -0
  247. package/test/fakers/gpt-question.faker.ts +11 -0
  248. package/test/fakers/gpt-response.faker.ts +12 -0
  249. package/test/fakers/invert-transform.faker.ts +16 -0
  250. package/test/fakers/mcad-object-interaction.faker.ts +22 -0
  251. package/test/fakers/orientation.faker.ts +17 -0
  252. package/test/fakers/segment-angle.faker.ts +12 -0
  253. package/test/fakers/vector2.faker.ts +12 -0
  254. package/test/fakers/vector3.faker.ts +16 -0
  255. package/test/plugins/findByTestId.ts +25 -0
  256. package/test/plugins/vuetify.ts +16 -0
  257. package/test/setup.ts +16 -5
  258. package/tsconfig.json +4 -15
  259. package/vite.config.mts +20 -46
  260. package/vitest.config.mts +24 -43
  261. package/index.ts +0 -72
  262. package/src/assets/images/dark/3DICOM.png +0 -0
  263. package/src/assets/images/dark/3dicom-logo.svg +0 -1
  264. package/src/assets/images/light/3DICOM.png +0 -0
  265. package/src/assets/images/light/3dicom-logo.svg +0 -1
  266. package/src/assets/logo.png +0 -0
  267. package/src/assets/logo.svg +0 -6
  268. package/src/components/WebGL3DR.vue +0 -102
  269. package/src/components/__tests__/webgl3dr.spec.ts +0 -37
  270. package/src/components/icons/liver.vue +0 -21
  271. package/src/components/loading/__tests__/loading-spinner.spec.ts +0 -11
  272. package/src/components/modal/ViewerAnnotationModal.vue +0 -115
  273. package/src/components/modal/ViewerAnnotations.vue +0 -283
  274. package/src/components/modal/__tests__/ViewerAnnotationModal.spec.ts +0 -79
  275. package/src/components/modal/composables/useEventListener.ts +0 -22
  276. package/src/components/selectors/__tests__/value-selector.spec.ts +0 -53
  277. package/src/components/sliders/DoubleSliderSelector.vue +0 -141
  278. package/src/components/sliders/__tests__/double-slider-selector.spec.ts +0 -104
  279. package/src/components/sliders/__tests__/vertical-slider-selector.spec.ts +0 -61
  280. package/src/dataLayer/__tests__/getIconForPreset.spec.ts +0 -40
  281. package/src/dataLayer/__tests__/patchDataOverlay.spec.ts +0 -88
  282. package/src/dataLayer/__tests__/scanState.spec.ts +0 -93
  283. package/src/dataLayer/getIconForPreset.ts +0 -11
  284. package/src/dataLayer/patchDataOverlay.ts +0 -101
  285. package/src/dataLayer/useViewer3cr.ts +0 -7
  286. package/src/helpers/__tests__/layout-overlay-style.spec.ts +0 -290
  287. package/src/helpers/__tests__/utils.spec.ts +0 -70
  288. package/src/helpers/layoutOverlayStyle.ts +0 -96
  289. package/src/helpers/utils.ts +0 -16
  290. package/src/models/Callbacks.ts +0 -2
  291. package/src/models/LoadViewerOptions.ts +0 -31
  292. package/src/models/LoadViewerPayload.ts +0 -9
  293. package/src/models/__tests__/load-viewer-options.spec.ts +0 -22
  294. package/src/plugins/__tests__/index.spec.ts +0 -19
  295. package/src/plugins/index.ts +0 -17
  296. package/src/services/gpt/gpt.service.ts +0 -27
  297. package/static/3cr-types-browser/index.ts +0 -74
  298. package/static/3cr-types-browser/types/Action.ts +0 -6
  299. package/static/3cr-types-browser/types/AlphaKeys.ts +0 -5
  300. package/static/3cr-types-browser/types/AnchorPoint.ts +0 -12
  301. package/static/3cr-types-browser/types/CallToAction.ts +0 -5
  302. package/static/3cr-types-browser/types/ColourData.ts +0 -7
  303. package/static/3cr-types-browser/types/ColourPresetData.ts +0 -9
  304. package/static/3cr-types-browser/types/CurrentDataOverlayState.ts +0 -6
  305. package/static/3cr-types-browser/types/CurrentScanState.ts +0 -22
  306. package/static/3cr-types-browser/types/DataOverlay.ts +0 -22
  307. package/static/3cr-types-browser/types/DataOverlayActions.ts +0 -14
  308. package/static/3cr-types-browser/types/DataOverlayData.ts +0 -8
  309. package/static/3cr-types-browser/types/DataOverlayEvent.ts +0 -8
  310. package/static/3cr-types-browser/types/DecryptionKey.ts +0 -4
  311. package/static/3cr-types-browser/types/DisplaySettings.ts +0 -10
  312. package/static/3cr-types-browser/types/EmptyPayload.ts +0 -3
  313. package/static/3cr-types-browser/types/EnumPayload.ts +0 -4
  314. package/static/3cr-types-browser/types/FileManagementActions.ts +0 -11
  315. package/static/3cr-types-browser/types/FlipValue.ts +0 -7
  316. package/static/3cr-types-browser/types/FrontEndInterfaces.ts +0 -14
  317. package/static/3cr-types-browser/types/GradientKeys.ts +0 -7
  318. package/static/3cr-types-browser/types/GreyscalePresetData.ts +0 -6
  319. package/static/3cr-types-browser/types/InitialDataOverlayState.ts +0 -6
  320. package/static/3cr-types-browser/types/InitialScanState.ts +0 -19
  321. package/static/3cr-types-browser/types/InteractionType.ts +0 -8
  322. package/static/3cr-types-browser/types/InteractivityActions.ts +0 -6
  323. package/static/3cr-types-browser/types/InteractivityState.ts +0 -4
  324. package/static/3cr-types-browser/types/InvertTransformData.ts +0 -6
  325. package/static/3cr-types-browser/types/LayoutActions.ts +0 -6
  326. package/static/3cr-types-browser/types/LayoutData.ts +0 -7
  327. package/static/3cr-types-browser/types/LoadDataSet.ts +0 -6
  328. package/static/3cr-types-browser/types/LoadSessionState.ts +0 -4
  329. package/static/3cr-types-browser/types/LocalLoadDataset.ts +0 -3
  330. package/static/3cr-types-browser/types/MovementData.ts +0 -7
  331. package/static/3cr-types-browser/types/NavigationCubeActions.ts +0 -8
  332. package/static/3cr-types-browser/types/NavigationCubeData.ts +0 -12
  333. package/static/3cr-types-browser/types/NavigationCubeTransform.ts +0 -9
  334. package/static/3cr-types-browser/types/NotificationPayload.ts +0 -7
  335. package/static/3cr-types-browser/types/NotificationsActions.ts +0 -6
  336. package/static/3cr-types-browser/types/Object.ts +0 -1
  337. package/static/3cr-types-browser/types/ObjectColour.ts +0 -7
  338. package/static/3cr-types-browser/types/ObjectIcon.ts +0 -5
  339. package/static/3cr-types-browser/types/ObjectInvert.ts +0 -7
  340. package/static/3cr-types-browser/types/ObjectSize.ts +0 -7
  341. package/static/3cr-types-browser/types/ObjectSize2D.ts +0 -7
  342. package/static/3cr-types-browser/types/ObjectVisible.ts +0 -5
  343. package/static/3cr-types-browser/types/PositionData.ts +0 -14
  344. package/static/3cr-types-browser/types/PresetsActions.ts +0 -4
  345. package/static/3cr-types-browser/types/RotationValue.ts +0 -7
  346. package/static/3cr-types-browser/types/ScanMovementActions.ts +0 -27
  347. package/static/3cr-types-browser/types/ScanMovementData.ts +0 -3
  348. package/static/3cr-types-browser/types/ScanOrientationActions.ts +0 -6
  349. package/static/3cr-types-browser/types/ScanStateActions.ts +0 -4
  350. package/static/3cr-types-browser/types/ScanView.ts +0 -6
  351. package/static/3cr-types-browser/types/SettingsData.ts +0 -12
  352. package/static/3cr-types-browser/types/SlicerData.ts +0 -9
  353. package/static/3cr-types-browser/types/SliderValue.ts +0 -4
  354. package/static/3cr-types-browser/types/SlidersActions.ts +0 -18
  355. package/static/3cr-types-browser/types/Vector2Data.ts +0 -5
  356. package/static/3cr-types-browser/types/Vector3Data.ts +0 -6
  357. package/static/3cr-types-browser/types/VectorMovementData.ts +0 -8
  358. package/static/3cr-types-browser/types/ViewInteractiveMode.ts +0 -5
  359. package/static/3cr-types-browser/types/ViewOrientation.ts +0 -8
  360. package/static/3cr-types-browser/types/ViewOrientations.ts +0 -10
  361. package/static/3cr-types-browser/types/ViewSelectionActions.ts +0 -9
  362. package/static/3cr-types-browser/types/ViewToggleData.ts +0 -7
  363. package/static/3cr-types-browser/types/VolumeOrientation.ts +0 -7
  364. package/test/helper.ts +0 -44
  365. /package/src/components/{loading → shared}/LoadingSpinner.vue +0 -0
  366. /package/src/components/{sliders → shared}/VerticalSliderSelector.vue +0 -0
  367. /package/{config.ts → src/config.ts} +0 -0
  368. /package/src/{dataLayer → functions}/clamp.ts +0 -0
  369. /package/src/{dataLayer → models}/eventHandlers.ts +0 -0
  370. /package/{static/3cr-types-browser/types/ActionData.ts → src/types/action-data.ts} +0 -0
Binary file
Binary file
Binary file
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/mstile-150x150.png"/>
6
+ <TileColor>#da532c</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.14, written by Peter Selinger 2001-2017
9
+ </metadata>
10
+ <g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M2939 6958 c-1 -7 -2 -337 -3 -733 -1 -470 -5 -719 -11 -718 -11 1
13
+ -440 111 -560 143 -147 39 -391 102 -405 105 -14 3 -202 52 -437 113 l-111 30
14
+ -4 -22 c-1 -11 -3 -333 -2 -713 0 -381 -3 -693 -7 -693 -7 0 -296 76 -454 119
15
+ -138 38 -810 213 -832 217 -12 2 -34 9 -48 14 -15 6 -28 10 -31 10 -2 0 -3
16
+ -840 -2 -1867 l3 -1867 65 -19 c141 -40 359 -104 405 -118 35 -11 267 -78 310
17
+ -89 17 -5 71 -20 120 -35 50 -14 104 -30 120 -34 17 -5 134 -39 260 -76 127
18
+ -37 244 -70 260 -75 17 -4 156 -44 310 -89 154 -45 492 -143 750 -217 259 -75
19
+ 597 -173 752 -218 l282 -83 -2 919 c-1 505 -1 918 0 918 2 0 67 -18 145 -41
20
+ 79 -22 166 -47 193 -54 28 -7 84 -23 125 -35 41 -12 82 -23 90 -25 8 -2 125
21
+ -36 260 -74 135 -39 248 -71 252 -71 3 0 6 412 7 916 0 504 1 917 3 919 2 1
22
+ 55 -13 118 -32 202 -61 302 -91 445 -133 162 -48 315 -94 400 -120 33 -10 70
23
+ -21 83 -25 l22 -6 -2 1548 -3 1548 -155 43 c-85 23 -195 53 -245 67 -49 13
24
+ -216 58 -370 100 -154 42 -287 78 -295 80 -8 2 -42 11 -75 20 -33 9 -82 23
25
+ -110 30 -125 34 -335 90 -495 134 -96 27 -287 79 -425 116 -137 37 -295 79
26
+ -350 95 -173 48 -330 90 -337 90 -5 0 -8 -6 -9 -12z m981 -1008 c85 -23 184
27
+ -50 220 -60 36 -10 108 -30 160 -44 239 -64 554 -149 640 -172 52 -14 104 -29
28
+ 116 -34 l21 -8 0 -769 c0 -422 -1 -771 -3 -775 -2 -3 -52 9 -112 27 -59 18
29
+ -133 40 -164 49 l-58 17 -1 62 c0 34 0 227 0 428 l0 366 -87 22 c-48 12 -154
30
+ 39 -237 60 -82 22 -231 60 -330 86 -349 90 -409 106 -412 109 -3 3 -5 402 -4
31
+ 618 l1 87 48 -14 c26 -7 117 -32 202 -55z m-1632 -1036 c75 -19 225 -58 332
32
+ -86 107 -27 222 -57 255 -65 l61 -15 0 -339 c0 -198 -4 -339 -9 -339 -5 0 -37
33
+ 7 -71 16 -33 9 -68 18 -76 20 -8 2 -73 19 -145 38 -71 19 -211 55 -310 81 -99
34
+ 26 -182 48 -183 50 -2 2 -4 133 -4 292 1 366 1 383 7 383 3 0 67 -16 143 -36z
35
+ m1447 -374 c11 -5 43 -13 70 -20 28 -6 85 -20 128 -32 78 -20 78 -20 74 -52
36
+ -4 -36 -4 -36 -117 -1 -41 13 -108 33 -147 45 -69 20 -73 23 -73 49 0 25 3 28
37
+ 23 24 12 -2 31 -8 42 -13z m-2845 -694 c52 -13 149 -39 215 -56 66 -17 143
38
+ -37 170 -45 28 -8 68 -19 91 -24 l40 -11 1 -590 c0 -324 1 -592 4 -594 3 -3
39
+ 926 -268 979 -281 8 -2 65 -18 125 -35 61 -17 124 -35 140 -40 17 -4 68 -20
40
+ 115 -33 47 -14 103 -30 125 -36 l41 -11 -1 -529 c0 -291 -3 -532 -6 -535 -3
41
+ -3 -19 -2 -35 3 -16 5 -164 48 -329 96 -165 47 -406 117 -535 155 -129 37
42
+ -332 96 -450 130 -118 34 -260 75 -314 92 -55 16 -109 32 -120 34 -12 2 -102
43
+ 28 -201 57 l-180 53 -2 1118 c-1 1034 0 1116 15 1112 10 -3 60 -16 112 -30z
44
+ m2910 -147 c36 -11 89 -27 118 -35 99 -26 89 38 88 -568 -1 -294 -4 -537 -7
45
+ -541 -6 -5 -315 78 -326 88 -3 4 -6 810 -3 1059 l0 37 33 -10 c17 -6 61 -19
46
+ 97 -30z m-1270 -284 c118 -31 256 -67 307 -81 50 -13 93 -24 95 -24 2 0 4
47
+ -102 3 -227 0 -143 -4 -228 -10 -227 -11 1 -778 217 -783 220 -3 2 -5 264 -3
48
+ 400 l1 42 88 -23 c48 -13 184 -48 302 -80z"/>
49
+ </g>
50
+ </svg>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
package/index.html CHANGED
@@ -1,46 +1,39 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
-
4
- <head>
3
+ <head>
5
4
  <meta charset="UTF-8" />
6
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
8
- <link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
9
- <script src="https://cdn.jsdelivr.net/npm/@statsig/js-client@latest/build/statsig-js-client+session-replay+web-analytics.min.js"></script>
10
- <!-- <script src="https://cdn.jsdelivr.net/npm/statsig-js/build/statsig-prod-web-sdk.min.js" ></script>-->
11
-
12
- <title>Welcome to Vuetify 3</title>
13
- </head>
14
-
15
- <body>
16
- <div id="app"></div>
17
- <script type="module">
18
- import {registerViewer, loadViewer} from './index.ts';
19
-
20
- const { StatsigClient, SessionReplay, runStatsigAutoCapture, runStatsigSessionReplay } = window.Statsig;
21
-
22
- const client = new StatsigClient(
23
- "client-YaAjxOTTRbuSN3peDAwXEzErieXpI744a3OHDgonzvV",
24
- { userID: undefined },
25
- {environment: {tier: 'development'}}
26
- );
27
- client.initializeSync()
28
-
29
- runStatsigAutoCapture(client);
30
- window.playgroundStatsigClient = client
31
-
32
-
33
- const dynamicConfig = client.getDynamicConfig("3cr_viewer_version");
34
- const testVersion = (window.location.href.includes('test.') || window.location.href.includes('localhost')) && new URLSearchParams(window.location.search).get("build_version")
35
- const version = testVersion ?? dynamicConfig.value["sdkVersion"] ?? "1.1.0";
36
-
37
- client.initializeAsync().then(() => {
38
- registerViewer(version).then(() => {
39
- loadViewer().then()
40
- })
41
- }).catch((err) => console.error(err));
42
-
43
- </script>
44
- </body>
45
-
6
+ <meta name="msapplication-TileColor" content="#da532c" />
7
+ <meta name="theme-color" content="#ffffff" />
8
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
9
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
10
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
11
+ <link rel="manifest" href="/site.webmanifest" />
12
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
13
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
14
+ <title>3CR Browser Viewer</title>
15
+ </head>
16
+ <body>
17
+ <div id="app"></div>
18
+ <script type="module">
19
+ import { registerViewer, loadViewer } from '/src/main.ts';
20
+ import { StatsigClient } from '@statsig/js-client';
21
+ import { runStatsigAutoCapture } from '@statsig/web-analytics';
22
+
23
+ const key = "client-YaAjxOTTRbuSN3peDAwXEzErieXpI744a3OHDgonzvV";
24
+ const user = { userID: undefined };
25
+ const options = { environment: { tier: 'development' } };
26
+ const client = new StatsigClient(key, user, options);
27
+ runStatsigAutoCapture(client);
28
+ await client.initializeAsync();
29
+ window.playgroundStatsigClient = client
30
+
31
+ const dynamicConfig = client.getDynamicConfig("3cr_viewer_version");
32
+ const testVersion = (window.location.href.includes('test.') || window.location.href.includes('localhost')) && new URLSearchParams(window.location.search).get("build_version")
33
+ const version = testVersion ?? dynamicConfig.value["sdkVersion"] ?? "1.1.0";
34
+
35
+ await registerViewer(version);
36
+ await loadViewer();
37
+ </script>
38
+ </body>
46
39
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3cr/viewer-browser",
3
- "version": "0.0.196",
3
+ "version": "0.0.220",
4
4
  "main": "./dist/Viewer3CR.umd.js",
5
5
  "module": "dist/Viewer3CR.umd.js",
6
6
  "homepage": "https://docs.3cr.singular.health",
@@ -9,7 +9,7 @@
9
9
  "url": "git+ssh://git@bitbucket.org:medvr/3cr-viewer-browser.git"
10
10
  },
11
11
  "scripts": {
12
- "dev": "vite",
12
+ "dev": "vite --force",
13
13
  "build": "vue-tsc --noEmit && vite build",
14
14
  "deploy": "npm version --no-git-tag-version patch && npm run build && npm publish",
15
15
  "deploy:ci": "npm run build && npm publish --access=public",
@@ -21,40 +21,43 @@
21
21
  "coverage": "vitest run --coverage"
22
22
  },
23
23
  "dependencies": {
24
- "@3cr/sdk-browser": "^1.0.13",
25
- "@3cr/types-ts": "file:static/3cr-types-browser",
24
+ "@3cr/sdk-browser": "^1.0.16",
25
+ "@3cr/types-ts": "^1.0.138",
26
26
  "@kyvg/vue3-notification": "^3.2.1",
27
- "@mdi/font": "6.2.95",
27
+ "@mdi/font": "^7.4.47",
28
28
  "@mdi/js": "^7.4.47",
29
+ "@statsig/js-client": "^1.5.0",
30
+ "@statsig/session-replay": "^1.5.0",
31
+ "@statsig/web-analytics": "^1.5.0",
29
32
  "axios": "^1.7.2",
30
- "intro.js": "^7.2.0",
33
+ "intro.js": "^8.0.0-beta.1",
31
34
  "logrocket": "^8.1.0",
32
- "roboto-fontface": "*",
33
- "vue": "^3.4.21",
34
- "vuetify": "^3.5.8"
35
+ "roboto-fontface": "^0.10.0",
36
+ "vue": "^3.4.29",
37
+ "vuetify": "^3.6.12"
35
38
  },
36
39
  "devDependencies": {
37
40
  "@babel/types": "^7.24.0",
38
- "@types/node": "^20.11.25",
41
+ "@faker-js/faker": "^8.4.1",
42
+ "@types/node": "^20.14.2",
39
43
  "@vitejs/plugin-vue": "^5.0.4",
40
- "@vitest/coverage-istanbul": "^1.4.0",
41
- "@vitest/coverage-v8": "^1.4.0",
42
- "@vitest/ui": "^1.4.0",
43
- "@vue/test-utils": "^2.4.5",
44
+ "@vitest/coverage-istanbul": "^2.0.3",
45
+ "@vitest/ui": "^2.0.3",
46
+ "@vue/test-utils": "^2.4.6",
44
47
  "aws-sdk": "^2.1594.0",
45
48
  "jsdom": "^24.0.0",
46
- "material-design-icons-iconfont": "^6.7.0",
47
49
  "mime-types": "^2.1.35",
50
+ "prettier": "^3.3.2",
48
51
  "randomstring": "^1.3.0",
49
52
  "resize-observer-polyfill": "^1.5.1",
50
53
  "sass": "^1.71.1",
51
54
  "typescript": "^5.4.2",
52
55
  "unplugin-fonts": "^1.1.1",
53
- "unplugin-vue-components": "^0.26.0",
54
- "vite": "^5.1.5",
55
- "vite-plugin-css-injected-by-js": "^3.5.0",
56
+ "unplugin-vue-components": "^0.27.0",
57
+ "vite": "^5.3.1",
58
+ "vite-plugin-css-injected-by-js": "^3.5.1",
56
59
  "vite-plugin-vuetify": "^2.0.3",
57
- "vitest": "^1.4.0",
58
- "vue-tsc": "^2.0.6"
60
+ "vitest": "^2.0.3",
61
+ "vue-tsc": "^2.0.21"
59
62
  }
60
63
  }
Binary file
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/mstile-150x150.png"/>
6
+ <TileColor>#da532c</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
Binary file
Binary file
Binary file
@@ -5,46 +5,43 @@
5
5
  <meta charset="UTF-8" />
6
6
  <link rel="icon" href="/favicon.ico" />
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com" />
8
+
9
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
10
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
11
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
12
+ <link rel="manifest" href="/site.webmanifest">
13
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
14
+ <meta name="msapplication-TileColor" content="#da532c">
15
+ <meta name="theme-color" content="#ffffff">
16
+
8
17
  <script src="https://cdn.jsdelivr.net/npm/@3cr/viewer-browser@{{version}}/dist/Viewer3CR.umd.js"> </script>
9
18
  <script type="module">
19
+ const channel = new BroadcastChannel('GET_SERVICE_WORKER_BUILD');
20
+ channel.addEventListener('message', event => {
21
+ console.log('Service Worker Build', event.data);
22
+ });
10
23
  function invokeServiceWorkerUpdateFlow(registration) {
11
24
  console.log('[SW] Found update, pushing')
12
- registration.waiting.postMessage('SKIP_WAITING')
25
+ registration.waiting.postMessage('SKIP_WAITING')
26
+ }
27
+ function getServiceWorkerBuild(registration) {
28
+ console.log(
29
+ "[CHECK]: Service_Worker_Registered_With_Scope",
30
+ registration.scope
31
+ );
32
+ registration.active.postMessage('GET_SERVICE_WORKER_BUILD')
13
33
  }
14
34
  function initServiceWorker() {
15
- // Only enable service worker in production
16
35
  if ("serviceWorker" in navigator) {
17
36
  navigator.serviceWorker
18
37
  .register("/sw.js", { scope: "/" })
19
38
  .then((registration) => {
20
- console.log(
21
- "[CHECK]: Service_Worker_Registered_With_Scope",
22
- registration.scope
23
- );
24
- // ensure the case when the updatefound event was missed is also handled
25
- // by re-invoking the prompt when there's a waiting Service Worker
26
39
  if (registration.waiting) {
27
40
  invokeServiceWorkerUpdateFlow(registration)
41
+ } else {
42
+ getServiceWorkerBuild(registration)
28
43
  }
29
44
 
30
- // detect Service Worker update available and wait for it to become installed
31
- registration.addEventListener('updatefound', () => {
32
- if (registration.installing) {
33
- // wait until the new Service worker is actually installed (ready to take over)
34
- registration.installing.addEventListener('statechange', () => {
35
- if (registration.waiting) {
36
- // if there's an existing controller (previous Service Worker), show the prompt
37
- if (navigator.serviceWorker.controller) {
38
- invokeServiceWorkerUpdateFlow(registration)
39
- } else {
40
- // otherwise it's the first install, nothing to do
41
- console.log('Service Worker initialized for the first time')
42
- }
43
- }
44
- })
45
- }
46
- })
47
-
48
45
  let refreshing = false;
49
46
 
50
47
  // detect controller change and refresh the page
@@ -54,15 +51,15 @@
54
51
  refreshing = true
55
52
  }
56
53
  })
54
+ navigator.serviceWorker.addEventListener('controlling', () => {
55
+ window.location.reload();
56
+ });
57
57
  })
58
58
  .catch((error) => {
59
59
  console.error("[ERR]: Service_Worker_Registration_Failed:", error);
60
60
  });
61
-
62
61
  }
63
62
  }
64
-
65
- // Call the initServiceWorker function when the page loads
66
63
  window.addEventListener("load", () => {
67
64
  initServiceWorker();
68
65
  });
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.14, written by Peter Selinger 2001-2017
9
+ </metadata>
10
+ <g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M2939 6958 c-1 -7 -2 -337 -3 -733 -1 -470 -5 -719 -11 -718 -11 1
13
+ -440 111 -560 143 -147 39 -391 102 -405 105 -14 3 -202 52 -437 113 l-111 30
14
+ -4 -22 c-1 -11 -3 -333 -2 -713 0 -381 -3 -693 -7 -693 -7 0 -296 76 -454 119
15
+ -138 38 -810 213 -832 217 -12 2 -34 9 -48 14 -15 6 -28 10 -31 10 -2 0 -3
16
+ -840 -2 -1867 l3 -1867 65 -19 c141 -40 359 -104 405 -118 35 -11 267 -78 310
17
+ -89 17 -5 71 -20 120 -35 50 -14 104 -30 120 -34 17 -5 134 -39 260 -76 127
18
+ -37 244 -70 260 -75 17 -4 156 -44 310 -89 154 -45 492 -143 750 -217 259 -75
19
+ 597 -173 752 -218 l282 -83 -2 919 c-1 505 -1 918 0 918 2 0 67 -18 145 -41
20
+ 79 -22 166 -47 193 -54 28 -7 84 -23 125 -35 41 -12 82 -23 90 -25 8 -2 125
21
+ -36 260 -74 135 -39 248 -71 252 -71 3 0 6 412 7 916 0 504 1 917 3 919 2 1
22
+ 55 -13 118 -32 202 -61 302 -91 445 -133 162 -48 315 -94 400 -120 33 -10 70
23
+ -21 83 -25 l22 -6 -2 1548 -3 1548 -155 43 c-85 23 -195 53 -245 67 -49 13
24
+ -216 58 -370 100 -154 42 -287 78 -295 80 -8 2 -42 11 -75 20 -33 9 -82 23
25
+ -110 30 -125 34 -335 90 -495 134 -96 27 -287 79 -425 116 -137 37 -295 79
26
+ -350 95 -173 48 -330 90 -337 90 -5 0 -8 -6 -9 -12z m981 -1008 c85 -23 184
27
+ -50 220 -60 36 -10 108 -30 160 -44 239 -64 554 -149 640 -172 52 -14 104 -29
28
+ 116 -34 l21 -8 0 -769 c0 -422 -1 -771 -3 -775 -2 -3 -52 9 -112 27 -59 18
29
+ -133 40 -164 49 l-58 17 -1 62 c0 34 0 227 0 428 l0 366 -87 22 c-48 12 -154
30
+ 39 -237 60 -82 22 -231 60 -330 86 -349 90 -409 106 -412 109 -3 3 -5 402 -4
31
+ 618 l1 87 48 -14 c26 -7 117 -32 202 -55z m-1632 -1036 c75 -19 225 -58 332
32
+ -86 107 -27 222 -57 255 -65 l61 -15 0 -339 c0 -198 -4 -339 -9 -339 -5 0 -37
33
+ 7 -71 16 -33 9 -68 18 -76 20 -8 2 -73 19 -145 38 -71 19 -211 55 -310 81 -99
34
+ 26 -182 48 -183 50 -2 2 -4 133 -4 292 1 366 1 383 7 383 3 0 67 -16 143 -36z
35
+ m1447 -374 c11 -5 43 -13 70 -20 28 -6 85 -20 128 -32 78 -20 78 -20 74 -52
36
+ -4 -36 -4 -36 -117 -1 -41 13 -108 33 -147 45 -69 20 -73 23 -73 49 0 25 3 28
37
+ 23 24 12 -2 31 -8 42 -13z m-2845 -694 c52 -13 149 -39 215 -56 66 -17 143
38
+ -37 170 -45 28 -8 68 -19 91 -24 l40 -11 1 -590 c0 -324 1 -592 4 -594 3 -3
39
+ 926 -268 979 -281 8 -2 65 -18 125 -35 61 -17 124 -35 140 -40 17 -4 68 -20
40
+ 115 -33 47 -14 103 -30 125 -36 l41 -11 -1 -529 c0 -291 -3 -532 -6 -535 -3
41
+ -3 -19 -2 -35 3 -16 5 -164 48 -329 96 -165 47 -406 117 -535 155 -129 37
42
+ -332 96 -450 130 -118 34 -260 75 -314 92 -55 16 -109 32 -120 34 -12 2 -102
43
+ 28 -201 57 l-180 53 -2 1118 c-1 1034 0 1116 15 1112 10 -3 60 -16 112 -30z
44
+ m2910 -147 c36 -11 89 -27 118 -35 99 -26 89 38 88 -568 -1 -294 -4 -537 -7
45
+ -541 -6 -5 -315 78 -326 88 -3 4 -6 810 -3 1059 l0 37 33 -10 c17 -6 61 -19
46
+ 97 -30z m-1270 -284 c118 -31 256 -67 307 -81 50 -13 93 -24 95 -24 2 0 4
47
+ -102 3 -227 0 -143 -4 -228 -10 -227 -11 1 -778 217 -783 220 -3 2 -5 264 -3
48
+ 400 l1 42 88 -23 c48 -13 184 -48 302 -80z"/>
49
+ </g>
50
+ </svg>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
package/playground/sw.js CHANGED
@@ -1,3 +1,8 @@
1
+ let SERVICE_WORKER_BUILD = "NOT_DETECTED";
2
+ let SERVICE_WORKER_BUILD_TIME = 0;
3
+ let VIEWER_VERSION = "{{version}}";
4
+ const cacheName = "playground-cache";
5
+
1
6
  // Service Worker-based solution
2
7
  self.addEventListener("activate", async () => {
3
8
  // after we've taken over, iterate over all the current clients (windows)
@@ -12,6 +17,16 @@ self.addEventListener("message", async (event) => {
12
17
  if (event.data === "SKIP_WAITING") {
13
18
  await self.skipWaiting();
14
19
  }
20
+ if (event.data === "GET_SERVICE_WORKER_BUILD") {
21
+ // From service-worker.js:
22
+ const channel = new BroadcastChannel("GET_SERVICE_WORKER_BUILD");
23
+ channel.postMessage({
24
+ buildKey: SERVICE_WORKER_BUILD,
25
+ epoch: SERVICE_WORKER_BUILD_TIME,
26
+ dateTime: new Date(SERVICE_WORKER_BUILD_TIME * 1000).toISOString(),
27
+ viewerVersion: VIEWER_VERSION,
28
+ });
29
+ }
15
30
  });
16
31
  self.addEventListener("fetch", (event) => {
17
32
  if (
@@ -25,7 +40,6 @@ self.addEventListener("fetch", (event) => {
25
40
 
26
41
  async function handleServerRequest(request) {
27
42
  // Define the name for the cache related to GeoServer requests
28
- const cacheName = "playground-cache";
29
43
  // Open or create the cache
30
44
  const cache = await caches.open(cacheName);
31
45
 
Binary file
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/mstile-150x150.png"/>
6
+ <TileColor>#da532c</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.14, written by Peter Selinger 2001-2017
9
+ </metadata>
10
+ <g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M2939 6958 c-1 -7 -2 -337 -3 -733 -1 -470 -5 -719 -11 -718 -11 1
13
+ -440 111 -560 143 -147 39 -391 102 -405 105 -14 3 -202 52 -437 113 l-111 30
14
+ -4 -22 c-1 -11 -3 -333 -2 -713 0 -381 -3 -693 -7 -693 -7 0 -296 76 -454 119
15
+ -138 38 -810 213 -832 217 -12 2 -34 9 -48 14 -15 6 -28 10 -31 10 -2 0 -3
16
+ -840 -2 -1867 l3 -1867 65 -19 c141 -40 359 -104 405 -118 35 -11 267 -78 310
17
+ -89 17 -5 71 -20 120 -35 50 -14 104 -30 120 -34 17 -5 134 -39 260 -76 127
18
+ -37 244 -70 260 -75 17 -4 156 -44 310 -89 154 -45 492 -143 750 -217 259 -75
19
+ 597 -173 752 -218 l282 -83 -2 919 c-1 505 -1 918 0 918 2 0 67 -18 145 -41
20
+ 79 -22 166 -47 193 -54 28 -7 84 -23 125 -35 41 -12 82 -23 90 -25 8 -2 125
21
+ -36 260 -74 135 -39 248 -71 252 -71 3 0 6 412 7 916 0 504 1 917 3 919 2 1
22
+ 55 -13 118 -32 202 -61 302 -91 445 -133 162 -48 315 -94 400 -120 33 -10 70
23
+ -21 83 -25 l22 -6 -2 1548 -3 1548 -155 43 c-85 23 -195 53 -245 67 -49 13
24
+ -216 58 -370 100 -154 42 -287 78 -295 80 -8 2 -42 11 -75 20 -33 9 -82 23
25
+ -110 30 -125 34 -335 90 -495 134 -96 27 -287 79 -425 116 -137 37 -295 79
26
+ -350 95 -173 48 -330 90 -337 90 -5 0 -8 -6 -9 -12z m981 -1008 c85 -23 184
27
+ -50 220 -60 36 -10 108 -30 160 -44 239 -64 554 -149 640 -172 52 -14 104 -29
28
+ 116 -34 l21 -8 0 -769 c0 -422 -1 -771 -3 -775 -2 -3 -52 9 -112 27 -59 18
29
+ -133 40 -164 49 l-58 17 -1 62 c0 34 0 227 0 428 l0 366 -87 22 c-48 12 -154
30
+ 39 -237 60 -82 22 -231 60 -330 86 -349 90 -409 106 -412 109 -3 3 -5 402 -4
31
+ 618 l1 87 48 -14 c26 -7 117 -32 202 -55z m-1632 -1036 c75 -19 225 -58 332
32
+ -86 107 -27 222 -57 255 -65 l61 -15 0 -339 c0 -198 -4 -339 -9 -339 -5 0 -37
33
+ 7 -71 16 -33 9 -68 18 -76 20 -8 2 -73 19 -145 38 -71 19 -211 55 -310 81 -99
34
+ 26 -182 48 -183 50 -2 2 -4 133 -4 292 1 366 1 383 7 383 3 0 67 -16 143 -36z
35
+ m1447 -374 c11 -5 43 -13 70 -20 28 -6 85 -20 128 -32 78 -20 78 -20 74 -52
36
+ -4 -36 -4 -36 -117 -1 -41 13 -108 33 -147 45 -69 20 -73 23 -73 49 0 25 3 28
37
+ 23 24 12 -2 31 -8 42 -13z m-2845 -694 c52 -13 149 -39 215 -56 66 -17 143
38
+ -37 170 -45 28 -8 68 -19 91 -24 l40 -11 1 -590 c0 -324 1 -592 4 -594 3 -3
39
+ 926 -268 979 -281 8 -2 65 -18 125 -35 61 -17 124 -35 140 -40 17 -4 68 -20
40
+ 115 -33 47 -14 103 -30 125 -36 l41 -11 -1 -529 c0 -291 -3 -532 -6 -535 -3
41
+ -3 -19 -2 -35 3 -16 5 -164 48 -329 96 -165 47 -406 117 -535 155 -129 37
42
+ -332 96 -450 130 -118 34 -260 75 -314 92 -55 16 -109 32 -120 34 -12 2 -102
43
+ 28 -201 57 l-180 53 -2 1118 c-1 1034 0 1116 15 1112 10 -3 60 -16 112 -30z
44
+ m2910 -147 c36 -11 89 -27 118 -35 99 -26 89 38 88 -568 -1 -294 -4 -537 -7
45
+ -541 -6 -5 -315 78 -326 88 -3 4 -6 810 -3 1059 l0 37 33 -10 c17 -6 61 -19
46
+ 97 -30z m-1270 -284 c118 -31 256 -67 307 -81 50 -13 93 -24 95 -24 2 0 4
47
+ -102 3 -227 0 -143 -4 -228 -10 -227 -11 1 -778 217 -783 220 -3 2 -5 264 -3
48
+ 400 l1 42 88 -23 c48 -13 184 -48 302 -80z"/>
49
+ </g>
50
+ </svg>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "",
3
+ "short_name": "",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }