@ogc-maps/storybook-components 0.9.0 → 0.11.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/dist/{CollapsibleControl-CGRNPpCw.js → CollapsibleControl-qo9daiD8.js} +5 -5
- package/dist/ExportButton-BsNrOvRE.js +25 -0
- package/dist/FeatureTooltip-DxzN-jnp.js +49 -0
- package/dist/Legend-BLWBzD7Y.js +275 -0
- package/dist/SearchPanel-4Y12jfuP.js +401 -0
- package/dist/components/CollapsibleControl/index.js +1 -1
- package/dist/components/ExportButton/ExportButton.d.ts +2 -8
- package/dist/components/ExportButton/ExportButton.d.ts.map +1 -1
- package/dist/components/ExportButton/index.d.ts +1 -1
- package/dist/components/ExportButton/index.d.ts.map +1 -1
- package/dist/components/ExportButton/index.js +1 -1
- package/dist/components/ExportModal/ExportModal.d.ts +29 -0
- package/dist/components/ExportModal/ExportModal.d.ts.map +1 -0
- package/dist/components/ExportModal/index.d.ts +3 -0
- package/dist/components/ExportModal/index.d.ts.map +1 -0
- package/dist/components/FeatureTooltip/FeatureTooltip.d.ts +12 -2
- package/dist/components/FeatureTooltip/FeatureTooltip.d.ts.map +1 -1
- package/dist/components/FeatureTooltip/index.js +1 -1
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/Legend/Legend.d.ts.map +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/MeasurePanel/MeasurePanel.d.ts +13 -0
- package/dist/components/MeasurePanel/MeasurePanel.d.ts.map +1 -0
- package/dist/components/MeasurePanel/index.d.ts +3 -0
- package/dist/components/MeasurePanel/index.d.ts.map +1 -0
- package/dist/components/ResultsDrawer/ResultsDrawer.d.ts +15 -0
- package/dist/components/ResultsDrawer/ResultsDrawer.d.ts.map +1 -0
- package/dist/components/ResultsDrawer/index.d.ts +3 -0
- package/dist/components/ResultsDrawer/index.d.ts.map +1 -0
- package/dist/components/SearchFieldEditor/SearchFieldEditor.d.ts.map +1 -1
- package/dist/components/SearchPanel/NumberInput.d.ts.map +1 -1
- package/dist/components/SearchPanel/SearchPanel.d.ts +2 -1
- package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
- package/dist/components/SearchPanel/index.js +1 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts +15 -0
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -0
- package/dist/components/SelectionPanel/index.d.ts +3 -0
- package/dist/components/SelectionPanel/index.d.ts.map +1 -0
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -1
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
- package/dist/components/admin/CollapsibleSection.d.ts +1 -1
- package/dist/components/admin/CollapsibleSection.d.ts.map +1 -1
- package/dist/components/index.d.ts +11 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/geo-CyDCsiW-.js +1116 -0
- package/dist/hooks/index.d.ts +9 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +47 -37
- package/dist/hooks/useExport.d.ts +22 -0
- package/dist/hooks/useExport.d.ts.map +1 -0
- package/dist/hooks/useMeasure.d.ts +15 -0
- package/dist/hooks/useMeasure.d.ts.map +1 -0
- package/dist/hooks/useSelection.d.ts +14 -0
- package/dist/hooks/useSelection.d.ts.map +1 -0
- package/dist/{index-UmK2u6Yd.js → index-BrphSJJ2.js} +401 -395
- package/dist/main.js +1677 -1096
- package/dist/schemas/config.d.ts +142 -0
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/boxDraw.d.ts +5 -0
- package/dist/utils/boxDraw.d.ts.map +1 -0
- package/dist/utils/cql2.d.ts +11 -0
- package/dist/utils/cql2.d.ts.map +1 -1
- package/dist/utils/csvExport.d.ts.map +1 -1
- package/dist/utils/download.d.ts +2 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/expressionColors.d.ts.map +1 -1
- package/dist/utils/geo.d.ts +3 -0
- package/dist/utils/geo.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/measure.d.ts +49 -0
- package/dist/utils/measure.d.ts.map +1 -0
- package/dist/utils/ogcApi.d.ts +7 -0
- package/dist/utils/ogcApi.d.ts.map +1 -1
- package/dist/utils/selection.d.ts +12 -0
- package/dist/utils/selection.d.ts.map +1 -0
- package/package.json +6 -3
- package/dist/ExportButton-CLsWoW4m.js +0 -77
- package/dist/FeatureTooltip-Db1LgLQV.js +0 -47
- package/dist/Legend-CwaZA84A.js +0 -273
- package/dist/SearchPanel-DtLXMoVs.js +0 -363
- package/dist/cql2-DOJnQwcv.js +0 -440
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,12 +2,19 @@ import { SearchField } from '../types';
|
|
|
2
2
|
export { useOgcCollections, type UseOgcCollectionsResult } from './useOgcCollections';
|
|
3
3
|
export { useOgcFeatures, type UseOgcFeaturesResult } from './useOgcFeatures';
|
|
4
4
|
export { useCsvExport, type UseCsvExportOptions, type UseCsvExportResult } from './useCsvExport';
|
|
5
|
+
export { useExport, type UseExportOptions, type UseExportResult, type FormatConverter } from './useExport';
|
|
6
|
+
export { featuresToCsv, type CsvExportOptions } from '../utils/csvExport';
|
|
7
|
+
export { downloadBlob } from '../utils/download';
|
|
5
8
|
export { useOgcQueryables, type UseOgcQueryablesResult } from './useOgcQueryables';
|
|
6
9
|
export { useOgcCollectionDetail, type UseOgcCollectionDetailResult } from './useOgcCollectionDetail';
|
|
10
|
+
export { useMeasure, type UseMeasureResult } from './useMeasure';
|
|
11
|
+
export { useSelection, type UseSelectionResult } from './useSelection';
|
|
7
12
|
export type { OgcApiSource, LayerConfig, MapConfig, UIConfig, ViewConfig, StyleConfig, FilterConfig, LegendConfig, SearchConfig, SearchField, TextSearchField, NumberSearchField, DatetimeSearchField, SelectSearchField, PropertyDisplay, PropertyDisplayConfig, } from '../types';
|
|
8
13
|
export { resolvePropertyDisplay } from '../utils/propertyDisplay';
|
|
9
14
|
export { resolveStyleWithSprites } from '../utils/spriteUtils';
|
|
10
15
|
export type SearchFieldType = SearchField['type'];
|
|
11
|
-
export { fetchCollections, fetchFeatures, fetchQueryables, fetchCollectionDetail, fetchConformance, fetchTileJson, fetchFeatureCount, fetchDistinctValues, getFilteredVectorTileUrl, getCql2FilteredVectorTileUrl, getTileJsonUrl, getVectorTileUrl, type OgcCollection, type OgcCollectionsResponse, type GeoJsonFeature, type OgcFeatureCollection, type OgcQueryables, type OgcConformance, type TileJson, type QueryableProperty, type FetchFeaturesOptions, } from '../utils/ogcApi';
|
|
12
|
-
export { eq, neq, gt, gte, lt, lte, between, like, inList, isNull, and, or, not, tAfter, tBefore, tDuring, fromSimpleFilters, fromStructuredFilters, serializeCql2, type CQL2Expression, type CQL2PropertyRef, type CQL2Date, type CQL2Timestamp, type CQL2Interval, } from '../utils/cql2';
|
|
16
|
+
export { fetchCollections, fetchFeatures, fetchFeatureById, fetchQueryables, fetchCollectionDetail, fetchConformance, fetchTileJson, fetchFeatureCount, fetchDistinctValues, getFilteredVectorTileUrl, getCql2FilteredVectorTileUrl, getTileJsonUrl, getVectorTileUrl, type OgcCollection, type OgcCollectionsResponse, type GeoJsonFeature, type OgcFeatureCollection, type OgcQueryables, type OgcConformance, type TileJson, type QueryableProperty, type FetchFeaturesOptions, } from '../utils/ogcApi';
|
|
17
|
+
export { eq, neq, gt, gte, lt, lte, between, like, inList, isNull, and, or, not, tAfter, tBefore, tDuring, fromSimpleFilters, fromStructuredFilters, serializeCql2, sIntersects, sWithin, sDwithin, type CQL2Expression, type CQL2PropertyRef, type CQL2Date, type CQL2Timestamp, type CQL2Interval, type CQL2Geometry, } from '../utils/cql2';
|
|
18
|
+
export { bboxFromGeometry, type BBox } from '../utils/geo';
|
|
19
|
+
export type { SelectionMode, SelectedFeature } from '../utils/selection';
|
|
13
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGvE,YAAY,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC5B,cAAc,EACd,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,GAAG,EACH,EAAE,EACF,GAAG,EACH,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,OAAO,EACP,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,41 +1,51 @@
|
|
|
1
|
-
import { a, b as t,
|
|
1
|
+
import { a, b as t, c as l, d as r, e as o, f as i, g as c, h as u, i as n, j as f, k as h, l as g, m as C, n as F, o as d, p as m, q as p, r as y, s as b, t as D, u as T, v as S, w as q, x as v, y as x, z as O, A as U, B as V, C as w, D as B, E, F as I, G as J, H as Q, I as k, J as z, K as A, L as G, M as L, N as M, O as N, P, Q as W, R as j, S as H, T as K, U as R, V as X } from "../geo-CyDCsiW-.js";
|
|
2
2
|
export {
|
|
3
3
|
a as and,
|
|
4
|
-
t as
|
|
5
|
-
l as
|
|
6
|
-
r as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
c as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
f as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
C as
|
|
16
|
-
F as
|
|
17
|
-
|
|
18
|
-
m as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
T as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
t as bboxFromGeometry,
|
|
5
|
+
l as between,
|
|
6
|
+
r as downloadBlob,
|
|
7
|
+
o as eq,
|
|
8
|
+
i as featuresToCsv,
|
|
9
|
+
c as fetchCollectionDetail,
|
|
10
|
+
u as fetchCollections,
|
|
11
|
+
n as fetchConformance,
|
|
12
|
+
f as fetchDistinctValues,
|
|
13
|
+
h as fetchFeatureById,
|
|
14
|
+
g as fetchFeatureCount,
|
|
15
|
+
C as fetchFeatures,
|
|
16
|
+
F as fetchQueryables,
|
|
17
|
+
d as fetchTileJson,
|
|
18
|
+
m as fromSimpleFilters,
|
|
19
|
+
p as fromStructuredFilters,
|
|
20
|
+
y as getCql2FilteredVectorTileUrl,
|
|
21
|
+
b as getFilteredVectorTileUrl,
|
|
22
|
+
D as getTileJsonUrl,
|
|
23
|
+
T as getVectorTileUrl,
|
|
24
|
+
S as gt,
|
|
25
|
+
q as gte,
|
|
26
|
+
v as inList,
|
|
27
|
+
x as isNull,
|
|
28
|
+
O as like,
|
|
29
|
+
U as lt,
|
|
30
|
+
V as lte,
|
|
31
|
+
w as neq,
|
|
32
|
+
B as not,
|
|
33
|
+
E as or,
|
|
34
|
+
I as resolvePropertyDisplay,
|
|
31
35
|
J as resolveStyleWithSprites,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
z as
|
|
35
|
-
A as
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
Q as sDwithin,
|
|
37
|
+
k as sIntersects,
|
|
38
|
+
z as sWithin,
|
|
39
|
+
A as serializeCql2,
|
|
40
|
+
G as tAfter,
|
|
41
|
+
L as tBefore,
|
|
42
|
+
M as tDuring,
|
|
43
|
+
N as useCsvExport,
|
|
44
|
+
P as useExport,
|
|
45
|
+
W as useMeasure,
|
|
46
|
+
j as useOgcCollectionDetail,
|
|
47
|
+
H as useOgcCollections,
|
|
48
|
+
K as useOgcFeatures,
|
|
49
|
+
R as useOgcQueryables,
|
|
50
|
+
X as useSelection
|
|
41
51
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GeoJsonFeature } from '../utils/ogcApi';
|
|
2
|
+
import { CQL2Expression } from '../utils/cql2';
|
|
3
|
+
export type FormatConverter = (features: GeoJsonFeature[], collectionId: string) => Promise<{
|
|
4
|
+
blob: Blob;
|
|
5
|
+
filename: string;
|
|
6
|
+
}> | {
|
|
7
|
+
blob: Blob;
|
|
8
|
+
filename: string;
|
|
9
|
+
};
|
|
10
|
+
export interface UseExportOptions {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
limit?: number;
|
|
13
|
+
converters: Record<string, FormatConverter>;
|
|
14
|
+
}
|
|
15
|
+
export interface UseExportResult {
|
|
16
|
+
runExport: (collectionId: string, formatId: string, filename: string, cql2Filter?: CQL2Expression) => Promise<void>;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
progress: string | null;
|
|
19
|
+
error: Error | null;
|
|
20
|
+
}
|
|
21
|
+
export declare function useExport({ baseUrl, limit, converters, }: UseExportOptions): UseExportResult;
|
|
22
|
+
//# sourceMappingURL=useExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../src/hooks/useExport.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,CAC5B,QAAQ,EAAE,cAAc,EAAE,EAC1B,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,CACT,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,cAAc,KACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAe,EACf,UAAU,GACX,EAAE,gBAAgB,GAAG,eAAe,CAkEpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MeasureMode, MeasureUnit, Measurement } from '../utils/measure';
|
|
2
|
+
export interface UseMeasureResult {
|
|
3
|
+
mode: MeasureMode | null;
|
|
4
|
+
points: [number, number][];
|
|
5
|
+
unit: MeasureUnit;
|
|
6
|
+
measurement: Measurement | null;
|
|
7
|
+
geometryData: GeoJSON.Feature | null;
|
|
8
|
+
pointsData: GeoJSON.FeatureCollection | null;
|
|
9
|
+
setMode: (mode: MeasureMode | null) => void;
|
|
10
|
+
setUnit: (unit: MeasureUnit) => void;
|
|
11
|
+
addPoint: (point: [number, number]) => void;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useMeasure(): UseMeasureResult;
|
|
15
|
+
//# sourceMappingURL=useMeasure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMeasure.d.ts","sourceRoot":"","sources":["../../src/hooks/useMeasure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG9E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,UAAU,IAAI,gBAAgB,CAmC7C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectionMode, SelectedFeature } from '../utils/selection';
|
|
2
|
+
export interface UseSelectionResult {
|
|
3
|
+
mode: SelectionMode | null;
|
|
4
|
+
activeLayerId: string | null;
|
|
5
|
+
features: SelectedFeature[];
|
|
6
|
+
highlightData: GeoJSON.FeatureCollection | null;
|
|
7
|
+
setMode: (mode: SelectionMode | null) => void;
|
|
8
|
+
setActiveLayerId: (layerId: string | null) => void;
|
|
9
|
+
addFeatures: (features: SelectedFeature[]) => void;
|
|
10
|
+
removeFeature: (key: string) => void;
|
|
11
|
+
clearFeatures: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useSelection(): UseSelectionResult;
|
|
14
|
+
//# sourceMappingURL=useSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelection.d.ts","sourceRoot":"","sources":["../../src/hooks/useSelection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACnD,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID,wBAAgB,YAAY,IAAI,kBAAkB,CAsDjD"}
|