@jupytergis/base 0.15.0 → 0.16.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/BaseCommandIDs.d.ts +5 -0
- package/lib/commands/BaseCommandIDs.js +5 -0
- package/lib/commands/index.js +218 -47
- package/lib/commands/operationCommands.js +2 -2
- package/lib/constants.js +5 -1
- package/lib/{panelview/annotationPanel.js → features/annotations/AnnotationsPanel.js} +1 -1
- package/lib/{annotations → features/annotations}/index.d.ts +1 -0
- package/lib/{annotations → features/annotations}/index.js +1 -0
- package/lib/{console → features/console}/consoleview.js +1 -1
- package/lib/{panelview/filter-panel → features/filter}/Filter.js +4 -4
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.d.ts +3 -2
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.js +2 -1
- package/lib/{panelview/identify-panel → features/identify}/IdentifyPanel.d.ts +2 -0
- package/lib/features/identify/IdentifyPanel.js +102 -0
- package/lib/features/identify/components/FeatureCard.d.ts +17 -0
- package/lib/features/identify/components/FeatureCard.js +26 -0
- package/lib/features/identify/components/FeatureCardHeader.d.ts +11 -0
- package/lib/features/identify/components/FeatureCardHeader.js +30 -0
- package/lib/features/identify/components/FeatureFloater.d.ts +7 -0
- package/lib/features/identify/components/FeatureFloater.js +19 -0
- package/lib/features/identify/components/FeaturePropertyList.d.ts +11 -0
- package/lib/features/identify/components/FeaturePropertyList.js +18 -0
- package/lib/features/identify/components/FeatureRow.d.ts +13 -0
- package/lib/features/identify/components/FeatureRow.js +25 -0
- package/lib/features/identify/components/PropertyEditors.d.ts +44 -0
- package/lib/features/identify/components/PropertyEditors.js +56 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.d.ts +11 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.js +132 -0
- package/lib/features/identify/types/editorTypes.d.ts +21 -0
- package/lib/features/identify/utils/getFeatureIdentifier.d.ts +5 -0
- package/lib/features/identify/utils/getFeatureIdentifier.js +14 -0
- package/lib/features/identify/utils/highlightLayer.d.ts +11 -0
- package/lib/features/identify/utils/highlightLayer.js +57 -0
- package/lib/features/identify/utils/highlightStyle.d.ts +7 -0
- package/lib/features/identify/utils/highlightStyle.js +40 -0
- package/lib/{dialogs/layerBrowserDialog.js → features/layer-browser/index.js} +2 -2
- package/lib/features/layers/forms/layer/geoTiffLayerForm.d.ts +3 -0
- package/lib/{formbuilder/objectform/layer/webGlLayerForm.js → features/layers/forms/layer/geoTiffLayerForm.js} +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.js +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.js +4 -4
- package/lib/features/layers/forms/layer/storySegmentLayerForm.js +150 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.js +5 -5
- package/lib/features/layers/forms/source/geopackagesource.d.ts +3 -0
- package/lib/features/layers/forms/source/geopackagesource.js +93 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.d.ts +1 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.js +1 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.js +6 -6
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.js +1 -1
- package/lib/features/layers/symbology/Grammar.d.ts +11 -0
- package/lib/features/layers/symbology/Grammar.js +235 -0
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.d.ts +1 -1
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.js +30 -10
- package/lib/{dialogs → features/layers}/symbology/classificationModes.d.ts +6 -6
- package/lib/{dialogs → features/layers}/symbology/classificationModes.js +48 -44
- package/lib/{dialogs → features/layers}/symbology/colorRampUtils.d.ts +1 -0
- package/lib/{dialogs → features/layers}/symbology/colorRampUtils.js +12 -1
- package/lib/features/layers/symbology/components/MappingRow.d.ts +40 -0
- package/lib/features/layers/symbology/components/MappingRow.js +516 -0
- package/lib/features/layers/symbology/components/NumericInput.d.ts +20 -0
- package/lib/features/layers/symbology/components/NumericInput.js +44 -0
- package/lib/features/layers/symbology/components/ScaleEditor.d.ts +33 -0
- package/lib/features/layers/symbology/components/ScaleEditor.js +221 -0
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.js +3 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.d.ts +2 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.js +6 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.js +39 -9
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.js +1 -1
- package/lib/features/layers/symbology/grammarToOLLayer.d.ts +27 -0
- package/lib/features/layers/symbology/grammarToOLLayer.js +145 -0
- package/lib/features/layers/symbology/grammarToOLStyle.d.ts +32 -0
- package/lib/features/layers/symbology/grammarToOLStyle.js +467 -0
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.js +4 -2
- package/lib/features/layers/symbology/styleBuilder.d.ts +21 -0
- package/lib/features/layers/symbology/styleBuilder.js +145 -0
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +12 -12
- package/lib/{dialogs → features/layers}/symbology/symbologyUtils.d.ts +18 -10
- package/lib/{dialogs → features/layers}/symbology/symbologyUtils.js +0 -84
- package/lib/{panelview/objectproperties.d.ts → features/objectproperties/index.d.ts} +1 -1
- package/lib/{panelview/objectproperties.js → features/objectproperties/index.js} +5 -10
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.js +28 -14
- package/lib/features/processing/forms/MapExtentToggle.d.ts +13 -0
- package/lib/features/processing/forms/MapExtentToggle.js +20 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.d.ts +10 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.js +99 -0
- package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.js +5 -5
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.js +6 -6
- package/lib/features/processing/forms/rasterizeForm.d.ts +10 -0
- package/lib/features/processing/forms/rasterizeForm.js +75 -0
- package/lib/features/processing/forms/useMapExtent.d.ts +22 -0
- package/lib/features/processing/forms/useMapExtent.js +57 -0
- package/lib/{processing → features/processing}/index.d.ts +19 -2
- package/lib/features/processing/index.js +1246 -0
- package/lib/{processing → features/processing}/processingCommands.d.ts +1 -1
- package/lib/features/processing/processingCommands.js +168 -0
- package/lib/features/processing/serverProcessing.d.ts +51 -0
- package/lib/features/processing/serverProcessing.js +99 -0
- package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.js +5 -5
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.js +1 -1
- package/lib/features/stac-browser/types/types.js +1 -0
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.d.ts +4 -1
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.js +3 -4
- package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.js +1 -1
- package/lib/{panelview/story-maps → features/story}/StoryViewerPanel.d.ts +12 -11
- package/lib/features/story/StoryViewerPanel.js +64 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.d.ts +9 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.js +21 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.d.ts +10 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.js +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.d.ts +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.js +55 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.d.ts +15 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.js +93 -0
- package/lib/features/story/components/ListStoryStageOverlay.d.ts +12 -0
- package/lib/features/story/components/ListStoryStageOverlay.js +132 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.d.ts +6 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.js +7 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaDesktopView.d.ts +4 -2
- package/lib/features/story/components/SpectaDesktopView.js +67 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.d.ts +2 -4
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.js +3 -3
- package/lib/features/story/components/SpectaSingleModeContent.d.ts +18 -0
- package/lib/features/story/components/SpectaSingleModeContent.js +8 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.d.ts +15 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.js +142 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.d.ts +3 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.js +17 -0
- package/lib/features/story/hooks/useListStoryScroll.d.ts +15 -0
- package/lib/features/story/hooks/useListStoryScroll.js +107 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.d.ts +19 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.js +56 -0
- package/lib/features/story/hooks/useStoryImagePreload.d.ts +1 -0
- package/lib/features/story/hooks/useStoryImagePreload.js +24 -0
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.d.ts +2 -7
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.js +20 -44
- package/lib/features/story/hooks/useStoryScrollState.d.ts +21 -0
- package/lib/features/story/hooks/useStoryScrollState.js +39 -0
- package/lib/features/story/hooks/useStorySegmentSync.d.ts +8 -0
- package/lib/features/story/hooks/useStorySegmentSync.js +51 -0
- package/lib/features/story/types/types.d.ts +38 -0
- package/lib/features/story/types/types.js +1 -0
- package/lib/features/story/utils/computeListStoryScrollState.d.ts +12 -0
- package/lib/features/story/utils/computeListStoryScrollState.js +70 -0
- package/lib/features/story/utils/listStoryMeasureQueue.d.ts +11 -0
- package/lib/features/story/utils/listStoryMeasureQueue.js +14 -0
- package/lib/features/story/utils/listStoryScrollTrack.d.ts +17 -0
- package/lib/features/story/utils/listStoryScrollTrack.js +72 -0
- package/lib/features/story/utils/spectaPresentation.d.ts +9 -0
- package/lib/features/story/utils/spectaPresentation.js +37 -0
- package/lib/features/story/utils/storySegmentViewItems.d.ts +5 -0
- package/lib/features/story/utils/storySegmentViewItems.js +30 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.js +11 -9
- package/lib/keybindings.json +5 -0
- package/lib/mainview/OpenEOTileLayer.d.ts +49 -0
- package/lib/mainview/OpenEOTileLayer.js +179 -0
- package/lib/mainview/TemporalSlider.js +11 -9
- package/lib/mainview/geoJsonFeaturePatch.d.ts +9 -0
- package/lib/mainview/geoJsonFeaturePatch.js +43 -0
- package/lib/mainview/mainView.d.ts +90 -7
- package/lib/mainview/mainView.js +1196 -586
- package/lib/mainview/mainviewwidget.d.ts +5 -1
- package/lib/mainview/mainviewwidget.js +4 -2
- package/lib/shared/components/Button.d.ts +1 -1
- package/lib/shared/components/DropdownMenu.d.ts +1 -0
- package/lib/shared/components/DropdownMenu.js +3 -2
- package/lib/shared/components/NativeSelect.d.ts +8 -0
- package/lib/shared/components/NativeSelect.js +29 -0
- package/lib/shared/components/Tabs.d.ts +3 -3
- package/lib/shared/components/Tabs.js +5 -5
- package/lib/{formbuilder → shared/formbuilder}/creationform.js +71 -4
- package/lib/{formbuilder → shared/formbuilder}/editform.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/formselectors.d.ts +2 -2
- package/lib/{formbuilder → shared/formbuilder}/formselectors.js +10 -4
- package/lib/shared/formbuilder/index.d.ts +4 -0
- package/lib/shared/formbuilder/index.js +4 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.js +4 -4
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.js +4 -4
- package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.js +8 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.d.ts +3 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.js +11 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.js +1 -1
- package/lib/{icons.d.ts → shared/icons.d.ts} +2 -0
- package/lib/{icons.js → shared/icons.js} +28 -18
- package/lib/tools.d.ts +2 -0
- package/lib/tools.js +138 -4
- package/lib/types.d.ts +6 -1
- package/lib/types.js +6 -1
- package/lib/{menus.js → workspace/menus.js} +10 -2
- package/lib/workspace/panels/components/TabbedPanel.d.ts +17 -0
- package/lib/workspace/panels/components/TabbedPanel.js +19 -0
- package/lib/{panelview → workspace/panels}/components/layers.js +63 -18
- package/lib/workspace/panels/components/legendItem.js +680 -0
- package/lib/workspace/panels/hooks/useLayerTree.d.ts +19 -0
- package/lib/workspace/panels/hooks/useLayerTree.js +103 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.d.ts +27 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.js +72 -0
- package/lib/workspace/panels/hooks/useUIState.d.ts +2 -0
- package/lib/workspace/panels/hooks/useUIState.js +25 -0
- package/lib/{panelview → workspace/panels}/index.d.ts +1 -1
- package/lib/{panelview → workspace/panels}/index.js +1 -1
- package/lib/{panelview → workspace/panels}/leftpanel.d.ts +1 -1
- package/lib/workspace/panels/leftpanel.js +70 -0
- package/lib/{panelview/rightpanel.d.ts → workspace/panels/mergedpanel.d.ts} +6 -5
- package/lib/workspace/panels/mergedpanel.js +166 -0
- package/lib/workspace/panels/rightpanel.d.ts +25 -0
- package/lib/{panelview → workspace/panels}/rightpanel.js +53 -63
- package/lib/{statusbar → workspace/statusbar}/StatusBar.js +5 -4
- package/lib/{toolbar → workspace/toolbar}/widget.d.ts +2 -0
- package/lib/{toolbar → workspace/toolbar}/widget.js +33 -5
- package/lib/{widget.d.ts → workspace/widget.d.ts} +7 -5
- package/lib/{widget.js → workspace/widget.js} +16 -7
- package/package.json +16 -4
- package/style/base.css +109 -1
- package/style/icons/geopackage.svg +95 -0
- package/style/icons/pencil_solid.svg +7 -0
- package/style/identify.css +95 -0
- package/style/layerBrowser.css +28 -0
- package/style/leftPanel.css +25 -0
- package/style/shared/button.css +12 -0
- package/style/shared/dropdownMenu.css +9 -0
- package/style/shared/nativeSelect.css +75 -0
- package/style/shared/tabs.css +1 -1
- package/style/spectaProgressBar.css +0 -1
- package/style/storyPanel.css +140 -9
- package/style/storySpectaArticleOverlay.css +129 -0
- package/style/symbologyDialog.css +285 -27
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +0 -42
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +0 -23
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +0 -59
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +0 -92
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +0 -5
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +0 -313
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +0 -112
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +0 -8
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +0 -9
- package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Canonical.js +0 -130
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +0 -243
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +0 -362
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +0 -120
- package/lib/formbuilder/index.d.ts +0 -4
- package/lib/formbuilder/index.js +0 -4
- package/lib/formbuilder/objectform/layer/storySegmentLayerForm.js +0 -95
- package/lib/formbuilder/objectform/layer/webGlLayerForm.d.ts +0 -3
- package/lib/formbuilder/objectform/process/index.d.ts +0 -1
- package/lib/formbuilder/objectform/process/index.js +0 -1
- package/lib/panelview/components/legendItem.js +0 -210
- package/lib/panelview/identify-panel/IdentifyPanel.js +0 -102
- package/lib/panelview/leftpanel.js +0 -139
- package/lib/panelview/story-maps/StoryViewerPanel.js +0 -116
- package/lib/panelview/story-maps/components/SpectaDesktopView.js +0 -49
- package/lib/processing/index.js +0 -200
- package/lib/processing/processingCommands.js +0 -67
- /package/lib/{panelview/annotationPanel.d.ts → features/annotations/AnnotationsPanel.d.ts} +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.js +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.js +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.js +0 -0
- /package/lib/{annotations → features/annotations}/model.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/model.js +0 -0
- /package/lib/{console → features/console}/consoleview.d.ts +0 -0
- /package/lib/{console → features/console}/index.d.ts +0 -0
- /package/lib/{console → features/console}/index.js +0 -0
- /package/lib/{panelview/filter-panel → features/filter}/Filter.d.ts +0 -0
- /package/lib/{stacBrowser/types/types.js → features/identify/types/editorTypes.js} +0 -0
- /package/lib/{dialogs/layerBrowserDialog.d.ts → features/layer-browser/index.d.ts} +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/storySegmentLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/cmocean.json +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.js +0 -0
- /package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/types/types.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/creationform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/editform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.d.ts +0 -0
- /package/lib/{store.d.ts → shared/store.d.ts} +0 -0
- /package/lib/{store.js → shared/store.js} +0 -0
- /package/lib/{menus.d.ts → workspace/menus.d.ts} +0 -0
- /package/lib/{panelview → workspace/panels}/components/layers.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/components/legendItem.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.d.ts +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/StatusBar.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.js +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IStorySegmentLayer } from '@jupytergis/schema';
|
|
2
|
+
export type StorySegmentDisplayMode = 'map' | 'markdown';
|
|
3
|
+
/** Active handoff between two segments while scrolling the virtual track. */
|
|
4
|
+
export interface IListStorySegmentTransition {
|
|
5
|
+
/** 0–1 across the handoff span (outgoing segment + gap + incoming segment). */
|
|
6
|
+
progress: number;
|
|
7
|
+
fromIndex: number;
|
|
8
|
+
toIndex: number;
|
|
9
|
+
fromMode: StorySegmentDisplayMode;
|
|
10
|
+
toMode: StorySegmentDisplayMode;
|
|
11
|
+
}
|
|
12
|
+
export interface IStorySegmentViewItem {
|
|
13
|
+
id: string;
|
|
14
|
+
index: number;
|
|
15
|
+
layerName: string;
|
|
16
|
+
activeSlide: IStorySegmentLayer['parameters'] | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface IListStoryMarkdownSegment {
|
|
19
|
+
id: string;
|
|
20
|
+
index: number;
|
|
21
|
+
markdown: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IListStoryScrollTrackSegment {
|
|
24
|
+
id: string;
|
|
25
|
+
index: number;
|
|
26
|
+
contentMode: StorySegmentDisplayMode;
|
|
27
|
+
height: number;
|
|
28
|
+
measured: boolean;
|
|
29
|
+
/** Inclusive start in scroller content coordinates. */
|
|
30
|
+
start: number;
|
|
31
|
+
/** Exclusive end in scroller content coordinates. */
|
|
32
|
+
end: number;
|
|
33
|
+
}
|
|
34
|
+
export interface IListStoryScrollTrackLayout {
|
|
35
|
+
segments: IListStoryScrollTrackSegment[];
|
|
36
|
+
/** Sum of segment heights and handoff gaps (virtual track height). */
|
|
37
|
+
scrollTrackHeight: number;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IListStorySegmentTransition, IListStoryScrollTrackSegment } from "../types/types";
|
|
2
|
+
export interface IListStoryScrollState {
|
|
3
|
+
activeIndex: number;
|
|
4
|
+
segmentTransition: IListStorySegmentTransition | null;
|
|
5
|
+
}
|
|
6
|
+
interface IComputeListStoryScrollInput {
|
|
7
|
+
scrollTop: number;
|
|
8
|
+
viewportHeight: number;
|
|
9
|
+
segments: IListStoryScrollTrackSegment[];
|
|
10
|
+
}
|
|
11
|
+
export declare function computeListStoryScrollState({ scrollTop, viewportHeight, segments, }: IComputeListStoryScrollInput): IListStoryScrollState | null;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function clamp01(value) {
|
|
2
|
+
return Math.min(1, Math.max(0, value));
|
|
3
|
+
}
|
|
4
|
+
function findSegmentAtScrollCenter(scrollCenter, segments) {
|
|
5
|
+
if (scrollCenter < segments[0].start) {
|
|
6
|
+
return segments[0];
|
|
7
|
+
}
|
|
8
|
+
for (const segment of segments) {
|
|
9
|
+
if (scrollCenter >= segment.start && scrollCenter < segment.end) {
|
|
10
|
+
return segment;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return segments[segments.length - 1];
|
|
14
|
+
}
|
|
15
|
+
function computePairTransition(scrollTop, fromSegment, toSegment) {
|
|
16
|
+
if (scrollTop < fromSegment.start || scrollTop >= toSegment.end) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const handoffEndScrollTop = toSegment.start;
|
|
20
|
+
const handoffSpan = handoffEndScrollTop - fromSegment.start;
|
|
21
|
+
if (handoffSpan <= 0) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
if (scrollTop >= handoffEndScrollTop) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const progress = clamp01((scrollTop - fromSegment.start) / handoffSpan);
|
|
28
|
+
return {
|
|
29
|
+
progress,
|
|
30
|
+
activeIndex: progress >= 0.5 ? toSegment.index : fromSegment.index,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function buildSegmentTransitionPayload(fromSegment, toSegment, progress) {
|
|
34
|
+
return {
|
|
35
|
+
progress,
|
|
36
|
+
fromIndex: fromSegment.index,
|
|
37
|
+
toIndex: toSegment.index,
|
|
38
|
+
fromMode: fromSegment.contentMode,
|
|
39
|
+
toMode: toSegment.contentMode,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function computeListStoryScrollState({ scrollTop, viewportHeight, segments, }) {
|
|
43
|
+
if (!segments.length) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
if (segments.length === 1) {
|
|
47
|
+
return {
|
|
48
|
+
activeIndex: segments[0].index,
|
|
49
|
+
segmentTransition: null,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
for (let i = 0; i < segments.length - 1; i++) {
|
|
53
|
+
const fromSegment = segments[i];
|
|
54
|
+
const toSegment = segments[i + 1];
|
|
55
|
+
const pairTransition = computePairTransition(scrollTop, fromSegment, toSegment);
|
|
56
|
+
if (!pairTransition) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
activeIndex: pairTransition.activeIndex,
|
|
61
|
+
segmentTransition: buildSegmentTransitionPayload(fromSegment, toSegment, pairTransition.progress),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const scrollCenter = scrollTop + viewportHeight / 2;
|
|
65
|
+
const activeSegment = findSegmentAtScrollCenter(scrollCenter, segments);
|
|
66
|
+
return {
|
|
67
|
+
activeIndex: activeSegment.index,
|
|
68
|
+
segmentTransition: null,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IListStoryMarkdownSegment } from "../types/types";
|
|
2
|
+
export declare const LIST_STORY_MEASURE_LOOKAHEAD = 2;
|
|
3
|
+
interface IBuildPendingMeasureIdsParams {
|
|
4
|
+
markdownSegments: IListStoryMarkdownSegment[];
|
|
5
|
+
currentSegmentIndex: number;
|
|
6
|
+
heightsById: Readonly<Record<string, number>>;
|
|
7
|
+
measuringSegmentId: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** Markdown segment ids near the active index that still need measurement. */
|
|
10
|
+
export declare function buildPendingMeasureIds({ markdownSegments, currentSegmentIndex, heightsById, measuringSegmentId, }: IBuildPendingMeasureIdsParams): string[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const LIST_STORY_MEASURE_LOOKAHEAD = 2;
|
|
2
|
+
/** Markdown segment ids near the active index that still need measurement. */
|
|
3
|
+
export function buildPendingMeasureIds({ markdownSegments, currentSegmentIndex, heightsById, measuringSegmentId, }) {
|
|
4
|
+
const pending = markdownSegments
|
|
5
|
+
.filter(segment => Math.abs(segment.index - currentSegmentIndex) <=
|
|
6
|
+
LIST_STORY_MEASURE_LOOKAHEAD && heightsById[segment.id] === undefined)
|
|
7
|
+
.sort((a, b) => Math.abs(a.index - currentSegmentIndex) -
|
|
8
|
+
Math.abs(b.index - currentSegmentIndex))
|
|
9
|
+
.map(segment => segment.id);
|
|
10
|
+
if (!measuringSegmentId) {
|
|
11
|
+
return pending;
|
|
12
|
+
}
|
|
13
|
+
return pending.filter(id => id !== measuringSegmentId);
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IStorySegmentLayer } from '@jupytergis/schema';
|
|
2
|
+
import type { IListStoryScrollTrackLayout, StorySegmentDisplayMode, IStorySegmentViewItem } from "../types/types";
|
|
3
|
+
interface IBuildListStoryScrollTrackInput {
|
|
4
|
+
items: IStorySegmentViewItem[];
|
|
5
|
+
/** Story column scroller height (markdown estimates, scroll padding). */
|
|
6
|
+
viewportHeight: number;
|
|
7
|
+
/** Map stage height (`.jGIS-Mainview-Container`); defaults to viewportHeight. */
|
|
8
|
+
mapViewportHeight?: number;
|
|
9
|
+
heightsById?: Readonly<Record<string, number>>;
|
|
10
|
+
}
|
|
11
|
+
export declare function estimateMarkdownHeight(markdown: string, viewportHeight: number): number;
|
|
12
|
+
export declare function estimateMapSegmentHeight(viewportHeight: number): number;
|
|
13
|
+
export declare function getScrollTrackSegmentHeight(layout: IListStoryScrollTrackLayout | null, index: number): number | undefined;
|
|
14
|
+
/** Builds cumulative segment ranges for the virtual list story scroll track. */
|
|
15
|
+
export declare function buildListStoryScrollTrack({ items, viewportHeight, mapViewportHeight, heightsById, }: IBuildListStoryScrollTrackInput): IListStoryScrollTrackLayout | null;
|
|
16
|
+
export declare function getSegmentDisplayMode(activeSlide: IStorySegmentLayer['parameters'] | undefined): StorySegmentDisplayMode;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const MARKDOWN_LINE_HEIGHT_PX = 28;
|
|
2
|
+
const MARKDOWN_CONTENT_PADDING_PX = 32;
|
|
3
|
+
const MIN_MARKDOWN_VIEWPORT_RATIO = 0.5;
|
|
4
|
+
export function estimateMarkdownHeight(markdown, viewportHeight) {
|
|
5
|
+
const lineCount = Math.max(1, markdown.split('\n').length);
|
|
6
|
+
const estimatedFromLines = lineCount * MARKDOWN_LINE_HEIGHT_PX + MARKDOWN_CONTENT_PADDING_PX;
|
|
7
|
+
const minHeight = viewportHeight * MIN_MARKDOWN_VIEWPORT_RATIO;
|
|
8
|
+
return Math.max(minHeight, estimatedFromLines);
|
|
9
|
+
}
|
|
10
|
+
export function estimateMapSegmentHeight(viewportHeight) {
|
|
11
|
+
return viewportHeight;
|
|
12
|
+
}
|
|
13
|
+
export function getScrollTrackSegmentHeight(layout, index) {
|
|
14
|
+
var _a;
|
|
15
|
+
return (_a = layout === null || layout === void 0 ? void 0 : layout.segments.find(segment => segment.index === index)) === null || _a === void 0 ? void 0 : _a.height;
|
|
16
|
+
}
|
|
17
|
+
function segmentHeightForItem(item, viewportHeight, mapViewportHeight, heightsById) {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const mode = getSegmentDisplayMode(item.activeSlide);
|
|
20
|
+
if (mode === 'map') {
|
|
21
|
+
return {
|
|
22
|
+
height: estimateMapSegmentHeight(mapViewportHeight),
|
|
23
|
+
measured: mapViewportHeight > 0,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const measured = heightsById[item.id];
|
|
27
|
+
if (measured !== undefined && measured > 0) {
|
|
28
|
+
return { height: measured, measured: true };
|
|
29
|
+
}
|
|
30
|
+
const markdown = (_c = (_b = (_a = item.activeSlide) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.markdown) !== null && _c !== void 0 ? _c : '';
|
|
31
|
+
return {
|
|
32
|
+
height: estimateMarkdownHeight(typeof markdown === 'string' ? markdown : '', viewportHeight),
|
|
33
|
+
measured: false,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Builds cumulative segment ranges for the virtual list story scroll track. */
|
|
37
|
+
export function buildListStoryScrollTrack({ items, viewportHeight, mapViewportHeight, heightsById = {}, }) {
|
|
38
|
+
if (!items.length || viewportHeight <= 0) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const mapHeight = mapViewportHeight !== null && mapViewportHeight !== void 0 ? mapViewportHeight : viewportHeight;
|
|
42
|
+
const heights = items.map(item => segmentHeightForItem(item, viewportHeight, mapHeight, heightsById));
|
|
43
|
+
const handoffGap = mapHeight;
|
|
44
|
+
let offset = 0;
|
|
45
|
+
const segments = items.map((item, i) => {
|
|
46
|
+
const start = offset;
|
|
47
|
+
const height = heights[i].height;
|
|
48
|
+
const gapAfter = i < items.length - 1 ? handoffGap : 0;
|
|
49
|
+
const end = start + height + gapAfter;
|
|
50
|
+
offset = end;
|
|
51
|
+
return {
|
|
52
|
+
id: item.id,
|
|
53
|
+
index: item.index,
|
|
54
|
+
contentMode: getSegmentDisplayMode(item.activeSlide),
|
|
55
|
+
height,
|
|
56
|
+
measured: heights[i].measured,
|
|
57
|
+
start,
|
|
58
|
+
end,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
segments,
|
|
63
|
+
scrollTrackHeight: offset,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function getSegmentDisplayMode(activeSlide) {
|
|
67
|
+
var _a;
|
|
68
|
+
if (((_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _a === void 0 ? void 0 : _a.contentMode) === 'markdown') {
|
|
69
|
+
return 'markdown';
|
|
70
|
+
}
|
|
71
|
+
return 'map';
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJGISStoryMap } from '@jupytergis/schema';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
/** CSS variables (+ optional text color) for specta theming */
|
|
4
|
+
export declare function getSpectaPresentationCssVars(story: IJGISStoryMap | null): CSSProperties;
|
|
5
|
+
/**
|
|
6
|
+
* Full inline style for solid surfaces (e.g. mobile drawer).
|
|
7
|
+
* Do not use on `.jgis-specta-story-panel-container` — it overrides the gradient.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSpectaPresentationStyle(story: IJGISStoryMap | null): CSSProperties;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { STORY_TYPE } from "../../../types";
|
|
2
|
+
/** CSS variables (+ optional text color) for specta theming */
|
|
3
|
+
export function getSpectaPresentationCssVars(story) {
|
|
4
|
+
const isListMode = (story === null || story === void 0 ? void 0 : story.storyType) === STORY_TYPE.verticalScroll;
|
|
5
|
+
const bgColor = story === null || story === void 0 ? void 0 : story.presentationBgColor;
|
|
6
|
+
const textColor = story === null || story === void 0 ? void 0 : story.presentationTextColor;
|
|
7
|
+
const style = {};
|
|
8
|
+
if (textColor) {
|
|
9
|
+
style['--jgis-specta-text-color'] = textColor;
|
|
10
|
+
style.color = textColor;
|
|
11
|
+
}
|
|
12
|
+
if (isListMode) {
|
|
13
|
+
style['--jgis-specta-panel-color'] =
|
|
14
|
+
'transparent';
|
|
15
|
+
if (bgColor) {
|
|
16
|
+
style['--jgis-specta-bg-color'] = bgColor;
|
|
17
|
+
}
|
|
18
|
+
return style;
|
|
19
|
+
}
|
|
20
|
+
if (bgColor) {
|
|
21
|
+
style['--jgis-specta-panel-color'] = bgColor;
|
|
22
|
+
}
|
|
23
|
+
return style;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Full inline style for solid surfaces (e.g. mobile drawer).
|
|
27
|
+
* Do not use on `.jgis-specta-story-panel-container` — it overrides the gradient.
|
|
28
|
+
*/
|
|
29
|
+
export function getSpectaPresentationStyle(story) {
|
|
30
|
+
const style = getSpectaPresentationCssVars(story);
|
|
31
|
+
const isListMode = (story === null || story === void 0 ? void 0 : story.storyType) === STORY_TYPE.verticalScroll;
|
|
32
|
+
const bgColor = story === null || story === void 0 ? void 0 : story.presentationBgColor;
|
|
33
|
+
if (!isListMode && bgColor) {
|
|
34
|
+
style.backgroundColor = bgColor;
|
|
35
|
+
}
|
|
36
|
+
return style;
|
|
37
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IJGISStoryMap, IJupyterGISModel } from '@jupytergis/schema';
|
|
2
|
+
import type { IListStoryMarkdownSegment, IStorySegmentViewItem } from "../types/types";
|
|
3
|
+
export declare function buildStorySegmentViewItems(model: IJupyterGISModel, storyData: IJGISStoryMap | null): IStorySegmentViewItem[];
|
|
4
|
+
export declare function getStoryMarkdownFromSlide(activeSlide: IStorySegmentViewItem['activeSlide']): string;
|
|
5
|
+
export declare function getListStoryMarkdownSegmentsFromItems(items: IStorySegmentViewItem[]): IListStoryMarkdownSegment[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getSegmentDisplayMode } from './listStoryScrollTrack';
|
|
2
|
+
export function buildStorySegmentViewItems(model, storyData) {
|
|
3
|
+
var _a;
|
|
4
|
+
const segments = (_a = storyData === null || storyData === void 0 ? void 0 : storyData.storySegments) !== null && _a !== void 0 ? _a : [];
|
|
5
|
+
const items = segments.map((segmentId, index) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const layer = model.getLayer(segmentId);
|
|
8
|
+
return {
|
|
9
|
+
id: segmentId,
|
|
10
|
+
index,
|
|
11
|
+
layerName: (_a = layer === null || layer === void 0 ? void 0 : layer.name) !== null && _a !== void 0 ? _a : `Segment ${index + 1}`,
|
|
12
|
+
activeSlide: layer === null || layer === void 0 ? void 0 : layer.parameters,
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
return items;
|
|
16
|
+
}
|
|
17
|
+
export function getStoryMarkdownFromSlide(activeSlide) {
|
|
18
|
+
var _a;
|
|
19
|
+
const markdown = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _a === void 0 ? void 0 : _a.markdown;
|
|
20
|
+
return typeof markdown === 'string' ? markdown : '';
|
|
21
|
+
}
|
|
22
|
+
export function getListStoryMarkdownSegmentsFromItems(items) {
|
|
23
|
+
return items
|
|
24
|
+
.filter(item => getSegmentDisplayMode(item.activeSlide) === 'markdown')
|
|
25
|
+
.map(item => ({
|
|
26
|
+
id: item.id,
|
|
27
|
+
index: item.index,
|
|
28
|
+
markdown: getStoryMarkdownFromSlide(item.activeSlide),
|
|
29
|
+
}));
|
|
30
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
export * from './annotations';
|
|
1
|
+
export * from './features/annotations';
|
|
2
|
+
export * from './features/processing/serverProcessing';
|
|
2
3
|
export * from './commands/index';
|
|
3
4
|
export * from './constants';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './icons';
|
|
5
|
+
export * from './features/layers/layerCreationFormDialog';
|
|
6
|
+
export * from './shared/icons';
|
|
6
7
|
export * from './mainview';
|
|
7
|
-
export * from './menus';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './store';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
8
|
+
export * from './workspace/menus';
|
|
9
|
+
export * from './workspace/panels';
|
|
10
|
+
export * from './shared/store';
|
|
11
|
+
export * from './features/stac-browser';
|
|
12
|
+
export * from './features/objectproperties';
|
|
13
|
+
export * from './workspace/toolbar';
|
|
12
14
|
export * from './tools';
|
|
13
15
|
export * from './types';
|
|
14
|
-
export * from './widget';
|
|
16
|
+
export * from './workspace/widget';
|
package/lib/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
export * from './annotations';
|
|
1
|
+
export * from './features/annotations';
|
|
2
|
+
export * from './features/processing/serverProcessing';
|
|
2
3
|
export * from './commands/index';
|
|
3
4
|
export * from './constants';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './icons';
|
|
5
|
+
export * from './features/layers/layerCreationFormDialog';
|
|
6
|
+
export * from './shared/icons';
|
|
6
7
|
export * from './mainview';
|
|
7
|
-
export * from './menus';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './store';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
8
|
+
export * from './workspace/menus';
|
|
9
|
+
export * from './workspace/panels';
|
|
10
|
+
export * from './shared/store';
|
|
11
|
+
export * from './features/stac-browser';
|
|
12
|
+
export * from './features/objectproperties';
|
|
13
|
+
export * from './workspace/toolbar';
|
|
12
14
|
export * from './tools';
|
|
13
15
|
export * from './types';
|
|
14
|
-
export * from './widget';
|
|
16
|
+
export * from './workspace/widget';
|
package/lib/keybindings.json
CHANGED
|
@@ -39,6 +39,11 @@
|
|
|
39
39
|
"keys": ["F2"],
|
|
40
40
|
"selector": ".data-jgis-keybinding"
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"command": "jupytergis:toggleDrawFeatures",
|
|
44
|
+
"keys": ["Accel Shift D"],
|
|
45
|
+
"selector": ".data-jgis-keybinding"
|
|
46
|
+
},
|
|
42
47
|
{
|
|
43
48
|
"command": "jupytergis:executeConsole",
|
|
44
49
|
"keys": ["Shift Enter"],
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Connection, Process } from '@openeo/js-client';
|
|
2
|
+
import TileLayer from 'ol/layer/Tile';
|
|
3
|
+
import { ProjectionLike } from 'ol/proj';
|
|
4
|
+
import { XYZ as XYZSource } from 'ol/source';
|
|
5
|
+
import { Options as XYZOptions } from 'ol/source/XYZ';
|
|
6
|
+
export interface ISigninValues {
|
|
7
|
+
serverUrl: string;
|
|
8
|
+
username: string;
|
|
9
|
+
password: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function connect(connectionInfo: IOpenEOConnectionInfo): Promise<Connection>;
|
|
12
|
+
export interface IOpenEOConnectionInfo {
|
|
13
|
+
/**
|
|
14
|
+
* The url to the open-eo server.
|
|
15
|
+
*/
|
|
16
|
+
url?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The session bearer.
|
|
19
|
+
*/
|
|
20
|
+
authBearer?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IOpenEOTileLayerOptions {
|
|
23
|
+
/**
|
|
24
|
+
* The tile size
|
|
25
|
+
*/
|
|
26
|
+
projection?: ProjectionLike;
|
|
27
|
+
}
|
|
28
|
+
export declare class OpenEOTileLayer extends TileLayer {
|
|
29
|
+
}
|
|
30
|
+
export interface IOpenEOTileSourceOptions extends XYZOptions {
|
|
31
|
+
/**
|
|
32
|
+
* The process graph value.
|
|
33
|
+
*/
|
|
34
|
+
processGraph: Process;
|
|
35
|
+
/**
|
|
36
|
+
* The connection info.
|
|
37
|
+
*/
|
|
38
|
+
connectionInfo: IOpenEOConnectionInfo;
|
|
39
|
+
}
|
|
40
|
+
export declare class OpenEOTileSource extends XYZSource {
|
|
41
|
+
constructor(options: IOpenEOTileSourceOptions);
|
|
42
|
+
private _connect;
|
|
43
|
+
private _updateUrl;
|
|
44
|
+
private _url;
|
|
45
|
+
private _connection;
|
|
46
|
+
private _connected;
|
|
47
|
+
processGraph: Process;
|
|
48
|
+
connectionInfo: IOpenEOConnectionInfo;
|
|
49
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { showErrorMessage, Dialog, ReactWidget, showDialog, } from '@jupyterlab/apputils';
|
|
2
|
+
import { PromiseDelegate } from '@lumino/coreutils';
|
|
3
|
+
import { OpenEO } from '@openeo/js-client';
|
|
4
|
+
import TileLayer from 'ol/layer/Tile';
|
|
5
|
+
import { XYZ as XYZSource } from 'ol/source';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
const CONNECTIONS = {};
|
|
8
|
+
class SigninWidget extends ReactWidget {
|
|
9
|
+
constructor(initialServerUrl = '') {
|
|
10
|
+
super();
|
|
11
|
+
this._username = '';
|
|
12
|
+
this._password = '';
|
|
13
|
+
this._serverUrl = initialServerUrl;
|
|
14
|
+
}
|
|
15
|
+
getValue() {
|
|
16
|
+
return {
|
|
17
|
+
serverUrl: this._serverUrl,
|
|
18
|
+
username: this._username,
|
|
19
|
+
password: this._password,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (React.createElement("div", { style: {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
gap: '12px',
|
|
27
|
+
minWidth: '320px',
|
|
28
|
+
} },
|
|
29
|
+
React.createElement("label", null,
|
|
30
|
+
React.createElement("div", { style: { marginBottom: '4px' } }, "Server URL"),
|
|
31
|
+
React.createElement("input", { className: "jp-mod-styled", type: "text", defaultValue: this._serverUrl, onChange: e => {
|
|
32
|
+
this._serverUrl = e.target.value;
|
|
33
|
+
}, style: { width: '100%' } })),
|
|
34
|
+
React.createElement("label", null,
|
|
35
|
+
React.createElement("div", { style: { marginBottom: '4px' } }, "Username"),
|
|
36
|
+
React.createElement("input", { className: "jp-mod-styled", type: "text", onChange: e => {
|
|
37
|
+
this._username = e.target.value;
|
|
38
|
+
}, style: { width: '100%' } })),
|
|
39
|
+
React.createElement("label", null,
|
|
40
|
+
React.createElement("div", { style: { marginBottom: '4px' } }, "Password"),
|
|
41
|
+
React.createElement("input", { className: "jp-mod-styled", type: "password", onChange: e => {
|
|
42
|
+
this._password = e.target.value;
|
|
43
|
+
}, style: { width: '100%' } }))));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function showSigninDialog(serverUrl) {
|
|
47
|
+
const body = new SigninWidget(serverUrl);
|
|
48
|
+
const result = await showDialog({
|
|
49
|
+
title: 'Signin to OpenEO tile server',
|
|
50
|
+
body,
|
|
51
|
+
buttons: [Dialog.cancelButton(), Dialog.okButton({ label: 'Sign In' })],
|
|
52
|
+
});
|
|
53
|
+
if (!result.button.accept) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return body.getValue();
|
|
57
|
+
}
|
|
58
|
+
export async function connect(connectionInfo) {
|
|
59
|
+
let { url } = connectionInfo;
|
|
60
|
+
const { authBearer } = connectionInfo;
|
|
61
|
+
let signIn = null;
|
|
62
|
+
if (!url) {
|
|
63
|
+
signIn = await showSigninDialog(url);
|
|
64
|
+
if (!signIn) {
|
|
65
|
+
throw new Error('Needs credentials to connect to OpenEO server.');
|
|
66
|
+
}
|
|
67
|
+
url = signIn.serverUrl;
|
|
68
|
+
}
|
|
69
|
+
if (!url.match(/^https?:\/\//i)) {
|
|
70
|
+
url = `https://${url}`;
|
|
71
|
+
}
|
|
72
|
+
// Already connected to that server url
|
|
73
|
+
if (CONNECTIONS[url]) {
|
|
74
|
+
return CONNECTIONS[url];
|
|
75
|
+
}
|
|
76
|
+
const errorTitle = 'Failed to connect to the OpenEO server';
|
|
77
|
+
const parsedUrl = new URL(url);
|
|
78
|
+
if (window.location.protocol === 'https:' &&
|
|
79
|
+
parsedUrl.protocol !== 'https:') {
|
|
80
|
+
showErrorMessage(errorTitle, 'You are trying to connect to a server with HTTP instead of HTTPS, which is insecure and prohibited by web browsers. Please use HTTPS instead.');
|
|
81
|
+
throw new Error(errorTitle);
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
const connection = await OpenEO.connect(url, {
|
|
85
|
+
addNamespaceToProcess: true,
|
|
86
|
+
});
|
|
87
|
+
const providers = await connection.listAuthProviders();
|
|
88
|
+
let providerType = 'basic';
|
|
89
|
+
let token = null;
|
|
90
|
+
if (authBearer) {
|
|
91
|
+
providerType = authBearer.split('/')[0];
|
|
92
|
+
token = authBearer.split('/')[2];
|
|
93
|
+
}
|
|
94
|
+
const authProvider = providers.find(provider => provider.type === providerType);
|
|
95
|
+
if (!authProvider) {
|
|
96
|
+
throw new Error(`Failed to get "${providerType}" OpenEO provider.`);
|
|
97
|
+
}
|
|
98
|
+
if (token) {
|
|
99
|
+
authProvider.setToken(token);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
if (!signIn) {
|
|
103
|
+
// TODO Add support for signin dialogs for OIDC?
|
|
104
|
+
signIn = await showSigninDialog(url);
|
|
105
|
+
if (!signIn) {
|
|
106
|
+
throw new Error('Needs credentials to connect to OpenEO server.');
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
await authProvider.login(signIn.username, signIn.password);
|
|
110
|
+
const token = authProvider.getToken();
|
|
111
|
+
if (token) {
|
|
112
|
+
connectionInfo.authBearer = token;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const serviceTypes = await connection.listServiceTypes();
|
|
116
|
+
// TODO Support other services?
|
|
117
|
+
if (!serviceTypes['XYZ']) {
|
|
118
|
+
throw new Error('We need the OpenEO service to support XYZ tiling.');
|
|
119
|
+
}
|
|
120
|
+
CONNECTIONS[url] = connection;
|
|
121
|
+
return connection;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
showErrorMessage(errorTitle, `${error}`);
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export class OpenEOTileLayer extends TileLayer {
|
|
129
|
+
}
|
|
130
|
+
export class OpenEOTileSource extends XYZSource {
|
|
131
|
+
constructor(options) {
|
|
132
|
+
super(Object.assign(Object.assign({}, options), { url: '{z},{x},{y}', tileLoadFunction: async (tile, src) => {
|
|
133
|
+
await this._connected.promise;
|
|
134
|
+
let url = this._url;
|
|
135
|
+
if (!url) {
|
|
136
|
+
throw new Error('XYZ URL undefined');
|
|
137
|
+
}
|
|
138
|
+
const [z, x, y] = tile.tileCoord;
|
|
139
|
+
url = url.replace('%7Bz%7D', z);
|
|
140
|
+
url = url.replace('%7By%7D', y);
|
|
141
|
+
url = url.replace('%7Bx%7D', x);
|
|
142
|
+
const res = await fetch(url, {
|
|
143
|
+
method: 'GET',
|
|
144
|
+
});
|
|
145
|
+
const blob = await res.blob();
|
|
146
|
+
tile.getImage().src = URL.createObjectURL(blob);
|
|
147
|
+
} }));
|
|
148
|
+
this._url = null;
|
|
149
|
+
this._connection = null;
|
|
150
|
+
this._connected = new PromiseDelegate();
|
|
151
|
+
this._connect(options.connectionInfo, options.processGraph);
|
|
152
|
+
}
|
|
153
|
+
async _connect(connectionInfo, graph) {
|
|
154
|
+
this._connection = await connect(connectionInfo);
|
|
155
|
+
if (!this._connection) {
|
|
156
|
+
throw new Error('Failed to get OpenEO connection');
|
|
157
|
+
}
|
|
158
|
+
this._connected.resolve();
|
|
159
|
+
this._updateUrl(graph);
|
|
160
|
+
}
|
|
161
|
+
async _updateUrl(processGraph) {
|
|
162
|
+
await this._connected.promise;
|
|
163
|
+
if (!this._connection) {
|
|
164
|
+
throw new Error('Failed to get OpenEO service connection');
|
|
165
|
+
}
|
|
166
|
+
let service = null;
|
|
167
|
+
try {
|
|
168
|
+
service = await this._connection.createService(processGraph, 'XYZ');
|
|
169
|
+
}
|
|
170
|
+
catch (e) {
|
|
171
|
+
throw new Error(`Failed to connect to XYZ service ${e}`);
|
|
172
|
+
}
|
|
173
|
+
if (!service.url) {
|
|
174
|
+
throw new Error('Failed to connect to XYZ service');
|
|
175
|
+
}
|
|
176
|
+
this._url = service.url;
|
|
177
|
+
this.refresh();
|
|
178
|
+
}
|
|
179
|
+
}
|