@smartnet360/svelte-components 0.0.91 → 0.0.92
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/map-v3/demo/DemoMap.svelte +0 -6
- package/dist/map-v3/features/cells/layers/CellsLayer.svelte +2 -4
- package/dist/map-v3/features/cells/layers/CellsLayer.svelte.d.ts +0 -2
- package/dist/map-v3/features/cells/stores/cell.data.svelte.d.ts +2 -0
- package/dist/map-v3/features/cells/stores/cell.data.svelte.js +8 -1
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { createCellDataStore } from '../features/cells/stores/cell.data.svelte';
|
|
6
6
|
import { createCellRegistry } from '../features/cells/stores/cell.registry.svelte';
|
|
7
7
|
import { CellDisplayStore } from '../features/cells/stores/cell.display.svelte';
|
|
8
|
-
import { SiteDistanceStore } from '../features/cells/stores/site.distance.svelte';
|
|
9
8
|
import FeatureSettingsControl from '../core/controls/FeatureSettingsControl.svelte';
|
|
10
9
|
import CellFilterControl from '../features/cells/components/CellFilterControl.svelte';
|
|
11
10
|
import { createRepeaterDataStore } from '../features/repeaters/stores/repeater.data.svelte';
|
|
@@ -34,7 +33,6 @@
|
|
|
34
33
|
const cellData = createCellDataStore();
|
|
35
34
|
const cellRegistry = createCellRegistry('demo-map');
|
|
36
35
|
const cellDisplay = new CellDisplayStore();
|
|
37
|
-
const siteDistanceStore = new SiteDistanceStore();
|
|
38
36
|
|
|
39
37
|
const siteData = createSiteDataStore(cellData);
|
|
40
38
|
const siteRegistry = createSiteRegistry('demo-map');
|
|
@@ -49,9 +47,6 @@
|
|
|
49
47
|
// Need to cast or map if types slightly differ, but they should match
|
|
50
48
|
cellData.setCells(demoCells as any);
|
|
51
49
|
repeaterData.setRepeaters(demoRepeaters);
|
|
52
|
-
|
|
53
|
-
// Compute site distances
|
|
54
|
-
siteDistanceStore.updateDistances(demoCells as any);
|
|
55
50
|
});
|
|
56
51
|
</script>
|
|
57
52
|
|
|
@@ -99,7 +94,6 @@
|
|
|
99
94
|
dataStore={cellData}
|
|
100
95
|
registry={cellRegistry}
|
|
101
96
|
displayStore={cellDisplay}
|
|
102
|
-
siteDistanceStore={siteDistanceStore}
|
|
103
97
|
/>
|
|
104
98
|
<CellLabelsLayer dataStore={cellData} registry={cellRegistry} displayStore={cellDisplay} />
|
|
105
99
|
<RepeatersLayer dataStore={repeaterData} registry={repeaterRegistry} displayStore={repeaterDisplay} />
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import type { CellDataStore } from '../stores/cell.data.svelte';
|
|
5
5
|
import type { CellRegistry } from '../stores/cell.registry.svelte';
|
|
6
6
|
import type { CellDisplayStore } from '../stores/cell.display.svelte';
|
|
7
|
-
import type { SiteDistanceStore } from '../stores/site.distance.svelte';
|
|
8
7
|
import { groupCells, getColorForGroup } from '../logic/grouping';
|
|
9
8
|
import { generateCellArc, calculateRadiusInMeters, calculateAutoRadius } from '../logic/geometry';
|
|
10
9
|
import type { TechnologyBandKey } from '../types';
|
|
@@ -14,10 +13,9 @@
|
|
|
14
13
|
dataStore: CellDataStore;
|
|
15
14
|
registry: CellRegistry;
|
|
16
15
|
displayStore: CellDisplayStore;
|
|
17
|
-
siteDistanceStore: SiteDistanceStore;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
let { dataStore, registry, displayStore
|
|
18
|
+
let { dataStore, registry, displayStore }: Props = $props();
|
|
21
19
|
|
|
22
20
|
const mapStore = getContext<MapStore>('MAP_CONTEXT');
|
|
23
21
|
let sourceId = 'cells-source';
|
|
@@ -187,7 +185,7 @@
|
|
|
187
185
|
|
|
188
186
|
if (displayStore.useAutoSize) {
|
|
189
187
|
// Auto-size mode: get target radius for this site
|
|
190
|
-
const siteDistance = siteDistanceStore.getDistance(cell.siteId, 500);
|
|
188
|
+
const siteDistance = dataStore.siteDistanceStore.getDistance(cell.siteId, 500);
|
|
191
189
|
const autoRadius = calculateAutoRadius(siteDistance, displayStore.autoSizeMode);
|
|
192
190
|
|
|
193
191
|
// Scale based on z-index for stacking visibility
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { CellDataStore } from '../stores/cell.data.svelte';
|
|
2
2
|
import type { CellRegistry } from '../stores/cell.registry.svelte';
|
|
3
3
|
import type { CellDisplayStore } from '../stores/cell.display.svelte';
|
|
4
|
-
import type { SiteDistanceStore } from '../stores/site.distance.svelte';
|
|
5
4
|
interface Props {
|
|
6
5
|
dataStore: CellDataStore;
|
|
7
6
|
registry: CellRegistry;
|
|
8
7
|
displayStore: CellDisplayStore;
|
|
9
|
-
siteDistanceStore: SiteDistanceStore;
|
|
10
8
|
}
|
|
11
9
|
declare const CellsLayer: import("svelte").Component<Props, {}, "">;
|
|
12
10
|
type CellsLayer = ReturnType<typeof CellsLayer>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Cell } from '../types';
|
|
2
|
+
import { SiteDistanceStore } from './site.distance.svelte';
|
|
2
3
|
export declare class CellDataStore {
|
|
3
4
|
rawCells: Cell[];
|
|
4
5
|
filterOnAir: boolean;
|
|
6
|
+
siteDistanceStore: SiteDistanceStore;
|
|
5
7
|
constructor();
|
|
6
8
|
setCells(cells: Cell[]): void;
|
|
7
9
|
get filteredCells(): Cell[];
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { SiteDistanceStore } from './site.distance.svelte';
|
|
1
2
|
export class CellDataStore {
|
|
2
3
|
rawCells = $state([]);
|
|
3
4
|
filterOnAir = $state(false);
|
|
4
|
-
|
|
5
|
+
// Internal site distance store for auto-sizing
|
|
6
|
+
siteDistanceStore;
|
|
7
|
+
constructor() {
|
|
8
|
+
this.siteDistanceStore = new SiteDistanceStore();
|
|
9
|
+
}
|
|
5
10
|
setCells(cells) {
|
|
6
11
|
this.rawCells = cells;
|
|
12
|
+
// Automatically update site distances when cells are loaded
|
|
13
|
+
this.siteDistanceStore.updateDistances(cells);
|
|
7
14
|
}
|
|
8
15
|
get filteredCells() {
|
|
9
16
|
if (!this.filterOnAir)
|