@3cr/viewer-browser 0.0.200 → 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.
- package/.circleci/config.yml +46 -22
- package/.prettierrc +6 -0
- package/components.d.ts +23 -10
- package/dist/Viewer3CR.js +37 -46
- package/dist/Viewer3CR.mjs +22625 -20892
- package/dist/Viewer3CR.umd.js +37 -46
- package/dist/android-chrome-192x192.png +0 -0
- package/dist/android-chrome-512x512.png +0 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/browserconfig.xml +9 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/mstile-144x144.png +0 -0
- package/dist/mstile-150x150.png +0 -0
- package/dist/mstile-310x150.png +0 -0
- package/dist/mstile-310x310.png +0 -0
- package/dist/mstile-70x70.png +0 -0
- package/dist/safari-pinned-tab.svg +50 -0
- package/dist/site.webmanifest +19 -0
- package/index.html +34 -41
- package/package.json +23 -20
- package/playground/android-chrome-192x192.png +0 -0
- package/playground/android-chrome-512x512.png +0 -0
- package/playground/apple-touch-icon.png +0 -0
- package/playground/browserconfig.xml +9 -0
- package/playground/favicon-16x16.png +0 -0
- package/playground/favicon-32x32.png +0 -0
- package/playground/favicon.ico +0 -0
- package/playground/index.html +26 -29
- package/playground/mstile-144x144.png +0 -0
- package/playground/mstile-150x150.png +0 -0
- package/playground/mstile-310x150.png +0 -0
- package/playground/mstile-310x310.png +0 -0
- package/playground/mstile-70x70.png +0 -0
- package/playground/safari-pinned-tab.svg +50 -0
- package/playground/site.webmanifest +19 -0
- package/playground/sw.js +15 -1
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/browserconfig.xml +9 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/mstile-144x144.png +0 -0
- package/public/mstile-150x150.png +0 -0
- package/public/mstile-310x150.png +0 -0
- package/public/mstile-310x310.png +0 -0
- package/public/mstile-70x70.png +0 -0
- package/public/safari-pinned-tab.svg +50 -0
- package/public/site.webmanifest +19 -0
- package/src/App.vue +35 -45
- package/src/__tests__/app.spec.ts +7 -8
- package/{__tests__/index.spec.ts → src/__tests__/main.spec.ts} +5 -6
- package/src/assets/logos/3dicom/white-mini.svg +20 -0
- package/src/assets/logos/3dicom/white.svg +30 -0
- package/src/assets/styles.scss +14 -4
- package/src/components/demo/__tests__/DemoModal.spec.ts +9 -8
- package/src/components/demo/__tests__/DemoPatientModal.spec.ts +11 -10
- package/src/components/demo/__tests__/options.spec.ts +1 -1
- package/src/components/demo/licence/__tests__/DemoLicenceEnableCloudStorageModal.spec.ts +11 -10
- package/src/components/demo/licence/__tests__/DemoLicenceInfoModal.spec.ts +21 -11
- package/src/components/demo/licence/__tests__/DemoLicenceSendToPartyModal.spec.ts +10 -10
- package/src/components/demo/licence/__tests__/DemoLicenceShareToMobileModal.spec.ts +14 -13
- package/src/components/demo/options.ts +54 -59
- package/src/components/demo/patient/__tests__/DemoPatientEnableCloudStorageModal.spec.ts +11 -10
- package/src/components/demo/patient/__tests__/DemoPatientInfoModal.spec.ts +12 -11
- package/src/components/demo/patient/__tests__/DemoPatientSendToPartyModal.spec.ts +10 -10
- package/src/components/demo/patient/__tests__/DemoPatientShareToMobileModal.spec.ts +14 -13
- package/src/components/modal/ActionRail.vue +7 -11
- package/src/components/modal/AskAI.vue +35 -50
- package/src/components/modal/CloseViewerModal.vue +22 -57
- package/src/components/modal/MftpWebGL3DRModal.vue +152 -570
- package/src/components/modal/ViewerActionRail.vue +50 -39
- package/src/components/modal/ViewerNavigationDrawer.vue +10 -8
- package/src/components/modal/ViewerNavigationDrawerContent.vue +82 -49
- package/src/components/modal/ViewerNavigationDrawerFooter.vue +57 -60
- package/src/components/modal/ViewerNavigationDrawerHeader.vue +13 -48
- package/src/components/modal/ViewerScanView.vue +114 -0
- package/src/components/modal/WebGL3DR.vue +84 -0
- package/src/components/modal/__tests__/ActionRail.spec.ts +10 -0
- package/src/components/modal/__tests__/AskAI.spec.ts +33 -0
- package/src/components/modal/__tests__/CloseViewerModal.spec.ts +24 -14
- package/src/components/modal/__tests__/MftpWebGL3DRModal.spec.ts +147 -176
- package/src/components/modal/__tests__/ViewerActionRail.spec.ts +11 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawer.spec.ts +10 -12
- package/src/components/modal/__tests__/ViewerNavigationDrawerContent.spec.ts +4 -22
- package/src/components/modal/__tests__/ViewerNavigationDrawerFooter.spec.ts +35 -32
- package/src/components/modal/__tests__/ViewerNavigationDrawerHeader.spec.ts +11 -9
- package/src/components/modal/__tests__/ViewerScanView.spec.ts +60 -0
- package/src/components/modal/__tests__/WebGL3DR.spec.ts +57 -0
- package/src/components/modal/actions/Flip3dAction.vue +1 -1
- package/src/components/modal/actions/FlipHorizontalAction.vue +5 -10
- package/src/components/modal/actions/FlipVerticalAction.vue +5 -10
- package/src/components/modal/actions/FullscreenAction.vue +6 -11
- package/src/components/modal/actions/HideViewAction.vue +38 -0
- package/src/components/modal/actions/NavigationCubeAction.vue +7 -14
- package/src/components/modal/actions/PanAction.vue +4 -4
- package/src/components/modal/actions/ResetViewAction.vue +1 -1
- package/src/components/modal/actions/Rotate2dAction.vue +8 -20
- package/src/components/modal/actions/Slice3dAction.vue +10 -32
- package/src/components/modal/actions/ZoomAction.vue +1 -1
- package/src/components/modal/actions/__tests__/Action.spec.ts +8 -9
- package/src/components/modal/actions/__tests__/Flip3dAction.spec.ts +6 -8
- package/src/components/modal/actions/__tests__/FlipHorizontalAction.spec.ts +6 -7
- package/src/components/modal/actions/__tests__/FlipVerticalAction.spec.ts +6 -7
- package/src/components/modal/actions/__tests__/FullscreenAction.spec.ts +9 -10
- package/src/components/modal/actions/__tests__/NavigationCubeAction.spec.ts +11 -11
- package/src/components/modal/actions/__tests__/PanAction.spec.ts +9 -10
- package/src/components/modal/actions/__tests__/ResetViewAction.spec.ts +7 -7
- package/src/components/modal/actions/__tests__/Rotate2dAction.spec.ts +6 -8
- package/src/components/modal/actions/__tests__/Slice3dAction.spec.ts +23 -5
- package/src/components/modal/actions/__tests__/ZoomAction.spec.ts +8 -10
- package/src/components/modal/buttons/AutoAnnotateBtn.vue +29 -0
- package/src/components/modal/buttons/__tests__/AutoAnnotateBtn.spec.ts +28 -0
- package/src/components/modal/menus/FileMenu.vue +80 -0
- package/src/components/modal/menus/SettingsMenu.vue +111 -0
- package/src/components/modal/menus/__tests__/FileMenu.spec.ts +110 -0
- package/src/components/modal/menus/__tests__/SettingsMenu.spec.ts +71 -0
- package/src/components/shared/DoubleSliderSelector.vue +142 -0
- package/src/components/shared/UpdateSnackbar.vue +72 -0
- package/src/components/{selectors → shared}/ValueSelector.vue +9 -12
- package/src/components/shared/__tests__/DoubleSliderSelector.spec.ts +83 -0
- package/src/components/shared/__tests__/LoadingSpinner.spec.ts +9 -0
- package/src/components/shared/__tests__/UpdateSnackbar.spec.ts +116 -0
- package/src/components/shared/__tests__/ValueSelector.spec.ts +39 -0
- package/src/components/shared/__tests__/VerticalSliderSelector.spec.ts +50 -0
- package/src/components/views/AnnotationTreeView.vue +234 -0
- package/src/components/{modal/ViewerDisplaySettings.vue → views/DisplaySettings.vue} +7 -15
- package/src/components/views/MarkupTreeView.vue +199 -0
- package/src/components/views/McadObjectTreeView.vue +119 -0
- package/src/components/views/__tests__/AnnotationTreeView.spec.ts +62 -0
- package/src/components/{modal/__tests__/ViewerDisplaySettings.spec.ts → views/__tests__/DisplaySettings.spec.ts} +24 -20
- package/src/components/views/__tests__/MarkupTreeView.spec.ts +41 -0
- package/src/components/views/__tests__/McadObjectTreeView.spec.ts +47 -0
- package/src/components/views/modals/DataOverlayModal.vue +89 -0
- package/src/components/views/modals/DataOverlayModalManager.vue +104 -0
- package/src/components/views/modals/__tests__/DataOverlayModal.spec.ts +33 -0
- package/src/components/views/modals/__tests__/DataOverlayModalManager.spec.ts +93 -0
- package/src/components/views/shared/MaskIcon.vue +44 -0
- package/src/components/views/shared/ObjectColor.vue +31 -0
- package/src/components/views/shared/ObjectLabel.vue +30 -0
- package/src/components/views/shared/Opacity.vue +66 -0
- package/src/components/views/shared/VisibilityBtn.vue +25 -0
- package/src/components/views/shared/__tests__/MaskIcon.spec.ts +10 -0
- package/src/components/views/shared/__tests__/ObjectColor.spec.ts +10 -0
- package/src/components/views/shared/__tests__/ObjectLabel.spec.ts +10 -0
- package/src/components/views/shared/__tests__/Opacity.spec.ts +24 -0
- package/src/components/views/shared/__tests__/VisibilityBtn.spec.ts +11 -0
- package/src/components/views/types/annotation-tree-view-item-child-action.ts +6 -0
- package/src/components/views/types/annotation-tree-view-item-child.ts +9 -0
- package/src/components/views/types/annotation-tree-view-item.ts +13 -0
- package/src/components/views/types/markup-tree-view-item-child.ts +6 -0
- package/src/components/views/types/markup-tree-view-item.ts +14 -0
- package/src/components/views/types/mcad-object-tree-view-item.ts +13 -0
- package/src/composables/__tests__/useAnnotations.spec.ts +35 -0
- package/src/composables/__tests__/useEventListener.spec.ts +32 -0
- package/src/composables/__tests__/useIntroJs.spec.ts +51 -0
- package/src/composables/__tests__/useMarkups.spec.ts +39 -0
- package/src/composables/__tests__/useMcadObjects.spec.ts +36 -0
- package/src/composables/__tests__/useMouse.spec.ts +20 -0
- package/src/{components/modal/composables → composables}/__tests__/useNavigationCubeObserver.spec.ts +17 -12
- package/src/{dataLayer → composables}/__tests__/useViewer3cr.spec.ts +1 -2
- package/src/composables/useAnnotations.ts +37 -0
- package/src/composables/useEventListener.ts +25 -0
- package/src/composables/useIntroJs.ts +125 -0
- package/src/composables/useMarkups.ts +41 -0
- package/src/composables/useMcadObjects.ts +32 -0
- package/src/composables/useMouse.ts +14 -0
- package/src/{components/modal/composables → composables}/useNavigationCubeObserver.ts +35 -25
- package/src/composables/useScanMovement.ts +25 -0
- package/src/composables/useScanSliders.ts +36 -0
- package/src/composables/useVersion3cr.ts +7 -0
- package/src/composables/useViewer3cr.ts +7 -0
- package/src/composables/useViewerOptions.ts +35 -0
- package/src/{dataLayer → functions}/__tests__/clamp.spec.ts +1 -2
- package/src/functions/__tests__/layoutOverlayStyle.spec.ts +325 -0
- package/src/{helpers/__tests__/model-helper.spec.ts → functions/__tests__/modelHelper.spec.ts} +77 -40
- package/src/{notifications → functions}/__tests__/notification.spec.ts +19 -29
- package/src/functions/__tests__/parseAction.spec.ts +9 -0
- package/src/functions/__tests__/parseCallToAction.spec.ts +11 -0
- package/src/functions/__tests__/parseDataOverlay.spec.ts +15 -0
- package/src/functions/__tests__/parseDataOverlayData.spec.ts +9 -0
- package/src/functions/__tests__/parseDataOverlayEvent.spec.ts +10 -0
- package/src/functions/__tests__/parseMcadEvent.spec.ts +10 -0
- package/src/functions/layoutOverlayStyle.ts +84 -0
- package/src/{helpers → functions}/modelHelper.ts +79 -18
- package/src/{notifications → functions}/notification.ts +12 -14
- package/src/functions/parseAction.ts +9 -0
- package/src/functions/parseCallToAction.ts +9 -0
- package/src/functions/parseDataOverlay.ts +10 -0
- package/src/functions/parseDataOverlayData.ts +10 -0
- package/src/functions/parseDataOverlayEvent.ts +17 -0
- package/src/functions/parseMcadEvent.ts +10 -0
- package/src/functions/rgbaToCss.ts +13 -0
- package/src/main.ts +48 -9
- package/src/{dataLayer → models}/__tests__/eventHandlers.spec.ts +2 -3
- package/src/models/__tests__/loadViewerOptions.spec.ts +72 -0
- package/src/models/__tests__/loadViewerPayload.spec.ts +10 -0
- package/src/models/__tests__/scanState.spec.ts +190 -0
- package/src/models/callbacks.ts +4 -0
- package/src/models/loadViewerOptions.ts +40 -0
- package/src/models/loadViewerPayload.ts +24 -0
- package/src/{dataLayer → models}/scanState.ts +63 -74
- package/src/plugins/__tests__/usePlugins.spec.ts +12 -0
- package/src/plugins/__tests__/vuetify.spec.ts +3 -4
- package/src/plugins/usePlugins.ts +8 -0
- package/src/plugins/vuetify.ts +31 -65
- package/src/services/{gpt/__tests__ → __tests__}/gpt.service.spec.ts +2 -2
- package/src/services/__tests__/service-worker.service.spec.ts +32 -0
- package/src/{dataLayer/__tests__/viewer3cr.spec.ts → services/__tests__/viewer-3cr.service.spec.ts} +97 -36
- package/src/services/gpt.service.ts +17 -0
- package/src/services/service-worker.service.ts +16 -0
- package/src/{dataLayer/viewer3cr.ts → services/viewer-3cr.service.ts} +269 -150
- package/src/types/action.ts +13 -0
- package/src/types/call-to-action.ts +9 -0
- package/src/types/colour.ts +6 -0
- package/src/types/data-overlay-angle.ts +16 -0
- package/src/types/data-overlay-annotation.ts +18 -0
- package/src/types/data-overlay-data.ts +15 -0
- package/src/types/data-overlay-info.ts +14 -0
- package/src/types/data-overlay-interaction.ts +15 -0
- package/src/types/data-overlay-length.ts +16 -0
- package/src/types/data-overlay-markup.ts +7 -0
- package/src/types/data-overlay-mcad.ts +20 -0
- package/src/types/data-overlay-polygon.ts +18 -0
- package/src/types/data-overlay.ts +16 -0
- package/src/types/gpt-question.ts +4 -0
- package/src/types/gpt-response-payload.ts +6 -0
- package/src/types/mcad-object-interaction.ts +15 -0
- package/src/types/segment-angle.ts +5 -0
- package/src/types/vector2.ts +4 -0
- package/src/types/vector3.ts +5 -0
- package/test/fakers/action-data.faker.ts +11 -0
- package/test/fakers/action.faker.ts +19 -0
- package/test/fakers/call-to-action.faker.ts +17 -0
- package/test/fakers/colour.faker.ts +17 -0
- package/test/fakers/data-overlay-angle.faker.ts +37 -0
- package/test/fakers/data-overlay-annotation.faker.ts +41 -0
- package/test/fakers/data-overlay-data.faker.ts +97 -0
- package/test/fakers/data-overlay-info.faker.ts +29 -0
- package/test/fakers/data-overlay-interaction.faker.ts +62 -0
- package/test/fakers/data-overlay-length.faker.ts +37 -0
- package/test/fakers/data-overlay-mcad.faker.ts +40 -0
- package/test/fakers/data-overlay-polygon.faker.ts +39 -0
- package/test/fakers/gpt-question.faker.ts +11 -0
- package/test/fakers/gpt-response.faker.ts +12 -0
- package/test/fakers/invert-transform.faker.ts +16 -0
- package/test/fakers/mcad-object-interaction.faker.ts +22 -0
- package/test/fakers/orientation.faker.ts +17 -0
- package/test/fakers/segment-angle.faker.ts +12 -0
- package/test/fakers/vector2.faker.ts +12 -0
- package/test/fakers/vector3.faker.ts +16 -0
- package/test/plugins/findByTestId.ts +25 -0
- package/test/plugins/vuetify.ts +16 -0
- package/test/setup.ts +16 -5
- package/tsconfig.json +4 -15
- package/vite.config.mts +20 -46
- package/vitest.config.mts +24 -43
- package/index.ts +0 -72
- package/src/assets/images/dark/3DICOM.png +0 -0
- package/src/assets/images/dark/3dicom-logo.svg +0 -1
- package/src/assets/images/light/3DICOM.png +0 -0
- package/src/assets/images/light/3dicom-logo.svg +0 -1
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +0 -6
- package/src/components/WebGL3DR.vue +0 -102
- package/src/components/__tests__/webgl3dr.spec.ts +0 -37
- package/src/components/icons/liver.vue +0 -21
- package/src/components/loading/__tests__/loading-spinner.spec.ts +0 -11
- package/src/components/modal/ViewerAnnotationModal.vue +0 -111
- package/src/components/modal/ViewerAnnotations.vue +0 -289
- package/src/components/modal/__tests__/ViewerAnnotationModal.spec.ts +0 -79
- package/src/components/modal/composables/useEventListener.ts +0 -22
- package/src/components/selectors/__tests__/value-selector.spec.ts +0 -53
- package/src/components/sliders/DoubleSliderSelector.vue +0 -141
- package/src/components/sliders/__tests__/double-slider-selector.spec.ts +0 -104
- package/src/components/sliders/__tests__/vertical-slider-selector.spec.ts +0 -61
- package/src/dataLayer/__tests__/getIconForPreset.spec.ts +0 -40
- package/src/dataLayer/__tests__/patchDataOverlay.spec.ts +0 -88
- package/src/dataLayer/__tests__/scanState.spec.ts +0 -93
- package/src/dataLayer/getIconForPreset.ts +0 -11
- package/src/dataLayer/patchDataOverlay.ts +0 -101
- package/src/dataLayer/useViewer3cr.ts +0 -7
- package/src/helpers/__tests__/layout-overlay-style.spec.ts +0 -290
- package/src/helpers/__tests__/utils.spec.ts +0 -70
- package/src/helpers/layoutOverlayStyle.ts +0 -96
- package/src/helpers/utils.ts +0 -16
- package/src/models/Callbacks.ts +0 -2
- package/src/models/LoadViewerOptions.ts +0 -31
- package/src/models/LoadViewerPayload.ts +0 -9
- package/src/models/__tests__/load-viewer-options.spec.ts +0 -22
- package/src/plugins/__tests__/index.spec.ts +0 -19
- package/src/plugins/index.ts +0 -17
- package/src/services/gpt/gpt.service.ts +0 -35
- package/static/3cr-types-browser/index.ts +0 -74
- package/static/3cr-types-browser/types/Action.ts +0 -6
- package/static/3cr-types-browser/types/AlphaKeys.ts +0 -5
- package/static/3cr-types-browser/types/AnchorPoint.ts +0 -12
- package/static/3cr-types-browser/types/CallToAction.ts +0 -5
- package/static/3cr-types-browser/types/ColourData.ts +0 -7
- package/static/3cr-types-browser/types/ColourPresetData.ts +0 -9
- package/static/3cr-types-browser/types/CurrentDataOverlayState.ts +0 -6
- package/static/3cr-types-browser/types/CurrentScanState.ts +0 -22
- package/static/3cr-types-browser/types/DataOverlay.ts +0 -22
- package/static/3cr-types-browser/types/DataOverlayActions.ts +0 -14
- package/static/3cr-types-browser/types/DataOverlayData.ts +0 -8
- package/static/3cr-types-browser/types/DataOverlayEvent.ts +0 -8
- package/static/3cr-types-browser/types/DecryptionKey.ts +0 -4
- package/static/3cr-types-browser/types/DisplaySettings.ts +0 -10
- package/static/3cr-types-browser/types/EmptyPayload.ts +0 -3
- package/static/3cr-types-browser/types/EnumPayload.ts +0 -4
- package/static/3cr-types-browser/types/FileManagementActions.ts +0 -11
- package/static/3cr-types-browser/types/FlipValue.ts +0 -7
- package/static/3cr-types-browser/types/FrontEndInterfaces.ts +0 -14
- package/static/3cr-types-browser/types/GradientKeys.ts +0 -7
- package/static/3cr-types-browser/types/GreyscalePresetData.ts +0 -6
- package/static/3cr-types-browser/types/InitialDataOverlayState.ts +0 -6
- package/static/3cr-types-browser/types/InitialScanState.ts +0 -19
- package/static/3cr-types-browser/types/InteractionType.ts +0 -8
- package/static/3cr-types-browser/types/InteractivityActions.ts +0 -6
- package/static/3cr-types-browser/types/InteractivityState.ts +0 -4
- package/static/3cr-types-browser/types/InvertTransformData.ts +0 -6
- package/static/3cr-types-browser/types/LayoutActions.ts +0 -6
- package/static/3cr-types-browser/types/LayoutData.ts +0 -7
- package/static/3cr-types-browser/types/LoadDataSet.ts +0 -6
- package/static/3cr-types-browser/types/LoadSessionState.ts +0 -4
- package/static/3cr-types-browser/types/LocalLoadDataset.ts +0 -3
- package/static/3cr-types-browser/types/MovementData.ts +0 -7
- package/static/3cr-types-browser/types/NavigationCubeActions.ts +0 -8
- package/static/3cr-types-browser/types/NavigationCubeData.ts +0 -12
- package/static/3cr-types-browser/types/NavigationCubeTransform.ts +0 -9
- package/static/3cr-types-browser/types/NotificationPayload.ts +0 -7
- package/static/3cr-types-browser/types/NotificationsActions.ts +0 -6
- package/static/3cr-types-browser/types/Object.ts +0 -1
- package/static/3cr-types-browser/types/ObjectColour.ts +0 -7
- package/static/3cr-types-browser/types/ObjectIcon.ts +0 -5
- package/static/3cr-types-browser/types/ObjectInvert.ts +0 -7
- package/static/3cr-types-browser/types/ObjectSize.ts +0 -7
- package/static/3cr-types-browser/types/ObjectSize2D.ts +0 -7
- package/static/3cr-types-browser/types/ObjectVisible.ts +0 -5
- package/static/3cr-types-browser/types/PositionData.ts +0 -14
- package/static/3cr-types-browser/types/PresetsActions.ts +0 -4
- package/static/3cr-types-browser/types/RotationValue.ts +0 -7
- package/static/3cr-types-browser/types/ScanMovementActions.ts +0 -27
- package/static/3cr-types-browser/types/ScanMovementData.ts +0 -3
- package/static/3cr-types-browser/types/ScanOrientationActions.ts +0 -6
- package/static/3cr-types-browser/types/ScanStateActions.ts +0 -4
- package/static/3cr-types-browser/types/ScanView.ts +0 -6
- package/static/3cr-types-browser/types/SettingsData.ts +0 -12
- package/static/3cr-types-browser/types/SlicerData.ts +0 -9
- package/static/3cr-types-browser/types/SliderValue.ts +0 -4
- package/static/3cr-types-browser/types/SlidersActions.ts +0 -18
- package/static/3cr-types-browser/types/Vector2Data.ts +0 -5
- package/static/3cr-types-browser/types/Vector3Data.ts +0 -6
- package/static/3cr-types-browser/types/VectorMovementData.ts +0 -8
- package/static/3cr-types-browser/types/ViewInteractiveMode.ts +0 -5
- package/static/3cr-types-browser/types/ViewOrientation.ts +0 -8
- package/static/3cr-types-browser/types/ViewOrientations.ts +0 -10
- package/static/3cr-types-browser/types/ViewSelectionActions.ts +0 -9
- package/static/3cr-types-browser/types/ViewToggleData.ts +0 -7
- package/static/3cr-types-browser/types/VolumeOrientation.ts +0 -7
- package/test/helper.ts +0 -44
- /package/src/components/{loading → shared}/LoadingSpinner.vue +0 -0
- /package/src/components/{sliders → shared}/VerticalSliderSelector.vue +0 -0
- /package/{config.ts → src/config.ts} +0 -0
- /package/src/{dataLayer → functions}/clamp.ts +0 -0
- /package/src/{dataLayer → models}/eventHandlers.ts +0 -0
- /package/{static/3cr-types-browser/types/ActionData.ts → src/types/action-data.ts} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/favicon.ico
ADDED
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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.
|
|
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.
|
|
25
|
-
"@3cr/types-ts": "
|
|
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": "
|
|
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": "^
|
|
33
|
+
"intro.js": "^8.0.0-beta.1",
|
|
31
34
|
"logrocket": "^8.1.0",
|
|
32
|
-
"roboto-fontface": "
|
|
33
|
-
"vue": "^3.4.
|
|
34
|
-
"vuetify": "^3.
|
|
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
|
-
"@
|
|
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": "^
|
|
41
|
-
"@vitest/
|
|
42
|
-
"@
|
|
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.
|
|
54
|
-
"vite": "^5.1
|
|
55
|
-
"vite-plugin-css-injected-by-js": "^3.5.
|
|
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": "^
|
|
58
|
-
"vue-tsc": "^2.0.
|
|
60
|
+
"vitest": "^2.0.3",
|
|
61
|
+
"vue-tsc": "^2.0.21"
|
|
59
62
|
}
|
|
60
63
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/playground/favicon.ico
CHANGED
|
Binary file
|
package/playground/index.html
CHANGED
|
@@ -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
|
-
|
|
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
|
|
Binary file
|
|
Binary file
|
|
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
|
+
}
|