@gamecrafters/base-ui 0.0.17 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/build/components/floating-panel/FloatingPanel.d.ts +7 -0
  2. package/build/components/floating-panel/FloatingPanel.types.d.ts +100 -0
  3. package/build/components/floating-panel/FloatingPanelBody.d.ts +7 -0
  4. package/build/components/floating-panel/FloatingPanelCloseTrigger.d.ts +5 -0
  5. package/build/components/floating-panel/FloatingPanelContent.d.ts +7 -0
  6. package/build/components/floating-panel/FloatingPanelContext.d.ts +3 -0
  7. package/build/components/floating-panel/FloatingPanelControl.d.ts +7 -0
  8. package/build/components/floating-panel/FloatingPanelDragTrigger.d.ts +7 -0
  9. package/build/components/floating-panel/FloatingPanelHeader.d.ts +7 -0
  10. package/build/components/floating-panel/FloatingPanelPositioner.d.ts +7 -0
  11. package/build/components/floating-panel/FloatingPanelResizeTrigger.d.ts +7 -0
  12. package/build/components/floating-panel/FloatingPanelStageTrigger.d.ts +7 -0
  13. package/build/components/floating-panel/FloatingPanelTitle.d.ts +7 -0
  14. package/build/components/floating-panel/FloatingPanelTrigger.d.ts +5 -0
  15. package/build/components/floating-panel/floatingPanelRect.d.ts +23 -0
  16. package/build/components/floating-panel/index.d.ts +67 -0
  17. package/build/components/format-byte/FormatByte.d.ts +10 -0
  18. package/build/components/format-byte/FormatByte.types.d.ts +11 -0
  19. package/build/components/format-byte/index.d.ts +2 -0
  20. package/build/components/format-number/FormatNumber.d.ts +10 -0
  21. package/build/components/format-number/FormatNumber.types.d.ts +10 -0
  22. package/build/components/format-number/index.d.ts +2 -0
  23. package/build/components/frame/Frame.d.ts +9 -0
  24. package/build/components/frame/Frame.types.d.ts +12 -0
  25. package/build/components/frame/FrameContent.d.ts +7 -0
  26. package/build/components/frame/index.d.ts +2 -0
  27. package/build/components/index.d.ts +5 -0
  28. package/build/components/map/Map.d.ts +19 -0
  29. package/build/components/map/Map.types.d.ts +15 -0
  30. package/build/components/map/index.d.ts +43 -0
  31. package/build/lib/react-openlayers/Map.d.ts +7 -0
  32. package/build/lib/react-openlayers/MapContext.d.ts +2 -0
  33. package/build/lib/react-openlayers/MapMarker.d.ts +6 -0
  34. package/build/lib/react-openlayers/MapOverlay.d.ts +7 -0
  35. package/build/lib/react-openlayers/MapView.d.ts +6 -0
  36. package/build/lib/react-openlayers/controls/MapAttributionControl.d.ts +6 -0
  37. package/build/lib/react-openlayers/controls/MapDrawControl.d.ts +7 -0
  38. package/build/lib/react-openlayers/controls/MapFullScreenControl.d.ts +6 -0
  39. package/build/lib/react-openlayers/controls/MapLayersControl.d.ts +7 -0
  40. package/build/lib/react-openlayers/controls/MapMousePositionControl.d.ts +6 -0
  41. package/build/lib/react-openlayers/controls/MapOverviewMapControl.d.ts +6 -0
  42. package/build/lib/react-openlayers/controls/MapScaleLineControl.d.ts +6 -0
  43. package/build/lib/react-openlayers/controls/MapSearchControl.d.ts +7 -0
  44. package/build/lib/react-openlayers/controls/useMapControl.d.ts +2 -0
  45. package/build/lib/react-openlayers/controls/useMapCustomControl.d.ts +1 -0
  46. package/build/lib/react-openlayers/geocoding.d.ts +3 -0
  47. package/build/lib/react-openlayers/index.d.ts +38 -0
  48. package/build/lib/react-openlayers/interactions/MapDragRotateAndZoomInteraction.d.ts +6 -0
  49. package/build/lib/react-openlayers/interactions/MapLinkInteraction.d.ts +6 -0
  50. package/build/lib/react-openlayers/interactions/MapPointerInteraction.d.ts +6 -0
  51. package/build/lib/react-openlayers/interactions/MapSelectInteraction.d.ts +6 -0
  52. package/build/lib/react-openlayers/interactions/MapTranslateInteraction.d.ts +6 -0
  53. package/build/lib/react-openlayers/interactions/useMapInteraction.d.ts +2 -0
  54. package/build/lib/react-openlayers/layers/MapGraticuleLayer.d.ts +6 -0
  55. package/build/lib/react-openlayers/layers/MapHeatmapLayer.d.ts +6 -0
  56. package/build/lib/react-openlayers/layers/MapImageLayer.d.ts +6 -0
  57. package/build/lib/react-openlayers/layers/MapLayerGroup.d.ts +6 -0
  58. package/build/lib/react-openlayers/layers/MapLayerGroupContext.d.ts +2 -0
  59. package/build/lib/react-openlayers/layers/MapTileLayer.d.ts +6 -0
  60. package/build/lib/react-openlayers/layers/MapVectorLayer.d.ts +6 -0
  61. package/build/lib/react-openlayers/layers/MapWebGLTileLayer.d.ts +6 -0
  62. package/build/lib/react-openlayers/layers/useMapLayer.d.ts +2 -0
  63. package/build/lib/react-openlayers/layers/useMapLayerGroup.d.ts +1 -0
  64. package/build/lib/react-openlayers/marker.d.ts +11 -0
  65. package/build/lib/react-openlayers/types/index.d.ts +89 -0
  66. package/build/lib/react-openlayers/useMap.d.ts +1 -0
  67. package/build/main.cjs.js +795 -6
  68. package/build/main.esm.js +793 -4
  69. package/build/providers/index.d.ts +1 -0
  70. package/build/providers/locale/Locale.types.d.ts +23 -0
  71. package/build/providers/locale/LocaleContext.d.ts +4 -0
  72. package/build/providers/locale/LocaleProvider.d.ts +8 -0
  73. package/build/providers/locale/index.d.ts +8 -0
  74. package/build/providers/locale/useCollator.d.ts +2 -0
  75. package/build/providers/locale/useDateFormatter.d.ts +2 -0
  76. package/build/providers/locale/useFilter.d.ts +2 -0
  77. package/build/providers/locale/useLocaleContext.d.ts +1 -0
  78. package/build/providers/locale/useNumberFormatter.d.ts +2 -0
  79. package/build/styles/main.css +1 -1
  80. package/build/utilities/i18n.d.ts +26 -0
  81. package/package.json +2 -1
@@ -0,0 +1,38 @@
1
+ /**
2
+ * React OpenLayers library
3
+ */
4
+ export { Map } from "./Map";
5
+ export { MapContext } from "./MapContext";
6
+ export { useMap } from "./useMap";
7
+ export { MapView } from "./MapView";
8
+ export { MapMarker } from "./MapMarker";
9
+ export { MapOverlay } from "./MapOverlay";
10
+ export { getAddress, getLonLat } from "./geocoding";
11
+ export { addMarker, removeMarker, getMarkerImage, DEFAULT_MARKER_COLOR } from "./marker";
12
+ export { MapLayerGroup } from "./layers/MapLayerGroup";
13
+ export { MapLayerGroupContext } from "./layers/MapLayerGroupContext";
14
+ export { useMapLayerGroup } from "./layers/useMapLayerGroup";
15
+ export { useMapLayer } from "./layers/useMapLayer";
16
+ export { MapTileLayer } from "./layers/MapTileLayer";
17
+ export { MapImageLayer } from "./layers/MapImageLayer";
18
+ export { MapVectorLayer } from "./layers/MapVectorLayer";
19
+ export { MapGraticuleLayer } from "./layers/MapGraticuleLayer";
20
+ export { MapHeatmapLayer } from "./layers/MapHeatmapLayer";
21
+ export { MapWebGLTileLayer } from "./layers/MapWebGLTileLayer";
22
+ export { useMapControl } from "./controls/useMapControl";
23
+ export { useMapCustomControl } from "./controls/useMapCustomControl";
24
+ export { MapAttributionControl } from "./controls/MapAttributionControl";
25
+ export { MapFullScreenControl } from "./controls/MapFullScreenControl";
26
+ export { MapScaleLineControl } from "./controls/MapScaleLineControl";
27
+ export { MapMousePositionControl } from "./controls/MapMousePositionControl";
28
+ export { MapOverviewMapControl } from "./controls/MapOverviewMapControl";
29
+ export { MapDrawControl } from "./controls/MapDrawControl";
30
+ export { MapLayersControl } from "./controls/MapLayersControl";
31
+ export { MapSearchControl } from "./controls/MapSearchControl";
32
+ export { useMapInteraction } from "./interactions/useMapInteraction";
33
+ export { MapDragRotateAndZoomInteraction } from "./interactions/MapDragRotateAndZoomInteraction";
34
+ export { MapTranslateInteraction } from "./interactions/MapTranslateInteraction";
35
+ export { MapPointerInteraction } from "./interactions/MapPointerInteraction";
36
+ export { MapSelectInteraction } from "./interactions/MapSelectInteraction";
37
+ export { MapLinkInteraction } from "./interactions/MapLinkInteraction";
38
+ export type { MapProps, MapViewProps, MapMarkerProps, MapOverlayProps, MapOverlayContent, MapLayerProps, MapLayerGroupProps, MapTileLayerProps, MapImageLayerProps, MapVectorLayerProps, MapGraticuleLayerProps, MapHeatmapLayerProps, MapWebGLTileLayerProps, MapAttributionControlProps, MapFullScreenControlProps, MapMousePositionControlProps, MapOverviewMapControlProps, MapScaleLineControlProps, MapCustomControlProps, MapDrawControlProps, MapDrawShape, MapLayersControlProps, MapSearchControlProps, MapDragRotateAndZoomInteractionProps, MapLinkInteractionProps, MapPointerInteractionProps, MapSelectInteractionProps, MapTranslateInteractionProps, MapSearchResult, } from "./types";
@@ -0,0 +1,6 @@
1
+ import type { MapDragRotateAndZoomInteractionProps } from "../types";
2
+ declare function MapDragRotateAndZoomInteraction(props: MapDragRotateAndZoomInteractionProps): null;
3
+ declare namespace MapDragRotateAndZoomInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapDragRotateAndZoomInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapLinkInteractionProps } from "../types";
2
+ declare function MapLinkInteraction(props: MapLinkInteractionProps): null;
3
+ declare namespace MapLinkInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapLinkInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapPointerInteractionProps } from "../types";
2
+ declare function MapPointerInteraction(props: MapPointerInteractionProps): null;
3
+ declare namespace MapPointerInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapPointerInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapSelectInteractionProps } from "../types";
2
+ declare function MapSelectInteraction({ onSelect, style, ...options }: MapSelectInteractionProps): null;
3
+ declare namespace MapSelectInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapSelectInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapTranslateInteractionProps } from "../types";
2
+ declare function MapTranslateInteraction(props: MapTranslateInteractionProps): null;
3
+ declare namespace MapTranslateInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapTranslateInteraction };
@@ -0,0 +1,2 @@
1
+ import type Interaction from "ol/interaction/Interaction";
2
+ export declare const useMapInteraction: <TInteraction extends Interaction>(create: () => TInteraction) => TInteraction;
@@ -0,0 +1,6 @@
1
+ import type { MapGraticuleLayerProps } from "../types";
2
+ declare function MapGraticuleLayer({ name, ...options }: MapGraticuleLayerProps): null;
3
+ declare namespace MapGraticuleLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapGraticuleLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapHeatmapLayerProps } from "../types";
2
+ declare function MapHeatmapLayer({ name, ...options }: MapHeatmapLayerProps): null;
3
+ declare namespace MapHeatmapLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapHeatmapLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapImageLayerProps } from "../types";
2
+ declare function MapImageLayer({ name, ...options }: MapImageLayerProps): null;
3
+ declare namespace MapImageLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapImageLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapLayerGroupProps } from "../types";
2
+ declare function MapLayerGroup({ children, name, ...options }: MapLayerGroupProps): import("react").JSX.Element;
3
+ declare namespace MapLayerGroup {
4
+ var displayName: string;
5
+ }
6
+ export { MapLayerGroup };
@@ -0,0 +1,2 @@
1
+ import type LayerGroup from "ol/layer/Group";
2
+ export declare const MapLayerGroupContext: import("react").Context<LayerGroup | undefined>;
@@ -0,0 +1,6 @@
1
+ import type { MapTileLayerProps } from "../types";
2
+ declare function MapTileLayer({ name, ...options }: MapTileLayerProps): null;
3
+ declare namespace MapTileLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapTileLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapVectorLayerProps } from "../types";
2
+ declare function MapVectorLayer({ name, ...options }: MapVectorLayerProps): null;
3
+ declare namespace MapVectorLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapVectorLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapWebGLTileLayerProps } from "../types";
2
+ declare function MapWebGLTileLayer({ name, ...options }: MapWebGLTileLayerProps): null;
3
+ declare namespace MapWebGLTileLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapWebGLTileLayer };
@@ -0,0 +1,2 @@
1
+ import type BaseLayer from "ol/layer/Base";
2
+ export declare const useMapLayer: <TLayer extends BaseLayer>(create: () => TLayer, name?: string) => TLayer;
@@ -0,0 +1 @@
1
+ export declare const useMapLayerGroup: () => import("ol/layer/Group").default | undefined;
@@ -0,0 +1,11 @@
1
+ import Feature from "ol/Feature";
2
+ import Point from "ol/geom/Point";
3
+ import type { Map as OlMap } from "ol";
4
+ import type { FeatureLike } from "ol/Feature";
5
+ import type { Coordinate } from "ol/coordinate";
6
+ export declare const DEFAULT_MARKER_COLOR = "#257ECA";
7
+ export declare function getMarkerImage(color?: string, label?: string): string;
8
+ export declare function addMarker(map: OlMap, lonLat: Coordinate, color?: string, label?: string): Feature<Point, {
9
+ [x: string]: any;
10
+ }>;
11
+ export declare function removeMarker(map: OlMap, marker: FeatureLike): void;
@@ -0,0 +1,89 @@
1
+ import type * as React from "react";
2
+ import type { Coordinate } from "ol/coordinate";
3
+ import type { MapOptions } from "ol/Map";
4
+ import type { ViewOptions } from "ol/View";
5
+ import type { Options as OverlayOptions } from "ol/Overlay";
6
+ import type { Options as ControlOptions } from "ol/control/Control";
7
+ import type { Options as AttributionControlOptions } from "ol/control/Attribution";
8
+ import type { Options as FullScreenControlOptions } from "ol/control/FullScreen";
9
+ import type { Options as MousePositionControlOptions } from "ol/control/MousePosition";
10
+ import type { Options as OverviewMapControlOptions } from "ol/control/OverviewMap";
11
+ import type { Options as ScaleLineControlOptions } from "ol/control/ScaleLine";
12
+ import type { Options as LayerGroupOptions } from "ol/layer/Group";
13
+ import type { Options as TileLayerOptions } from "ol/layer/BaseTile";
14
+ import type { Options as ImageLayerOptions } from "ol/layer/BaseImage";
15
+ import type { Options as VectorLayerOptions } from "ol/layer/Vector";
16
+ import type { Options as GraticuleLayerOptions } from "ol/layer/Graticule";
17
+ import type { Options as HeatmapLayerOptions } from "ol/layer/Heatmap";
18
+ import type { Options as WebGLTileLayerOptions } from "ol/layer/WebGLTile";
19
+ import type ImageSource from "ol/source/Image";
20
+ import type TileSource from "ol/source/Tile";
21
+ import type { Options as DragRotateAndZoomOptions } from "ol/interaction/DragRotateAndZoom";
22
+ import type { Options as LinkOptions } from "ol/interaction/Link";
23
+ import type { Options as PointerOptions } from "ol/interaction/Pointer";
24
+ import type { Options as SelectOptions, SelectEvent } from "ol/interaction/Select";
25
+ import type { Options as TranslateOptions } from "ol/interaction/Translate";
26
+ export type MapProps = Omit<MapOptions, "target"> & {
27
+ children?: React.ReactNode;
28
+ className?: string;
29
+ style?: React.CSSProperties;
30
+ };
31
+ export type MapViewProps = ViewOptions;
32
+ export type MapMarkerProps = {
33
+ lonLat?: Coordinate;
34
+ address?: string;
35
+ color?: string;
36
+ label?: string;
37
+ addOnClick?: boolean;
38
+ removeOnClick?: boolean;
39
+ };
40
+ export type MapOverlayContent = {
41
+ coordinate: Coordinate;
42
+ lonLat: Coordinate;
43
+ address: string;
44
+ };
45
+ export type MapOverlayProps = Omit<OverlayOptions, "element"> & {
46
+ children?: React.ReactNode | ((content: MapOverlayContent) => React.ReactNode);
47
+ };
48
+ export type MapLayerProps = {
49
+ name?: string;
50
+ };
51
+ export type MapLayerGroupProps = LayerGroupOptions & MapLayerProps & {
52
+ children?: React.ReactNode;
53
+ };
54
+ export type MapTileLayerProps = TileLayerOptions<TileSource> & MapLayerProps;
55
+ export type MapImageLayerProps = ImageLayerOptions<ImageSource> & MapLayerProps;
56
+ export type MapVectorLayerProps = VectorLayerOptions & MapLayerProps;
57
+ export type MapGraticuleLayerProps = GraticuleLayerOptions & MapLayerProps;
58
+ export type MapHeatmapLayerProps = HeatmapLayerOptions & MapLayerProps;
59
+ export type MapWebGLTileLayerProps = WebGLTileLayerOptions & MapLayerProps;
60
+ export type MapAttributionControlProps = AttributionControlOptions;
61
+ export type MapFullScreenControlProps = FullScreenControlOptions;
62
+ export type MapMousePositionControlProps = MousePositionControlOptions;
63
+ export type MapOverviewMapControlProps = OverviewMapControlOptions;
64
+ export type MapScaleLineControlProps = ScaleLineControlOptions;
65
+ export type MapCustomControlProps = Pick<ControlOptions, "target"> & {
66
+ className?: string;
67
+ };
68
+ export type MapDrawShape = "Point" | "LineString" | "Circle";
69
+ export type MapDrawControlProps = MapCustomControlProps & {
70
+ fileName?: string;
71
+ };
72
+ export type MapLayersControlProps = MapCustomControlProps;
73
+ export type MapSearchControlProps = MapCustomControlProps & {
74
+ zoom?: number;
75
+ color?: string;
76
+ placeholder?: string;
77
+ };
78
+ export type MapDragRotateAndZoomInteractionProps = DragRotateAndZoomOptions;
79
+ export type MapLinkInteractionProps = LinkOptions;
80
+ export type MapPointerInteractionProps = PointerOptions;
81
+ export type MapSelectInteractionProps = SelectOptions & {
82
+ onSelect?: (event: SelectEvent) => void;
83
+ };
84
+ export type MapTranslateInteractionProps = TranslateOptions;
85
+ export type MapSearchResult = {
86
+ lat: string;
87
+ lon: string;
88
+ display_name: string;
89
+ };
@@ -0,0 +1 @@
1
+ export declare const useMap: () => import("ol").Map | undefined;