@octostar/map-component 0.2.15 → 0.2.17
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/index.cjs +85 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +85 -62
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/map-editor-canvas.d.ts.map +1 -1
- package/dist/types/lib/layer-features.d.ts +27 -0
- package/dist/types/lib/layer-features.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"AA2FA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;AAwQxD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmG5E,eAAO,MAAM,eAAe,4GAslS1B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three stores a layer's features can live in. Editable layers keep
|
|
3
|
+
* visible features in MapboxDraw (`getDrawFeature`) and hidden ones in
|
|
4
|
+
* `hiddenFeatures`; read-only (high-performance) layers — host entity layers,
|
|
5
|
+
* file imports — keep theirs in `readOnlyFeatures` regardless of visibility.
|
|
6
|
+
*/
|
|
7
|
+
export interface LayerFeatureSources {
|
|
8
|
+
getDrawFeature: (id: string) => GeoJSON.Feature | undefined;
|
|
9
|
+
hiddenFeatures: Pick<Map<string, GeoJSON.Feature[]>, 'get'>;
|
|
10
|
+
readOnlyFeatures: Pick<Map<string, GeoJSON.Feature[]>, 'get'>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Collect every feature belonging to one layer across all three stores.
|
|
14
|
+
* A read-only layer's `featureIds` point into `readOnlyFeatures`, so the
|
|
15
|
+
* draw lookup yields nothing for them and the union stays duplicate-free.
|
|
16
|
+
*/
|
|
17
|
+
export declare function collectLayerFeatures(layer: {
|
|
18
|
+
id: string;
|
|
19
|
+
visible: boolean;
|
|
20
|
+
featureIds: string[];
|
|
21
|
+
}, sources: LayerFeatureSources): GeoJSON.Feature[];
|
|
22
|
+
/**
|
|
23
|
+
* Drop internal (`_`-prefixed) properties from exported features, except the
|
|
24
|
+
* keys in `keep` (the enriched save preserves `_layerIndex` for re-import).
|
|
25
|
+
*/
|
|
26
|
+
export declare function stripInternalProperties(features: readonly GeoJSON.Feature[], keep?: ReadonlySet<string>): GeoJSON.Feature[];
|
|
27
|
+
//# sourceMappingURL=layer-features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-features.d.ts","sourceRoot":"","sources":["../../../client/src/lib/layer-features.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAC5D,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC5D,gBAAgB,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,EAC7D,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,OAAO,EAAE,CAgBnB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,SAAS,OAAO,CAAC,OAAO,EAAE,EACpC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,OAAO,CAAC,OAAO,EAAE,CASnB"}
|