@jupytergis/base 0.15.0 → 0.16.0-alpha.1

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 (414) hide show
  1. package/lib/commands/BaseCommandIDs.d.ts +5 -0
  2. package/lib/commands/BaseCommandIDs.js +5 -0
  3. package/lib/commands/index.js +218 -48
  4. package/lib/commands/operationCommands.js +2 -2
  5. package/lib/constants.js +9 -1
  6. package/lib/{panelview/annotationPanel.js → features/annotations/AnnotationsPanel.js} +1 -1
  7. package/lib/{annotations → features/annotations}/index.d.ts +1 -0
  8. package/lib/{annotations → features/annotations}/index.js +1 -0
  9. package/lib/{console → features/console}/consoleview.js +1 -1
  10. package/lib/{panelview/filter-panel → features/filter}/Filter.js +4 -4
  11. package/lib/{panelview/filter-panel → features/filter}/FilterRow.d.ts +3 -2
  12. package/lib/{panelview/filter-panel → features/filter}/FilterRow.js +2 -1
  13. package/lib/{panelview/identify-panel → features/identify}/IdentifyPanel.d.ts +2 -0
  14. package/lib/features/identify/IdentifyPanel.js +102 -0
  15. package/lib/features/identify/components/FeatureCard.d.ts +17 -0
  16. package/lib/features/identify/components/FeatureCard.js +26 -0
  17. package/lib/features/identify/components/FeatureCardHeader.d.ts +11 -0
  18. package/lib/features/identify/components/FeatureCardHeader.js +30 -0
  19. package/lib/features/identify/components/FeatureFloater.d.ts +7 -0
  20. package/lib/features/identify/components/FeatureFloater.js +19 -0
  21. package/lib/features/identify/components/FeaturePropertyList.d.ts +11 -0
  22. package/lib/features/identify/components/FeaturePropertyList.js +18 -0
  23. package/lib/features/identify/components/FeatureRow.d.ts +13 -0
  24. package/lib/features/identify/components/FeatureRow.js +25 -0
  25. package/lib/features/identify/components/PropertyEditors.d.ts +44 -0
  26. package/lib/features/identify/components/PropertyEditors.js +56 -0
  27. package/lib/features/identify/hooks/useIdentifyPropertyEditor.d.ts +11 -0
  28. package/lib/features/identify/hooks/useIdentifyPropertyEditor.js +132 -0
  29. package/lib/features/identify/types/editorTypes.d.ts +21 -0
  30. package/lib/features/identify/utils/getFeatureIdentifier.d.ts +5 -0
  31. package/lib/features/identify/utils/getFeatureIdentifier.js +14 -0
  32. package/lib/features/identify/utils/highlightLayer.d.ts +11 -0
  33. package/lib/features/identify/utils/highlightLayer.js +57 -0
  34. package/lib/features/identify/utils/highlightStyle.d.ts +7 -0
  35. package/lib/features/identify/utils/highlightStyle.js +40 -0
  36. package/lib/{dialogs/layerBrowserDialog.js → features/layer-browser/index.js} +2 -2
  37. package/lib/{formbuilder/objectform/layer/heatmapLayerForm.d.ts → features/layers/forms/layer/geoTiffLayerForm.d.ts} +1 -1
  38. package/lib/{formbuilder/objectform/layer/webGlLayerForm.js → features/layers/forms/layer/geoTiffLayerForm.js} +5 -5
  39. package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.js +4 -4
  40. package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.d.ts +1 -2
  41. package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.js +1 -2
  42. package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.d.ts +1 -1
  43. package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.js +4 -4
  44. package/lib/features/layers/forms/layer/storySegmentLayerForm.js +150 -0
  45. package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.js +4 -4
  46. package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.js +5 -5
  47. package/lib/features/layers/forms/source/geopackagesource.d.ts +3 -0
  48. package/lib/features/layers/forms/source/geopackagesource.js +93 -0
  49. package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.js +5 -5
  50. package/lib/{formbuilder/objectform → features/layers/forms}/source/index.d.ts +1 -0
  51. package/lib/{formbuilder/objectform → features/layers/forms}/source/index.js +1 -0
  52. package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.js +5 -5
  53. package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.d.ts +1 -1
  54. package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.js +4 -4
  55. package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.js +4 -4
  56. package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.d.ts +1 -1
  57. package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.js +6 -6
  58. package/lib/{dialogs → features/layers}/layerCreationFormDialog.d.ts +1 -1
  59. package/lib/{dialogs → features/layers}/layerCreationFormDialog.js +1 -1
  60. package/lib/features/layers/symbology/Grammar.d.ts +11 -0
  61. package/lib/features/layers/symbology/Grammar.js +316 -0
  62. package/lib/{dialogs → features/layers}/symbology/classificationModes.d.ts +6 -6
  63. package/lib/{dialogs → features/layers}/symbology/classificationModes.js +48 -44
  64. package/lib/{dialogs → features/layers}/symbology/colorRampUtils.d.ts +1 -0
  65. package/lib/{dialogs → features/layers}/symbology/colorRampUtils.js +12 -1
  66. package/lib/features/layers/symbology/components/MappingRow.d.ts +40 -0
  67. package/lib/features/layers/symbology/components/MappingRow.js +520 -0
  68. package/lib/features/layers/symbology/components/NumericInput.d.ts +20 -0
  69. package/lib/features/layers/symbology/components/NumericInput.js +44 -0
  70. package/lib/features/layers/symbology/components/ScaleEditor.d.ts +33 -0
  71. package/lib/features/layers/symbology/components/ScaleEditor.js +221 -0
  72. package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.d.ts +1 -1
  73. package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.js +4 -3
  74. package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.d.ts +2 -1
  75. package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.js +6 -1
  76. package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
  77. package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.js +39 -9
  78. package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.js +1 -1
  79. package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.d.ts +1 -1
  80. package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.js +14 -2
  81. package/lib/features/layers/symbology/grammarToOLLayer.d.ts +27 -0
  82. package/lib/features/layers/symbology/grammarToOLLayer.js +145 -0
  83. package/lib/features/layers/symbology/grammarToOLStyle.d.ts +32 -0
  84. package/lib/features/layers/symbology/grammarToOLStyle.js +487 -0
  85. package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.d.ts +1 -1
  86. package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.js +1 -1
  87. package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.js +1 -1
  88. package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.js +4 -2
  89. package/lib/features/layers/symbology/styleBuilder.d.ts +24 -0
  90. package/lib/features/layers/symbology/styleBuilder.js +158 -0
  91. package/lib/{dialogs → features/layers}/symbology/symbologyDialog.d.ts +1 -1
  92. package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +11 -13
  93. package/lib/{dialogs → features/layers}/symbology/symbologyUtils.d.ts +18 -10
  94. package/lib/{dialogs → features/layers}/symbology/symbologyUtils.js +0 -84
  95. package/lib/{panelview/objectproperties.d.ts → features/objectproperties/index.d.ts} +1 -1
  96. package/lib/{panelview/objectproperties.js → features/objectproperties/index.js} +5 -10
  97. package/lib/{dialogs → features/processing}/ProcessingFormDialog.d.ts +1 -1
  98. package/lib/{dialogs → features/processing}/ProcessingFormDialog.js +28 -14
  99. package/lib/features/processing/forms/MapExtentToggle.d.ts +13 -0
  100. package/lib/features/processing/forms/MapExtentToggle.js +20 -0
  101. package/lib/features/processing/forms/clipRasterByExtentForm.d.ts +10 -0
  102. package/lib/features/processing/forms/clipRasterByExtentForm.js +99 -0
  103. package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.js +5 -5
  104. package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.d.ts +1 -1
  105. package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.js +6 -6
  106. package/lib/features/processing/forms/rasterizeForm.d.ts +10 -0
  107. package/lib/features/processing/forms/rasterizeForm.js +75 -0
  108. package/lib/features/processing/forms/useMapExtent.d.ts +22 -0
  109. package/lib/features/processing/forms/useMapExtent.js +57 -0
  110. package/lib/{processing → features/processing}/index.d.ts +19 -2
  111. package/lib/features/processing/index.js +1246 -0
  112. package/lib/{processing → features/processing}/processingCommands.d.ts +1 -1
  113. package/lib/features/processing/processingCommands.js +168 -0
  114. package/lib/features/processing/serverProcessing.d.ts +51 -0
  115. package/lib/features/processing/serverProcessing.js +99 -0
  116. package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.js +2 -2
  117. package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.js +5 -5
  118. package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.js +1 -1
  119. package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.js +2 -2
  120. package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.js +1 -1
  121. package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.js +3 -3
  122. package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.js +3 -3
  123. package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.js +1 -1
  124. package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.js +1 -1
  125. package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.js +2 -2
  126. package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.js +2 -2
  127. package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.js +3 -3
  128. package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.js +1 -1
  129. package/lib/features/stac-browser/types/types.js +1 -0
  130. package/lib/{panelview/story-maps → features/story}/SpectaPanel.d.ts +4 -1
  131. package/lib/{panelview/story-maps → features/story}/SpectaPanel.js +3 -4
  132. package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.js +1 -1
  133. package/lib/{panelview/story-maps → features/story}/StoryViewerPanel.d.ts +12 -11
  134. package/lib/features/story/StoryViewerPanel.js +64 -0
  135. package/lib/features/story/__tests__/fixtures/listStoryTestItems.d.ts +9 -0
  136. package/lib/features/story/__tests__/fixtures/listStoryTestItems.js +21 -0
  137. package/lib/features/story/components/ListStoryMapOverlayPanel.d.ts +10 -0
  138. package/lib/features/story/components/ListStoryMapOverlayPanel.js +11 -0
  139. package/lib/features/story/components/ListStoryMarkdownMeasurePane.d.ts +11 -0
  140. package/lib/features/story/components/ListStoryMarkdownMeasurePane.js +55 -0
  141. package/lib/features/story/components/ListStoryOverlayMarkdown.d.ts +15 -0
  142. package/lib/features/story/components/ListStoryOverlayMarkdown.js +93 -0
  143. package/lib/features/story/components/ListStoryStageOverlay.d.ts +11 -0
  144. package/lib/features/story/components/ListStoryStageOverlay.js +150 -0
  145. package/lib/features/story/components/ListStoryTitleBar.d.ts +7 -0
  146. package/lib/features/story/components/ListStoryTitleBar.js +20 -0
  147. package/lib/features/story/components/ListStoryTitleBarDesktop.d.ts +2 -0
  148. package/lib/features/story/components/ListStoryTitleBarDesktop.js +55 -0
  149. package/lib/features/story/components/ListStoryTitleBarMobile.d.ts +2 -0
  150. package/lib/features/story/components/ListStoryTitleBarMobile.js +41 -0
  151. package/lib/features/story/components/ListStoryVirtualScrollTrack.d.ts +6 -0
  152. package/lib/features/story/components/ListStoryVirtualScrollTrack.js +7 -0
  153. package/lib/{panelview/story-maps → features/story}/components/SpectaDesktopView.d.ts +4 -2
  154. package/lib/features/story/components/SpectaDesktopView.js +67 -0
  155. package/lib/features/story/components/SpectaMobileListModeContent.d.ts +13 -0
  156. package/lib/features/story/components/SpectaMobileListModeContent.js +36 -0
  157. package/lib/features/story/components/SpectaMobileSingleModeContent.d.ts +14 -0
  158. package/lib/{panelview/story-maps/components/SpectaMobileView.js → features/story/components/SpectaMobileSingleModeContent.js} +4 -6
  159. package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.d.ts +5 -3
  160. package/lib/features/story/components/SpectaMobileView.js +12 -0
  161. package/lib/features/story/components/SpectaSingleModeContent.d.ts +18 -0
  162. package/lib/features/story/components/SpectaSingleModeContent.js +8 -0
  163. package/lib/features/story/context/ListStoryScrollTrackContext.d.ts +19 -0
  164. package/lib/features/story/context/ListStoryScrollTrackContext.js +186 -0
  165. package/lib/features/story/hooks/useCurrentSegmentIndex.d.ts +3 -0
  166. package/lib/features/story/hooks/useCurrentSegmentIndex.js +17 -0
  167. package/lib/features/story/hooks/useListStoryScroll.d.ts +15 -0
  168. package/lib/features/story/hooks/useListStoryScroll.js +107 -0
  169. package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.d.ts +19 -0
  170. package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.js +56 -0
  171. package/lib/features/story/hooks/useStoryImagePreload.d.ts +1 -0
  172. package/lib/features/story/hooks/useStoryImagePreload.js +24 -0
  173. package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.d.ts +2 -7
  174. package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.js +21 -60
  175. package/lib/features/story/hooks/useStoryScrollState.d.ts +21 -0
  176. package/lib/features/story/hooks/useStoryScrollState.js +39 -0
  177. package/lib/features/story/hooks/useStorySegmentSync.d.ts +8 -0
  178. package/lib/features/story/hooks/useStorySegmentSync.js +51 -0
  179. package/lib/features/story/types/types.d.ts +43 -0
  180. package/lib/features/story/types/types.js +1 -0
  181. package/lib/features/story/utils/computeListStoryScrollState.d.ts +14 -0
  182. package/lib/features/story/utils/computeListStoryScrollState.js +79 -0
  183. package/lib/features/story/utils/listStoryMeasureQueue.d.ts +11 -0
  184. package/lib/features/story/utils/listStoryMeasureQueue.js +14 -0
  185. package/lib/features/story/utils/listStoryScrollTrack.d.ts +17 -0
  186. package/lib/features/story/utils/listStoryScrollTrack.js +72 -0
  187. package/lib/features/story/utils/spectaPresentation.d.ts +9 -0
  188. package/lib/features/story/utils/spectaPresentation.js +37 -0
  189. package/lib/features/story/utils/storySegmentViewItems.d.ts +5 -0
  190. package/lib/features/story/utils/storySegmentViewItems.js +30 -0
  191. package/lib/index.d.ts +11 -9
  192. package/lib/index.js +11 -9
  193. package/lib/keybindings.json +5 -0
  194. package/lib/mainview/OpenEOTileLayer.d.ts +49 -0
  195. package/lib/mainview/OpenEOTileLayer.js +179 -0
  196. package/lib/mainview/TemporalSlider.js +11 -9
  197. package/lib/mainview/components/MainViewMapSurface.d.ts +15 -0
  198. package/lib/mainview/components/MainViewMapSurface.js +13 -0
  199. package/lib/mainview/components/MainViewOverlayLayer.d.ts +9 -0
  200. package/lib/mainview/components/MainViewOverlayLayer.js +11 -0
  201. package/lib/mainview/components/MainViewSidePanels.d.ts +17 -0
  202. package/lib/mainview/components/MainViewSidePanels.js +10 -0
  203. package/lib/mainview/components/MainViewSpectaPanel.d.ts +17 -0
  204. package/lib/mainview/components/MainViewSpectaPanel.js +8 -0
  205. package/lib/mainview/components/MainViewStoryStage.d.ts +13 -0
  206. package/lib/mainview/components/MainViewStoryStage.js +17 -0
  207. package/lib/mainview/components/PositionedFloater.d.ts +10 -0
  208. package/lib/mainview/components/PositionedFloater.js +7 -0
  209. package/lib/mainview/geoJsonFeaturePatch.d.ts +9 -0
  210. package/lib/mainview/geoJsonFeaturePatch.js +43 -0
  211. package/lib/mainview/mainView.d.ts +93 -14
  212. package/lib/mainview/mainView.js +1216 -686
  213. package/lib/mainview/mainviewwidget.d.ts +5 -1
  214. package/lib/mainview/mainviewwidget.js +4 -2
  215. package/lib/shared/components/Button.d.ts +1 -1
  216. package/lib/shared/components/DropdownMenu.d.ts +1 -0
  217. package/lib/shared/components/DropdownMenu.js +3 -2
  218. package/lib/shared/components/NativeSelect.d.ts +8 -0
  219. package/lib/shared/components/NativeSelect.js +29 -0
  220. package/lib/shared/components/Tabs.d.ts +3 -3
  221. package/lib/shared/components/Tabs.js +5 -5
  222. package/lib/{formbuilder → shared/formbuilder}/creationform.js +71 -4
  223. package/lib/{formbuilder → shared/formbuilder}/editform.js +1 -1
  224. package/lib/{formbuilder → shared/formbuilder}/formselectors.d.ts +2 -2
  225. package/lib/{formbuilder → shared/formbuilder}/formselectors.js +10 -7
  226. package/lib/shared/formbuilder/index.d.ts +4 -0
  227. package/lib/shared/formbuilder/index.js +4 -0
  228. package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.d.ts +1 -1
  229. package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.d.ts +1 -1
  230. package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.js +1 -1
  231. package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.js +1 -1
  232. package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.js +4 -4
  233. package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.js +1 -1
  234. package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.js +1 -1
  235. package/lib/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.js +4 -4
  236. package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.js +8 -1
  237. package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.d.ts +3 -1
  238. package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.js +11 -0
  239. package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.d.ts +1 -1
  240. package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.js +1 -1
  241. package/lib/{icons.d.ts → shared/icons.d.ts} +2 -0
  242. package/lib/{icons.js → shared/icons.js} +28 -18
  243. package/lib/tools.d.ts +2 -0
  244. package/lib/tools.js +138 -4
  245. package/lib/types.d.ts +6 -1
  246. package/lib/types.js +6 -2
  247. package/lib/{menus.js → workspace/menus.js} +10 -2
  248. package/lib/workspace/panels/components/TabbedPanel.d.ts +17 -0
  249. package/lib/workspace/panels/components/TabbedPanel.js +19 -0
  250. package/lib/{panelview → workspace/panels}/components/layers.js +63 -18
  251. package/lib/workspace/panels/components/legendItem.js +680 -0
  252. package/lib/workspace/panels/hooks/useLayerTree.d.ts +19 -0
  253. package/lib/workspace/panels/hooks/useLayerTree.js +103 -0
  254. package/lib/workspace/panels/hooks/useRightPanelOptions.d.ts +27 -0
  255. package/lib/workspace/panels/hooks/useRightPanelOptions.js +72 -0
  256. package/lib/workspace/panels/hooks/useUIState.d.ts +2 -0
  257. package/lib/workspace/panels/hooks/useUIState.js +25 -0
  258. package/lib/{panelview → workspace/panels}/index.d.ts +1 -1
  259. package/lib/{panelview → workspace/panels}/index.js +1 -1
  260. package/lib/{panelview → workspace/panels}/leftpanel.d.ts +1 -1
  261. package/lib/workspace/panels/leftpanel.js +70 -0
  262. package/lib/{panelview/rightpanel.d.ts → workspace/panels/mergedpanel.d.ts} +6 -5
  263. package/lib/workspace/panels/mergedpanel.js +166 -0
  264. package/lib/workspace/panels/rightpanel.d.ts +25 -0
  265. package/lib/{panelview → workspace/panels}/rightpanel.js +53 -63
  266. package/lib/{statusbar → workspace/statusbar}/StatusBar.js +5 -4
  267. package/lib/{toolbar → workspace/toolbar}/widget.d.ts +2 -0
  268. package/lib/{toolbar → workspace/toolbar}/widget.js +33 -5
  269. package/lib/{widget.d.ts → workspace/widget.d.ts} +7 -5
  270. package/lib/{widget.js → workspace/widget.js} +16 -7
  271. package/package.json +16 -4
  272. package/style/base.css +124 -2
  273. package/style/icons/geopackage.svg +95 -0
  274. package/style/icons/pencil_solid.svg +7 -0
  275. package/style/identify.css +95 -0
  276. package/style/layerBrowser.css +29 -1
  277. package/style/leftPanel.css +25 -0
  278. package/style/shared/button.css +12 -0
  279. package/style/shared/dropdownMenu.css +9 -0
  280. package/style/shared/nativeSelect.css +75 -0
  281. package/style/shared/tabs.css +1 -1
  282. package/style/spectaProgressBar.css +0 -1
  283. package/style/storyPanel.css +330 -9
  284. package/style/storySpectaArticleOverlay.css +129 -0
  285. package/style/symbologyDialog.css +522 -27
  286. package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +0 -4
  287. package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +0 -42
  288. package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +0 -23
  289. package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +0 -59
  290. package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +0 -4
  291. package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +0 -92
  292. package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +0 -5
  293. package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +0 -313
  294. package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +0 -4
  295. package/lib/dialogs/symbology/vector_layer/VectorRendering.js +0 -112
  296. package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +0 -8
  297. package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +0 -9
  298. package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +0 -4
  299. package/lib/dialogs/symbology/vector_layer/types/Canonical.js +0 -130
  300. package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +0 -4
  301. package/lib/dialogs/symbology/vector_layer/types/Categorized.js +0 -243
  302. package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +0 -4
  303. package/lib/dialogs/symbology/vector_layer/types/Graduated.js +0 -362
  304. package/lib/dialogs/symbology/vector_layer/types/Heatmap.d.ts +0 -4
  305. package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +0 -89
  306. package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +0 -4
  307. package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +0 -120
  308. package/lib/formbuilder/index.d.ts +0 -4
  309. package/lib/formbuilder/index.js +0 -4
  310. package/lib/formbuilder/objectform/layer/heatmapLayerForm.js +0 -96
  311. package/lib/formbuilder/objectform/layer/storySegmentLayerForm.js +0 -95
  312. package/lib/formbuilder/objectform/layer/webGlLayerForm.d.ts +0 -3
  313. package/lib/formbuilder/objectform/process/index.d.ts +0 -1
  314. package/lib/formbuilder/objectform/process/index.js +0 -1
  315. package/lib/panelview/components/legendItem.js +0 -210
  316. package/lib/panelview/identify-panel/IdentifyPanel.js +0 -102
  317. package/lib/panelview/leftpanel.js +0 -139
  318. package/lib/panelview/story-maps/StoryViewerPanel.js +0 -116
  319. package/lib/panelview/story-maps/components/SpectaDesktopView.js +0 -49
  320. package/lib/processing/index.js +0 -200
  321. package/lib/processing/processingCommands.js +0 -67
  322. /package/lib/{panelview/annotationPanel.d.ts → features/annotations/AnnotationsPanel.d.ts} +0 -0
  323. /package/lib/{annotations → features/annotations}/components/Annotation.d.ts +0 -0
  324. /package/lib/{annotations → features/annotations}/components/Annotation.js +0 -0
  325. /package/lib/{annotations → features/annotations}/components/AnnotationFloater.d.ts +0 -0
  326. /package/lib/{annotations → features/annotations}/components/AnnotationFloater.js +0 -0
  327. /package/lib/{annotations → features/annotations}/components/Message.d.ts +0 -0
  328. /package/lib/{annotations → features/annotations}/components/Message.js +0 -0
  329. /package/lib/{annotations → features/annotations}/model.d.ts +0 -0
  330. /package/lib/{annotations → features/annotations}/model.js +0 -0
  331. /package/lib/{console → features/console}/consoleview.d.ts +0 -0
  332. /package/lib/{console → features/console}/index.d.ts +0 -0
  333. /package/lib/{console → features/console}/index.js +0 -0
  334. /package/lib/{panelview/filter-panel → features/filter}/Filter.d.ts +0 -0
  335. /package/lib/{stacBrowser/types/types.js → features/identify/types/editorTypes.js} +0 -0
  336. /package/lib/{dialogs/layerBrowserDialog.d.ts → features/layer-browser/index.d.ts} +0 -0
  337. /package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.d.ts +0 -0
  338. /package/lib/{formbuilder/objectform → features/layers/forms}/layer/storySegmentLayerForm.d.ts +0 -0
  339. /package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.d.ts +0 -0
  340. /package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.d.ts +0 -0
  341. /package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.d.ts +0 -0
  342. /package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.d.ts +0 -0
  343. /package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.d.ts +0 -0
  344. /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.d.ts +0 -0
  345. /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js +0 -0
  346. /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.js +0 -0
  347. /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.d.ts +0 -0
  348. /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/cmocean.json +0 -0
  349. /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.d.ts +0 -0
  350. /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.d.ts +0 -0
  351. /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.js +0 -0
  352. /package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.d.ts +0 -0
  353. /package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.d.ts +0 -0
  354. /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.d.ts +0 -0
  355. /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.js +0 -0
  356. /package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.d.ts +0 -0
  357. /package/lib/{processing → features/processing}/processingFormToParam.d.ts +0 -0
  358. /package/lib/{processing → features/processing}/processingFormToParam.js +0 -0
  359. /package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.d.ts +0 -0
  360. /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.d.ts +0 -0
  361. /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.d.ts +0 -0
  362. /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.d.ts +0 -0
  363. /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.d.ts +0 -0
  364. /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.d.ts +0 -0
  365. /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.d.ts +0 -0
  366. /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.js +0 -0
  367. /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.d.ts +0 -0
  368. /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.d.ts +0 -0
  369. /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.d.ts +0 -0
  370. /package/lib/{stacBrowser → features/stac-browser}/constants.d.ts +0 -0
  371. /package/lib/{stacBrowser → features/stac-browser}/constants.js +0 -0
  372. /package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.d.ts +0 -0
  373. /package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.d.ts +0 -0
  374. /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.d.ts +0 -0
  375. /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.d.ts +0 -0
  376. /package/lib/{stacBrowser → features/stac-browser}/index.d.ts +0 -0
  377. /package/lib/{stacBrowser → features/stac-browser}/index.js +0 -0
  378. /package/lib/{stacBrowser → features/stac-browser}/types/types.d.ts +0 -0
  379. /package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.d.ts +0 -0
  380. /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.d.ts +0 -0
  381. /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.js +0 -0
  382. /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.d.ts +0 -0
  383. /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.js +0 -0
  384. /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.d.ts +0 -0
  385. /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.js +0 -0
  386. /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.d.ts +0 -0
  387. /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.js +0 -0
  388. /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.d.ts +0 -0
  389. /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.js +0 -0
  390. /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.d.ts +0 -0
  391. /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.js +0 -0
  392. /package/lib/{formbuilder → shared/formbuilder}/creationform.d.ts +0 -0
  393. /package/lib/{formbuilder → shared/formbuilder}/editform.d.ts +0 -0
  394. /package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.js +0 -0
  395. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.d.ts +0 -0
  396. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.d.ts +0 -0
  397. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.js +0 -0
  398. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.d.ts +0 -0
  399. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.d.ts +0 -0
  400. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.d.ts +0 -0
  401. /package/lib/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.d.ts +0 -0
  402. /package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.d.ts +0 -0
  403. /package/lib/{store.d.ts → shared/store.d.ts} +0 -0
  404. /package/lib/{store.js → shared/store.js} +0 -0
  405. /package/lib/{menus.d.ts → workspace/menus.d.ts} +0 -0
  406. /package/lib/{panelview → workspace/panels}/components/layers.d.ts +0 -0
  407. /package/lib/{panelview → workspace/panels}/components/legendItem.d.ts +0 -0
  408. /package/lib/{panelview → workspace/panels}/header.d.ts +0 -0
  409. /package/lib/{panelview → workspace/panels}/header.js +0 -0
  410. /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.d.ts +0 -0
  411. /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.js +0 -0
  412. /package/lib/{statusbar → workspace/statusbar}/StatusBar.d.ts +0 -0
  413. /package/lib/{toolbar → workspace/toolbar}/index.d.ts +0 -0
  414. /package/lib/{toolbar → workspace/toolbar}/index.js +0 -0
@@ -0,0 +1,99 @@
1
+ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
+ import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
3
+ import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
4
+ import { MapExtentToggle } from './MapExtentToggle';
5
+ import { useMapExtent } from './useMapExtent';
6
+ export function ClipRasterByExtentForm(props) {
7
+ const { schema: schemaProp, sourceData, syncData, model, filePath, ok, } = props;
8
+ const { formData, setFormData, schema, hasSchema } = useSchemaFormState({
9
+ sourceData,
10
+ schemaProp,
11
+ model,
12
+ });
13
+ const submitButtonRef = useRef(null);
14
+ const { isActive: mapExtentActive, extentRef, toggle } = useMapExtent(model);
15
+ useEffect(() => {
16
+ if (!ok) {
17
+ return;
18
+ }
19
+ const handler = () => { var _a; return (_a = submitButtonRef.current) === null || _a === void 0 ? void 0 : _a.click(); };
20
+ ok.connect(handler);
21
+ return () => {
22
+ ok.disconnect(handler);
23
+ };
24
+ }, [ok]);
25
+ const formContextValue = useMemo(() => ({ model, formData }), [model, formData]);
26
+ // Schema for the top section: inputLayer only
27
+ const schemaTop = useMemo(() => {
28
+ var _a;
29
+ return ((_a = schema === null || schema === void 0 ? void 0 : schema.properties) === null || _a === void 0 ? void 0 : _a.inputLayer)
30
+ ? {
31
+ type: 'object',
32
+ properties: { inputLayer: schema.properties.inputLayer },
33
+ required: [],
34
+ additionalProperties: false,
35
+ }
36
+ : null;
37
+ }, [schema]);
38
+ // Schema for the extent section: xMin/yMin/xMax/yMax
39
+ // Required only when the user is entering them manually
40
+ const schemaExtent = useMemo(() => (schema === null || schema === void 0 ? void 0 : schema.properties)
41
+ ? {
42
+ type: 'object',
43
+ properties: {
44
+ xMin: schema.properties.xMin,
45
+ yMin: schema.properties.yMin,
46
+ xMax: schema.properties.xMax,
47
+ yMax: schema.properties.yMax,
48
+ },
49
+ required: mapExtentActive
50
+ ? []
51
+ : ['xMin', 'yMin', 'xMax', 'yMax'],
52
+ additionalProperties: false,
53
+ }
54
+ : null, [schema, mapExtentActive]);
55
+ // Schema for the bottom section: output options
56
+ const schemaBottom = useMemo(() => (schema === null || schema === void 0 ? void 0 : schema.properties)
57
+ ? {
58
+ type: 'object',
59
+ properties: {
60
+ outputFileName: schema.properties.outputFileName,
61
+ embedOutputLayer: schema.properties.embedOutputLayer,
62
+ },
63
+ required: [],
64
+ additionalProperties: false,
65
+ }
66
+ : null, [schema]);
67
+ const handleTopChange = useCallback((data) => setFormData(prev => (Object.assign(Object.assign({}, prev), data))), [setFormData]);
68
+ const handleExtentChange = useCallback((data) => {
69
+ // When using map extent, rjsf may strip disabled-looking fields on some
70
+ // browsers; always restore the cached extent values to be safe.
71
+ setFormData(prev => (Object.assign(Object.assign(Object.assign({}, prev), data), (mapExtentActive ? extentRef.current : {}))));
72
+ }, [setFormData, mapExtentActive, extentRef]);
73
+ const handleBottomChange = useCallback((data) => setFormData(prev => (Object.assign(Object.assign({}, prev), data))), [setFormData]);
74
+ const handleSubmit = useCallback((data) => {
75
+ syncData === null || syncData === void 0 ? void 0 : syncData(Object.assign(Object.assign({}, formData), data));
76
+ }, [syncData, formData]);
77
+ const handleCheckboxChange = useCallback((e) => {
78
+ const extent = toggle(e.target.checked);
79
+ if (extent) {
80
+ setFormData(prev => (Object.assign(Object.assign({}, prev), extent)));
81
+ }
82
+ }, [toggle, setFormData]);
83
+ if (!hasSchema || !schemaTop || !schemaExtent || !schemaBottom) {
84
+ return null;
85
+ }
86
+ return (React.createElement("div", null,
87
+ React.createElement(SchemaForm, { schema: schemaTop, formData: { inputLayer: formData.inputLayer }, onChange: handleTopChange, onSubmit: () => undefined, formContext: formContextValue, filePath: filePath, liveValidate: false }),
88
+ React.createElement(MapExtentToggle, { isActive: mapExtentActive, onChange: handleCheckboxChange },
89
+ React.createElement(SchemaForm, { schema: schemaExtent, formData: {
90
+ xMin: formData.xMin,
91
+ yMin: formData.yMin,
92
+ xMax: formData.xMax,
93
+ yMax: formData.yMax,
94
+ }, onChange: handleExtentChange, onSubmit: () => undefined, formContext: formContextValue, filePath: filePath })),
95
+ React.createElement(SchemaForm, { schema: schemaBottom, formData: {
96
+ outputFileName: formData.outputFileName,
97
+ embedOutputLayer: formData.embedOutputLayer,
98
+ }, onChange: handleBottomChange, onSubmit: handleSubmit, formContext: formContextValue, filePath: filePath, submitButtonRef: submitButtonRef, liveValidate: false })));
99
+ }
@@ -1,8 +1,8 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react';
2
+ import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
3
+ import { processBaseSchema, removeFormEntry, } from "../../../shared/formbuilder/objectform/schemaUtils";
4
+ import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
2
5
  import { deepCopy, loadFile } from "../../../tools";
3
- import { SchemaForm } from '../SchemaForm';
4
- import { processBaseSchema, removeFormEntry } from '../schemaUtils';
5
- import { useSchemaFormState } from '../useSchemaFormState';
6
6
  async function fetchFieldNames(model, layerId) {
7
7
  var _a, _b, _c;
8
8
  if (!layerId) {
@@ -32,7 +32,7 @@ async function fetchFieldNames(model, layerId) {
32
32
  }
33
33
  export function DissolveForm(props) {
34
34
  const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, ok, } = props;
35
- const { formData, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
35
+ const { formData, setFormData, formContextValue, hasSchema, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
36
36
  const [features, setFeatures] = useState([]);
37
37
  const submitButtonRef = useRef(null);
38
38
  useEffect(() => {
@@ -70,5 +70,5 @@ export function DissolveForm(props) {
70
70
  if (!hasSchema) {
71
71
  return null;
72
72
  }
73
- return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: handleChangeBase, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
73
+ return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: setFormData, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
74
74
  }
@@ -4,7 +4,7 @@
4
4
  import { Dialog } from '@jupyterlab/apputils';
5
5
  import { Signal } from '@lumino/signaling';
6
6
  import React from 'react';
7
- import type { IBaseFormProps } from "../../types";
7
+ import type { IBaseFormProps } from "../../../types";
8
8
  export interface IProcessingFormWrapperProps extends IBaseFormProps {
9
9
  /** Signal emitted by the dialog when OK is clicked; form submits when this fires. */
10
10
  ok?: Signal<Dialog<any>, number>;
@@ -1,11 +1,11 @@
1
1
  import React, { useEffect, useMemo, useRef } from 'react';
2
- import { deepCopy } from "../../tools";
3
- import { SchemaForm } from './SchemaForm';
4
- import { processBaseSchema, removeFormEntry } from './schemaUtils';
5
- import { useSchemaFormState } from './useSchemaFormState';
2
+ import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
3
+ import { processBaseSchema, removeFormEntry, } from "../../../shared/formbuilder/objectform/schemaUtils";
4
+ import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
5
+ import { deepCopy } from "../../../tools";
6
6
  export function DefaultProcessingForm(props) {
7
7
  const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, ok, } = props;
8
- const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
8
+ const { formData, setFormData, schema, formContextValue, hasSchema, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
9
9
  const submitButtonRef = useRef(null);
10
10
  useEffect(() => {
11
11
  if (!ok) {
@@ -29,5 +29,5 @@ export function DefaultProcessingForm(props) {
29
29
  if (!hasSchema) {
30
30
  return null;
31
31
  }
32
- return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: handleChangeBase, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
32
+ return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: setFormData, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
33
33
  }
@@ -0,0 +1,10 @@
1
+ import { IJupyterGISModel } from '@jupytergis/schema';
2
+ import { Dialog } from '@jupyterlab/apputils';
3
+ import { Signal } from '@lumino/signaling';
4
+ import React from 'react';
5
+ import type { IBaseFormProps } from "../../../types";
6
+ export interface IRasterizeFormProps extends IBaseFormProps {
7
+ ok?: Signal<Dialog<any>, number>;
8
+ model: IJupyterGISModel;
9
+ }
10
+ export declare function RasterizeForm(props: IRasterizeFormProps): React.ReactElement | null;
@@ -0,0 +1,75 @@
1
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
2
+ import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
3
+ import { processBaseSchema, removeFormEntry, } from "../../../shared/formbuilder/objectform/schemaUtils";
4
+ import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
5
+ import { deepCopy, loadFile } from "../../../tools";
6
+ async function fetchNumericFieldNames(model, layerId) {
7
+ var _a, _b, _c, _d;
8
+ if (!layerId) {
9
+ return [];
10
+ }
11
+ const layer = model.getLayer(layerId);
12
+ if (!((_a = layer === null || layer === void 0 ? void 0 : layer.parameters) === null || _a === void 0 ? void 0 : _a.source)) {
13
+ return [];
14
+ }
15
+ const source = model.getSource(layer.parameters.source);
16
+ if (!source || source.type !== 'GeoJSONSource') {
17
+ return [];
18
+ }
19
+ const sourceData = source.parameters;
20
+ const jsonData = (_b = sourceData === null || sourceData === void 0 ? void 0 : sourceData.data) !== null && _b !== void 0 ? _b : ((sourceData === null || sourceData === void 0 ? void 0 : sourceData.path)
21
+ ? await loadFile({
22
+ filepath: sourceData.path,
23
+ type: 'GeoJSONSource',
24
+ model,
25
+ })
26
+ : undefined);
27
+ if (!((_c = jsonData === null || jsonData === void 0 ? void 0 : jsonData.features) === null || _c === void 0 ? void 0 : _c.length)) {
28
+ return [];
29
+ }
30
+ // gdal_rasterize -a needs a numeric attribute. Filter accordingly.
31
+ const props = (_d = jsonData.features[0].properties) !== null && _d !== void 0 ? _d : {};
32
+ return Object.keys(props).filter(k => typeof props[k] === 'number');
33
+ }
34
+ export function RasterizeForm(props) {
35
+ const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, ok, } = props;
36
+ const { formData, setFormData, formContextValue, hasSchema, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
37
+ const [features, setFeatures] = useState([]);
38
+ const submitButtonRef = useRef(null);
39
+ useEffect(() => {
40
+ fetchNumericFieldNames(model, formData === null || formData === void 0 ? void 0 : formData.inputLayer)
41
+ .then(setFeatures)
42
+ .catch(() => setFeatures([]));
43
+ }, [model, formData === null || formData === void 0 ? void 0 : formData.inputLayer]);
44
+ useEffect(() => {
45
+ if (!ok) {
46
+ return;
47
+ }
48
+ const handler = () => {
49
+ var _a;
50
+ (_a = submitButtonRef.current) === null || _a === void 0 ? void 0 : _a.click();
51
+ };
52
+ ok.connect(handler);
53
+ return () => {
54
+ ok.disconnect(handler);
55
+ };
56
+ }, [ok]);
57
+ const schema = useMemo(() => {
58
+ const schemaCopy = deepCopy(schemaProp !== null && schemaProp !== void 0 ? schemaProp : {});
59
+ if (schemaCopy.properties &&
60
+ schemaCopy.properties.attributeField) {
61
+ schemaCopy.properties.attributeField = Object.assign(Object.assign({}, schemaCopy.properties.attributeField), { enum: ['', ...features], enumNames: ['(use burn value)', ...features] });
62
+ }
63
+ return schemaCopy;
64
+ }, [schemaProp, features]);
65
+ const uiSchema = useMemo(() => {
66
+ const builtUiSchema = {};
67
+ const dataCopy = deepCopy(formData);
68
+ processBaseSchema(dataCopy, schema, builtUiSchema, formContext, removeFormEntry);
69
+ return builtUiSchema;
70
+ }, [schema, formData, formContext]);
71
+ if (!hasSchema) {
72
+ return null;
73
+ }
74
+ return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: setFormData, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
75
+ }
@@ -0,0 +1,22 @@
1
+ import { IDict, IJupyterGISModel } from '@jupytergis/schema';
2
+ export interface IUseMapExtentResult {
3
+ isActive: boolean;
4
+ extentRef: React.MutableRefObject<IDict>;
5
+ toggle: (checked: boolean) => IDict | null;
6
+ }
7
+ /**
8
+ * Reads the current map viewport from the model awareness and returns the
9
+ * bounding box in EPSG:4326, or null if the viewport is not yet available.
10
+ */
11
+ export declare function getMapExtent(model: IJupyterGISModel): IDict | null;
12
+ /**
13
+ * Manages the "Use current map extent" toggle state.
14
+ *
15
+ * Returns:
16
+ * - `isActive`: whether the map extent is currently locked in
17
+ * - `extentRef`: cached extent values (used to restore fields after rjsf re-renders)
18
+ * - `toggle(checked)`: call when the checkbox changes; returns the extent dict
19
+ * when activating (so the caller can merge it into form state), or null when
20
+ * deactivating or when the viewport is not yet ready.
21
+ */
22
+ export declare function useMapExtent(model: IJupyterGISModel): IUseMapExtentResult;
@@ -0,0 +1,57 @@
1
+ import { transformExtent } from 'ol/proj';
2
+ import { useRef, useState } from 'react';
3
+ /**
4
+ * Reads the current map viewport from the model awareness and returns the
5
+ * bounding box in EPSG:4326, or null if the viewport is not yet available.
6
+ */
7
+ export function getMapExtent(model) {
8
+ var _a, _b, _c, _d;
9
+ const viewport = (_b = (_a = model.sharedModel.awareness.getLocalState()) === null || _a === void 0 ? void 0 : _a.viewportState) === null || _b === void 0 ? void 0 : _b.value;
10
+ if (!(viewport === null || viewport === void 0 ? void 0 : viewport.extent)) {
11
+ return null;
12
+ }
13
+ const mapProjection = (_d = (_c = model.sharedModel.options) === null || _c === void 0 ? void 0 : _c.projection) !== null && _d !== void 0 ? _d : 'EPSG:3857';
14
+ let [xMin, yMin, xMax, yMax] = viewport.extent;
15
+ if (mapProjection !== 'EPSG:4326') {
16
+ [xMin, yMin, xMax, yMax] = transformExtent(viewport.extent, mapProjection, 'EPSG:4326');
17
+ }
18
+ const round = (v) => Math.round(v * 1e6) / 1e6;
19
+ return {
20
+ xMin: round(xMin),
21
+ yMin: round(yMin),
22
+ xMax: round(xMax),
23
+ yMax: round(yMax),
24
+ };
25
+ }
26
+ /**
27
+ * Manages the "Use current map extent" toggle state.
28
+ *
29
+ * Returns:
30
+ * - `isActive`: whether the map extent is currently locked in
31
+ * - `extentRef`: cached extent values (used to restore fields after rjsf re-renders)
32
+ * - `toggle(checked)`: call when the checkbox changes; returns the extent dict
33
+ * when activating (so the caller can merge it into form state), or null when
34
+ * deactivating or when the viewport is not yet ready.
35
+ */
36
+ export function useMapExtent(model) {
37
+ const [isActive, setIsActive] = useState(false);
38
+ const extentRef = useRef({});
39
+ const toggle = (checked) => {
40
+ if (checked) {
41
+ const extent = getMapExtent(model);
42
+ if (extent) {
43
+ extentRef.current = extent;
44
+ setIsActive(true);
45
+ return extent;
46
+ }
47
+ // Viewport not ready — leave checkbox unchecked, fields stay required
48
+ return null;
49
+ }
50
+ else {
51
+ setIsActive(false);
52
+ extentRef.current = {};
53
+ return null;
54
+ }
55
+ };
56
+ return { isActive, extentRef, toggle };
57
+ }
@@ -1,6 +1,6 @@
1
1
  import { IDict, IJGISLayer, IJupyterGISModel, IJGISFormSchemaRegistry, LayerType, ProcessingType } from '@jupytergis/schema';
2
2
  import { JupyterFrontEnd } from '@jupyterlab/application';
3
- import { JupyterGISTracker } from '../types';
3
+ import { JupyterGISTracker } from '../../types';
4
4
  /**
5
5
  * Get the currently selected layer from the shared model. Returns null if there is no selection or multiple layer is selected.
6
6
  */
@@ -22,4 +22,21 @@ export declare function processLayer(tracker: JupyterGISTracker, formSchemaRegis
22
22
  gdalFunction: GdalFunctions;
23
23
  options: (sqlQuery: string) => string[];
24
24
  }, app: JupyterFrontEnd, filePath?: string, processingInputs?: Record<string, any>): Promise<void>;
25
- export declare function executeSQLProcessing(model: IJupyterGISModel, geojsonString: string, gdalFunction: GdalFunctions, options: string[], layerNamePrefix: string, processingType: ProcessingType, embedOutputLayer: boolean, tracker: JupyterGISTracker, app: JupyterFrontEnd): Promise<void>;
25
+ /**
26
+ * Rasterize a vector layer to a GeoTIFF on disk and add it as a WebGlLayer.
27
+ */
28
+ export declare function rasterizeLayer(tracker: JupyterGISTracker, formSchemaRegistry: IJGISFormSchemaRegistry, processingType: ProcessingType, gdalFunction: GdalFunctions, app: JupyterFrontEnd, filePath?: string, processingInputs?: Record<string, any>): Promise<void>;
29
+ /**
30
+ * Clip a GeoTiff raster layer to a bounding-box extent using gdal_translate -projwin.
31
+ */
32
+ export declare function clipRasterByExtent(tracker: JupyterGISTracker, formSchemaRegistry: IJGISFormSchemaRegistry, app: JupyterFrontEnd, filePath?: string, processingInputs?: Record<string, any>): Promise<void>;
33
+ /**
34
+ * Clip a GeoTiff raster layer using a vector layer as the cutline.
35
+ * Uses gdalwarp with -cutline (and optionally -crop_to_cutline).
36
+ */
37
+ export declare function clipRasterByVector(tracker: JupyterGISTracker, formSchemaRegistry: IJGISFormSchemaRegistry, app: JupyterFrontEnd, filePath?: string, processingInputs?: Record<string, any>): Promise<void>;
38
+ /**
39
+ * Clip a vector layer by another vector layer using ST_Intersection.
40
+ */
41
+ export declare function clipVectorByMaskLayer(tracker: JupyterGISTracker, formSchemaRegistry: IJGISFormSchemaRegistry, app: JupyterFrontEnd, filePath?: string, processingInputs?: Record<string, any>): Promise<void>;
42
+ export declare function executeSQLProcessing(model: IJupyterGISModel, geojsonString: string, gdalFunction: GdalFunctions, options: string[], layerNamePrefix: string, processingType: ProcessingType, embedOutputLayer: boolean, tracker: JupyterGISTracker, app: JupyterFrontEnd, exactLayerName?: string): Promise<void>;