@longline/aqua-ui 1.0.0 → 1.0.8
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/main.js +1 -1
- package/package.json +5 -7
- package/Types.d.ts +0 -6
- package/Types.js +0 -5
- package/containers/Anchor/Anchor.d.ts +0 -63
- package/containers/Anchor/Anchor.js +0 -113
- package/containers/Anchor/index.d.ts +0 -1
- package/containers/Anchor/index.js +0 -1
- package/containers/Dock/Dock.d.ts +0 -45
- package/containers/Dock/Dock.js +0 -61
- package/containers/Dock/Dockable.d.ts +0 -60
- package/containers/Dock/Dockable.js +0 -98
- package/containers/Dock/index.d.ts +0 -2
- package/containers/Dock/index.js +0 -2
- package/containers/Form/Field.d.ts +0 -104
- package/containers/Form/Field.js +0 -168
- package/containers/Form/Form.d.ts +0 -51
- package/containers/Form/Form.js +0 -89
- package/containers/Form/Validation.d.ts +0 -212
- package/containers/Form/Validation.js +0 -232
- package/containers/Form/context/FormContext.d.ts +0 -10
- package/containers/Form/context/FormContext.js +0 -3
- package/containers/Form/context/useForm.d.ts +0 -5
- package/containers/Form/context/useForm.js +0 -9
- package/containers/Form/elements/BoxWrapper.d.ts +0 -15
- package/containers/Form/elements/BoxWrapper.js +0 -35
- package/containers/Form/elements/Hint.d.ts +0 -21
- package/containers/Form/elements/Hint.js +0 -15
- package/containers/Form/elements/Label.d.ts +0 -22
- package/containers/Form/elements/Label.js +0 -15
- package/containers/Form/elements/SimpleWrapper.d.ts +0 -15
- package/containers/Form/elements/SimpleWrapper.js +0 -17
- package/containers/GlassPane/GlassPane.d.ts +0 -36
- package/containers/GlassPane/GlassPane.js +0 -66
- package/containers/GlassPane/index.d.ts +0 -1
- package/containers/GlassPane/index.js +0 -1
- package/containers/InfoBox/InfoBox.d.ts +0 -34
- package/containers/InfoBox/InfoBox.js +0 -45
- package/containers/InfoBox/elements/Content.d.ts +0 -23
- package/containers/InfoBox/elements/Content.js +0 -37
- package/containers/InfoBox/elements/Footer.d.ts +0 -9
- package/containers/InfoBox/elements/Footer.js +0 -24
- package/containers/InfoBox/elements/Header.d.ts +0 -9
- package/containers/InfoBox/elements/Header.js +0 -24
- package/containers/List/List.d.ts +0 -45
- package/containers/List/List.js +0 -47
- package/containers/List/ListCell.d.ts +0 -13
- package/containers/List/ListCell.js +0 -24
- package/containers/List/ListRow.d.ts +0 -15
- package/containers/List/ListRow.js +0 -24
- package/containers/List/index.d.ts +0 -3
- package/containers/List/index.js +0 -3
- package/containers/Tabs/Pane.d.ts +0 -29
- package/containers/Tabs/Pane.js +0 -45
- package/containers/Tabs/Tabs.d.ts +0 -66
- package/containers/Tabs/Tabs.js +0 -144
- package/controls/Chip/Chip.d.ts +0 -35
- package/controls/Chip/Chip.js +0 -83
- package/controls/Fab/Fab.d.ts +0 -73
- package/controls/Fab/Fab.js +0 -94
- package/controls/Icon/Icon.d.ts +0 -98
- package/controls/Icon/Icon.js +0 -79
- package/controls/Icon/index.d.ts +0 -1
- package/controls/Icon/index.js +0 -1
- package/controls/Key/Key.d.ts +0 -22
- package/controls/Key/Key.js +0 -74
- package/controls/Key/index.d.ts +0 -1
- package/controls/Key/index.js +0 -1
- package/controls/LinearChart/LinearChart.d.ts +0 -31
- package/controls/LinearChart/LinearChart.js +0 -58
- package/controls/ListView/Body.d.ts +0 -8
- package/controls/ListView/Body.js +0 -24
- package/controls/ListView/Column.d.ts +0 -55
- package/controls/ListView/Column.js +0 -8
- package/controls/ListView/ColumnsManager/ColumnDraggable.d.ts +0 -11
- package/controls/ListView/ColumnsManager/ColumnDraggable.js +0 -83
- package/controls/ListView/ColumnsManager/ColumnsManager.d.ts +0 -12
- package/controls/ListView/ColumnsManager/ColumnsManager.js +0 -63
- package/controls/ListView/ColumnsManager/OrderColumns.d.ts +0 -11
- package/controls/ListView/ColumnsManager/OrderColumns.js +0 -62
- package/controls/ListView/ColumnsManager/SourceColumns.d.ts +0 -10
- package/controls/ListView/ColumnsManager/SourceColumns.js +0 -45
- package/controls/ListView/Ghost.d.ts +0 -9
- package/controls/ListView/Ghost.js +0 -52
- package/controls/ListView/Header.d.ts +0 -12
- package/controls/ListView/Header.js +0 -35
- package/controls/ListView/HeaderButton.d.ts +0 -8
- package/controls/ListView/HeaderButton.js +0 -8
- package/controls/ListView/HeaderCell.d.ts +0 -20
- package/controls/ListView/HeaderCell.js +0 -47
- package/controls/ListView/IListViewProps.d.ts +0 -105
- package/controls/ListView/IListViewProps.js +0 -1
- package/controls/ListView/ListView.d.ts +0 -20
- package/controls/ListView/ListView.js +0 -97
- package/controls/ListView/NoData.d.ts +0 -19
- package/controls/ListView/NoData.js +0 -30
- package/controls/ListView/SortButton.d.ts +0 -16
- package/controls/ListView/SortButton.js +0 -26
- package/controls/ListView/Table.d.ts +0 -18
- package/controls/ListView/Table.js +0 -99
- package/controls/ListView/Total.d.ts +0 -9
- package/controls/ListView/Total.js +0 -28
- package/controls/ListView/sortItems.d.ts +0 -6
- package/controls/ListView/sortItems.js +0 -35
- package/controls/Mouse/Mouse.d.ts +0 -38
- package/controls/Mouse/Mouse.js +0 -51
- package/controls/Mouse/index.d.ts +0 -1
- package/controls/Mouse/index.js +0 -1
- package/controls/PrimaryButton/PrimaryButton.d.ts +0 -63
- package/controls/PrimaryButton/PrimaryButton.js +0 -83
- package/controls/PrimaryButton/index.d.ts +0 -1
- package/controls/PrimaryButton/index.js +0 -1
- package/controls/Progress/Progress.d.ts +0 -35
- package/controls/Progress/Progress.js +0 -49
- package/controls/SecondaryButton/SecondaryButton.d.ts +0 -58
- package/controls/SecondaryButton/SecondaryButton.js +0 -73
- package/controls/SecondaryButton/index.d.ts +0 -1
- package/controls/SecondaryButton/index.js +0 -1
- package/controls/TabBar/Tab.d.ts +0 -21
- package/controls/TabBar/Tab.js +0 -25
- package/controls/TabBar/TabBar.d.ts +0 -34
- package/controls/TabBar/TabBar.js +0 -134
- package/controls/TabBar/Underliner.d.ts +0 -7
- package/controls/TabBar/Underliner.js +0 -27
- package/controls/TabBar/index.d.ts +0 -1
- package/controls/TabBar/index.js +0 -1
- package/controls/TertiaryButton/TertiaryButton.d.ts +0 -28
- package/controls/TertiaryButton/TertiaryButton.js +0 -65
- package/controls/TertiaryButton/index.d.ts +0 -1
- package/controls/TertiaryButton/index.js +0 -1
- package/controls/View/View.d.ts +0 -35
- package/controls/View/View.js +0 -58
- package/formatters/Date/DateTime.d.ts +0 -45
- package/formatters/Date/DateTime.js +0 -64
- package/formatters/Date/elements/Custom.d.ts +0 -18
- package/formatters/Date/elements/Custom.js +0 -22
- package/formatters/Date/elements/Distance.d.ts +0 -24
- package/formatters/Date/elements/Distance.js +0 -45
- package/formatters/Date/elements/LongDate.d.ts +0 -17
- package/formatters/Date/elements/LongDate.js +0 -11
- package/formatters/Date/elements/LongDateTime.d.ts +0 -14
- package/formatters/Date/elements/LongDateTime.js +0 -10
- package/formatters/Date/elements/LongTime.d.ts +0 -14
- package/formatters/Date/elements/LongTime.js +0 -10
- package/formatters/Date/elements/ShortDate.d.ts +0 -14
- package/formatters/Date/elements/ShortDate.js +0 -10
- package/formatters/Date/elements/ShortDateTime.d.ts +0 -14
- package/formatters/Date/elements/ShortDateTime.js +0 -10
- package/formatters/Date/elements/ShortTime.d.ts +0 -18
- package/formatters/Date/elements/ShortTime.js +0 -10
- package/formatters/Date/elements/toDate.d.ts +0 -2
- package/formatters/Date/elements/toDate.js +0 -13
- package/formatters/Filesize/Filesize.d.ts +0 -29
- package/formatters/Filesize/Filesize.js +0 -54
- package/formatters/GIS/Latitude.d.ts +0 -23
- package/formatters/GIS/Latitude.js +0 -13
- package/formatters/GIS/Longitude.d.ts +0 -23
- package/formatters/GIS/Longitude.js +0 -13
- package/formatters/GIS/index.d.ts +0 -2
- package/formatters/GIS/index.js +0 -2
- package/formatters/GIS/toDMS.d.ts +0 -2
- package/formatters/GIS/toDMS.js +0 -16
- package/formatters/Highlight/Highlight.d.ts +0 -22
- package/formatters/Highlight/Highlight.js +0 -32
- package/formatters/Highlight/index.d.ts +0 -1
- package/formatters/Highlight/index.js +0 -1
- package/formatters/Human/Human.d.ts +0 -18
- package/formatters/Human/Human.js +0 -34
- package/formatters/Human/index.d.ts +0 -1
- package/formatters/Human/index.js +0 -1
- package/formatters/Number/Number.d.ts +0 -24
- package/formatters/Number/Number.js +0 -36
- package/formatters/Number/index.d.ts +0 -1
- package/formatters/Number/index.js +0 -1
- package/helper/DMS.d.ts +0 -22
- package/helper/DMS.js +0 -46
- package/helper/HslColor.d.ts +0 -11
- package/helper/HslColor.js +0 -47
- package/helper/RgbColor.d.ts +0 -43
- package/helper/RgbColor.js +0 -162
- package/helper/SizeHelper.d.ts +0 -10
- package/helper/SizeHelper.js +0 -56
- package/helper/darken.d.ts +0 -8
- package/helper/darken.js +0 -18
- package/helper/guard.d.ts +0 -5
- package/helper/guard.js +0 -7
- package/helper/lighten.d.ts +0 -8
- package/helper/lighten.js +0 -11
- package/helper/nameToHex.d.ts +0 -6
- package/helper/nameToHex.js +0 -163
- package/inputs/DateInput/Body.d.ts +0 -34
- package/inputs/DateInput/Body.js +0 -50
- package/inputs/DateInput/Calendar.d.ts +0 -15
- package/inputs/DateInput/Calendar.js +0 -60
- package/inputs/DateInput/DateInput.d.ts +0 -73
- package/inputs/DateInput/DateInput.js +0 -143
- package/inputs/DateInput/Day.d.ts +0 -32
- package/inputs/DateInput/Day.js +0 -33
- package/inputs/DateInput/InfiniteList.d.ts +0 -26
- package/inputs/DateInput/InfiniteList.js +0 -87
- package/inputs/DateInput/Nav.d.ts +0 -11
- package/inputs/DateInput/Nav.js +0 -24
- package/inputs/DateInput/Navbar.d.ts +0 -16
- package/inputs/DateInput/Navbar.js +0 -33
- package/inputs/DateInput/NumericInput.d.ts +0 -14
- package/inputs/DateInput/NumericInput.js +0 -48
- package/inputs/DateInput/Selector.d.ts +0 -47
- package/inputs/DateInput/Selector.js +0 -55
- package/inputs/DateInput/SimpleList.d.ts +0 -19
- package/inputs/DateInput/SimpleList.js +0 -31
- package/inputs/Dropdown/Body.d.ts +0 -25
- package/inputs/Dropdown/Body.js +0 -14
- package/inputs/Dropdown/Column.d.ts +0 -21
- package/inputs/Dropdown/Column.js +0 -6
- package/inputs/Dropdown/Dropdown.d.ts +0 -136
- package/inputs/Dropdown/Dropdown.js +0 -446
- package/inputs/Dropdown/Selection.d.ts +0 -11
- package/inputs/Dropdown/Selection.js +0 -23
- package/inputs/Dropdown/Selector.d.ts +0 -29
- package/inputs/Dropdown/Selector.js +0 -16
- package/inputs/Editor/Editor.d.ts +0 -45
- package/inputs/Editor/Editor.js +0 -60
- package/inputs/Editor/buttons/BoldButton.d.ts +0 -7
- package/inputs/Editor/buttons/BoldButton.js +0 -7
- package/inputs/Editor/buttons/BulletListButton.d.ts +0 -7
- package/inputs/Editor/buttons/BulletListButton.js +0 -7
- package/inputs/Editor/buttons/CodeBlockButton.d.ts +0 -7
- package/inputs/Editor/buttons/CodeBlockButton.js +0 -7
- package/inputs/Editor/buttons/CodeButton.d.ts +0 -7
- package/inputs/Editor/buttons/CodeButton.js +0 -7
- package/inputs/Editor/buttons/ItalicButton.d.ts +0 -7
- package/inputs/Editor/buttons/ItalicButton.js +0 -7
- package/inputs/Editor/buttons/OrderedListButton.d.ts +0 -7
- package/inputs/Editor/buttons/OrderedListButton.js +0 -7
- package/inputs/Editor/buttons/StrikethroughButton.d.ts +0 -7
- package/inputs/Editor/buttons/StrikethroughButton.js +0 -7
- package/inputs/Editor/menu/MenuBar.d.ts +0 -9
- package/inputs/Editor/menu/MenuBar.js +0 -44
- package/inputs/Editor/menu/MenuButton.d.ts +0 -35
- package/inputs/Editor/menu/MenuButton.js +0 -34
- package/inputs/Editor/menu/MenuSeparator.d.ts +0 -7
- package/inputs/Editor/menu/MenuSeparator.js +0 -24
- package/inputs/Input/Clear.d.ts +0 -7
- package/inputs/Input/Clear.js +0 -14
- package/inputs/Input/Input.d.ts +0 -133
- package/inputs/Input/Input.js +0 -64
- package/inputs/Input/InputWrapper.d.ts +0 -23
- package/inputs/Input/InputWrapper.js +0 -57
- package/inputs/Input/index.d.ts +0 -1
- package/inputs/Input/index.js +0 -1
- package/inputs/Selector/ISelectorProps.d.ts +0 -29
- package/inputs/Selector/ISelectorProps.js +0 -1
- package/inputs/Selector/Selector.d.ts +0 -29
- package/inputs/Selector/Selector.js +0 -77
- package/inputs/Selector/index.d.ts +0 -1
- package/inputs/Selector/index.js +0 -1
- package/inputs/Selector/widgets/Checkbox.d.ts +0 -6
- package/inputs/Selector/widgets/Checkbox.js +0 -29
- package/inputs/Selector/widgets/Toggle.d.ts +0 -6
- package/inputs/Selector/widgets/Toggle.js +0 -24
- package/inputs/Slider/Slider.d.ts +0 -63
- package/inputs/Slider/Slider.js +0 -198
- package/inputs/Textarea/Textarea.d.ts +0 -79
- package/inputs/Textarea/Textarea.js +0 -65
- package/map/Map/Map.d.ts +0 -47
- package/map/Map/Map.js +0 -221
- package/map/Map/index.d.ts +0 -1
- package/map/Map/index.js +0 -1
- package/map/PositionsManager/PositionBox.d.ts +0 -14
- package/map/PositionsManager/PositionBox.js +0 -86
- package/map/PositionsManager/PositionsManager.d.ts +0 -27
- package/map/PositionsManager/PositionsManager.js +0 -99
- package/map/controls/CompassButton/CompassButton.d.ts +0 -33
- package/map/controls/CompassButton/CompassButton.js +0 -88
- package/map/controls/FullscreenButton/FullscreenButton.d.ts +0 -21
- package/map/controls/FullscreenButton/FullscreenButton.js +0 -62
- package/map/controls/Geocoder/Geocoder.d.ts +0 -49
- package/map/controls/Geocoder/Geocoder.js +0 -179
- package/map/controls/Geocoder/GeocoderApi.d.ts +0 -59
- package/map/controls/Geocoder/GeocoderApi.js +0 -68
- package/map/controls/Geocoder/GeocoderEntry.d.ts +0 -15
- package/map/controls/Geocoder/GeocoderEntry.js +0 -18
- package/map/controls/Geocoder/GeocoderList.d.ts +0 -10
- package/map/controls/Geocoder/GeocoderList.js +0 -18
- package/map/controls/Geocoder/GeocoderSelector.d.ts +0 -16
- package/map/controls/Geocoder/GeocoderSelector.js +0 -25
- package/map/controls/Graticule/Graticule.d.ts +0 -35
- package/map/controls/Graticule/Graticule.js +0 -142
- package/map/controls/MapLoader/MapLoader.d.ts +0 -33
- package/map/controls/MapLoader/MapLoader.js +0 -73
- package/map/controls/ScaleControl/ScaleControl.d.ts +0 -24
- package/map/controls/ScaleControl/ScaleControl.js +0 -107
- package/map/controls/ZoomInButton/ZoomInButton.d.ts +0 -19
- package/map/controls/ZoomInButton/ZoomInButton.js +0 -56
- package/map/controls/ZoomOutButton/ZoomOutButton.d.ts +0 -19
- package/map/controls/ZoomOutButton/ZoomOutButton.js +0 -56
- package/map/controls/base/MapButton/Hint.d.ts +0 -17
- package/map/controls/base/MapButton/Hint.js +0 -34
- package/map/controls/base/MapButton/MapButton.d.ts +0 -46
- package/map/controls/base/MapButton/MapButton.js +0 -71
- package/map/controls/base/MapButton/index.d.ts +0 -1
- package/map/controls/base/MapButton/index.js +0 -1
- package/map/controls/base/MapButtonGroup/MapButtonGroup.d.ts +0 -17
- package/map/controls/base/MapButtonGroup/MapButtonGroup.js +0 -24
- package/map/controls/base/MapControl/MapControl.d.ts +0 -36
- package/map/controls/base/MapControl/MapControl.js +0 -77
- package/map/controls/base/MapControl/index.d.ts +0 -1
- package/map/controls/base/MapControl/index.js +0 -1
- package/map/layers/ClusterLayer/ClusterLayer.d.ts +0 -79
- package/map/layers/ClusterLayer/ClusterLayer.js +0 -118
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.d.ts +0 -51
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +0 -151
- package/map/layers/InterpolationLayer/ContoursFragmentShader.d.ts +0 -2
- package/map/layers/InterpolationLayer/ContoursFragmentShader.js +0 -2
- package/map/layers/InterpolationLayer/ContoursVertexShader.d.ts +0 -2
- package/map/layers/InterpolationLayer/ContoursVertexShader.js +0 -2
- package/map/layers/InterpolationLayer/IGradientStop.d.ts +0 -5
- package/map/layers/InterpolationLayer/IGradientStop.js +0 -1
- package/map/layers/InterpolationLayer/InterpolationLayer.d.ts +0 -35
- package/map/layers/InterpolationLayer/InterpolationLayer.js +0 -256
- package/map/layers/InterpolationLayer/LevelsFragmentShader.d.ts +0 -2
- package/map/layers/InterpolationLayer/LevelsFragmentShader.js +0 -2
- package/map/layers/InterpolationLayer/LevelsVertexShader.d.ts +0 -2
- package/map/layers/InterpolationLayer/LevelsVertexShader.js +0 -2
- package/map/layers/ParticlesLayer/ParticlesFragmentShader.d.ts +0 -2
- package/map/layers/ParticlesLayer/ParticlesFragmentShader.js +0 -2
- package/map/layers/ParticlesLayer/ParticlesLayer.d.ts +0 -40
- package/map/layers/ParticlesLayer/ParticlesLayer.js +0 -337
- package/map/layers/ParticlesLayer/ParticlesVertexShader.d.ts +0 -2
- package/map/layers/ParticlesLayer/ParticlesVertexShader.js +0 -2
- package/map/layers/ParticlesLayer/UVFragmentShader.d.ts +0 -2
- package/map/layers/ParticlesLayer/UVFragmentShader.js +0 -2
- package/map/layers/ParticlesLayer/UVVertexShader.d.ts +0 -2
- package/map/layers/ParticlesLayer/UVVertexShader.js +0 -2
- package/map/markers/ClusterMarker/ClusterMarker.d.ts +0 -36
- package/map/markers/ClusterMarker/ClusterMarker.js +0 -99
- package/map/markers/ClusterMarker/index.d.ts +0 -1
- package/map/markers/ClusterMarker/index.js +0 -1
- package/map/markers/RiskMarker/RiskMarker.d.ts +0 -22
- package/map/markers/RiskMarker/RiskMarker.js +0 -61
- package/modules/MainMenu/Item.d.ts +0 -42
- package/modules/MainMenu/Item.js +0 -94
- package/modules/MainMenu/MainMenu.d.ts +0 -20
- package/modules/MainMenu/MainMenu.js +0 -41
- package/modules/MainMenu/index.d.ts +0 -1
- package/modules/MainMenu/index.js +0 -1
- package/modules/Root/Content.d.ts +0 -16
- package/modules/Root/Content.js +0 -25
- package/modules/Root/Overlay.d.ts +0 -23
- package/modules/Root/Overlay.js +0 -33
- package/modules/Root/Root.d.ts +0 -7
- package/modules/Root/Root.js +0 -45
- package/modules/Root/Shader.d.ts +0 -15
- package/modules/Root/Shader.js +0 -24
- package/modules/Root/Sidebar.d.ts +0 -13
- package/modules/Root/Sidebar.js +0 -24
- package/modules/Root/stories/SampleContent.d.ts +0 -7
- package/modules/Root/stories/SampleContent.js +0 -44
- package/services/Dialog/AlertDialog.d.ts +0 -31
- package/services/Dialog/AlertDialog.js +0 -29
- package/services/Dialog/ConfirmDialog.d.ts +0 -34
- package/services/Dialog/ConfirmDialog.js +0 -30
- package/services/Dialog/Dialog.d.ts +0 -91
- package/services/Dialog/Dialog.js +0 -92
- package/services/Dialog/DialogBackground.d.ts +0 -7
- package/services/Dialog/DialogBackground.js +0 -12
- package/services/Dialog/DialogContent.d.ts +0 -25
- package/services/Dialog/DialogContent.js +0 -38
- package/services/Dialog/DialogFooter.d.ts +0 -24
- package/services/Dialog/DialogFooter.js +0 -50
- package/services/Dialog/DialogHeader.d.ts +0 -18
- package/services/Dialog/DialogHeader.js +0 -36
- package/services/Dialog/DialogWindow.d.ts +0 -13
- package/services/Dialog/DialogWindow.js +0 -12
- package/services/Dialog/XhrDialog.d.ts +0 -34
- package/services/Dialog/XhrDialog.js +0 -321
- package/services/Toast/IToastMessage.d.ts +0 -10
- package/services/Toast/IToastMessage.js +0 -1
- package/services/Toast/IToastProps.d.ts +0 -23
- package/services/Toast/IToastProps.js +0 -1
- package/services/Toast/Toast.d.ts +0 -21
- package/services/Toast/Toast.js +0 -79
- package/services/Toast/ToastContainer.d.ts +0 -40
- package/services/Toast/ToastContainer.js +0 -65
- package/services/Toast/ToastContext.d.ts +0 -22
- package/services/Toast/ToastContext.js +0 -7
- package/services/Toast/ToastProvider.d.ts +0 -19
- package/services/Toast/ToastProvider.js +0 -67
- package/services/Toast/index.d.ts +0 -2
- package/services/Toast/index.js +0 -2
- package/services/Toast/useToast.d.ts +0 -5
- package/services/Toast/useToast.js +0 -9
- package/styles/NormalTheme.d.ts +0 -3
- package/styles/NormalTheme.js +0 -65
- package/styles/StyleBase.d.ts +0 -2
- package/styles/StyleBase.js +0 -8
- package/styles/StyleReset.d.ts +0 -2
- package/styles/StyleReset.js +0 -8
- package/svg/editor/index.d.ts +0 -10
- package/svg/editor/index.js +0 -11
- package/svg/file/index.d.ts +0 -5
- package/svg/file/index.js +0 -6
- package/svg/icons/index.d.ts +0 -36
- package/svg/icons/index.js +0 -37
- package/svg/index.d.ts +0 -11
- package/svg/index.js +0 -5
- package/svg/menu/index.d.ts +0 -8
- package/svg/menu/index.js +0 -9
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
var __assign = (this && this.__assign) || function () {
|
|
6
|
-
__assign = Object.assign || function(t) {
|
|
7
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
-
s = arguments[i];
|
|
9
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
-
t[p] = s[p];
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
};
|
|
14
|
-
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
-
var t = {};
|
|
18
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
-
t[p] = s[p];
|
|
20
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
-
t[p[i]] = s[p[i]];
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
};
|
|
27
|
-
import * as React from 'react';
|
|
28
|
-
import styled, { css } from 'styled-components';
|
|
29
|
-
import { Hint } from './Hint';
|
|
30
|
-
import { MapControl } from '../MapControl';
|
|
31
|
-
var MapButtonBase = function (props) {
|
|
32
|
-
var handleClick = function () {
|
|
33
|
-
if (props.disabled)
|
|
34
|
-
return;
|
|
35
|
-
if (props.onClick)
|
|
36
|
-
props.onClick();
|
|
37
|
-
};
|
|
38
|
-
var renderButton = function () {
|
|
39
|
-
return React.createElement("div", { className: props.className, tabIndex: props.disabled ? -1 : 0, onClick: handleClick },
|
|
40
|
-
React.createElement(Button, { "$grouped": props.grouped, "$size": props.size, "$disabled": props.disabled, "$active": props.active }, props.children),
|
|
41
|
-
props.hint &&
|
|
42
|
-
React.createElement(Hint, { offset: 12, side: props.x < 0 ? "right" : "left" }, props.hint));
|
|
43
|
-
};
|
|
44
|
-
if (props.grouped)
|
|
45
|
-
return renderButton();
|
|
46
|
-
return React.createElement(MapControl, { x: props.x, y: props.y }, renderButton());
|
|
47
|
-
};
|
|
48
|
-
// const Teardrop = styled.svg<{ $disabled: boolean }>`
|
|
49
|
-
var Button = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject([" \n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: ", ";\n\n // Border:\n border-radius: 4px;\n\n ", "\n\n svg {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 8px;\n fill: ", ";\n transition: fill ease-in-out ", "ms;\n }\n\n // Hover:\n div:hover > & {\n background-color: ", ";\n }\n\n ", "\n\n // Disabled:\n ", "\n"], [" \n width: 100%;\n height: 100%;\n cursor: pointer;\n background-color: ", ";\n\n // Border:\n border-radius: 4px;\n\n ", "\n\n svg {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 8px;\n fill: ", ";\n transition: fill ease-in-out ", "ms;\n }\n\n // Hover:\n div:hover > & {\n background-color: ", ";\n }\n\n ", "\n\n // Disabled:\n ", "\n"])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.$grouped && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n div:first-child > & {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n div:not(:last-child):not(:first-child) > & {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n div:last-child > & {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n "], ["\n div:first-child > & {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n div:not(:last-child):not(:first-child) > & {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n div:last-child > & {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n "]))); }, function (p) { return p.theme.colors.neutral[10]; }, function (p) { return p.theme.animation.duration; }, function (p) { return p.theme.colors.neutral[95]; }, function (p) { return p.$active && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", " !important;\n svg {\n fill: ", ";\n }\n "], ["\n background-color: ", " !important;\n svg {\n fill: ", ";\n }\n "])), function (p) { return p.theme.colors.accent; }, function (p) { return p.theme.colors.neutral[100]; }); }, function (p) { return p.$disabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n cursor: default;\n background-color: ", ";\n svg { fill: ", "; } \n "], ["\n cursor: default;\n background-color: ", ";\n svg { fill: ", "; } \n "])), function (p) { return p.theme.colors.neutral[50]; }, function (p) { return p.theme.colors.primary[3]; }); });
|
|
50
|
-
var MapButtonStyled = styled(MapButtonBase)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: relative;\n pointer-events: all;\n\n // Size control:\n width: ", "px;\n height: ", "px;\n\n outline: 0;\n user-select: none;\n\n // Grouped button has a separator border (though not the last button in the group):\n ", "\n\n // Hint positioning:\n div:nth-child(2) {\n opacity: 0;\n }\n\n // Hover:\n &:hover {\n div:nth-child(2) {\n opacity: 1;\n }\n }\n\n // Disabled mode:\n ", " \n"], ["\n position: relative;\n pointer-events: all;\n\n // Size control:\n width: ", "px;\n height: ", "px;\n\n outline: 0;\n user-select: none;\n\n // Grouped button has a separator border (though not the last button in the group):\n ", "\n\n // Hint positioning:\n div:nth-child(2) {\n opacity: 0;\n }\n\n // Hover:\n &:hover {\n div:nth-child(2) {\n opacity: 1;\n }\n }\n\n // Disabled mode:\n ", " \n"
|
|
51
|
-
/**
|
|
52
|
-
* A `MapButton` is a square button to be used on a Mapbox map. It must
|
|
53
|
-
* be provided with the `ViewState` by the underlying `Map`.
|
|
54
|
-
*
|
|
55
|
-
* This component is **abstract**: the button has no content by itself,
|
|
56
|
-
* which must be provided by its child.
|
|
57
|
-
*/
|
|
58
|
-
])), function (p) { return p.size; }, function (p) { return p.size; }, function (p) { return p.grouped && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:not(:last-child) {\n border-bottom: solid 1px ", ";\n } \n "], ["\n &:not(:last-child) {\n border-bottom: solid 1px ", ";\n } \n "])), function (p) { return p.theme.colors.neutral[80]; }); }, function (p) { return p.disabled && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n pointer-events: none;\n cursor: default;\n "], ["\n pointer-events: none;\n cursor: default;\n "]))); });
|
|
59
|
-
/**
|
|
60
|
-
* A `MapButton` is a square button to be used on a Mapbox map. It must
|
|
61
|
-
* be provided with the `ViewState` by the underlying `Map`.
|
|
62
|
-
*
|
|
63
|
-
* This component is **abstract**: the button has no content by itself,
|
|
64
|
-
* which must be provided by its child.
|
|
65
|
-
*/
|
|
66
|
-
var MapButton = function (_a) {
|
|
67
|
-
var _b = _a.size, size = _b === void 0 ? 32 : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.active, active = _d === void 0 ? false : _d, _e = _a.grouped, grouped = _e === void 0 ? false : _e, props = __rest(_a, ["size", "disabled", "active", "grouped"]);
|
|
68
|
-
return React.createElement(MapButtonStyled, __assign({ size: size, disabled: disabled, active: active, grouped: grouped }, props));
|
|
69
|
-
};
|
|
70
|
-
export { MapButton };
|
|
71
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MapButton, IMapButtonProps } from './MapButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MapButton } from './MapButton';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IMapControlProps } from '../MapControl';
|
|
3
|
-
interface IProps extends IMapControlProps {
|
|
4
|
-
/**
|
|
5
|
-
* Children must be one or more `MapButton`-derived components.
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A `MapButtonGroup` groups `MapButton`-derived components, like `ZoomInButton` and `CompassButton`.
|
|
11
|
-
* It removes button borders, leaving a thin separator line between buttons.
|
|
12
|
-
*
|
|
13
|
-
* The button children do not need `x` and `y` coordinates. Instead, coordinates are set once
|
|
14
|
-
* through `MapButtonGroup`.
|
|
15
|
-
*/
|
|
16
|
-
declare const MapButtonGroup: (props: IProps) => React.JSX.Element;
|
|
17
|
-
export { MapButtonGroup };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MapControl } from '../MapControl';
|
|
3
|
-
/**
|
|
4
|
-
* A `MapButtonGroup` groups `MapButton`-derived components, like `ZoomInButton` and `CompassButton`.
|
|
5
|
-
* It removes button borders, leaving a thin separator line between buttons.
|
|
6
|
-
*
|
|
7
|
-
* The button children do not need `x` and `y` coordinates. Instead, coordinates are set once
|
|
8
|
-
* through `MapButtonGroup`.
|
|
9
|
-
*/
|
|
10
|
-
var MapButtonGroup = function (props) {
|
|
11
|
-
return (React.createElement(MapControl, { x: props.x, y: props.y },
|
|
12
|
-
React.createElement("div", { className: props.className }, React.Children.map(props.children, function (child) {
|
|
13
|
-
if (child == null)
|
|
14
|
-
return null;
|
|
15
|
-
return React.cloneElement(child, {
|
|
16
|
-
// X-coordinate is required to determine if Hint aligns left or right.
|
|
17
|
-
x: props.x,
|
|
18
|
-
// If there's only one child, then grouped should be false, or we'd get
|
|
19
|
-
// a single button with no borders.
|
|
20
|
-
grouped: React.Children.count(props.children) > 1
|
|
21
|
-
});
|
|
22
|
-
}))));
|
|
23
|
-
};
|
|
24
|
-
export { MapButtonGroup };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IMapControlProps {
|
|
3
|
-
/** @ignore */
|
|
4
|
-
className?: string;
|
|
5
|
-
/**
|
|
6
|
-
* (From `MapControl`): Horizontal button position. A positive value is an offset from
|
|
7
|
-
* the left, and a negative value is an offset from the right.
|
|
8
|
-
* @default 0
|
|
9
|
-
*/
|
|
10
|
-
x?: number;
|
|
11
|
-
/**
|
|
12
|
-
* (From `MapControl`): Vertical button position. A positive value is an offset from the
|
|
13
|
-
* top, and a negative value is an offset from the bottom.
|
|
14
|
-
* @default 0
|
|
15
|
-
*/
|
|
16
|
-
y?: number;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* `MapControl` positions a control of top of a map, taking Mapbox `padding`
|
|
20
|
-
* into account.
|
|
21
|
-
*
|
|
22
|
-
* The control is positioned using `x` and `y`. Positive values mean offset from
|
|
23
|
-
* left and top, and negative coordinates mean offsets from right and bottom.
|
|
24
|
-
*
|
|
25
|
-
* This component is **abstract**: the button has no content by itself,
|
|
26
|
-
* which must be provided by its child.
|
|
27
|
-
*
|
|
28
|
-
* **Note**: `MapControl` has `pointer-events: none`. It is the responsibility of
|
|
29
|
-
* the wrapped control to set `pointer-events: all`. This is done to accommodate
|
|
30
|
-
* controls that must not capture pointer events, such as `MapLoader`
|
|
31
|
-
* and `ScaleControl`.
|
|
32
|
-
*/
|
|
33
|
-
declare const MapControl: ({ x, y, ...props }: IMapControlProps & {
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
}) => React.JSX.Element;
|
|
36
|
-
export { MapControl, IMapControlProps };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
var __assign = (this && this.__assign) || function () {
|
|
6
|
-
__assign = Object.assign || function(t) {
|
|
7
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
-
s = arguments[i];
|
|
9
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
-
t[p] = s[p];
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
};
|
|
14
|
-
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
-
var t = {};
|
|
18
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
-
t[p] = s[p];
|
|
20
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
-
t[p[i]] = s[p[i]];
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
};
|
|
27
|
-
import * as React from 'react';
|
|
28
|
-
import { useViewState } from '../../../Map';
|
|
29
|
-
import styled from 'styled-components';
|
|
30
|
-
var MapControlBase = function (props) {
|
|
31
|
-
var viewState = useViewState();
|
|
32
|
-
return (React.createElement("div", { className: props.className, style: {
|
|
33
|
-
// Must calculate this style dynamically, because it needs local state.
|
|
34
|
-
left: props.x >= 0 ? "".concat(props.x + viewState.padding.left, "px") : 'auto',
|
|
35
|
-
right: props.x < 0 ? "".concat(viewState.padding.right - props.x, "px") : 'auto',
|
|
36
|
-
top: props.y >= 0 ? "".concat(props.y + viewState.padding.top, "px") : 'auto',
|
|
37
|
-
bottom: props.y < 0 ? "".concat(-props.y - -viewState.padding.bottom, "px") : 'auto'
|
|
38
|
-
} }, props.children));
|
|
39
|
-
};
|
|
40
|
-
var MapControlStyled = styled(MapControlBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n z-index: 100;\n box-sizing: border-box;\n pointer-events: none;\n"], ["\n position: absolute;\n z-index: 100;\n box-sizing: border-box;\n pointer-events: none;\n"
|
|
41
|
-
/**
|
|
42
|
-
* `MapControl` positions a control of top of a map, taking Mapbox `padding`
|
|
43
|
-
* into account.
|
|
44
|
-
*
|
|
45
|
-
* The control is positioned using `x` and `y`. Positive values mean offset from
|
|
46
|
-
* left and top, and negative coordinates mean offsets from right and bottom.
|
|
47
|
-
*
|
|
48
|
-
* This component is **abstract**: the button has no content by itself,
|
|
49
|
-
* which must be provided by its child.
|
|
50
|
-
*
|
|
51
|
-
* **Note**: `MapControl` has `pointer-events: none`. It is the responsibility of
|
|
52
|
-
* the wrapped control to set `pointer-events: all`. This is done to accommodate
|
|
53
|
-
* controls that must not capture pointer events, such as `MapLoader`
|
|
54
|
-
* and `ScaleControl`.
|
|
55
|
-
*/
|
|
56
|
-
])));
|
|
57
|
-
/**
|
|
58
|
-
* `MapControl` positions a control of top of a map, taking Mapbox `padding`
|
|
59
|
-
* into account.
|
|
60
|
-
*
|
|
61
|
-
* The control is positioned using `x` and `y`. Positive values mean offset from
|
|
62
|
-
* left and top, and negative coordinates mean offsets from right and bottom.
|
|
63
|
-
*
|
|
64
|
-
* This component is **abstract**: the button has no content by itself,
|
|
65
|
-
* which must be provided by its child.
|
|
66
|
-
*
|
|
67
|
-
* **Note**: `MapControl` has `pointer-events: none`. It is the responsibility of
|
|
68
|
-
* the wrapped control to set `pointer-events: all`. This is done to accommodate
|
|
69
|
-
* controls that must not capture pointer events, such as `MapLoader`
|
|
70
|
-
* and `ScaleControl`.
|
|
71
|
-
*/
|
|
72
|
-
var MapControl = function (_a) {
|
|
73
|
-
var _b = _a.x, x = _b === void 0 ? 0 : _b, _c = _a.y, y = _c === void 0 ? 0 : _c, props = __rest(_a, ["x", "y"]);
|
|
74
|
-
return React.createElement(MapControlStyled, __assign({ x: x, y: y }, props));
|
|
75
|
-
};
|
|
76
|
-
export { MapControl };
|
|
77
|
-
var templateObject_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MapControl';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MapControl';
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IItem {
|
|
3
|
-
latitude: number;
|
|
4
|
-
longitude: number;
|
|
5
|
-
}
|
|
6
|
-
interface IProps {
|
|
7
|
-
/**
|
|
8
|
-
* Array of items that must be clustered. Each item must at least have
|
|
9
|
-
* a `latitude` and `longitude` key.
|
|
10
|
-
*/
|
|
11
|
-
items: IItem[];
|
|
12
|
-
/**
|
|
13
|
-
* Radius of cluster (in pixels).
|
|
14
|
-
* @default 18
|
|
15
|
-
*/
|
|
16
|
-
radius?: number;
|
|
17
|
-
/**
|
|
18
|
-
* If set, cluster size is relative to its value (as taken from the `field`),
|
|
19
|
-
* adding this value to the cluster radius per logarithmic step.
|
|
20
|
-
* @default 0
|
|
21
|
-
*/
|
|
22
|
-
relativeSize?: number;
|
|
23
|
-
/**
|
|
24
|
-
* If provided, then this property will be extracted from features and a
|
|
25
|
-
* sum is calculated for each cluster. This is the value that will be
|
|
26
|
-
* printed on clusters. If omitted, `point_count` is used.
|
|
27
|
-
*/
|
|
28
|
-
aggregation?: string;
|
|
29
|
-
/**
|
|
30
|
-
* RingFields are drawn as colored segments around the cluster marker.
|
|
31
|
-
* For each ring field, provide a (numeric) item property.
|
|
32
|
-
* @default []
|
|
33
|
-
*/
|
|
34
|
-
ringFields?: string[];
|
|
35
|
-
/**
|
|
36
|
-
* Radius of each cluster. A value of 512 indicates a radius equal to the width
|
|
37
|
-
* of a tile.
|
|
38
|
-
* @default 80
|
|
39
|
-
*/
|
|
40
|
-
clusterRadius?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Max zoom on which to cluster points. Defaults to one zoom less than maxzoom
|
|
43
|
-
* (so that last zoom features are not clustered). Clusters are re-evaluated at
|
|
44
|
-
* integer zoom levels so setting clusterMaxZoom to 14 means the clusters will
|
|
45
|
-
* be displayed until z15.
|
|
46
|
-
* @default 18
|
|
47
|
-
*/
|
|
48
|
-
clusterMaxZoom?: number;
|
|
49
|
-
/**
|
|
50
|
-
* If set, clicking a cluster zooms the map to its extent.
|
|
51
|
-
* @default false
|
|
52
|
-
*/
|
|
53
|
-
clickZoom?: boolean;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* A `ClusterLayer` manages its own `Source`. It does not takes GeoJSON, but a list of objects which must at least have
|
|
57
|
-
* `latitude` and `longitude` keys. Other object keys may be used for the aggregate values of clusters; if no field is
|
|
58
|
-
* supplied, then the cluster will display the number of features inside them (the `point_count`).
|
|
59
|
-
*
|
|
60
|
-
* A `ClusterLayer` uses `HtmlMarkerLayer`, providing it with its own preset marker.
|
|
61
|
-
*
|
|
62
|
-
* `ringFields` is an array of strings, each element being a key in the layer input items. For each cluster, the field
|
|
63
|
-
* values are aggregated, and then an arc is painted on the cluster marker which correspond to that field's weight
|
|
64
|
-
* compared to the other `ringFields`.
|
|
65
|
-
*
|
|
66
|
-
* ```tsx
|
|
67
|
-
* const items = [
|
|
68
|
-
* { latitude: 23.3, longitude: 16.6, population: 100 },
|
|
69
|
-
* { latitude: 24.5, longitude: 17.2, population: 250 },
|
|
70
|
-
* ...
|
|
71
|
-
* ];
|
|
72
|
-
*
|
|
73
|
-
* <Map>
|
|
74
|
-
* <ClusterLayer items={items} aggregation="population"/>
|
|
75
|
-
* </Map>
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
declare const ClusterLayer: ({ relativeSize, radius, clusterRadius, clusterMaxZoom, ringFields, clickZoom, ...props }: IProps) => React.JSX.Element;
|
|
79
|
-
export { ClusterLayer };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import * as React from 'react';
|
|
24
|
-
import { Source, useMap } from 'react-map-gl';
|
|
25
|
-
import { HtmlMarkerLayer } from '../HtmlMarkerLayer/HtmlMarkerLayer';
|
|
26
|
-
import { ClusterMarker } from '../../markers/ClusterMarker';
|
|
27
|
-
function uuidv4() {
|
|
28
|
-
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, function (c) {
|
|
29
|
-
return (+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
var ClusterLayerBase = function (_a) {
|
|
33
|
-
var _b = _a.relativeSize, relativeSize = _b === void 0 ? 0 : _b, _c = _a.radius, radius = _c === void 0 ? 18 : _c, _d = _a.clusterRadius, clusterRadius = _d === void 0 ? 80 : _d, _e = _a.clusterMaxZoom, clusterMaxZoom = _e === void 0 ? 18 : _e, _f = _a.ringFields, ringFields = _f === void 0 ? [] : _f, _g = _a.clickZoom, clickZoom = _g === void 0 ? false : _g, props = __rest(_a, ["relativeSize", "radius", "clusterRadius", "clusterMaxZoom", "ringFields", "clickZoom"]);
|
|
34
|
-
var map = useMap().current;
|
|
35
|
-
// Generate a random, unique source ID:
|
|
36
|
-
var sourceId = React.useRef(uuidv4()).current;
|
|
37
|
-
var itemsToFeatures = React.useMemo(function () {
|
|
38
|
-
var collection = {
|
|
39
|
-
type: 'FeatureCollection',
|
|
40
|
-
// Return a feature for each item.
|
|
41
|
-
features: props.items.map(function (f) {
|
|
42
|
-
var _a;
|
|
43
|
-
// Build feature's propeties:
|
|
44
|
-
var properties = {};
|
|
45
|
-
// If an aggregation was provided, copy its value to the GeoJSON.
|
|
46
|
-
if (props.aggregation) {
|
|
47
|
-
properties[props.aggregation] = (_a = f[props.aggregation]) !== null && _a !== void 0 ? _a : 0;
|
|
48
|
-
}
|
|
49
|
-
// If ringFields were provided, copy their values to the GeoJSON.
|
|
50
|
-
ringFields.forEach(function (rf) { return properties[rf] = f[rf]; });
|
|
51
|
-
return {
|
|
52
|
-
type: 'Feature',
|
|
53
|
-
geometry: { type: 'Point', coordinates: [f.longitude, f.latitude] },
|
|
54
|
-
properties: properties
|
|
55
|
-
};
|
|
56
|
-
})
|
|
57
|
-
};
|
|
58
|
-
return collection;
|
|
59
|
-
}, [props.items]);
|
|
60
|
-
// Cluster properties calculations:
|
|
61
|
-
// * The `aggregation` is summed.
|
|
62
|
-
// * Each `ringField` is summed.
|
|
63
|
-
var clusterProperties = React.useMemo(function () {
|
|
64
|
-
var obj = {};
|
|
65
|
-
if (props.aggregation)
|
|
66
|
-
obj["sum"] = ["+", ["get", props.aggregation]];
|
|
67
|
-
ringFields.forEach(function (rf) { return obj[rf] = ["+", ["get", rf]]; });
|
|
68
|
-
return obj;
|
|
69
|
-
}, [props.aggregation, ringFields]);
|
|
70
|
-
var handleClick = function (longitude, latitude, cluster_id) {
|
|
71
|
-
map.getSource(sourceId).getClusterExpansionZoom(cluster_id, function (err, zoom) {
|
|
72
|
-
if (err)
|
|
73
|
-
return;
|
|
74
|
-
map.easeTo({
|
|
75
|
-
center: [longitude, latitude],
|
|
76
|
-
zoom: zoom
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
return (React.createElement(Source, { id: sourceId, type: 'geojson', data: itemsToFeatures, cluster: true, clusterRadius: clusterRadius, clusterMaxZoom: clusterMaxZoom, clusterProperties: __assign({}, clusterProperties) },
|
|
81
|
-
React.createElement(HtmlMarkerLayer, { sourceId: sourceId, idField: "cluster_id" }, function (markerProps) {
|
|
82
|
-
return React.createElement(ClusterMarker, __assign({ relativeSize: relativeSize, radius: radius, value: props.aggregation ? markerProps['sum'] : markerProps['point_count'], ringValues: ringFields.map(function (f) { return markerProps[f]; }), onClick: clickZoom ? function () { return handleClick(markerProps.longitude, markerProps.latitude, markerProps.cluster_id); } : null }, markerProps));
|
|
83
|
-
})));
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* A `ClusterLayer` manages its own `Source`. It does not takes GeoJSON, but a list of objects which must at least have
|
|
87
|
-
* `latitude` and `longitude` keys. Other object keys may be used for the aggregate values of clusters; if no field is
|
|
88
|
-
* supplied, then the cluster will display the number of features inside them (the `point_count`).
|
|
89
|
-
*
|
|
90
|
-
* A `ClusterLayer` uses `HtmlMarkerLayer`, providing it with its own preset marker.
|
|
91
|
-
*
|
|
92
|
-
* `ringFields` is an array of strings, each element being a key in the layer input items. For each cluster, the field
|
|
93
|
-
* values are aggregated, and then an arc is painted on the cluster marker which correspond to that field's weight
|
|
94
|
-
* compared to the other `ringFields`.
|
|
95
|
-
*
|
|
96
|
-
* ```tsx
|
|
97
|
-
* const items = [
|
|
98
|
-
* { latitude: 23.3, longitude: 16.6, population: 100 },
|
|
99
|
-
* { latitude: 24.5, longitude: 17.2, population: 250 },
|
|
100
|
-
* ...
|
|
101
|
-
* ];
|
|
102
|
-
*
|
|
103
|
-
* <Map>
|
|
104
|
-
* <ClusterLayer items={items} aggregation="population"/>
|
|
105
|
-
* </Map>
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
var ClusterLayer = function (_a) {
|
|
109
|
-
var _b = _a.relativeSize, relativeSize = _b === void 0 ? 0 : _b, _c = _a.radius, radius = _c === void 0 ? 24 : _c, _d = _a.clusterRadius, clusterRadius = _d === void 0 ? 80 : _d, _e = _a.clusterMaxZoom, clusterMaxZoom = _e === void 0 ? 18 : _e, ringFields = _a.ringFields, _f = _a.clickZoom, clickZoom = _f === void 0 ? false : _f, props = __rest(_a, ["relativeSize", "radius", "clusterRadius", "clusterMaxZoom", "ringFields", "clickZoom"]);
|
|
110
|
-
var _g = React.useState(0), key = _g[0], setKey = _g[1];
|
|
111
|
-
// When aggregation changes, we mount a whole new component. Mapbox does not
|
|
112
|
-
// appear to deal with changes to clusterProperties well.
|
|
113
|
-
React.useEffect(function () {
|
|
114
|
-
setKey(Date.now());
|
|
115
|
-
}, [props.aggregation, ringFields]);
|
|
116
|
-
return React.createElement(ClusterLayerBase, __assign({ key: key, relativeSize: relativeSize, radius: radius, clusterRadius: clusterRadius, clusterMaxZoom: clusterMaxZoom, ringFields: ringFields, clickZoom: clickZoom }, props));
|
|
117
|
-
};
|
|
118
|
-
export { ClusterLayer };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
/**
|
|
4
|
-
* Function that returns a marker component. Properties that `HtmlMarkerLayer`
|
|
5
|
-
* makes available to the component are passed in as `props`.
|
|
6
|
-
* e.g. `{(p) => <MyMarker {...p} bordered flashing/>}`
|
|
7
|
-
*/
|
|
8
|
-
children?: (props: any) => React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* ID of the source that's queried.
|
|
11
|
-
*/
|
|
12
|
-
sourceId: string;
|
|
13
|
-
/**
|
|
14
|
-
* Every feature must have a unique ID in its properties. This is used to
|
|
15
|
-
* tell features apart. If the `source` should ever change, then it is
|
|
16
|
-
* important that new items have new IDs, so that old markers get removed
|
|
17
|
-
* correctly.
|
|
18
|
-
*/
|
|
19
|
-
idField: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The `HtmlMarkerLayer` manages HTML markers on a map. HTML markers are far slower
|
|
23
|
-
* than OpenGL layers, but much more flexible: with SVG, any shape of marker can
|
|
24
|
-
* be designed, and the markers can easily be made responsive to hover.
|
|
25
|
-
*
|
|
26
|
-
* The `HtmlMarkerLayer` keeps an internal cache, creating and rendering markers only
|
|
27
|
-
* when they are visible in the map viewport. This is a suitable solution for clusters
|
|
28
|
-
* (where by definition there are never very many icons in the viewport), or when
|
|
29
|
-
* there are simply not _that_ many markers: up to a few hundred in the viewport is the
|
|
30
|
-
* upper limit.
|
|
31
|
-
*
|
|
32
|
-
* The `HtmlMarkerLayer` must be placed inside a GeoJSON `Source`. In that source,
|
|
33
|
-
* each feature must have a unique ID (passed to this layer as the `idField`), which
|
|
34
|
-
* is used to tell features apart. When features are refreshed, it is imported that
|
|
35
|
-
* they all get new IDs so that old markers get removed correctly.
|
|
36
|
-
*
|
|
37
|
-
* The `HtmlMarkerLayer` component takes a _function child_. This function accepts
|
|
38
|
-
* a `props` object, which will be the properties from each GeoJSON feature for which
|
|
39
|
-
* a marker is rendered.
|
|
40
|
-
*
|
|
41
|
-
* ```tsx
|
|
42
|
-
* // featureCollection has a property "id" with unique values
|
|
43
|
-
* <Source id="mysource" type="geojson" data={featureCollection}>
|
|
44
|
-
* <HtmlMarkerLayer sourceId="mysource" idField="id">
|
|
45
|
-
* {(markerProps) => <MyMarkerComponent color="gold" radius={45} {...markerProps}/>
|
|
46
|
-
* </HtmlMarkerLayer>
|
|
47
|
-
* </Source>
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
declare const HtmlMarkerLayer: (props: IProps) => React.JSX.Element;
|
|
51
|
-
export { HtmlMarkerLayer };
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import * as React from 'react';
|
|
13
|
-
import * as ReactDOM from 'react-dom/client';
|
|
14
|
-
import { Layer, useMap } from 'react-map-gl';
|
|
15
|
-
import { Marker } from 'mapbox-gl';
|
|
16
|
-
/**
|
|
17
|
-
* The `HtmlMarkerLayer` manages HTML markers on a map. HTML markers are far slower
|
|
18
|
-
* than OpenGL layers, but much more flexible: with SVG, any shape of marker can
|
|
19
|
-
* be designed, and the markers can easily be made responsive to hover.
|
|
20
|
-
*
|
|
21
|
-
* The `HtmlMarkerLayer` keeps an internal cache, creating and rendering markers only
|
|
22
|
-
* when they are visible in the map viewport. This is a suitable solution for clusters
|
|
23
|
-
* (where by definition there are never very many icons in the viewport), or when
|
|
24
|
-
* there are simply not _that_ many markers: up to a few hundred in the viewport is the
|
|
25
|
-
* upper limit.
|
|
26
|
-
*
|
|
27
|
-
* The `HtmlMarkerLayer` must be placed inside a GeoJSON `Source`. In that source,
|
|
28
|
-
* each feature must have a unique ID (passed to this layer as the `idField`), which
|
|
29
|
-
* is used to tell features apart. When features are refreshed, it is imported that
|
|
30
|
-
* they all get new IDs so that old markers get removed correctly.
|
|
31
|
-
*
|
|
32
|
-
* The `HtmlMarkerLayer` component takes a _function child_. This function accepts
|
|
33
|
-
* a `props` object, which will be the properties from each GeoJSON feature for which
|
|
34
|
-
* a marker is rendered.
|
|
35
|
-
*
|
|
36
|
-
* ```tsx
|
|
37
|
-
* // featureCollection has a property "id" with unique values
|
|
38
|
-
* <Source id="mysource" type="geojson" data={featureCollection}>
|
|
39
|
-
* <HtmlMarkerLayer sourceId="mysource" idField="id">
|
|
40
|
-
* {(markerProps) => <MyMarkerComponent color="gold" radius={45} {...markerProps}/>
|
|
41
|
-
* </HtmlMarkerLayer>
|
|
42
|
-
* </Source>
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
var HtmlMarkerLayer = function (props) {
|
|
46
|
-
var map = useMap().current;
|
|
47
|
-
// Can't call props.children directly from map render event handler.
|
|
48
|
-
// Make a ref copy:
|
|
49
|
-
var children = React.useRef(props.children);
|
|
50
|
-
var markers = React.useRef({});
|
|
51
|
-
var markersOnScreen = React.useRef({});
|
|
52
|
-
// Add render event to map, and remove it when this component
|
|
53
|
-
// is unmounted. Whenever the map renders, we must refresh
|
|
54
|
-
// all markers.
|
|
55
|
-
React.useEffect(function () {
|
|
56
|
-
map.on('render', updateMarkers);
|
|
57
|
-
return function () { map.off('render', updateMarkers); };
|
|
58
|
-
}, []);
|
|
59
|
-
// If the child function changes, then update the children ref copy.
|
|
60
|
-
// Also clear map and repaint it, because child component props may
|
|
61
|
-
// have changed.
|
|
62
|
-
React.useEffect(function () {
|
|
63
|
-
children.current = props.children;
|
|
64
|
-
for (var id in markersOnScreen.current) {
|
|
65
|
-
markersOnScreen.current[id].remove();
|
|
66
|
-
}
|
|
67
|
-
markers.current = {};
|
|
68
|
-
markersOnScreen.current = {};
|
|
69
|
-
map.triggerRepaint();
|
|
70
|
-
}, [props.children]);
|
|
71
|
-
// When component is unmounted, remove all its markers from the map.
|
|
72
|
-
React.useEffect(function () {
|
|
73
|
-
return function () {
|
|
74
|
-
for (var id in markersOnScreen.current) {
|
|
75
|
-
markersOnScreen.current[id].remove();
|
|
76
|
-
}
|
|
77
|
-
map.triggerRepaint();
|
|
78
|
-
};
|
|
79
|
-
}, []);
|
|
80
|
-
//
|
|
81
|
-
// Given a native or React component and props, turn it into an
|
|
82
|
-
// HTML element. Return this element.
|
|
83
|
-
//
|
|
84
|
-
var createHtmlElementFromReactNode = function (latlngfeatureProps) {
|
|
85
|
-
// Don't render anything if there is no child.
|
|
86
|
-
if (!children.current)
|
|
87
|
-
return null;
|
|
88
|
-
// Get the first child.
|
|
89
|
-
var elem = children.current(latlngfeatureProps);
|
|
90
|
-
// Render child.
|
|
91
|
-
var el = document.createElement('div');
|
|
92
|
-
var root = ReactDOM.createRoot(el);
|
|
93
|
-
root.render(elem);
|
|
94
|
-
return el;
|
|
95
|
-
};
|
|
96
|
-
//
|
|
97
|
-
// Calculate which markers are offscreen, and remove them.
|
|
98
|
-
// Add new markers for markers which are now onscreen.
|
|
99
|
-
var updateMarkers = function () {
|
|
100
|
-
// Only run after GeoJSON is loaded:
|
|
101
|
-
if (!map.getSource(props.sourceId))
|
|
102
|
-
return;
|
|
103
|
-
if (!map.isSourceLoaded(props.sourceId))
|
|
104
|
-
return;
|
|
105
|
-
// Retrieve all features that are currently rendered on a visible map tile,
|
|
106
|
-
// thus excluding everything that's off-screen, for speed. The use of
|
|
107
|
-
// querySourceFeatures requires that at least one Layer exists, which is
|
|
108
|
-
// why we have layer that renders only invisible circles.
|
|
109
|
-
// querySourceFeatures often results duplicates due to buffering.
|
|
110
|
-
// Remove these duplicates by looking at each feature's unique ID.
|
|
111
|
-
var seen = {};
|
|
112
|
-
var features = map.querySourceFeatures(props.sourceId).filter(function (f) {
|
|
113
|
-
var id = f.properties[props.idField];
|
|
114
|
-
return seen.hasOwnProperty(id) ? false : (seen[id] = true);
|
|
115
|
-
});
|
|
116
|
-
// For every marker on the screen, create an HTML marker (if we didn't yet),
|
|
117
|
-
// and add it to the map if it's not there already
|
|
118
|
-
var newMarkers = {};
|
|
119
|
-
for (var _i = 0, features_1 = features; _i < features_1.length; _i++) {
|
|
120
|
-
var feature = features_1[_i];
|
|
121
|
-
var coords = feature.geometry.coordinates;
|
|
122
|
-
var fprops = feature.properties;
|
|
123
|
-
// if (!props.cluster) continue;
|
|
124
|
-
var id = fprops[props.idField];
|
|
125
|
-
// Is there a marker for this feature?
|
|
126
|
-
var marker = markers.current[id];
|
|
127
|
-
// If not, create one:
|
|
128
|
-
if (!marker) {
|
|
129
|
-
var el = createHtmlElementFromReactNode(__assign({ longitude: coords[0], latitude: coords[1] }, fprops));
|
|
130
|
-
marker = markers.current[id] = new Marker({
|
|
131
|
-
element: el
|
|
132
|
-
});
|
|
133
|
-
marker.setLngLat(coords);
|
|
134
|
-
}
|
|
135
|
-
newMarkers[id] = marker;
|
|
136
|
-
if (!markersOnScreen.current[id])
|
|
137
|
-
marker.addTo(map.getMap());
|
|
138
|
-
}
|
|
139
|
-
// for every marker we've added previously, remove those
|
|
140
|
-
// that are no longer visible:
|
|
141
|
-
for (var id in markersOnScreen.current) {
|
|
142
|
-
if (!newMarkers[id])
|
|
143
|
-
markersOnScreen.current[id].remove();
|
|
144
|
-
}
|
|
145
|
-
markersOnScreen.current = newMarkers;
|
|
146
|
-
};
|
|
147
|
-
// querySourceFeatures will only work if we have a layer, even
|
|
148
|
-
// though it's empty.
|
|
149
|
-
return (React.createElement(Layer, { source: props.sourceId, type: "circle", paint: { "circle-radius": 0 } }));
|
|
150
|
-
};
|
|
151
|
-
export { HtmlMarkerLayer };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const ContoursFragmentShader = " \n #ifdef GL_ES\n precision mediump float;\n #endif\n\n // Screen resolution is needed to convert gl_FragCoord to texture coordinate.\n uniform vec2 u_resolution;\n uniform sampler2D dataTexture;\n uniform int levels;\n uniform vec4 u_contourColor;\n uniform float u_gradientStops[12];\n uniform vec4 u_gradientColors[12];\n\n //\n // Given a value, find its corresponding color in the gradient stops.\n //\n vec4 getGradientColor(float position) {\n // Find left and right stop:\n float left = -1.0;\n float right = 99.0;\n vec4 leftColor;\n vec4 rightColor;\n\n for(int i = 0; i < 12; i++) {\n if (u_gradientStops[i] <= position) {\n left = u_gradientStops[i]; \n leftColor = u_gradientColors[i];\n } else break;\n }\n\n for(int i = 12 - 1; i >= 0; i--) {\n if (u_gradientStops[i] >= position) {\n right = u_gradientStops[i]; \n rightColor = u_gradientColors[i];\n } else break;\n }\n\n // Distance between stops:\n float width = right - left;\n // Distance from left stop:\n float dist = position - left;\n // Right stop weight:\n float weight;\n if(dist == 0.0) {\n weight = dist;\n } else {\n weight = dist / width;\n }\n\n float r = leftColor.x + (rightColor.x - leftColor.x) * weight;\n float g = leftColor.y + (rightColor.y - leftColor.y) * weight;\n float b = leftColor.z + (rightColor.z - leftColor.z) * weight;\n float a = leftColor.w + (rightColor.w - leftColor.w) * weight;\n return vec4(r, g, b, a); \n } \n\n //\n // Returns texture color at pixelCoord.\n //\n vec4 texelFetch(sampler2D tex, vec2 pixelCoord) {\n return texture2D(tex, pixelCoord / u_resolution);\n }\n\n //\n // Returns texture pixel shade, in a number of levels:\n int getShade(sampler2D tex, vec2 pixelCoord, float levels) {\n vec4 color = texelFetch(tex, pixelCoord);\n // If the color is transparent, return -1, so that there's always a contour line.\n if(color.w == 0.0) return -1;\n // Return greyscale shade in levels:\n return int(color.x * levels);\n }\n\n bool hasDifferentShade() {\n float dist = float(levels);\n\n // Get shades of input color and surrounding pixels:\n int shade = getShade(dataTexture, gl_FragCoord.xy, dist);\n int up = getShade(dataTexture, vec2(gl_FragCoord.x, gl_FragCoord.y - 1.0), dist);\n int down = getShade(dataTexture, vec2(gl_FragCoord.x, gl_FragCoord.y + 1.0), dist);\n int left = getShade(dataTexture, vec2(gl_FragCoord.x - 1.0, gl_FragCoord.y), dist);\n int right = getShade(dataTexture, vec2(gl_FragCoord.x + 1.0, gl_FragCoord.y), dist);\n return (up != shade || down != shade || left != shade || right != shade);\n }\n\n void main() {\n // Get input color:\n vec4 color = texelFetch(dataTexture, gl_FragCoord.xy);\n\n // If input is transparent, draw nothing.\n if(color.w == 0.0) return;\n\n // If the shade of the current pixel is different from any of its surrounding\n // pixels by at least a shade, then draw contour line color.\n if(levels != 0 && hasDifferentShade()) {\n gl_FragColor = u_contourColor;\n } \n // Otherwise draw the input color.\n else {\n gl_FragColor = getGradientColor(color.x);\n }\n }\n";
|
|
2
|
-
export { ContoursFragmentShader };
|