@phila/phila-ui-map-core 1.0.1-beta.6 → 1.0.1-beta.7

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.
@@ -225,6 +225,7 @@ iconSize: number;
225
225
  toggleable: boolean;
226
226
  active: boolean;
227
227
  activeColor: string;
228
+ teleportTo: undefined;
228
229
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
229
230
  click: () => void;
230
231
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_14<__VLS_TypePropsToRuntimeProps_14<MapButtonProps>, {
@@ -237,6 +238,7 @@ iconSize: number;
237
238
  toggleable: boolean;
238
239
  active: boolean;
239
240
  activeColor: string;
241
+ teleportTo: undefined;
240
242
  }>>> & Readonly<{
241
243
  onClick?: (() => any) | undefined;
242
244
  }>, {
@@ -249,6 +251,7 @@ iconSize: number;
249
251
  toggleable: boolean;
250
252
  active: boolean;
251
253
  activeColor: string;
254
+ teleportTo: HTMLElement | null;
252
255
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
253
256
 
254
257
  declare const __VLS_component_7: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_21<__VLS_TypePropsToRuntimeProps_21<CyclomediaRecordingsLayerProps>, {
@@ -980,6 +983,7 @@ position: string;
980
983
  selectedIndex: number;
981
984
  useAsControl: boolean;
982
985
  isDropUp: boolean;
986
+ teleportTo: undefined;
983
987
  }>>, {
984
988
  isOpen: Ref<boolean, boolean>;
985
989
  selectedIndex: Ref<number, number>;
@@ -993,10 +997,12 @@ position: string;
993
997
  selectedIndex: number;
994
998
  useAsControl: boolean;
995
999
  isDropUp: boolean;
1000
+ teleportTo: undefined;
996
1001
  }>>> & Readonly<{
997
1002
  onSelect?: ((option: BasemapOption, index: number) => any) | undefined;
998
1003
  }>, {
999
1004
  position: MapControlPosition_2;
1005
+ teleportTo: HTMLElement | null;
1000
1006
  selectedIndex: number;
1001
1007
  useAsControl: boolean;
1002
1008
  isDropUp: boolean;
@@ -1008,6 +1014,7 @@ declare interface BasemapDropdownProps {
1008
1014
  selectedIndex?: number;
1009
1015
  useAsControl?: boolean;
1010
1016
  isDropUp?: boolean;
1017
+ teleportTo?: HTMLElement | null;
1011
1018
  }
1012
1019
 
1013
1020
  declare interface BasemapOption {
@@ -1026,6 +1033,7 @@ title: string;
1026
1033
  iconSize: number;
1027
1034
  showDropdown: boolean;
1028
1035
  dropdownOptions: () => ImageryYearOption[];
1036
+ teleportTo: undefined;
1029
1037
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1030
1038
  change: (value: BasemapChangeEvent) => void;
1031
1039
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_16<__VLS_TypePropsToRuntimeProps_16<BasemapToggleProps>, {
@@ -1036,12 +1044,14 @@ title: string;
1036
1044
  iconSize: number;
1037
1045
  showDropdown: boolean;
1038
1046
  dropdownOptions: () => ImageryYearOption[];
1047
+ teleportTo: undefined;
1039
1048
  }>>> & Readonly<{
1040
1049
  onChange?: ((value: BasemapChangeEvent) => any) | undefined;
1041
1050
  }>, {
1042
1051
  position: MapControlPosition_2;
1043
1052
  title: string;
1044
1053
  iconSize: number;
1054
+ teleportTo: HTMLElement | null;
1045
1055
  imageryUrl: string;
1046
1056
  imageryLabelsUrl: string;
1047
1057
  showDropdown: boolean;
@@ -1058,6 +1068,7 @@ declare interface BasemapToggleProps extends BaseProps {
1058
1068
  iconSize?: number;
1059
1069
  showDropdown?: boolean;
1060
1070
  dropdownOptions?: BasemapOption[];
1071
+ teleportTo?: HTMLElement | null;
1061
1072
  }
1062
1073
 
1063
1074
  /**
@@ -1181,6 +1192,7 @@ iconSize: number;
1181
1192
  title: string;
1182
1193
  active: boolean;
1183
1194
  disabled: boolean;
1195
+ teleportTo: undefined;
1184
1196
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1185
1197
  toggle: (data: {
1186
1198
  active: boolean;
@@ -1196,6 +1208,7 @@ iconSize: number;
1196
1208
  title: string;
1197
1209
  active: boolean;
1198
1210
  disabled: boolean;
1211
+ teleportTo: undefined;
1199
1212
  }>>> & Readonly<{
1200
1213
  onError?: ((error: Error) => any) | undefined;
1201
1214
  onToggle?: ((data: {
@@ -1210,6 +1223,7 @@ position: MapControlPosition;
1210
1223
  title: string;
1211
1224
  iconSize: number;
1212
1225
  active: boolean;
1226
+ teleportTo: HTMLElement | null;
1213
1227
  disabled: boolean;
1214
1228
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1215
1229
 
@@ -1253,6 +1267,8 @@ export declare interface CyclomediaButtonProps {
1253
1267
  active?: boolean;
1254
1268
  /** Whether the button is disabled */
1255
1269
  disabled?: boolean;
1270
+ /** Element to teleport the button control into */
1271
+ teleportTo?: HTMLElement | null;
1256
1272
  }
1257
1273
 
1258
1274
  /**
@@ -1539,18 +1555,21 @@ export declare const DrawTool: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
1539
1555
  position: string;
1540
1556
  title: string;
1541
1557
  iconSize: number;
1558
+ teleportTo: undefined;
1542
1559
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1543
1560
  polygonComplete: (geometry: ShapeGeometry) => void;
1544
1561
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_13<__VLS_TypePropsToRuntimeProps_13<DrawToolProps>, {
1545
1562
  position: string;
1546
1563
  title: string;
1547
1564
  iconSize: number;
1565
+ teleportTo: undefined;
1548
1566
  }>>> & Readonly<{
1549
1567
  onPolygonComplete?: ((geometry: ShapeGeometry) => any) | undefined;
1550
1568
  }>, {
1551
1569
  position: MapControlPosition_2;
1552
1570
  title: string;
1553
1571
  iconSize: number;
1572
+ teleportTo: HTMLElement | null;
1554
1573
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1555
1574
 
1556
1575
  declare interface DrawToolProps extends BaseProps {
@@ -1559,6 +1578,7 @@ declare interface DrawToolProps extends BaseProps {
1559
1578
  position?: MapControlPosition_2;
1560
1579
  title?: string;
1561
1580
  iconSize?: number;
1581
+ teleportTo?: HTMLElement | null;
1562
1582
  }
1563
1583
 
1564
1584
  /**
@@ -1651,6 +1671,7 @@ iconSize: number;
1651
1671
  title: string;
1652
1672
  trackUser: boolean;
1653
1673
  markerColor: string;
1674
+ teleportTo: undefined;
1654
1675
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1655
1676
  located: (data: {
1656
1677
  longitude: number;
@@ -1664,6 +1685,7 @@ iconSize: number;
1664
1685
  title: string;
1665
1686
  trackUser: boolean;
1666
1687
  markerColor: string;
1688
+ teleportTo: undefined;
1667
1689
  }>>> & Readonly<{
1668
1690
  onLocated?: ((data: {
1669
1691
  longitude: number;
@@ -1675,6 +1697,7 @@ onError?: ((error: Error | GeolocationPositionError) => any) | undefined;
1675
1697
  position: MapControlPosition_2;
1676
1698
  title: string;
1677
1699
  iconSize: number;
1700
+ teleportTo: HTMLElement | null;
1678
1701
  trackUser: boolean;
1679
1702
  markerColor: string;
1680
1703
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -1686,6 +1709,7 @@ declare interface GeolocationButtonProps extends BaseProps {
1686
1709
  title?: string;
1687
1710
  trackUser?: boolean;
1688
1711
  markerColor?: string;
1712
+ teleportTo?: HTMLElement | null;
1689
1713
  }
1690
1714
 
1691
1715
  /**
@@ -1844,6 +1868,7 @@ declare interface MapButtonProps extends BaseProps {
1844
1868
  toggleable?: boolean;
1845
1869
  active?: boolean;
1846
1870
  activeColor?: string;
1871
+ teleportTo?: HTMLElement | null;
1847
1872
  }
1848
1873
 
1849
1874
  /**
@@ -2035,6 +2060,7 @@ placeholder: string;
2035
2060
  geocode: boolean;
2036
2061
  centerOnResult: boolean;
2037
2062
  searchZoom: number;
2063
+ teleportTo: undefined;
2038
2064
  }>>, {
2039
2065
  loading: Ref<boolean, boolean>;
2040
2066
  error: Ref<string | null, string | null>;
@@ -2049,12 +2075,14 @@ placeholder: string;
2049
2075
  geocode: boolean;
2050
2076
  centerOnResult: boolean;
2051
2077
  searchZoom: number;
2078
+ teleportTo: undefined;
2052
2079
  }>>> & Readonly<{
2053
2080
  onError?: ((error: string) => any) | undefined;
2054
2081
  onSearch?: ((query: string) => any) | undefined;
2055
2082
  onResult?: ((result: AisGeocodeResult) => any) | undefined;
2056
2083
  }>, {
2057
2084
  position: MapControlPosition_2;
2085
+ teleportTo: HTMLElement | null;
2058
2086
  placeholder: string;
2059
2087
  geocode: boolean;
2060
2088
  centerOnResult: boolean;
@@ -2070,6 +2098,7 @@ declare interface MapSearchControlProps {
2070
2098
  centerOnResult?: boolean;
2071
2099
  /** Zoom level when centering on result (default: 17) */
2072
2100
  searchZoom?: number;
2101
+ teleportTo?: HTMLElement | null;
2073
2102
  }
2074
2103
 
2075
2104
  export declare const MapTooltip: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
@@ -2146,6 +2175,7 @@ iconSize: number;
2146
2175
  title: string;
2147
2176
  active: boolean;
2148
2177
  disabled: boolean;
2178
+ teleportTo: undefined;
2149
2179
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2150
2180
  toggle: (payload: PictometryButtonTogglePayload) => void;
2151
2181
  error: (error: Error) => void;
@@ -2155,6 +2185,7 @@ iconSize: number;
2155
2185
  title: string;
2156
2186
  active: boolean;
2157
2187
  disabled: boolean;
2188
+ teleportTo: undefined;
2158
2189
  }>>> & Readonly<{
2159
2190
  onError?: ((error: Error) => any) | undefined;
2160
2191
  onToggle?: ((payload: PictometryButtonTogglePayload) => any) | undefined;
@@ -2163,6 +2194,7 @@ position: MapControlPosition_3;
2163
2194
  title: string;
2164
2195
  iconSize: number;
2165
2196
  active: boolean;
2197
+ teleportTo: HTMLElement | null;
2166
2198
  disabled: boolean;
2167
2199
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2168
2200
 
@@ -2184,6 +2216,8 @@ export declare interface PictometryButtonProps {
2184
2216
  iconSize?: number;
2185
2217
  /** Whether the button is disabled */
2186
2218
  disabled?: boolean;
2219
+ /** Element to teleport the button control into */
2220
+ teleportTo?: HTMLElement | null;
2187
2221
  }
2188
2222
 
2189
2223
  /**
@@ -2668,41 +2702,22 @@ declare interface SymbolLayerProps extends BaseLayerProps {
2668
2702
  declare function toggleDropdown(): void;
2669
2703
 
2670
2704
  /**
2671
- * Composable for adding MapLibre controls to the map.
2705
+ * Composable for adding native MapLibre controls to a Vue-managed corner container.
2672
2706
  *
2673
- * This composable handles positioning controls in MapLibre's corner containers
2674
- * (top-left, top-right, etc.) and automatic cleanup on unmount.
2707
+ * This is for MapLibre's built-in controls (like NavigationControl) that create
2708
+ * their own DOM elements internally. It calls control.onAdd(map) to get the
2709
+ * element, then appends it to the correct corner container provided by Map.vue.
2675
2710
  *
2676
- * ## What is IControl?
2677
- *
2678
- * IControl is MapLibre's interface for map controls. It's not a class you extend -
2679
- * it's a TypeScript interface that uses "duck typing": any object with the right
2680
- * methods qualifies. The required methods are:
2681
- *
2682
- * - onAdd(map): Called when control is added. Must return an HTMLElement.
2683
- * - onRemove(): Called when control is removed. Handle any cleanup here.
2684
- *
2685
- * So this plain object is a valid IControl:
2686
- *
2687
- * { onAdd() { return myDiv; }, onRemove() {} }
2688
- *
2689
- * ## Usage
2690
- *
2691
- * For Vue template-based controls (MapButton, MapSearchControl, BasemapDropdown),
2692
- * pass a ref to the container element. The composable creates the IControl internally,
2693
- * returning your Vue template's DOM element from onAdd():
2694
- *
2695
- * const containerRef = ref<HTMLElement | null>(null);
2696
- * useMapControl(props, containerRef);
2697
- *
2698
- * For MapLibre's built-in controls (like NavigationControl), pass a function that
2699
- * returns the control. These already implement IControl internally:
2711
+ * For Vue-template controls (MapButton, MapSearchControl, BasemapDropdown),
2712
+ * use the <Teleport> pattern with inject("controlCorners") instead.
2700
2713
  *
2714
+ * Usage:
2701
2715
  * useMapControl(props, () => new maplibregl.NavigationControl());
2702
2716
  */
2703
2717
  export declare function useMapControl(props: {
2704
2718
  position?: MapControlPosition_2;
2705
- }, controlOrContainer: Ref<HTMLElement | null> | (() => IControl)): void;
2719
+ teleportTo?: HTMLElement | null;
2720
+ }, createControl: () => IControl): void;
2706
2721
 
2707
2722
  /**
2708
2723
  * Validate credentials format (doesn't verify with server)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PictometryPanel-6pvRJItM.cjs"),o=require("./useMapControl-DEFMi86p.cjs"),a=require("./index-CNj5iS7C.cjs");exports.BasemapDropdown=e._sfc_main$13;exports.BasemapToggle=e._sfc_main$12;exports.CircleLayer=e._sfc_main$4;exports.CyclomediaButton=e.CyclomediaButton;exports.CyclomediaPanel=e.CyclomediaPanel;exports.CyclomediaRecordingsLayer=e._sfc_main$15;exports.DrawTool=e._sfc_main$9;exports.FillLayer=e._sfc_main$2;exports.GeolocationButton=e._sfc_main$11;exports.LineLayer=e._sfc_main$3;exports.Map=e.Map;exports.MapButton=e._sfc_main$10;exports.MapFloatingPanel=e._sfc_main$8;exports.MapIconTextPin=e.MapIconTextPin;exports.MapLoadingOverlay=e.MapLoadingOverlay;exports.MapMarker=e._sfc_main;exports.MapNavigationControl=e._sfc_main$7;exports.MapPopup=e._sfc_main$1;exports.MapSearchControl=e._sfc_main$14;exports.MapTooltip=e.MapTooltip;exports.PictometryButton=e.PictometryButton;exports.PictometryLabelsControl=e._sfc_main$17;exports.PictometryLayerControl=e.PictometryLayerControl;exports.PictometryPanel=e.PictometryPanel;exports.PictometryParcelsControl=e._sfc_main$16;exports.RasterLayer=e._sfc_main$6;exports.SymbolLayer=e._sfc_main$5;exports.clearTokenCache=e.clearTokenCache;exports.defaultBasemapSource=e.defaultBasemapSource;exports.defaultImageryOptions=e.defaultImageryOptions;exports.defaultLabelsSource=e.defaultLabelsSource;exports.getValidToken=e.getValidToken;exports.imageryLabelsSource=e.imageryLabelsSource;exports.imageryLabelsUrl=e.imageryLabelsUrl;exports.imageryParcelOutlinesSource=e.imageryParcelOutlinesSource;exports.imagerySources=e.imagerySources;exports.isPictometryLoaded=e.isPictometryLoaded;exports.loadPictometryScript=e.loadPictometryScript;exports.validateCredentials=e.validateCredentials;exports.useMapControl=o.useMapControl;exports.fetchParcelGeometry=a.fetchParcelGeometry;exports.geocodeAddress=a.geocodeAddress;exports.queryParcelAtPoint=a.queryParcelAtPoint;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PictometryPanel-NWZ2m-qA.cjs"),o=require("./useMapControl-CQEU6ZEn.cjs"),a=require("./index-CNj5iS7C.cjs");exports.BasemapDropdown=e._sfc_main$13;exports.BasemapToggle=e._sfc_main$12;exports.CircleLayer=e._sfc_main$4;exports.CyclomediaButton=e.CyclomediaButton;exports.CyclomediaPanel=e.CyclomediaPanel;exports.CyclomediaRecordingsLayer=e._sfc_main$15;exports.DrawTool=e._sfc_main$9;exports.FillLayer=e._sfc_main$2;exports.GeolocationButton=e._sfc_main$11;exports.LineLayer=e._sfc_main$3;exports.Map=e.Map;exports.MapButton=e._sfc_main$10;exports.MapFloatingPanel=e._sfc_main$8;exports.MapIconTextPin=e.MapIconTextPin;exports.MapLoadingOverlay=e.MapLoadingOverlay;exports.MapMarker=e._sfc_main;exports.MapNavigationControl=e._sfc_main$7;exports.MapPopup=e._sfc_main$1;exports.MapSearchControl=e._sfc_main$14;exports.MapTooltip=e.MapTooltip;exports.PictometryButton=e.PictometryButton;exports.PictometryLabelsControl=e._sfc_main$17;exports.PictometryLayerControl=e.PictometryLayerControl;exports.PictometryPanel=e.PictometryPanel;exports.PictometryParcelsControl=e._sfc_main$16;exports.RasterLayer=e._sfc_main$6;exports.SymbolLayer=e._sfc_main$5;exports.clearTokenCache=e.clearTokenCache;exports.defaultBasemapSource=e.defaultBasemapSource;exports.defaultImageryOptions=e.defaultImageryOptions;exports.defaultLabelsSource=e.defaultLabelsSource;exports.getValidToken=e.getValidToken;exports.imageryLabelsSource=e.imageryLabelsSource;exports.imageryLabelsUrl=e.imageryLabelsUrl;exports.imageryParcelOutlinesSource=e.imageryParcelOutlinesSource;exports.imagerySources=e.imagerySources;exports.isPictometryLoaded=e.isPictometryLoaded;exports.loadPictometryScript=e.loadPictometryScript;exports.validateCredentials=e.validateCredentials;exports.useMapControl=o.useMapControl;exports.fetchParcelGeometry=a.fetchParcelGeometry;exports.geocodeAddress=a.geocodeAddress;exports.queryParcelAtPoint=a.queryParcelAtPoint;
@@ -1,5 +1,5 @@
1
- import { p as o, o as s, f as r, C as t, r as l, s as i, l as c, d as n, n as y, e as m, M as p, m as d, k as u, a as P, i as g, _ as L, j as C, c as M, q as f, b as B, P as S, w as b, u as T, t as x, v as h, h as k, g as v, B as q, D as w, F as A, E as D, z as F, H as G, J as I, I as O, G as R, y as j, x as z, A as E } from "./PictometryPanel-Y4rO0d4R.js";
2
- import { u as J } from "./useMapControl-CLsqbbTQ.js";
1
+ import { p as o, o as s, f as r, C as t, r as l, s as i, l as c, d as n, n as y, e as m, M as p, m as d, k as u, a as P, i as g, _ as L, j as C, c as M, q as f, b as B, P as S, w as b, u as T, t as x, v as h, h as k, g as v, B as q, D as w, F as A, E as D, z as F, H as G, J as I, I as O, G as R, y as j, x as z, A as E } from "./PictometryPanel-BYMErsa9.js";
2
+ import { u as J } from "./useMapControl-BsuTq6k_.js";
3
3
  import { f as U, g as V, q as _ } from "./index-BXLyy2C_.js";
4
4
  export {
5
5
  o as BasemapDropdown,
@@ -1,45 +1,25 @@
1
1
  import { IControl } from 'maplibre-gl';
2
- import { Ref } from 'vue';
3
2
 
4
3
  /** Common position type for map controls */
5
4
  declare type MapControlPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
6
5
 
7
6
  /**
8
- * Composable for adding MapLibre controls to the map.
7
+ * Composable for adding native MapLibre controls to a Vue-managed corner container.
9
8
  *
10
- * This composable handles positioning controls in MapLibre's corner containers
11
- * (top-left, top-right, etc.) and automatic cleanup on unmount.
9
+ * This is for MapLibre's built-in controls (like NavigationControl) that create
10
+ * their own DOM elements internally. It calls control.onAdd(map) to get the
11
+ * element, then appends it to the correct corner container provided by Map.vue.
12
12
  *
13
- * ## What is IControl?
14
- *
15
- * IControl is MapLibre's interface for map controls. It's not a class you extend -
16
- * it's a TypeScript interface that uses "duck typing": any object with the right
17
- * methods qualifies. The required methods are:
18
- *
19
- * - onAdd(map): Called when control is added. Must return an HTMLElement.
20
- * - onRemove(): Called when control is removed. Handle any cleanup here.
21
- *
22
- * So this plain object is a valid IControl:
23
- *
24
- * { onAdd() { return myDiv; }, onRemove() {} }
25
- *
26
- * ## Usage
27
- *
28
- * For Vue template-based controls (MapButton, MapSearchControl, BasemapDropdown),
29
- * pass a ref to the container element. The composable creates the IControl internally,
30
- * returning your Vue template's DOM element from onAdd():
31
- *
32
- * const containerRef = ref<HTMLElement | null>(null);
33
- * useMapControl(props, containerRef);
34
- *
35
- * For MapLibre's built-in controls (like NavigationControl), pass a function that
36
- * returns the control. These already implement IControl internally:
13
+ * For Vue-template controls (MapButton, MapSearchControl, BasemapDropdown),
14
+ * use the <Teleport> pattern with inject("controlCorners") instead.
37
15
  *
16
+ * Usage:
38
17
  * useMapControl(props, () => new maplibregl.NavigationControl());
39
18
  */
40
19
  export declare function useMapControl(props: {
41
20
  position?: MapControlPosition;
42
- }, controlOrContainer: Ref<HTMLElement | null> | (() => IControl)): void;
21
+ teleportTo?: HTMLElement | null;
22
+ }, createControl: () => IControl): void;
43
23
 
44
24
  export { }
45
25
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useMapControl-DEFMi86p.cjs");exports.useMapControl=e.useMapControl;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useMapControl-CQEU6ZEn.cjs");exports.useMapControl=e.useMapControl;
@@ -1,4 +1,4 @@
1
- import { u as a } from "./useMapControl-CLsqbbTQ.js";
1
+ import { u as a } from "./useMapControl-BsuTq6k_.js";
2
2
  export {
3
3
  a as useMapControl
4
4
  };
package/dist/index.d.ts CHANGED
@@ -225,6 +225,7 @@ iconSize: number;
225
225
  toggleable: boolean;
226
226
  active: boolean;
227
227
  activeColor: string;
228
+ teleportTo: undefined;
228
229
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
229
230
  click: () => void;
230
231
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_14<__VLS_TypePropsToRuntimeProps_14<MapButtonProps>, {
@@ -237,6 +238,7 @@ iconSize: number;
237
238
  toggleable: boolean;
238
239
  active: boolean;
239
240
  activeColor: string;
241
+ teleportTo: undefined;
240
242
  }>>> & Readonly<{
241
243
  onClick?: (() => any) | undefined;
242
244
  }>, {
@@ -249,6 +251,7 @@ iconSize: number;
249
251
  toggleable: boolean;
250
252
  active: boolean;
251
253
  activeColor: string;
254
+ teleportTo: HTMLElement | null;
252
255
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
253
256
 
254
257
  declare const __VLS_component_7: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_21<__VLS_TypePropsToRuntimeProps_21<CyclomediaRecordingsLayerProps>, {
@@ -980,6 +983,7 @@ position: string;
980
983
  selectedIndex: number;
981
984
  useAsControl: boolean;
982
985
  isDropUp: boolean;
986
+ teleportTo: undefined;
983
987
  }>>, {
984
988
  isOpen: Ref<boolean, boolean>;
985
989
  selectedIndex: Ref<number, number>;
@@ -993,10 +997,12 @@ position: string;
993
997
  selectedIndex: number;
994
998
  useAsControl: boolean;
995
999
  isDropUp: boolean;
1000
+ teleportTo: undefined;
996
1001
  }>>> & Readonly<{
997
1002
  onSelect?: ((option: BasemapOption, index: number) => any) | undefined;
998
1003
  }>, {
999
1004
  position: MapControlPosition_2;
1005
+ teleportTo: HTMLElement | null;
1000
1006
  selectedIndex: number;
1001
1007
  useAsControl: boolean;
1002
1008
  isDropUp: boolean;
@@ -1008,6 +1014,7 @@ declare interface BasemapDropdownProps {
1008
1014
  selectedIndex?: number;
1009
1015
  useAsControl?: boolean;
1010
1016
  isDropUp?: boolean;
1017
+ teleportTo?: HTMLElement | null;
1011
1018
  }
1012
1019
 
1013
1020
  declare interface BasemapOption {
@@ -1026,6 +1033,7 @@ title: string;
1026
1033
  iconSize: number;
1027
1034
  showDropdown: boolean;
1028
1035
  dropdownOptions: () => ImageryYearOption[];
1036
+ teleportTo: undefined;
1029
1037
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1030
1038
  change: (value: BasemapChangeEvent) => void;
1031
1039
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_16<__VLS_TypePropsToRuntimeProps_16<BasemapToggleProps>, {
@@ -1036,12 +1044,14 @@ title: string;
1036
1044
  iconSize: number;
1037
1045
  showDropdown: boolean;
1038
1046
  dropdownOptions: () => ImageryYearOption[];
1047
+ teleportTo: undefined;
1039
1048
  }>>> & Readonly<{
1040
1049
  onChange?: ((value: BasemapChangeEvent) => any) | undefined;
1041
1050
  }>, {
1042
1051
  position: MapControlPosition_2;
1043
1052
  title: string;
1044
1053
  iconSize: number;
1054
+ teleportTo: HTMLElement | null;
1045
1055
  imageryUrl: string;
1046
1056
  imageryLabelsUrl: string;
1047
1057
  showDropdown: boolean;
@@ -1058,6 +1068,7 @@ declare interface BasemapToggleProps extends BaseProps {
1058
1068
  iconSize?: number;
1059
1069
  showDropdown?: boolean;
1060
1070
  dropdownOptions?: BasemapOption[];
1071
+ teleportTo?: HTMLElement | null;
1061
1072
  }
1062
1073
 
1063
1074
  /**
@@ -1181,6 +1192,7 @@ iconSize: number;
1181
1192
  title: string;
1182
1193
  active: boolean;
1183
1194
  disabled: boolean;
1195
+ teleportTo: undefined;
1184
1196
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1185
1197
  toggle: (data: {
1186
1198
  active: boolean;
@@ -1196,6 +1208,7 @@ iconSize: number;
1196
1208
  title: string;
1197
1209
  active: boolean;
1198
1210
  disabled: boolean;
1211
+ teleportTo: undefined;
1199
1212
  }>>> & Readonly<{
1200
1213
  onError?: ((error: Error) => any) | undefined;
1201
1214
  onToggle?: ((data: {
@@ -1210,6 +1223,7 @@ position: MapControlPosition;
1210
1223
  title: string;
1211
1224
  iconSize: number;
1212
1225
  active: boolean;
1226
+ teleportTo: HTMLElement | null;
1213
1227
  disabled: boolean;
1214
1228
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1215
1229
 
@@ -1253,6 +1267,8 @@ export declare interface CyclomediaButtonProps {
1253
1267
  active?: boolean;
1254
1268
  /** Whether the button is disabled */
1255
1269
  disabled?: boolean;
1270
+ /** Element to teleport the button control into */
1271
+ teleportTo?: HTMLElement | null;
1256
1272
  }
1257
1273
 
1258
1274
  /**
@@ -1539,18 +1555,21 @@ export declare const DrawTool: DefineComponent<ExtractPropTypes<__VLS_WithDefaul
1539
1555
  position: string;
1540
1556
  title: string;
1541
1557
  iconSize: number;
1558
+ teleportTo: undefined;
1542
1559
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1543
1560
  polygonComplete: (geometry: ShapeGeometry) => void;
1544
1561
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_13<__VLS_TypePropsToRuntimeProps_13<DrawToolProps>, {
1545
1562
  position: string;
1546
1563
  title: string;
1547
1564
  iconSize: number;
1565
+ teleportTo: undefined;
1548
1566
  }>>> & Readonly<{
1549
1567
  onPolygonComplete?: ((geometry: ShapeGeometry) => any) | undefined;
1550
1568
  }>, {
1551
1569
  position: MapControlPosition_2;
1552
1570
  title: string;
1553
1571
  iconSize: number;
1572
+ teleportTo: HTMLElement | null;
1554
1573
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1555
1574
 
1556
1575
  declare interface DrawToolProps extends BaseProps {
@@ -1559,6 +1578,7 @@ declare interface DrawToolProps extends BaseProps {
1559
1578
  position?: MapControlPosition_2;
1560
1579
  title?: string;
1561
1580
  iconSize?: number;
1581
+ teleportTo?: HTMLElement | null;
1562
1582
  }
1563
1583
 
1564
1584
  /**
@@ -1651,6 +1671,7 @@ iconSize: number;
1651
1671
  title: string;
1652
1672
  trackUser: boolean;
1653
1673
  markerColor: string;
1674
+ teleportTo: undefined;
1654
1675
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1655
1676
  located: (data: {
1656
1677
  longitude: number;
@@ -1664,6 +1685,7 @@ iconSize: number;
1664
1685
  title: string;
1665
1686
  trackUser: boolean;
1666
1687
  markerColor: string;
1688
+ teleportTo: undefined;
1667
1689
  }>>> & Readonly<{
1668
1690
  onLocated?: ((data: {
1669
1691
  longitude: number;
@@ -1675,6 +1697,7 @@ onError?: ((error: Error | GeolocationPositionError) => any) | undefined;
1675
1697
  position: MapControlPosition_2;
1676
1698
  title: string;
1677
1699
  iconSize: number;
1700
+ teleportTo: HTMLElement | null;
1678
1701
  trackUser: boolean;
1679
1702
  markerColor: string;
1680
1703
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -1686,6 +1709,7 @@ declare interface GeolocationButtonProps extends BaseProps {
1686
1709
  title?: string;
1687
1710
  trackUser?: boolean;
1688
1711
  markerColor?: string;
1712
+ teleportTo?: HTMLElement | null;
1689
1713
  }
1690
1714
 
1691
1715
  /**
@@ -1844,6 +1868,7 @@ declare interface MapButtonProps extends BaseProps {
1844
1868
  toggleable?: boolean;
1845
1869
  active?: boolean;
1846
1870
  activeColor?: string;
1871
+ teleportTo?: HTMLElement | null;
1847
1872
  }
1848
1873
 
1849
1874
  /**
@@ -2035,6 +2060,7 @@ placeholder: string;
2035
2060
  geocode: boolean;
2036
2061
  centerOnResult: boolean;
2037
2062
  searchZoom: number;
2063
+ teleportTo: undefined;
2038
2064
  }>>, {
2039
2065
  loading: Ref<boolean, boolean>;
2040
2066
  error: Ref<string | null, string | null>;
@@ -2049,12 +2075,14 @@ placeholder: string;
2049
2075
  geocode: boolean;
2050
2076
  centerOnResult: boolean;
2051
2077
  searchZoom: number;
2078
+ teleportTo: undefined;
2052
2079
  }>>> & Readonly<{
2053
2080
  onError?: ((error: string) => any) | undefined;
2054
2081
  onSearch?: ((query: string) => any) | undefined;
2055
2082
  onResult?: ((result: AisGeocodeResult) => any) | undefined;
2056
2083
  }>, {
2057
2084
  position: MapControlPosition_2;
2085
+ teleportTo: HTMLElement | null;
2058
2086
  placeholder: string;
2059
2087
  geocode: boolean;
2060
2088
  centerOnResult: boolean;
@@ -2070,6 +2098,7 @@ declare interface MapSearchControlProps {
2070
2098
  centerOnResult?: boolean;
2071
2099
  /** Zoom level when centering on result (default: 17) */
2072
2100
  searchZoom?: number;
2101
+ teleportTo?: HTMLElement | null;
2073
2102
  }
2074
2103
 
2075
2104
  export declare const MapTooltip: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
@@ -2146,6 +2175,7 @@ iconSize: number;
2146
2175
  title: string;
2147
2176
  active: boolean;
2148
2177
  disabled: boolean;
2178
+ teleportTo: undefined;
2149
2179
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2150
2180
  toggle: (payload: PictometryButtonTogglePayload) => void;
2151
2181
  error: (error: Error) => void;
@@ -2155,6 +2185,7 @@ iconSize: number;
2155
2185
  title: string;
2156
2186
  active: boolean;
2157
2187
  disabled: boolean;
2188
+ teleportTo: undefined;
2158
2189
  }>>> & Readonly<{
2159
2190
  onError?: ((error: Error) => any) | undefined;
2160
2191
  onToggle?: ((payload: PictometryButtonTogglePayload) => any) | undefined;
@@ -2163,6 +2194,7 @@ position: MapControlPosition_3;
2163
2194
  title: string;
2164
2195
  iconSize: number;
2165
2196
  active: boolean;
2197
+ teleportTo: HTMLElement | null;
2166
2198
  disabled: boolean;
2167
2199
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2168
2200
 
@@ -2184,6 +2216,8 @@ export declare interface PictometryButtonProps {
2184
2216
  iconSize?: number;
2185
2217
  /** Whether the button is disabled */
2186
2218
  disabled?: boolean;
2219
+ /** Element to teleport the button control into */
2220
+ teleportTo?: HTMLElement | null;
2187
2221
  }
2188
2222
 
2189
2223
  /**
@@ -2668,41 +2702,22 @@ declare interface SymbolLayerProps extends BaseLayerProps {
2668
2702
  declare function toggleDropdown(): void;
2669
2703
 
2670
2704
  /**
2671
- * Composable for adding MapLibre controls to the map.
2705
+ * Composable for adding native MapLibre controls to a Vue-managed corner container.
2672
2706
  *
2673
- * This composable handles positioning controls in MapLibre's corner containers
2674
- * (top-left, top-right, etc.) and automatic cleanup on unmount.
2707
+ * This is for MapLibre's built-in controls (like NavigationControl) that create
2708
+ * their own DOM elements internally. It calls control.onAdd(map) to get the
2709
+ * element, then appends it to the correct corner container provided by Map.vue.
2675
2710
  *
2676
- * ## What is IControl?
2677
- *
2678
- * IControl is MapLibre's interface for map controls. It's not a class you extend -
2679
- * it's a TypeScript interface that uses "duck typing": any object with the right
2680
- * methods qualifies. The required methods are:
2681
- *
2682
- * - onAdd(map): Called when control is added. Must return an HTMLElement.
2683
- * - onRemove(): Called when control is removed. Handle any cleanup here.
2684
- *
2685
- * So this plain object is a valid IControl:
2686
- *
2687
- * { onAdd() { return myDiv; }, onRemove() {} }
2688
- *
2689
- * ## Usage
2690
- *
2691
- * For Vue template-based controls (MapButton, MapSearchControl, BasemapDropdown),
2692
- * pass a ref to the container element. The composable creates the IControl internally,
2693
- * returning your Vue template's DOM element from onAdd():
2694
- *
2695
- * const containerRef = ref<HTMLElement | null>(null);
2696
- * useMapControl(props, containerRef);
2697
- *
2698
- * For MapLibre's built-in controls (like NavigationControl), pass a function that
2699
- * returns the control. These already implement IControl internally:
2711
+ * For Vue-template controls (MapButton, MapSearchControl, BasemapDropdown),
2712
+ * use the <Teleport> pattern with inject("controlCorners") instead.
2700
2713
  *
2714
+ * Usage:
2701
2715
  * useMapControl(props, () => new maplibregl.NavigationControl());
2702
2716
  */
2703
2717
  export declare function useMapControl(props: {
2704
2718
  position?: MapControlPosition_2;
2705
- }, controlOrContainer: Ref<HTMLElement | null> | (() => IControl)): void;
2719
+ teleportTo?: HTMLElement | null;
2720
+ }, createControl: () => IControl): void;
2706
2721
 
2707
2722
  /**
2708
2723
  * Validate credentials format (doesn't verify with server)
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PictometryPanel-6pvRJItM.cjs"),o=require("./useMapControl-DEFMi86p.cjs"),a=require("./index-CNj5iS7C.cjs");exports.BasemapDropdown=e._sfc_main$13;exports.BasemapToggle=e._sfc_main$12;exports.CircleLayer=e._sfc_main$4;exports.CyclomediaButton=e.CyclomediaButton;exports.CyclomediaPanel=e.CyclomediaPanel;exports.CyclomediaRecordingsLayer=e._sfc_main$15;exports.DrawTool=e._sfc_main$9;exports.FillLayer=e._sfc_main$2;exports.GeolocationButton=e._sfc_main$11;exports.LineLayer=e._sfc_main$3;exports.Map=e.Map;exports.MapButton=e._sfc_main$10;exports.MapFloatingPanel=e._sfc_main$8;exports.MapIconTextPin=e.MapIconTextPin;exports.MapLoadingOverlay=e.MapLoadingOverlay;exports.MapMarker=e._sfc_main;exports.MapNavigationControl=e._sfc_main$7;exports.MapPopup=e._sfc_main$1;exports.MapSearchControl=e._sfc_main$14;exports.MapTooltip=e.MapTooltip;exports.PictometryButton=e.PictometryButton;exports.PictometryLabelsControl=e._sfc_main$17;exports.PictometryLayerControl=e.PictometryLayerControl;exports.PictometryPanel=e.PictometryPanel;exports.PictometryParcelsControl=e._sfc_main$16;exports.RasterLayer=e._sfc_main$6;exports.SymbolLayer=e._sfc_main$5;exports.clearTokenCache=e.clearTokenCache;exports.defaultBasemapSource=e.defaultBasemapSource;exports.defaultImageryOptions=e.defaultImageryOptions;exports.defaultLabelsSource=e.defaultLabelsSource;exports.getValidToken=e.getValidToken;exports.imageryLabelsSource=e.imageryLabelsSource;exports.imageryLabelsUrl=e.imageryLabelsUrl;exports.imageryParcelOutlinesSource=e.imageryParcelOutlinesSource;exports.imagerySources=e.imagerySources;exports.isPictometryLoaded=e.isPictometryLoaded;exports.loadPictometryScript=e.loadPictometryScript;exports.validateCredentials=e.validateCredentials;exports.useMapControl=o.useMapControl;exports.fetchParcelGeometry=a.fetchParcelGeometry;exports.geocodeAddress=a.geocodeAddress;exports.queryParcelAtPoint=a.queryParcelAtPoint;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PictometryPanel-NWZ2m-qA.cjs"),o=require("./useMapControl-CQEU6ZEn.cjs"),a=require("./index-CNj5iS7C.cjs");exports.BasemapDropdown=e._sfc_main$13;exports.BasemapToggle=e._sfc_main$12;exports.CircleLayer=e._sfc_main$4;exports.CyclomediaButton=e.CyclomediaButton;exports.CyclomediaPanel=e.CyclomediaPanel;exports.CyclomediaRecordingsLayer=e._sfc_main$15;exports.DrawTool=e._sfc_main$9;exports.FillLayer=e._sfc_main$2;exports.GeolocationButton=e._sfc_main$11;exports.LineLayer=e._sfc_main$3;exports.Map=e.Map;exports.MapButton=e._sfc_main$10;exports.MapFloatingPanel=e._sfc_main$8;exports.MapIconTextPin=e.MapIconTextPin;exports.MapLoadingOverlay=e.MapLoadingOverlay;exports.MapMarker=e._sfc_main;exports.MapNavigationControl=e._sfc_main$7;exports.MapPopup=e._sfc_main$1;exports.MapSearchControl=e._sfc_main$14;exports.MapTooltip=e.MapTooltip;exports.PictometryButton=e.PictometryButton;exports.PictometryLabelsControl=e._sfc_main$17;exports.PictometryLayerControl=e.PictometryLayerControl;exports.PictometryPanel=e.PictometryPanel;exports.PictometryParcelsControl=e._sfc_main$16;exports.RasterLayer=e._sfc_main$6;exports.SymbolLayer=e._sfc_main$5;exports.clearTokenCache=e.clearTokenCache;exports.defaultBasemapSource=e.defaultBasemapSource;exports.defaultImageryOptions=e.defaultImageryOptions;exports.defaultLabelsSource=e.defaultLabelsSource;exports.getValidToken=e.getValidToken;exports.imageryLabelsSource=e.imageryLabelsSource;exports.imageryLabelsUrl=e.imageryLabelsUrl;exports.imageryParcelOutlinesSource=e.imageryParcelOutlinesSource;exports.imagerySources=e.imagerySources;exports.isPictometryLoaded=e.isPictometryLoaded;exports.loadPictometryScript=e.loadPictometryScript;exports.validateCredentials=e.validateCredentials;exports.useMapControl=o.useMapControl;exports.fetchParcelGeometry=a.fetchParcelGeometry;exports.geocodeAddress=a.geocodeAddress;exports.queryParcelAtPoint=a.queryParcelAtPoint;