@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,5 +1,5 @@
1
1
  import type { LineId, ModelId } from "@ogw_front/types/identifiers";
2
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
2
+ import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
4
4
  import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
5
5
  import { useDataStore } from "@ogw_front/stores/data";
@@ -15,12 +15,12 @@ export function useModelLinesColor(): {
15
15
  setModelLinesColor: (
16
16
  modelId: ModelId,
17
17
  lines_ids: LineId[],
18
- color: RGBAColor | undefined,
18
+ color: ColorRGBA | undefined,
19
19
  activeColoring?: string,
20
20
  collectionId?: string,
21
21
  ) => Promise<unknown>;
22
22
  modelLineColoring: (modelId: ModelId, line_id?: LineId) => StyleValues;
23
- modelLineColor: (modelId: ModelId, line_id?: LineId) => RGBAColor | undefined;
23
+ modelLineColor: (modelId: ModelId, line_id?: LineId) => ColorRGBA | undefined;
24
24
  modelLineActiveColoring: (modelId: ModelId, line_id?: LineId) => unknown;
25
25
  setModelLinesActiveColoring: (
26
26
  modelId: ModelId,
@@ -40,15 +40,15 @@ export function useModelLinesColor(): {
40
40
  return modelLinesCommonStyle.modelLineStyle(modelId, line_id).coloring as StyleValues;
41
41
  }
42
42
 
43
- function modelLineColor(modelId: ModelId, line_id?: LineId): RGBAColor | undefined {
43
+ function modelLineColor(modelId: ModelId, line_id?: LineId): ColorRGBA | undefined {
44
44
  // oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
45
- return modelLineColoring(modelId, line_id).constant as RGBAColor | undefined;
45
+ return modelLineColoring(modelId, line_id).constant as ColorRGBA | undefined;
46
46
  }
47
47
 
48
48
  async function setModelLinesColor(
49
49
  modelId: ModelId,
50
50
  lines_ids: LineId[],
51
- color: RGBAColor | undefined,
51
+ color: ColorRGBA | undefined,
52
52
  activeColoring = "constant",
53
53
  collectionId?: string,
54
54
  ): Promise<unknown> {
@@ -1,9 +1,9 @@
1
+ import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
1
2
  import type { LineId } from "@ogw_front/types/identifiers";
2
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
3
3
  import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
4
4
 
5
5
  interface ColorGroup {
6
- color: RGBAColor | undefined;
6
+ color: ColorRGBA | undefined;
7
7
  lines_ids: LineId[];
8
8
  }
9
9
 
@@ -1,11 +1,7 @@
1
1
  // oxlint-disable eslint/max-lines
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
- AttributeRangeMaximum,
8
- AttributeRangeMinimum,
9
5
  AttributeTimeStep,
10
6
  } from "@ogw_front/types/attribute";
11
7
  import type {
@@ -14,8 +10,15 @@ import type {
14
10
  AttributeStoredConfig,
15
11
  ValidAttributeInput,
16
12
  } from "@ogw_internal/stores/data_style/attribute_types";
17
- import { DEFAULT_NO_DATA_COLOR, type RGBAColor } from "@ogw_front/utils/default_styles/constants";
13
+ import type {
14
+ AttributeItem,
15
+ AttributeName,
16
+ AttributeRangeMaximum,
17
+ AttributeRangeMinimum,
18
+ ColorRGBA,
19
+ } from "@geode/opengeodeweb-viewer/schema_types";
18
20
  import type { LineId, ModelId } from "@ogw_front/types/identifiers";
21
+ import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
19
22
  import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
20
23
  import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
21
24
  // Third party imports
@@ -83,11 +86,11 @@ interface UseModelLinesEdgeAttributeReturn {
83
86
  lineIds: LineId[],
84
87
  colorMap: AttributeColorMap | undefined,
85
88
  ) => Promise<unknown>;
86
- modelLinesEdgeAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) => RGBAColor;
89
+ modelLinesEdgeAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) => ColorRGBA;
87
90
  setModelLinesEdgeAttributeNoDataColor: (
88
91
  modelId: ModelId,
89
92
  lineIds: LineId[],
90
- no_data_color: RGBAColor,
93
+ no_data_color: ColorRGBA,
91
94
  ) => Promise<unknown>;
92
95
  }
93
96
 
@@ -171,7 +174,7 @@ function useModelLinesEdgeAttributeGetters(
171
174
  const storedConfig = modelLinesEdgeAttributeStoredConfig(modelId, lineId, name, item);
172
175
  return storedConfig.colorMap;
173
176
  }
174
- function modelLinesEdgeAttributeNoDataColor(modelId: ModelId, lineId?: LineId): RGBAColor {
177
+ function modelLinesEdgeAttributeNoDataColor(modelId: ModelId, lineId?: LineId): ColorRGBA {
175
178
  const name = modelLinesEdgeAttributeName(modelId, lineId);
176
179
  const item = modelLinesEdgeAttributeItem(modelId, lineId);
177
180
  const storedConfig = modelLinesEdgeAttributeStoredConfig(modelId, lineId, name, item);
@@ -395,7 +398,7 @@ function useModelLinesEdgeAttribute(): UseModelLinesEdgeAttributeReturn {
395
398
  async function setModelLinesEdgeAttributeNoDataColor(
396
399
  modelId: ModelId,
397
400
  lineIds: LineId[],
398
- no_data_color: RGBAColor,
401
+ no_data_color: ColorRGBA,
399
402
  ): Promise<unknown> {
400
403
  const name = modelLinesEdgeAttributeName(modelId, lineIds[0]);
401
404
  const item = modelLinesEdgeAttributeItem(modelId, lineIds[0]);
@@ -1,11 +1,7 @@
1
1
  // oxlint-disable eslint/max-lines
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
- AttributeRangeMaximum,
8
- AttributeRangeMinimum,
9
5
  AttributeTimeStep,
10
6
  } from "@ogw_front/types/attribute";
11
7
  import type {
@@ -14,8 +10,15 @@ import type {
14
10
  AttributeStoredConfig,
15
11
  ValidAttributeInput,
16
12
  } from "@ogw_internal/stores/data_style/attribute_types";
17
- import { DEFAULT_NO_DATA_COLOR, type RGBAColor } from "@ogw_front/utils/default_styles/constants";
13
+ import type {
14
+ AttributeItem,
15
+ AttributeName,
16
+ AttributeRangeMaximum,
17
+ AttributeRangeMinimum,
18
+ ColorRGBA,
19
+ } from "@geode/opengeodeweb-viewer/schema_types";
18
20
  import type { LineId, ModelId } from "@ogw_front/types/identifiers";
21
+ import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
19
22
  import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
20
23
  import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
21
24
  // Third party imports
@@ -83,11 +86,11 @@ interface UseModelLinesVertexAttributeReturn {
83
86
  lineIds: LineId[],
84
87
  colorMap: AttributeColorMap | undefined,
85
88
  ) => Promise<unknown>;
86
- modelLinesVertexAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) => RGBAColor;
89
+ modelLinesVertexAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) => ColorRGBA;
87
90
  setModelLinesVertexAttributeNoDataColor: (
88
91
  modelId: ModelId,
89
92
  lineIds: LineId[],
90
- no_data_color: RGBAColor,
93
+ no_data_color: ColorRGBA,
91
94
  ) => Promise<unknown>;
92
95
  }
93
96
 
@@ -172,7 +175,7 @@ function useModelLinesVertexAttributeGetters(
172
175
  const storedConfig = modelLinesVertexAttributeStoredConfig(modelId, lineId, name, item);
173
176
  return storedConfig.colorMap;
174
177
  }
175
- function modelLinesVertexAttributeNoDataColor(modelId: ModelId, lineId?: LineId): RGBAColor {
178
+ function modelLinesVertexAttributeNoDataColor(modelId: ModelId, lineId?: LineId): ColorRGBA {
176
179
  const name = modelLinesVertexAttributeName(modelId, lineId);
177
180
  const item = modelLinesVertexAttributeItem(modelId, lineId);
178
181
  const storedConfig = modelLinesVertexAttributeStoredConfig(modelId, lineId, name, item);
@@ -396,7 +399,7 @@ function useModelLinesVertexAttribute(): UseModelLinesVertexAttributeReturn {
396
399
  async function setModelLinesVertexAttributeNoDataColor(
397
400
  modelId: ModelId,
398
401
  lineIds: LineId[],
399
- no_data_color: RGBAColor,
402
+ no_data_color: ColorRGBA,
400
403
  ): Promise<unknown> {
401
404
  const name = modelLinesVertexAttributeName(modelId, lineIds[0]);
402
405
  const item = modelLinesVertexAttributeItem(modelId, lineIds[0]);
@@ -1,5 +1,5 @@
1
1
  import type { LineId, ModelId } from "@ogw_front/types/identifiers";
2
- import type { Visibility } from "@ogw_front/types/style";
2
+ import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
4
4
  import { useModelLinesCommonStyle } from "./common";
5
5
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
@@ -1,12 +1,14 @@
1
1
  // oxlint-disable eslint/max-lines
2
+ import type { AttributeColorMap, AttributeRange } from "@ogw_front/types/attribute";
2
3
  import type {
3
- AttributeColorMap,
4
4
  AttributeItem,
5
5
  AttributeName,
6
- AttributeRange,
7
6
  AttributeRangeMaximum,
8
7
  AttributeRangeMinimum,
9
- } from "@ogw_front/types/attribute";
8
+ ColorRGBA,
9
+ PointSize,
10
+ Visibility,
11
+ } from "@geode/opengeodeweb-viewer/schema_types";
10
12
  import type {
11
13
  AttributeState,
12
14
  AttributeStoredConfig,
@@ -15,9 +17,7 @@ import {
15
17
  POINTS_DEFAULT_COLOR,
16
18
  POINTS_DEFAULT_SIZE,
17
19
  POINTS_DEFAULT_VISIBILITY,
18
- type RGBAColor,
19
20
  } from "@ogw_front/utils/default_styles/constants";
20
- import type { Size, Visibility } from "@ogw_front/types/style";
21
21
  import type { ModelId } from "@ogw_front/types/identifiers";
22
22
  import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
23
23
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
@@ -51,10 +51,10 @@ type PointsRequestSchema =
51
51
 
52
52
  interface PointsStyle {
53
53
  visibility?: Visibility;
54
- size?: Size;
54
+ size?: PointSize;
55
55
  coloring?: {
56
56
  active?: string;
57
- constant?: RGBAColor;
57
+ constant?: ColorRGBA;
58
58
  vertex?: AttributeState;
59
59
  };
60
60
  }
@@ -103,11 +103,11 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
103
103
  return pointsStyle(modelId, componentId).visibility ?? POINTS_DEFAULT_VISIBILITY;
104
104
  }
105
105
 
106
- function pointsSize(modelId: ModelId, componentId?: string): Size {
106
+ function pointsSize(modelId: ModelId, componentId?: string): PointSize {
107
107
  return pointsStyle(modelId, componentId).size ?? POINTS_DEFAULT_SIZE;
108
108
  }
109
109
 
110
- function pointsColor(modelId: ModelId, componentId?: string): RGBAColor {
110
+ function pointsColor(modelId: ModelId, componentId?: string): ColorRGBA {
111
111
  return pointsStyle(modelId, componentId).coloring?.constant ?? POINTS_DEFAULT_COLOR;
112
112
  }
113
113
 
@@ -153,7 +153,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
153
153
  return storedConfig(modelId, componentId).colorMap;
154
154
  }
155
155
 
156
- function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string): RGBAColor {
156
+ function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string): ColorRGBA {
157
157
  return storedConfig(modelId, componentId).no_data_color;
158
158
  }
159
159
 
@@ -213,7 +213,11 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
213
213
  return result;
214
214
  }
215
215
 
216
- async function setSize(modelId: ModelId, componentIds: string[], size: Size): Promise<unknown> {
216
+ async function setSize(
217
+ modelId: ModelId,
218
+ componentIds: string[],
219
+ size: PointSize,
220
+ ): Promise<unknown> {
217
221
  const result = await requestPoints(modelId, componentIds, schemas.size, {
218
222
  size,
219
223
  style: { size },
@@ -224,7 +228,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
224
228
  async function setColor(
225
229
  modelId: ModelId,
226
230
  componentIds: string[],
227
- color: RGBAColor,
231
+ color: ColorRGBA,
228
232
  ): Promise<unknown> {
229
233
  const result = await requestPoints(modelId, componentIds, schemas.color, {
230
234
  color,
@@ -339,7 +343,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
339
343
  async function setVertexAttributeNoDataColor(
340
344
  modelId: ModelId,
341
345
  componentIds: string[],
342
- no_data_color: RGBAColor,
346
+ no_data_color: ColorRGBA,
343
347
  ): Promise<unknown> {
344
348
  await mutateStoredConfig(modelId, componentIds, { no_data_color });
345
349
  const result = await applyVertexAttribute(modelId, componentIds);
@@ -1,5 +1,5 @@
1
1
  // Local imports
2
- import type { Size, Visibility } from "@ogw_front/types/style";
2
+ import type { PointSize, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  import type { ModelId } from "@ogw_front/types/identifiers";
4
4
  import { useModelPointsCommonStyle } from "./common";
5
5
  import { useModelPointsSizeStyle } from "./size";
@@ -31,7 +31,7 @@ export function useModelPointsStyle(): {
31
31
  ),
32
32
  whenDefined(
33
33
  // oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
34
- style.size as Size | undefined,
34
+ style.size as PointSize | undefined,
35
35
  async (size) => {
36
36
  const applied = await modelPointsSizeStyle.setModelPointsSize(modelId, size);
37
37
  return applied;
@@ -7,7 +7,7 @@ import {
7
7
  useModelComponentPointsStyle,
8
8
  } from "@ogw_internal/stores/data_style/model/points/component";
9
9
  import type { ModelId } from "@ogw_front/types/identifiers";
10
- import type { Size } from "@ogw_front/types/style";
10
+ import type { PointSize } from "@geode/opengeodeweb-viewer/schema_types";
11
11
  import { useModelPointsCommonStyle } from "./common";
12
12
  import { useViewerStore } from "@ogw_front/stores/viewer";
13
13
 
@@ -15,8 +15,8 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
15
15
  const schema = viewer_schemas.opengeodeweb_viewer.model.points.size;
16
16
 
17
17
  export function useModelPointsSizeStyle(): {
18
- modelPointsSize: (modelId: ModelId) => Size | undefined;
19
- setModelPointsSize: (modelId: ModelId, size: Size) => Promise<unknown>;
18
+ modelPointsSize: (modelId: ModelId) => PointSize | undefined;
19
+ setModelPointsSize: (modelId: ModelId, size: PointSize) => Promise<unknown>;
20
20
  } {
21
21
  const viewerStore = useViewerStore();
22
22
  const modelPointsCommonStyle = useModelPointsCommonStyle();
@@ -24,12 +24,12 @@ export function useModelPointsSizeStyle(): {
24
24
  useModelComponentPointsStyle(type),
25
25
  );
26
26
 
27
- function modelPointsSize(modelId: ModelId): Size | undefined {
27
+ function modelPointsSize(modelId: ModelId): PointSize | undefined {
28
28
  // oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
29
- return modelPointsCommonStyle.modelPointsStyle(modelId).size as Size | undefined;
29
+ return modelPointsCommonStyle.modelPointsStyle(modelId).size as PointSize | undefined;
30
30
  }
31
31
 
32
- async function setModelPointsSize(modelId: ModelId, size: Size): Promise<unknown> {
32
+ async function setModelPointsSize(modelId: ModelId, size: PointSize): Promise<unknown> {
33
33
  const params = { id: modelId, size };
34
34
  const result = await viewerStore.request(
35
35
  {
@@ -7,7 +7,7 @@ import {
7
7
  useModelComponentPointsStyle,
8
8
  } from "@ogw_internal/stores/data_style/model/points/component";
9
9
  import type { ModelId } from "@ogw_front/types/identifiers";
10
- import type { Visibility } from "@ogw_front/types/style";
10
+ import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
11
11
  import { useModelPointsCommonStyle } from "./common";
12
12
  import { useViewerStore } from "@ogw_front/stores/viewer";
13
13
 
@@ -1,5 +1,5 @@
1
1
  import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
2
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
2
+ import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
4
4
  import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
5
5
  import { useDataStore } from "@ogw_front/stores/data";
@@ -15,12 +15,12 @@ export function useModelSurfacesColor(): {
15
15
  setModelSurfacesColor: (
16
16
  modelId: ModelId,
17
17
  surfaces_ids: SurfaceId[],
18
- color: RGBAColor | undefined,
18
+ color: ColorRGBA | undefined,
19
19
  activeColoring?: string,
20
20
  collectionId?: string,
21
21
  ) => Promise<unknown>;
22
22
  modelSurfaceColoring: (modelId: ModelId, surface_id?: SurfaceId) => StyleValues;
23
- modelSurfaceColor: (modelId: ModelId, surface_id?: SurfaceId) => RGBAColor | undefined;
23
+ modelSurfaceColor: (modelId: ModelId, surface_id?: SurfaceId) => ColorRGBA | undefined;
24
24
  modelSurfaceActiveColoring: (modelId: ModelId, surface_id?: SurfaceId) => unknown;
25
25
  setModelSurfacesActiveColoring: (
26
26
  modelId: ModelId,
@@ -40,15 +40,15 @@ export function useModelSurfacesColor(): {
40
40
  return modelSurfacesCommonStyle.modelSurfaceStyle(modelId, surface_id).coloring as StyleValues;
41
41
  }
42
42
 
43
- function modelSurfaceColor(modelId: ModelId, surface_id?: SurfaceId): RGBAColor | undefined {
43
+ function modelSurfaceColor(modelId: ModelId, surface_id?: SurfaceId): ColorRGBA | undefined {
44
44
  // oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
45
- return modelSurfaceColoring(modelId, surface_id).constant as RGBAColor | undefined;
45
+ return modelSurfaceColoring(modelId, surface_id).constant as ColorRGBA | undefined;
46
46
  }
47
47
 
48
48
  async function setModelSurfacesColor(
49
49
  modelId: ModelId,
50
50
  surfaces_ids: SurfaceId[],
51
- color: RGBAColor | undefined,
51
+ color: ColorRGBA | undefined,
52
52
  activeColoring = "constant",
53
53
  collectionId?: string,
54
54
  ): Promise<unknown> {
@@ -1,9 +1,9 @@
1
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
1
+ import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
2
2
  import type { SurfaceId } from "@ogw_front/types/identifiers";
3
3
  import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
4
4
 
5
5
  interface ColorGroup {
6
- color: RGBAColor | undefined;
6
+ color: ColorRGBA | undefined;
7
7
  surfaces_ids: SurfaceId[];
8
8
  }
9
9
 
@@ -1,11 +1,7 @@
1
1
  // oxlint-disable eslint/max-lines
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
- AttributeRangeMaximum,
8
- AttributeRangeMinimum,
9
5
  AttributeTimeStep,
10
6
  } from "@ogw_front/types/attribute";
11
7
  import type {
@@ -14,8 +10,15 @@ import type {
14
10
  AttributeStoredConfig,
15
11
  ValidAttributeInput,
16
12
  } from "@ogw_internal/stores/data_style/attribute_types";
17
- import { DEFAULT_NO_DATA_COLOR, type RGBAColor } from "@ogw_front/utils/default_styles/constants";
13
+ import type {
14
+ AttributeItem,
15
+ AttributeName,
16
+ AttributeRangeMaximum,
17
+ AttributeRangeMinimum,
18
+ ColorRGBA,
19
+ } from "@geode/opengeodeweb-viewer/schema_types";
18
20
  import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
21
+ import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
19
22
  import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
20
23
  import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
21
24
  // Third party imports
@@ -87,11 +90,11 @@ interface UseModelSurfacesPolygonAttributeReturn {
87
90
  surfaceIds: SurfaceId[],
88
91
  colorMap: AttributeColorMap | undefined,
89
92
  ) => Promise<void>;
90
- modelSurfacesPolygonAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) => RGBAColor;
93
+ modelSurfacesPolygonAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) => ColorRGBA;
91
94
  setModelSurfacesPolygonAttributeNoDataColor: (
92
95
  modelId: ModelId,
93
96
  surfaceIds: SurfaceId[],
94
- no_data_color: RGBAColor,
97
+ no_data_color: ColorRGBA,
95
98
  ) => Promise<void>;
96
99
  }
97
100
 
@@ -187,7 +190,7 @@ function useModelSurfacesPolygonAttributeGetters(
187
190
  function modelSurfacesPolygonAttributeNoDataColor(
188
191
  modelId: ModelId,
189
192
  surfaceId?: SurfaceId,
190
- ): RGBAColor {
193
+ ): ColorRGBA {
191
194
  const name = modelSurfacesPolygonAttributeName(modelId, surfaceId);
192
195
  const item = modelSurfacesPolygonAttributeItem(modelId, surfaceId);
193
196
  const storedConfig = modelSurfacesPolygonAttributeStoredConfig(modelId, surfaceId, name, item);
@@ -401,7 +404,7 @@ function useModelSurfacesPolygonAttribute(): UseModelSurfacesPolygonAttributeRet
401
404
  async function setModelSurfacesPolygonAttributeNoDataColor(
402
405
  modelId: ModelId,
403
406
  surfaceIds: SurfaceId[],
404
- no_data_color: RGBAColor,
407
+ no_data_color: ColorRGBA,
405
408
  ): Promise<void> {
406
409
  const name = modelSurfacesPolygonAttributeName(modelId, surfaceIds[0]);
407
410
  const item = modelSurfacesPolygonAttributeItem(modelId, surfaceIds[0]);
@@ -1,11 +1,7 @@
1
1
  // oxlint-disable eslint/max-lines
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
- AttributeRangeMaximum,
8
- AttributeRangeMinimum,
9
5
  AttributeTimeStep,
10
6
  } from "@ogw_front/types/attribute";
11
7
  import type {
@@ -14,8 +10,15 @@ import type {
14
10
  AttributeStoredConfig,
15
11
  ValidAttributeInput,
16
12
  } from "@ogw_internal/stores/data_style/attribute_types";
17
- import { DEFAULT_NO_DATA_COLOR, type RGBAColor } from "@ogw_front/utils/default_styles/constants";
13
+ import type {
14
+ AttributeItem,
15
+ AttributeName,
16
+ AttributeRangeMaximum,
17
+ AttributeRangeMinimum,
18
+ ColorRGBA,
19
+ } from "@geode/opengeodeweb-viewer/schema_types";
18
20
  import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
21
+ import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
19
22
  import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
20
23
  import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
21
24
  // Third party imports
@@ -87,11 +90,11 @@ interface UseModelSurfacesVertexAttributeReturn {
87
90
  surfaceIds: SurfaceId[],
88
91
  colorMap: AttributeColorMap | undefined,
89
92
  ) => Promise<unknown>;
90
- modelSurfacesVertexAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) => RGBAColor;
93
+ modelSurfacesVertexAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) => ColorRGBA;
91
94
  setModelSurfacesVertexAttributeNoDataColor: (
92
95
  modelId: ModelId,
93
96
  surfaceIds: SurfaceId[],
94
- no_data_color: RGBAColor,
97
+ no_data_color: ColorRGBA,
95
98
  ) => Promise<unknown>;
96
99
  }
97
100
 
@@ -187,7 +190,7 @@ function useModelSurfacesVertexAttributeGetters(
187
190
  function modelSurfacesVertexAttributeNoDataColor(
188
191
  modelId: ModelId,
189
192
  surfaceId?: SurfaceId,
190
- ): RGBAColor {
193
+ ): ColorRGBA {
191
194
  const name = modelSurfacesVertexAttributeName(modelId, surfaceId);
192
195
  const item = modelSurfacesVertexAttributeItem(modelId, surfaceId);
193
196
  const storedConfig = modelSurfacesVertexAttributeStoredConfig(modelId, surfaceId, name, item);
@@ -407,7 +410,7 @@ function useModelSurfacesVertexAttribute(): UseModelSurfacesVertexAttributeRetur
407
410
  async function setModelSurfacesVertexAttributeNoDataColor(
408
411
  modelId: ModelId,
409
412
  surfaceIds: SurfaceId[],
410
- no_data_color: RGBAColor,
413
+ no_data_color: ColorRGBA,
411
414
  ): Promise<unknown> {
412
415
  const name = modelSurfacesVertexAttributeName(modelId, surfaceIds[0]);
413
416
  const item = modelSurfacesVertexAttributeItem(modelId, surfaceIds[0]);
@@ -1,5 +1,5 @@
1
1
  import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
2
- import type { Visibility } from "@ogw_front/types/style";
2
+ import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
4
4
  import { useModelSurfacesCommonStyle } from "./common";
5
5
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
@@ -1,7 +1,7 @@
1
1
  import { type ComponentStyleFunctions, dispatchToComponentTypes } from "./visibility_dispatch";
2
2
  import { MESH_COMPONENT_TYPES } from "@ogw_front/utils/default_styles";
3
3
  import type { ModelId } from "@ogw_front/types/identifiers";
4
- import type { Visibility } from "@ogw_front/types/style";
4
+ import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
5
5
  import { useDataStore } from "@ogw_front/stores/data";
6
6
  import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
7
7
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
@@ -1,11 +1,17 @@
1
1
  import type { SceneFontFamily, SceneOrientationWidget, SceneStyle } from "./types";
2
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
2
+ import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  // Third party imports
4
4
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
5
5
 
6
6
  // Local imports
7
+ import {
8
+ NO_VIEWER_MARKER,
9
+ viewerOrientationMarker,
10
+ } from "@ogw_front/composables/orientation_overlay";
11
+ import { consola } from "consola";
7
12
  import { getDefaultSceneStyle } from "@ogw_front/utils/default_styles";
8
13
  import { getTable } from "@ogw_internal/database/database";
14
+ import { toViewerColor } from "@ogw_front/composables/viewer_reset";
9
15
  import { useDataStyleState } from "./state";
10
16
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
11
17
  import { useViewerStore } from "@ogw_front/stores/viewer";
@@ -14,16 +20,10 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
14
20
  const text_style_schema = viewer_schemas.opengeodeweb_viewer.viewer.set_text_style;
15
21
  const orientation_widget_schema = viewer_schemas.opengeodeweb_viewer.viewer.set_orientation_widget;
16
22
 
17
- // oxlint-disable-next-line id-length -- the viewer schema requires { r, g, b }
18
- function toViewerColor(color: RGBAColor): { r: number; g: number; b: number } {
19
- // oxlint-disable-next-line id-length -- the viewer schema requires { r, g, b }
20
- return { r: color.red, g: color.green, b: color.blue };
21
- }
22
-
23
23
  // oxlint-disable-next-line max-lines-per-function
24
24
  export function useSceneStyle(): {
25
- setSceneBackgroundColor: (color: RGBAColor) => Promise<void>;
26
- setSceneTextColor: (color: RGBAColor) => Promise<unknown>;
25
+ setSceneBackgroundColor: (color: ColorRGBA) => Promise<void>;
26
+ setSceneTextColor: (color: ColorRGBA) => Promise<unknown>;
27
27
  setSceneFontFamily: (font_family: SceneFontFamily) => Promise<unknown>;
28
28
  setSceneOrientationWidget: (marker: SceneOrientationWidget) => Promise<unknown>;
29
29
  applySceneStyle: () => Promise<void>;
@@ -62,23 +62,35 @@ export function useSceneStyle(): {
62
62
  }
63
63
 
64
64
  async function requestOrientationWidget(marker: SceneOrientationWidget): Promise<unknown> {
65
- const result = await viewerStore.request(
66
- { schema: orientation_widget_schema, params: { marker } },
67
- {
68
- response_function: async () => {
69
- await saveSceneStyle({ orientation_widget: marker });
65
+ // With the front overlay, the viewer hides its marker while the scene style keeps the choice
66
+ const viewerMarker = viewerOrientationMarker(marker);
67
+ try {
68
+ const result = await viewerStore.request(
69
+ { schema: orientation_widget_schema, params: { marker: viewerMarker } },
70
+ {
71
+ response_function: async () => {
72
+ await saveSceneStyle({ orientation_widget: marker });
73
+ },
70
74
  },
71
- },
72
- );
73
- return result;
75
+ );
76
+ return result;
77
+ } catch (error) {
78
+ if (viewerMarker !== NO_VIEWER_MARKER) {
79
+ throw error;
80
+ }
81
+ // A viewer without the "none" marker keeps its own: the overlay still follows the user's choice
82
+ consola.warn("[OrientationOverlay] The viewer kept its orientation marker:", error);
83
+ await saveSceneStyle({ orientation_widget: marker });
84
+ return undefined;
85
+ }
74
86
  }
75
87
 
76
- async function setSceneBackgroundColor(color: RGBAColor): Promise<void> {
88
+ async function setSceneBackgroundColor(color: ColorRGBA): Promise<void> {
77
89
  await hybridViewerStore.setBackgroundColor(toViewerColor(color));
78
90
  await saveSceneStyle({ background_color: color });
79
91
  }
80
92
 
81
- async function setSceneTextColor(color: RGBAColor): Promise<unknown> {
93
+ async function setSceneTextColor(color: ColorRGBA): Promise<unknown> {
82
94
  const result = await requestTextStyle({ ...sceneStyle.value.text, color });
83
95
  return result;
84
96
  }
@@ -1,5 +1,6 @@
1
- import type { AttributeName, AttributeTimeStep } from "@ogw_front/types/attribute";
2
- import type { DataId } from "@ogw_front/types/identifiers";
1
+ import type { AttributeName } from "@geode/opengeodeweb-viewer/schema_types";
2
+ import type { AttributeTimeStep } from "@ogw_front/types/attribute";
3
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
3
4
  import { attributeArrayName } from "@ogw_front/utils/attributes";
4
5
  import { useDataStyleState } from "./state";
5
6
 
@@ -1,6 +1,5 @@
1
+ import type { ColorRGBA, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
1
2
  import type { DataIdentified } from "@ogw_front/types/identifiers";
2
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
3
- import type { Visibility } from "@ogw_front/types/style";
4
3
 
5
4
  type StyleValues = Record<string, unknown>;
6
5
 
@@ -36,9 +35,9 @@ type SceneOrientationWidget = "axes" | "compass";
36
35
 
37
36
  interface SceneStyle {
38
37
  id: "scene";
39
- background_color: RGBAColor;
38
+ background_color: ColorRGBA;
40
39
  text: {
41
- color: RGBAColor;
40
+ color: ColorRGBA;
42
41
  font_family: SceneFontFamily;
43
42
  };
44
43
  orientation_widget: SceneOrientationWidget;