@geode/opengeodeweb-front 11.2.2-rc.1 → 12.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/.build/shared/utils/response_handlers/load.js +5 -2
  2. package/.build/tests/browser/helpers/object_trees/main_object_tree.js +3 -3
  3. package/.build/tests/browser/helpers/object_trees/model_components_object_tree.js +2 -2
  4. package/.build/tests/browser/suites/model/surfaces.js +1 -1
  5. package/app/app.config.ts +28 -0
  6. package/app/assets/css/main.css +11 -0
  7. package/app/assets/geode_objects.ts +37 -108
  8. package/app/assets/img/geode_objects/HorizonStack3D.svg +10 -0
  9. package/app/components/ActionButton.vue +9 -2
  10. package/app/components/CameraManager/List.vue +6 -6
  11. package/app/components/CameraManager.vue +0 -1
  12. package/app/components/CameraOrientation.vue +12 -7
  13. package/app/components/ChromeTheme.vue +20 -0
  14. package/app/components/ClippingPlaneCard.vue +2 -3
  15. package/app/components/ClippingPlanes.vue +2 -2
  16. package/app/components/CrsSelector.vue +8 -8
  17. package/app/components/DeleteDialog.vue +12 -16
  18. package/app/components/DragAndDropInternal/DragAndDropInline.vue +7 -7
  19. package/app/components/DragAndDropInternal/DragAndDropOverlay.vue +87 -82
  20. package/app/components/ExtensionSelector.vue +21 -14
  21. package/app/components/FactorFilterPanel.vue +0 -1
  22. package/app/components/FeedBack/ErrorBanner.vue +8 -9
  23. package/app/components/FeedBack/Snackers.vue +5 -7
  24. package/app/components/FileUploader.vue +13 -21
  25. package/app/components/GlassCard.vue +3 -1
  26. package/app/components/HybridRenderingView.vue +2 -0
  27. package/app/components/HybridViewerTooltip.vue +4 -4
  28. package/app/components/Launcher.vue +1 -1
  29. package/app/components/Loading/EcoMessages.vue +17 -11
  30. package/app/components/Loading/Footer.vue +2 -2
  31. package/app/components/Loading/Header.vue +9 -4
  32. package/app/components/Loading/Progress.vue +7 -3
  33. package/app/components/Loading.vue +54 -46
  34. package/app/components/MissingFilesSelector.vue +5 -5
  35. package/app/components/ObjectSelector.vue +8 -15
  36. package/app/components/PackagesVersions.vue +1 -3
  37. package/app/components/ProjectCrs.vue +1 -1
  38. package/app/components/Screenshot.vue +23 -15
  39. package/app/components/SearchBar.vue +1 -3
  40. package/app/components/SliceCard.vue +1 -2
  41. package/app/components/Step.vue +1 -1
  42. package/app/components/Stepper.vue +13 -11
  43. package/app/components/ThresholdCard.vue +1 -1
  44. package/app/components/ThresholdFilter.vue +2 -2
  45. package/app/components/TimeSeriesTargetSelector.vue +3 -6
  46. package/app/components/ToolPanel.vue +3 -9
  47. package/app/components/Viewer/Basemap/CropOptions.vue +1 -1
  48. package/app/components/Viewer/Basemap/OpacityOptions.vue +1 -1
  49. package/app/components/Viewer/ContextMenu/CenterButton.vue +9 -3
  50. package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -1
  51. package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +17 -6
  52. package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -13
  53. package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +12 -9
  54. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +2 -2
  55. package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +12 -9
  56. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +1 -1
  57. package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +12 -9
  58. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -3
  59. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +12 -8
  60. package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +12 -9
  61. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +1 -1
  62. package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +12 -9
  63. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +1 -1
  64. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +16 -17
  65. package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +11 -6
  66. package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +11 -6
  67. package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +7 -8
  68. package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +7 -8
  69. package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +9 -10
  70. package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +9 -10
  71. package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +2 -2
  72. package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +1 -1
  73. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -4
  74. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -17
  75. package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +4 -4
  76. package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +1 -1
  77. package/app/components/Viewer/ObjectTree/Base/Controls.vue +22 -18
  78. package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +11 -11
  79. package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +3 -3
  80. package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +6 -9
  81. package/app/components/Viewer/ObjectTree/Box.vue +20 -21
  82. package/app/components/Viewer/ObjectTree/Layout.vue +28 -25
  83. package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +4 -3
  84. package/app/components/Viewer/ObjectTree/Views/ModelTree.vue +1 -1
  85. package/app/components/Viewer/Options/AttributeRangeSelector.vue +1 -1
  86. package/app/components/Viewer/Options/AttributeSelector.vue +1 -1
  87. package/app/components/Viewer/Options/ColorMapList.vue +7 -9
  88. package/app/components/Viewer/Options/ColorMapPicker.vue +2 -2
  89. package/app/components/Viewer/Options/ColorPicker.vue +9 -9
  90. package/app/components/Viewer/Options/ColoringTypeSelector.vue +9 -9
  91. package/app/components/Viewer/Options/NoDataColorInfo.vue +4 -4
  92. package/app/components/Viewer/Options/Sliders/Opacity.vue +1 -1
  93. package/app/components/Viewer/Options/Sliders/Slider.vue +1 -1
  94. package/app/components/Viewer/Options/TextureItem.vue +11 -8
  95. package/app/components/Viewer/Options/TexturesSelector.vue +3 -3
  96. package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
  97. package/app/components/Viewer/OrientationCompass.vue +223 -0
  98. package/app/components/Viewer/OrientationGlobe.vue +376 -0
  99. package/app/components/Viewer/OrientationOverlay.vue +47 -0
  100. package/app/components/Viewer/OverlappingObjectsPicker.vue +10 -7
  101. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +4 -5
  102. package/app/components/Viewer/Scene/BackgroundOptions.vue +3 -3
  103. package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +1 -1
  104. package/app/components/Viewer/Scene/TextOptions.vue +3 -3
  105. package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +12 -12
  106. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +1 -1
  107. package/app/components/Viewer/Surface/PolygonsColoring.vue +12 -12
  108. package/app/components/Viewer/Surface/PolygonsOptions.vue +1 -1
  109. package/app/components/Viewer/ToolActiveChip.vue +1 -1
  110. package/app/components/Viewer/Ui.vue +2 -2
  111. package/app/components/csv-preview/CsvPreviewer.vue +17 -24
  112. package/app/components/csv-preview/CsvSettings.vue +6 -6
  113. package/app/components/csv-preview/CsvTable.vue +11 -9
  114. package/app/composables/attribute_selector.ts +1 -1
  115. package/app/composables/batch_style.ts +3 -3
  116. package/app/composables/batch_style_model.ts +1 -1
  117. package/app/composables/chrome_theme.ts +23 -0
  118. package/app/composables/clipping_slices.ts +2 -1
  119. package/app/composables/hover_highlight.ts +10 -7
  120. package/app/composables/live_data_item.ts +1 -1
  121. package/app/composables/model_menu_context.ts +11 -4
  122. package/app/composables/orientation_overlay.ts +133 -0
  123. package/app/composables/project_manager_helpers/reset.ts +2 -0
  124. package/app/composables/project_manager_helpers/types.ts +2 -2
  125. package/app/composables/use_adaptive_styles.ts +42 -21
  126. package/app/composables/use_overlapping_picker.ts +10 -8
  127. package/app/composables/view_toolbar_options.ts +7 -7
  128. package/app/composables/view_toolbar_tool_options.ts +9 -11
  129. package/app/composables/viewer_context_menu.ts +4 -2
  130. package/app/composables/viewer_reset.ts +54 -0
  131. package/app/plugins/chrome_theme.ts +10 -0
  132. package/app/plugins/phosphor_icons.ts +13 -0
  133. package/app/plugins/scene_colors.ts +10 -0
  134. package/app/stores/basemap_helpers/builds.ts +2 -2
  135. package/app/stores/basemap_helpers/viewer.ts +1 -1
  136. package/app/stores/crs.ts +12 -12
  137. package/app/stores/data.ts +4 -5
  138. package/app/stores/data_helpers/mesh.ts +2 -1
  139. package/app/stores/data_style.ts +4 -3
  140. package/app/stores/hybrid_viewer.ts +5 -3
  141. package/app/stores/menu.ts +18 -12
  142. package/app/stores/treeview.ts +5 -4
  143. package/app/stores/viewer.ts +2 -0
  144. package/app/types/attribute.ts +5 -21
  145. package/app/types/identifiers.ts +5 -15
  146. package/app/utils/attribute_range.ts +1 -1
  147. package/app/utils/attributes.ts +2 -1
  148. package/app/utils/clipping_planes.ts +1 -1
  149. package/app/utils/color_picker.ts +3 -3
  150. package/app/utils/crs.ts +6 -6
  151. package/app/utils/default_styles/constants.ts +17 -22
  152. package/app/utils/default_styles/index.ts +24 -3
  153. package/app/utils/default_styles/mesh_components.ts +15 -11
  154. package/app/utils/default_styles/meshes.ts +1 -1
  155. package/app/utils/default_styles/model_components.ts +14 -10
  156. package/app/utils/default_styles/models.ts +1 -1
  157. package/app/utils/import_workflow.ts +3 -1
  158. package/app/utils/legacy_data_id.ts +2 -1
  159. package/app/utils/orientation_compass.ts +103 -0
  160. package/app/utils/orientation_gizmo.ts +73 -0
  161. package/app/utils/orientation_globe.ts +145 -0
  162. package/app/utils/orientation_strata.ts +119 -0
  163. package/app/utils/phosphor_icons.ts +105 -0
  164. package/app/utils/slice.ts +2 -1
  165. package/app/utils/threshold_sources.ts +1 -1
  166. package/internal/stores/data_style/attribute_types.ts +6 -6
  167. package/internal/stores/data_style/mesh/base_style.ts +6 -7
  168. package/internal/stores/data_style/mesh/cells/cell.ts +6 -6
  169. package/internal/stores/data_style/mesh/cells/cell_attribute.ts +8 -6
  170. package/internal/stores/data_style/mesh/cells/cell_config.ts +5 -6
  171. package/internal/stores/data_style/mesh/cells/color.ts +6 -6
  172. package/internal/stores/data_style/mesh/cells/opacity.ts +3 -4
  173. package/internal/stores/data_style/mesh/cells/vertex.ts +6 -6
  174. package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +8 -6
  175. package/internal/stores/data_style/mesh/cells/vertex_config.ts +5 -6
  176. package/internal/stores/data_style/mesh/cells/visibility.ts +1 -1
  177. package/internal/stores/data_style/mesh/edges/color.ts +6 -6
  178. package/internal/stores/data_style/mesh/edges/edge.ts +6 -6
  179. package/internal/stores/data_style/mesh/edges/edge_attribute.ts +8 -6
  180. package/internal/stores/data_style/mesh/edges/edge_config.ts +5 -6
  181. package/internal/stores/data_style/mesh/edges/opacity.ts +3 -4
  182. package/internal/stores/data_style/mesh/edges/vertex.ts +6 -6
  183. package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +8 -6
  184. package/internal/stores/data_style/mesh/edges/vertex_config.ts +5 -6
  185. package/internal/stores/data_style/mesh/edges/visibility.ts +1 -1
  186. package/internal/stores/data_style/mesh/edges/width.ts +6 -6
  187. package/internal/stores/data_style/mesh/index.ts +3 -4
  188. package/internal/stores/data_style/mesh/points/color.ts +6 -6
  189. package/internal/stores/data_style/mesh/points/common.ts +1 -1
  190. package/internal/stores/data_style/mesh/points/opacity.ts +3 -4
  191. package/internal/stores/data_style/mesh/points/size.ts +6 -6
  192. package/internal/stores/data_style/mesh/points/vertex.ts +6 -6
  193. package/internal/stores/data_style/mesh/points/vertex_attribute.ts +8 -6
  194. package/internal/stores/data_style/mesh/points/vertex_config.ts +5 -6
  195. package/internal/stores/data_style/mesh/points/visibility.ts +1 -1
  196. package/internal/stores/data_style/mesh/polygons/color.ts +6 -6
  197. package/internal/stores/data_style/mesh/polygons/opacity.ts +3 -4
  198. package/internal/stores/data_style/mesh/polygons/polygon.ts +6 -6
  199. package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +8 -6
  200. package/internal/stores/data_style/mesh/polygons/polygon_config.ts +5 -6
  201. package/internal/stores/data_style/mesh/polygons/vertex.ts +6 -6
  202. package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +8 -6
  203. package/internal/stores/data_style/mesh/polygons/vertex_config.ts +5 -6
  204. package/internal/stores/data_style/mesh/polygons/visibility.ts +1 -1
  205. package/internal/stores/data_style/mesh/polyhedra/color.ts +6 -6
  206. package/internal/stores/data_style/mesh/polyhedra/opacity.ts +3 -4
  207. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +6 -6
  208. package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +8 -6
  209. package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +5 -6
  210. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +6 -6
  211. package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +8 -6
  212. package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +5 -6
  213. package/internal/stores/data_style/mesh/polyhedra/visibility.ts +1 -1
  214. package/internal/stores/data_style/model/blocks/color.ts +6 -6
  215. package/internal/stores/data_style/model/blocks/coloring_groups.ts +2 -2
  216. package/internal/stores/data_style/model/blocks/polyhedron.ts +12 -9
  217. package/internal/stores/data_style/model/blocks/vertex.ts +12 -9
  218. package/internal/stores/data_style/model/blocks/visibility.ts +1 -1
  219. package/internal/stores/data_style/model/color.ts +10 -11
  220. package/internal/stores/data_style/model/common.ts +3 -4
  221. package/internal/stores/data_style/model/corners/color.ts +6 -6
  222. package/internal/stores/data_style/model/corners/index.ts +2 -2
  223. package/internal/stores/data_style/model/corners/vertex.ts +12 -9
  224. package/internal/stores/data_style/model/corners/visibility.ts +1 -1
  225. package/internal/stores/data_style/model/edges/component.ts +13 -13
  226. package/internal/stores/data_style/model/edges/visibility.ts +1 -1
  227. package/internal/stores/data_style/model/edges/width.ts +6 -6
  228. package/internal/stores/data_style/model/lines/color.ts +6 -6
  229. package/internal/stores/data_style/model/lines/coloring_groups.ts +2 -2
  230. package/internal/stores/data_style/model/lines/edge.ts +12 -9
  231. package/internal/stores/data_style/model/lines/vertex.ts +12 -9
  232. package/internal/stores/data_style/model/lines/visibility.ts +1 -1
  233. package/internal/stores/data_style/model/points/component.ts +17 -13
  234. package/internal/stores/data_style/model/points/index.ts +2 -2
  235. package/internal/stores/data_style/model/points/size.ts +6 -6
  236. package/internal/stores/data_style/model/points/visibility.ts +1 -1
  237. package/internal/stores/data_style/model/surfaces/color.ts +6 -6
  238. package/internal/stores/data_style/model/surfaces/coloring_groups.ts +2 -2
  239. package/internal/stores/data_style/model/surfaces/polygon.ts +12 -9
  240. package/internal/stores/data_style/model/surfaces/vertex.ts +12 -9
  241. package/internal/stores/data_style/model/surfaces/visibility.ts +1 -1
  242. package/internal/stores/data_style/model/visibility.ts +1 -1
  243. package/internal/stores/data_style/scene.ts +31 -19
  244. package/internal/stores/data_style/time_step.ts +3 -2
  245. package/internal/stores/data_style/types.ts +3 -4
  246. package/internal/stores/hybrid_viewer/brightness.ts +14 -7
  247. package/internal/stores/hybrid_viewer/camera.ts +1 -1
  248. package/internal/stores/hybrid_viewer/constants.ts +1 -12
  249. package/internal/stores/hybrid_viewer/filters.ts +2 -2
  250. package/internal/stores/hybrid_viewer/highlight.ts +2 -1
  251. package/internal/stores/hybrid_viewer/scene.ts +11 -4
  252. package/nuxt.config.ts +9 -1
  253. package/package.json +4 -2
  254. package/shared/utils/response_handlers/load.ts +19 -11
  255. package/tests/browser/helpers/object_trees/main_object_tree.ts +3 -3
  256. package/tests/browser/helpers/object_trees/model_components_object_tree.ts +2 -2
  257. package/tests/browser/suites/model/surfaces.ts +1 -1
  258. package/tests/unit/helpers/phosphor_glyphs.ts +46 -0
  259. package/app/assets/viewer_svgs/camera-bookmark.svg +0 -64
  260. package/app/types/style.ts +0 -13
@@ -1,6 +1,7 @@
1
1
  import type { MaybeComputedElementRef } from "@vueuse/core";
2
2
  import { consola } from "consola";
3
3
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
4
+ import { useTheme } from "vuetify";
4
5
  import { useTreeviewStore } from "@ogw_front/stores/treeview";
5
6
 
6
7
  const LUMINANCE_THRESHOLD = 0.65;
@@ -14,6 +15,8 @@ const MAX_OPACITY = 0.5;
14
15
 
15
16
  const MIN_BOOST = 1;
16
17
  const MAX_BOOST = 1.2;
18
+ // On a dark theme the glass carries light text: the backdrop is dimmed instead of boosted
19
+ const MIN_DIM = 0.8;
17
20
  const ADAPTIVE_REFRESH_RATE = 150;
18
21
 
19
22
  // `target` is intentionally duck-typed: callers pass either a coordinates source (a plain object, a Ref/ComputedRef of one, or a getter function returning one) or an element ref/template ref destined for vueuse's useElementBounding - see call sites in Viewer/ContextMenu and Viewer/ObjectTree components.
@@ -58,16 +61,49 @@ function getValue(val: unknown): number {
58
61
  return typeof val === "number" ? val : 0;
59
62
  }
60
63
 
64
+ // How much the glass has to cover its backdrop to keep the text readable: dark text (light theme)
65
+ // Needs it over a dark backdrop, light text (dark theme) over a bright one. Same curve both ways.
66
+ function contrastFactor(brightness: number, isDark: boolean): number {
67
+ const backdrop = isDark ? 1 - brightness : brightness;
68
+ const normalized = Math.min(1, backdrop / LUMINANCE_THRESHOLD);
69
+ return (1 - normalized) ** ADAPTIVE_EXPONENT;
70
+ }
71
+
72
+ interface GlassStyles {
73
+ "--adaptive-blur": string;
74
+ "--adaptive-opacity": number;
75
+ "--adaptive-brightness": number;
76
+ }
77
+
78
+ function useGlassStyles(
79
+ brightness: Ref<number>,
80
+ options: AdaptiveStylesOptions,
81
+ ): ComputedRef<GlassStyles> {
82
+ const theme = useTheme();
83
+ return computed(() => {
84
+ const isDark = theme.current.value.dark;
85
+ const factor = contrastFactor(brightness.value, isDark);
86
+ const blur = MIN_BLUR + factor * (MAX_BLUR - MIN_BLUR);
87
+ const minOpacity = options.minOpacity ?? MIN_OPACITY;
88
+ const maxOpacity = options.maxOpacity ?? MAX_OPACITY;
89
+ const opacity = minOpacity + factor * (maxOpacity - minOpacity);
90
+ const brightnessBoost = isDark
91
+ ? MIN_BOOST - factor * (MIN_BOOST - MIN_DIM)
92
+ : MIN_BOOST + factor * (MAX_BOOST - MIN_BOOST);
93
+ return {
94
+ "--adaptive-blur": `${blur}px`,
95
+ "--adaptive-opacity": opacity,
96
+ "--adaptive-brightness": brightnessBoost,
97
+ };
98
+ });
99
+ }
100
+
61
101
  // oxlint-disable max-lines-per-function
62
102
  export function useAdaptiveStyles(
63
103
  target: AdaptiveStylesTarget,
64
104
  options: AdaptiveStylesOptions = {},
65
105
  ): {
66
- adaptiveStyles: ComputedRef<{
67
- "--adaptive-blur": string;
68
- "--adaptive-opacity": number;
69
- "--adaptive-brightness": number;
70
- }>;
106
+ adaptiveStyles: ComputedRef<GlassStyles>;
71
107
  brightness: Ref<number>;
72
108
  } {
73
109
  const hybridViewerStore = useHybridViewerStore();
@@ -164,22 +200,7 @@ export function useAdaptiveStyles(
164
200
 
165
201
  watch(() => treeviewStore.opened_views, forceRefresh, { deep: true });
166
202
 
167
- const adaptiveStyles = computed(() => {
168
- const normalized = Math.min(1, brightness.value / LUMINANCE_THRESHOLD);
169
- const darkFactor = (1 - normalized) ** ADAPTIVE_EXPONENT;
170
-
171
- const blur = MIN_BLUR + darkFactor * (MAX_BLUR - MIN_BLUR);
172
- const minOpacity = options.minOpacity ?? MIN_OPACITY;
173
- const maxOpacity = options.maxOpacity ?? MAX_OPACITY;
174
- const opacity = minOpacity + darkFactor * (maxOpacity - minOpacity);
175
- const brightnessBoost = MIN_BOOST + darkFactor * (MAX_BOOST - MIN_BOOST);
176
-
177
- return {
178
- "--adaptive-blur": `${blur}px`,
179
- "--adaptive-opacity": opacity,
180
- "--adaptive-brightness": brightnessBoost,
181
- };
182
- });
203
+ const adaptiveStyles = useGlassStyles(brightness, options);
183
204
 
184
205
  return {
185
206
  adaptiveStyles,
@@ -1,31 +1,33 @@
1
1
  import { ref } from "vue";
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
3
3
 
4
+ import { type DataItem, useDataStore } from "@ogw_front/stores/data";
4
5
  import type {
5
- DataIdentified,
6
6
  GeodeObjectType,
7
7
  ViewerObjectType,
8
- } from "@ogw_front/types/identifiers";
9
- import { type DataItem, useDataStore } from "@ogw_front/stores/data";
8
+ } from "@geode/opengeodeweb-microservice/data_types";
9
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
10
+ import type { DataIdentified } from "@ogw_front/types/identifiers";
11
+ import type { ViewerId } from "@geode/opengeodeweb-viewer/schema_types";
10
12
  import { computeMenuPosition } from "@ogw_front/composables/overlapping_picker_menu";
11
13
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
12
14
  import { useViewerStore } from "@ogw_front/stores/viewer";
13
15
 
14
16
  interface PickedItem {
15
- id: string;
16
- viewer_id: number | undefined;
17
+ id: DataId;
18
+ viewer_id: ViewerId | undefined;
17
19
  }
18
20
 
19
21
  interface ProposedItem extends DataIdentified {
20
- viewer_id: number | undefined;
22
+ viewer_id: ViewerId | undefined;
21
23
  name: string;
22
24
  viewer_object_type: ViewerObjectType | undefined;
23
25
  geode_object_type: GeodeObjectType | undefined;
24
26
  }
25
27
 
26
28
  interface ViewerIdResult {
27
- id: string | undefined;
28
- viewer_id: number | undefined;
29
+ id: DataId | undefined;
30
+ viewer_id: ViewerId | undefined;
29
31
  // True when objects were under the cursor but the user closed the picker without choosing
30
32
  dismissed?: boolean;
31
33
  }
@@ -20,7 +20,7 @@ function pickingOptions(
20
20
  {
21
21
  testId: "resetCameraButton",
22
22
  tooltip: "Reset camera",
23
- icon: "mdi-cube-scan",
23
+ icon: "ph-cube-focus",
24
24
  action: (): void => {
25
25
  hybridViewerStore.resetCamera();
26
26
  },
@@ -28,7 +28,7 @@ function pickingOptions(
28
28
  {
29
29
  testId: "centerOnClickButton",
30
30
  tooltip: "Center on click",
31
- icon: "mdi-crosshairs-question",
31
+ icon: "ph-crosshair-simple",
32
32
  color: hybridViewerStore.is_picking ? "primary" : undefined,
33
33
  action: (): void => {
34
34
  tools.toggleTool(tools.is_picking);
@@ -37,7 +37,7 @@ function pickingOptions(
37
37
  {
38
38
  testId: "zoomToBoxButton",
39
39
  tooltip: "Zoom to box",
40
- icon: "mdi-magnify-scan",
40
+ icon: "ph-magnifying-glass-plus",
41
41
  color: hybridViewerStore.is_zoom_box_active ? "primary" : undefined,
42
42
  action: (): void => {
43
43
  tools.toggleTool(tools.is_zoom_box_active);
@@ -53,14 +53,14 @@ function hoverHighlightOption(
53
53
  return {
54
54
  testId: "highlightOnHoverButton",
55
55
  tooltip: "Highlight on hover",
56
- icon: "mdi-cursor-default-click",
56
+ icon: "ph-cursor-click",
57
57
  color: hybridViewerStore.is_hover_highlight ? "primary" : undefined,
58
58
  action: hybridViewerStore.is_hover_highlight ? tools.stopHoverHighlight : undefined,
59
59
  menu: [
60
60
  {
61
61
  title: "Cells",
62
62
  testId: "highlightOnHoverCellsButton",
63
- icon: "mdi-select-all",
63
+ icon: "ph-selection-all",
64
64
  action: (): void => {
65
65
  tools.toggleHoverHighlight("CELL");
66
66
  },
@@ -68,7 +68,7 @@ function hoverHighlightOption(
68
68
  {
69
69
  title: "Points",
70
70
  testId: "highlightOnHoverPointsButton",
71
- icon: "mdi-select-drag",
71
+ icon: "ph-selection",
72
72
  action: (): void => {
73
73
  tools.toggleHoverHighlight("POINT");
74
74
  },
@@ -85,7 +85,7 @@ function gridScaleOption(
85
85
  return {
86
86
  testId: "gridScaleButton",
87
87
  tooltip: "Toggle grid scale",
88
- icon: "mdi-ruler-square",
88
+ icon: "ph-grid-four",
89
89
  color: gridScale.value ? "primary" : undefined,
90
90
  action: (): void => {
91
91
  const schema = schemas.opengeodeweb_viewer.viewer.grid_scale;
@@ -1,4 +1,3 @@
1
- import CameraBookmarkIcon from "@ogw_front/assets/viewer_svgs/camera-bookmark.svg";
2
1
  import type { ViewToolbarTools } from "@ogw_front/composables/view_toolbar_tools";
3
2
 
4
3
  interface CameraOptionAction {
@@ -18,7 +17,7 @@ function panelOptions(tools: ViewToolbarTools): CameraOptionAction[] {
18
17
  {
19
18
  testId: "cameraOrientationButton",
20
19
  tooltip: "Camera orientation",
21
- icon: "mdi-rotate-3d",
20
+ icon: "ph-arrows-clockwise",
22
21
  action: (): void => {
23
22
  tools.toggleTool(tools.showCameraOrientation);
24
23
  },
@@ -26,8 +25,7 @@ function panelOptions(tools: ViewToolbarTools): CameraOptionAction[] {
26
25
  {
27
26
  testId: "cameraManagerButton",
28
27
  tooltip: "Manage camera positions",
29
- icon: CameraBookmarkIcon,
30
- iconSize: 34,
28
+ icon: "ph-video-camera",
31
29
  action: (): void => {
32
30
  tools.toggleTool(tools.showCameraManager);
33
31
  },
@@ -35,7 +33,7 @@ function panelOptions(tools: ViewToolbarTools): CameraOptionAction[] {
35
33
  {
36
34
  testId: "screenshotButton",
37
35
  tooltip: "Take a screenshot",
38
- icon: "mdi-camera",
36
+ icon: "ph-camera",
39
37
  action: (): void => {
40
38
  tools.toggleTool(tools.showScreenshot);
41
39
  },
@@ -49,7 +47,7 @@ function controlOptions(tools: ViewToolbarTools): CameraOptionAction[] {
49
47
  {
50
48
  testId: "zScalingButton",
51
49
  tooltip: "Z Scaling Control",
52
- icon: "mdi-sort",
50
+ icon: "ph-arrows-down-up",
53
51
  action: (): void => {
54
52
  tools.toggleTool(tools.showZScaling);
55
53
  },
@@ -57,7 +55,7 @@ function controlOptions(tools: ViewToolbarTools): CameraOptionAction[] {
57
55
  {
58
56
  testId: "clippingPlanesButton",
59
57
  tooltip: "Clipping Planes",
60
- icon: "mdi-content-cut",
58
+ icon: "ph-scissors",
61
59
  color: tools.showClippingPlanes.value ? "primary" : undefined,
62
60
  action: (): void => {
63
61
  tools.toggleTool(tools.showClippingPlanes);
@@ -72,7 +70,7 @@ function filterOptions(tools: ViewToolbarTools): CameraOptionAction[] {
72
70
  {
73
71
  testId: "shrinkFilterButton",
74
72
  tooltip: "Shrink Filter",
75
- icon: "mdi-arrow-collapse-all",
73
+ icon: "ph-arrows-in",
76
74
  color: tools.showShrinkFilter.value ? "primary" : undefined,
77
75
  action: (): void => {
78
76
  tools.toggleTool(tools.showShrinkFilter);
@@ -81,7 +79,7 @@ function filterOptions(tools: ViewToolbarTools): CameraOptionAction[] {
81
79
  {
82
80
  testId: "explodeFilterButton",
83
81
  tooltip: "Exploded View",
84
- icon: "mdi-arrow-expand-all",
82
+ icon: "ph-arrows-out",
85
83
  color: tools.showExplodeFilter.value ? "primary" : undefined,
86
84
  action: (): void => {
87
85
  tools.toggleTool(tools.showExplodeFilter);
@@ -90,7 +88,7 @@ function filterOptions(tools: ViewToolbarTools): CameraOptionAction[] {
90
88
  {
91
89
  testId: "thresholdFilterButton",
92
90
  tooltip: "Threshold Filter",
93
- icon: "mdi-filter-variant",
91
+ icon: "ph-funnel-simple",
94
92
  color: tools.showThresholdFilter.value ? "primary" : undefined,
95
93
  action: (): void => {
96
94
  tools.toggleTool(tools.showThresholdFilter);
@@ -103,7 +101,7 @@ function rulerOption(tools: ViewToolbarTools): CameraOptionAction {
103
101
  return {
104
102
  testId: "rulerButton",
105
103
  tooltip: "Ruler",
106
- icon: "mdi-ruler",
104
+ icon: "ph-ruler",
107
105
  color: tools.showRuler.value ? "primary" : undefined,
108
106
  action: (): void => {
109
107
  tools.toggleTool(tools.showRuler);
@@ -1,7 +1,9 @@
1
1
  import { type MenuMetaData, useMenuStore } from "@ogw_front/stores/menu";
2
2
  import type { Ref, ShallowRef } from "vue";
3
3
  import { BASEMAP_GROUP_ID } from "@ogw_front/utils/basemap_tree";
4
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
4
5
  import type { TreeMenuPayload } from "@ogw_front/utils/treeview";
6
+ import type { ViewerId } from "@geode/opengeodeweb-viewer/schema_types";
5
7
  import type { ViewerIdResult } from "@ogw_front/composables/use_overlapping_picker";
6
8
  import { useDataStore } from "@ogw_front/stores/data";
7
9
  import { useElementSize } from "@vueuse/core";
@@ -69,8 +71,8 @@ async function treeMenuTarget(
69
71
 
70
72
  async function viewerMenuTarget(
71
73
  dataStore: ReturnType<typeof useDataStore>,
72
- pickedId: string,
73
- viewer_id: number | undefined,
74
+ pickedId: DataId,
75
+ viewer_id: ViewerId | undefined,
74
76
  ): Promise<MenuTarget> {
75
77
  const item = await dataStore.item(pickedId);
76
78
  const meta_data: MenuMetaData = { ...item };
@@ -0,0 +1,54 @@
1
+ import type { ColorRGB, ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
2
+ import type { ViewerRequest } from "@ogw_front/stores/viewer_helpers/request";
3
+ // Third party imports
4
+ import { consola } from "consola";
5
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
6
+
7
+ // Local imports
8
+ import { getDefaultSceneStyle, getSceneColors } from "@ogw_front/utils/default_styles";
9
+ import {
10
+ hideViewerMarker,
11
+ resetOrientationMarkerVisibility,
12
+ } from "@ogw_front/composables/orientation_overlay";
13
+
14
+ // The scene colors of the viewer have no alpha (the text one takes it as its opacity)
15
+ function toViewerColor({ red, green, blue }: ColorRGBA): ColorRGB {
16
+ return { red, green, blue };
17
+ }
18
+
19
+ // A reset viewer draws its own scene colors: give it the app's (`ogwFront.sceneColors`), which the default
20
+ // Scene style shows
21
+ async function applyAppSceneColors(request: ViewerRequest): Promise<void> {
22
+ const sceneColors = getSceneColors();
23
+ const { background_color, text } = getDefaultSceneStyle();
24
+ if (sceneColors.background) {
25
+ await request({
26
+ schema: viewer_schemas.opengeodeweb_viewer.viewer.set_background_color,
27
+ params: { color: toViewerColor(background_color) },
28
+ });
29
+ }
30
+ if (sceneColors.text) {
31
+ await request({
32
+ schema: viewer_schemas.opengeodeweb_viewer.viewer.set_text_style,
33
+ params: {
34
+ color: toViewerColor(text.color),
35
+ font_family: text.font_family,
36
+ opacity: text.color.alpha,
37
+ },
38
+ });
39
+ }
40
+ }
41
+
42
+ // To call after each viewer reset (reset_visualization), which brings back the viewer's own scene. Neither
43
+ // Step fails the reset: the viewer stays usable with its own colors, and the marker is hidden either way
44
+ async function afterViewerReset(request: ViewerRequest): Promise<void> {
45
+ resetOrientationMarkerVisibility();
46
+ try {
47
+ await applyAppSceneColors(request);
48
+ } catch (error) {
49
+ consola.warn("[SceneColors] The viewer kept its own scene colors:", error);
50
+ }
51
+ await hideViewerMarker(request);
52
+ }
53
+
54
+ export { afterViewerReset, toViewerColor };
@@ -0,0 +1,10 @@
1
+ import { CHROME_THEME_KEY, DEFAULT_CHROME_THEME } from "@ogw_front/composables/chrome_theme";
2
+
3
+ // Hands `ogwFront.chromeTheme` (app.config.ts) to the whole Vue app, see composables/chrome_theme.ts
4
+ export default defineNuxtPlugin({
5
+ name: "ogw-chrome-theme",
6
+ setup(nuxtApp) {
7
+ const chromeTheme = useAppConfig().ogwFront?.chromeTheme ?? DEFAULT_CHROME_THEME;
8
+ nuxtApp.vueApp.provide(CHROME_THEME_KEY, chromeTheme);
9
+ },
10
+ });
@@ -0,0 +1,13 @@
1
+ import { phosphorIconOptions } from "@ogw_front/utils/phosphor_icons";
2
+
3
+ // Vuetify-nuxt-module only takes serializable icon options in nuxt.config (where its own icon sets
4
+ // Are disabled), so the component based Phosphor set is registered here, before Vuetify is created
5
+ export default defineNuxtPlugin({
6
+ name: "ogw-phosphor-icons",
7
+ enforce: "pre",
8
+ setup(nuxtApp) {
9
+ nuxtApp.hook("vuetify:before-create", ({ vuetifyOptions }) => {
10
+ vuetifyOptions.icons = phosphorIconOptions();
11
+ });
12
+ },
13
+ });
@@ -0,0 +1,10 @@
1
+ import { setSceneColors } from "@ogw_front/utils/default_styles";
2
+
3
+ // Hands `ogwFront.sceneColors` (app.config.ts) to the default scene style, before any data style store is created
4
+ export default defineNuxtPlugin({
5
+ name: "ogw-scene-colors",
6
+ enforce: "pre",
7
+ setup() {
8
+ setSceneColors(useAppConfig().ogwFront?.sceneColors ?? {});
9
+ },
10
+ });
@@ -1,10 +1,10 @@
1
1
  import { type MapStyle, sortedMaps } from "@ogw_front/utils/basemap_tree";
2
2
  import back_schemas, {
3
3
  type BasemapBuildResponse,
4
- type CRSList,
5
4
  } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
6
5
  import { ignoreError, useBasemapViewer } from "./viewer.js";
7
6
  import type { BasemapLayers } from "./layers.js";
7
+ import type { CRS } from "@geode/opengeodeweb-back/schema_types";
8
8
  import type { Extent } from "./extent.js";
9
9
  import type { Ref } from "vue";
10
10
  import { useBackStore } from "@ogw_front/stores/back";
@@ -73,7 +73,7 @@ function useBasemapBuilds(
73
73
  await hybridViewerStore.remoteRender();
74
74
  }
75
75
 
76
- async function display(build: number, extent: Extent, crs: CRSList): Promise<void> {
76
+ async function display(build: number, extent: Extent, crs: CRS): Promise<void> {
77
77
  const response = await backStore.request({
78
78
  schema: back_schemas.opengeodeweb_back.basemap.build,
79
79
  params: { maps: [...maps.value], crs, ...extent },
@@ -2,7 +2,7 @@ import back_schemas, {
2
2
  type BasemapBuildResponse,
3
3
  } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
4
4
  import type { MapStyle } from "@ogw_front/utils/basemap_tree";
5
- import type { Opacity } from "@ogw_front/types/style";
5
+ import type { Opacity } from "@geode/opengeodeweb-viewer/schema_types";
6
6
  import { useBackStore } from "@ogw_front/stores/back";
7
7
  import { useDataStore } from "@ogw_front/stores/data";
8
8
  import { useViewerStore } from "@ogw_front/stores/viewer";
package/app/stores/crs.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { DataId, GeodeObjectType } from "@ogw_front/types/identifiers";
2
- import back_schemas, {
3
- type CRSList,
4
- } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
5
1
  import { oldestCrs, sameCrs } from "@ogw_front/utils/crs";
2
+ import type { CRS } from "@geode/opengeodeweb-back/schema_types";
3
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
4
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
5
+ import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
6
6
  import { useBackStore } from "@ogw_front/stores/back";
7
7
  import { useDataStore } from "@ogw_front/stores/data";
8
8
 
@@ -11,12 +11,12 @@ import { useDataStore } from "@ogw_front/stores/data";
11
11
  export const useCrsStore = defineStore("crs", () => {
12
12
  const backStore = useBackStore();
13
13
  // OpenGeode geosciences lists the same geographic CRS for 2D and 3D data: one list for all types
14
- let geographicListPromise: Promise<CRSList[]> | undefined = undefined;
14
+ let geographicListPromise: Promise<CRS[]> | undefined = undefined;
15
15
  const crsEditEnabled = ref(false);
16
16
  const crsEditRequest = ref<string | undefined>(undefined);
17
17
  const dataStore = useDataStore();
18
18
  const crsItems = dataStore.refCrsItems();
19
- const projectCrs = ref<CRSList | undefined>(undefined);
19
+ const projectCrs = ref<CRS | undefined>(undefined);
20
20
  const projectCrsEditRequest = ref(false);
21
21
 
22
22
  // The project follows its data: once every georeferenced data is in one CRS, it is the project
@@ -44,7 +44,7 @@ export const useCrsStore = defineStore("crs", () => {
44
44
  // Data without CRS are listed too (value undefined): they could not follow the project
45
45
  const mismatchedCrs = computed(() => {
46
46
  const project = projectCrs.value;
47
- const mismatched = new Map<string, CRSList | undefined>();
47
+ const mismatched = new Map<string, CRS | undefined>();
48
48
  for (const item of crsItems.value) {
49
49
  if (project !== undefined && !sameCrs(item.crs, project)) {
50
50
  mismatched.set(item.data_id, item.crs);
@@ -53,7 +53,7 @@ export const useCrsStore = defineStore("crs", () => {
53
53
  return mismatched;
54
54
  });
55
55
 
56
- async function fetchGeographicList(geodeObjectType: GeodeObjectType): Promise<CRSList[]> {
56
+ async function fetchGeographicList(geodeObjectType: GeodeObjectType): Promise<CRS[]> {
57
57
  try {
58
58
  const response = await backStore.request({
59
59
  schema: back_schemas.opengeodeweb_back.crs.geographic_list,
@@ -70,7 +70,7 @@ export const useCrsStore = defineStore("crs", () => {
70
70
  return [];
71
71
  }
72
72
 
73
- async function geographicList(geodeObjectType: GeodeObjectType): Promise<CRSList[]> {
73
+ async function geographicList(geodeObjectType: GeodeObjectType): Promise<CRS[]> {
74
74
  // The promise is cached, so dialogs opened together share a single request.
75
75
  // The back still checks each CRS against the list of the data dimension
76
76
  geographicListPromise ??= fetchGeographicList(geodeObjectType);
@@ -90,7 +90,7 @@ export const useCrsStore = defineStore("crs", () => {
90
90
  crsEditRequest.value = undefined;
91
91
  }
92
92
 
93
- function setProjectCrs(crs: CRSList): void {
93
+ function setProjectCrs(crs: CRS): void {
94
94
  projectCrs.value = crs;
95
95
  }
96
96
 
@@ -107,12 +107,12 @@ export const useCrsStore = defineStore("crs", () => {
107
107
  projectCrs.value = undefined;
108
108
  }
109
109
 
110
- function exportStores(): { projectCrs?: CRSList } {
110
+ function exportStores(): { projectCrs?: CRS } {
111
111
  return { projectCrs: projectCrs.value };
112
112
  }
113
113
 
114
114
  // Called once the project data is imported: a project saved without it falls back to its oldest data
115
- function importStores(snapshot: { projectCrs?: CRSList } | undefined): void {
115
+ function importStores(snapshot: { projectCrs?: CRS } | undefined): void {
116
116
  projectCrs.value = snapshot?.projectCrs ?? oldestCrs(crsItems.value);
117
117
  }
118
118
 
@@ -1,15 +1,14 @@
1
1
  // oxlint-disable eslint/max-lines
2
2
  // Third party imports
3
- import type { CRSList } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
3
+ import type { CRS } from "@geode/opengeodeweb-back/schema_types";
4
4
  import type { Table } from "dexie";
5
5
  import { useObservable } from "@vueuse/rxjs";
6
6
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
7
7
 
8
8
  // Local imports
9
+ import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types";
9
10
  import type {
10
- DataId,
11
11
  DataIdentified,
12
- GeodeId,
13
12
  GeodeIdentified,
14
13
  GeodeObjectTyped,
15
14
  ModelId,
@@ -29,7 +28,7 @@ interface DataItem extends DataIdentified, GeodeIdentified, GeodeObjectTyped, Vi
29
28
  created_at: string;
30
29
  is_viewable?: boolean;
31
30
  binary_light_viewable?: string;
32
- crs?: CRSList;
31
+ crs?: CRS;
33
32
  }
34
33
 
35
34
  // What the CRS features read of a data: light to copy on each change
@@ -49,7 +48,7 @@ interface NewDataItem extends DataIdentified, GeodeIdentified, GeodeObjectTyped,
49
48
  name?: string;
50
49
  is_viewable?: boolean;
51
50
  binary_light_viewable?: string;
52
- crs?: CRSList;
51
+ crs?: CRS;
53
52
  // Set on saved data: kept by the project snapshot
54
53
  created_at?: string;
55
54
  mesh_components?: ModelComponentInput[];
@@ -1,6 +1,7 @@
1
1
  import type { DataIdentified, GeodeIdentified, ModelId } from "@ogw_front/types/identifiers";
2
2
  import type { ReadonlyTreeGroup } from "@ogw_front/types/tree";
3
3
  import type { Table } from "dexie";
4
+ import type { ViewerId } from "@geode/opengeodeweb-viewer/schema_types";
4
5
  import { database } from "@ogw_internal/database/database.js";
5
6
  import { liveObservable } from "@ogw_front/utils/live_observable";
6
7
  import { useObservable } from "@vueuse/rxjs";
@@ -16,7 +17,7 @@ interface FormattedComponent extends Readonly<GeodeIdentified> {
16
17
  readonly id: string;
17
18
  readonly title: string;
18
19
  readonly category: string;
19
- readonly viewer_id: number;
20
+ readonly viewer_id: ViewerId;
20
21
  readonly is_active: boolean;
21
22
  }
22
23
 
@@ -1,4 +1,3 @@
1
- import type { DataId, GeodeObjectType } from "@ogw_front/types/identifiers";
2
1
  import { type LegacyDataId, fromLegacyDataId } from "@ogw_front/utils/legacy_data_id";
3
2
  import type {
4
3
  ModelComponentStyle,
@@ -6,8 +5,10 @@ import type {
6
5
  ObjectStyle,
7
6
  SceneStyle,
8
7
  } from "@ogw_internal/stores/data_style/types";
8
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
9
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
9
10
  import type { Table } from "dexie";
10
- import type { Visibility } from "@ogw_front/types/style";
11
+ import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
11
12
  import { database } from "@ogw_internal/database/database.js";
12
13
  import { getDefaultStyle } from "@ogw_front/utils/default_styles";
13
14
  import { useAttributeTimeStepStyle } from "@ogw_internal/stores/data_style/time_step";
@@ -98,7 +99,7 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
98
99
  if (viewer_object_type === "model") {
99
100
  return modelStyleStore.applyModelStyle(dataId);
100
101
  }
101
- throw new Error(`Unknown viewer_object_type: ${viewer_object_type}`);
102
+ throw new Error(`Unknown viewer_object_type: ${String(viewer_object_type)}`);
102
103
  }
103
104
 
104
105
  function exportStores(): DataStyleSnapshot {
@@ -3,7 +3,10 @@ import {
3
3
  useHybridViewerViewport,
4
4
  } from "@ogw_internal/stores/hybrid_viewer/viewport";
5
5
  import { applySnapshot, useHybridViewerCamera } from "@ogw_internal/stores/hybrid_viewer/camera";
6
- import { BACKGROUND_COLOR } from "@ogw_internal/stores/hybrid_viewer/constants";
6
+ import {
7
+ localBackgroundColor,
8
+ useHybridViewerScene,
9
+ } from "@ogw_internal/stores/hybrid_viewer/scene";
7
10
  import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types";
8
11
  import { getCameraOptions } from "@ogw_internal/stores/hybrid_viewer/camera_animation";
9
12
  import { useHybridViewerBrightness } from "@ogw_internal/stores/hybrid_viewer/brightness";
@@ -11,7 +14,6 @@ import { useHybridViewerCore } from "@ogw_internal/stores/hybrid_viewer/core";
11
14
  import { useHybridViewerFilters } from "@ogw_internal/stores/hybrid_viewer/filters";
12
15
  import { useHybridViewerHighlight } from "@ogw_internal/stores/hybrid_viewer/highlight";
13
16
  import { useHybridViewerRuler } from "@ogw_internal/stores/hybrid_viewer/ruler";
14
- import { useHybridViewerScene } from "@ogw_internal/stores/hybrid_viewer/scene";
15
17
  import { useHybridViewerZoomBox } from "@ogw_internal/stores/hybrid_viewer/zoom_box";
16
18
  import { newInstance as vtkGenericRenderWindow } from "@kitware/vtk.js/Rendering/Misc/GenericRenderWindow";
17
19
 
@@ -58,7 +60,7 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
58
60
  }
59
61
  status.value = Status.CREATING;
60
62
  genericRenderWindow.value = vtkGenericRenderWindow({
61
- background: BACKGROUND_COLOR,
63
+ background: localBackgroundColor(),
62
64
  listenWindowResize: false,
63
65
  });
64
66
  const webGLRenderWindow =