@phila/phila-ui-map-core 0.0.1-beta.2

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.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./components.js"),a=require("./index-K0bKFr5g.cjs");exports.BasemapDropdown=o.BasemapDropdown;exports.BasemapToggle=o.BasemapToggle;exports.DrawTool=o.DrawTool;exports.GeolocationButton=o.GeolocationButton;exports.Map=o.Map;exports.MapButton=o.MapButton;exports.MapFloatingPanel=o.MapFloatingPanel;exports.MapLayer=o.MapLayer;exports.MapMarker=o.MapMarker;exports.MapNavigationControl=o.MapNavigationControl;exports.MeasureButton=o.MeasureButton;exports.createButtonControl=a.createButtonControl;exports.useMapControl=a.useMapControl;
package/dist/index.mjs ADDED
@@ -0,0 +1,17 @@
1
+ import { BasemapDropdown as t, BasemapToggle as e, DrawTool as r, GeolocationButton as n, Map as p, MapButton as M, MapFloatingPanel as l, MapLayer as u, MapMarker as s, MapNavigationControl as B, MeasureButton as g } from "./components.mjs";
2
+ import { q as m, u as C } from "./index-DJPTWX6O.js";
3
+ export {
4
+ t as BasemapDropdown,
5
+ e as BasemapToggle,
6
+ r as DrawTool,
7
+ n as GeolocationButton,
8
+ p as Map,
9
+ M as MapButton,
10
+ l as MapFloatingPanel,
11
+ u as MapLayer,
12
+ s as MapMarker,
13
+ B as MapNavigationControl,
14
+ g as MeasureButton,
15
+ m as createButtonControl,
16
+ C as useMapControl
17
+ };
File without changes
@@ -0,0 +1,130 @@
1
+ import { BaseProps } from '@phila/phila-ui-core';
2
+ import { FilterSpecification } from 'maplibre-gl';
3
+ import { LayerSpecification } from 'maplibre-gl';
4
+ import { LngLatLike } from 'maplibre-gl';
5
+ import { PointLike } from 'maplibre-gl';
6
+ import { SourceSpecification } from 'maplibre-gl';
7
+ import { StyleSpecification } from 'maplibre-gl';
8
+
9
+ export declare interface BasemapOption {
10
+ label: string;
11
+ imageryUrl: string;
12
+ imageryLabelsUrl: string;
13
+ }
14
+
15
+ export declare interface BasemapToggleProps extends BaseProps {
16
+ position?: MapControlPosition;
17
+ imageryUrl?: string;
18
+ imageryLabelsUrl?: string;
19
+ imageryLayerId?: string;
20
+ imageryLabelsLayerId?: string;
21
+ baseLayerId?: string | null;
22
+ iconImage?: string | null;
23
+ basemapImage?: string | null;
24
+ title?: string;
25
+ iconSize?: number;
26
+ showDropdown?: boolean;
27
+ dropdownOptions?: BasemapOption[];
28
+ }
29
+
30
+ export declare interface DrawToolProps extends BaseProps {
31
+ icon?: string;
32
+ position?: MapControlPosition;
33
+ title?: string;
34
+ iconSize?: number;
35
+ }
36
+
37
+ export declare interface GeolocationButtonProps extends BaseProps {
38
+ position?: MapControlPosition;
39
+ icon?: string;
40
+ iconSize?: number;
41
+ title?: string;
42
+ trackUser?: boolean;
43
+ showAccuracyCircle?: boolean;
44
+ }
45
+
46
+ /** Common layer type for MapLayer */
47
+ export declare type LayerType = "fill" | "line" | "symbol" | "circle" | "fill-extrusion" | "raster" | "background" | "heatmap" | "hillshade";
48
+
49
+ export declare interface MapButtonProps extends BaseProps {
50
+ icon?: string;
51
+ image?: string;
52
+ position?: MapControlPosition;
53
+ title?: string;
54
+ iconSize?: number;
55
+ toggleable?: boolean;
56
+ active?: boolean;
57
+ activeColor?: string;
58
+ }
59
+
60
+ /** Common position type for map controls */
61
+ export declare type MapControlPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
62
+
63
+ export declare interface MapFloatingPanelProps extends BaseProps {
64
+ position?: MapControlPosition;
65
+ visible?: boolean;
66
+ offset?: {
67
+ x: number;
68
+ y: number;
69
+ };
70
+ leaveRoomForControls?: boolean;
71
+ }
72
+
73
+ export declare interface MapLayerProps extends BaseProps {
74
+ id: string;
75
+ type: LayerType;
76
+ source: string | SourceSpecification;
77
+ sourceLayer?: string;
78
+ paint?: LayerSpecification["paint"];
79
+ layout?: LayerSpecification["layout"];
80
+ filter?: FilterSpecification;
81
+ minzoom?: number;
82
+ maxzoom?: number;
83
+ beforeId?: string;
84
+ }
85
+
86
+ export declare interface MapMarkerProps extends BaseProps {
87
+ lngLat: [number, number];
88
+ color?: string;
89
+ popup?: string;
90
+ draggable?: boolean;
91
+ rotation?: number;
92
+ offset?: PointLike;
93
+ icon?: string;
94
+ iconSize?: number;
95
+ iconColor?: string;
96
+ }
97
+
98
+ export declare interface MapNavigationControlProps extends BaseProps {
99
+ position?: MapControlPosition;
100
+ }
101
+
102
+ export declare interface MapProps extends BaseProps {
103
+ center?: LngLatLike;
104
+ zoom?: number;
105
+ style?: string | StyleSpecification;
106
+ minZoom?: number;
107
+ maxZoom?: number;
108
+ pitch?: number;
109
+ bearing?: number;
110
+ }
111
+
112
+ export declare interface MeasureButtonProps extends BaseProps {
113
+ position?: MapControlPosition;
114
+ icon?: string;
115
+ iconSize?: number;
116
+ title?: string;
117
+ unit?: "feet" | "meters" | "miles" | "kilometers";
118
+ }
119
+
120
+ export { }
121
+
122
+
123
+ declare global {
124
+ interface Window {
125
+ deleteActivePolygon?: () => void;
126
+ cancelDrawing?: () => void;
127
+ finishDrawing?: () => void;
128
+ }
129
+ }
130
+
package/dist/utils.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";
package/dist/utils.mjs ADDED
@@ -0,0 +1 @@
1
+
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@phila/phila-ui-map-core",
3
+ "version": "0.0.1-beta.2",
4
+ "type": "module",
5
+ "description": "Core map utilities and styles for Phila UI library",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./composables": {
16
+ "types": "./dist/composables/index.d.ts",
17
+ "import": "./dist/composables/index.mjs",
18
+ "require": "./dist/composables/index.js"
19
+ },
20
+ "./components": {
21
+ "types": "./dist/components/index.d.ts",
22
+ "import": "./dist/components/index.mjs",
23
+ "require": "./dist/components/index.js"
24
+ },
25
+ "./styles/*": "./dist/styles/*"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "keywords": [
31
+ "ui",
32
+ "core",
33
+ "utilities",
34
+ "styles",
35
+ "typescript"
36
+ ],
37
+ "author": "",
38
+ "license": "MIT",
39
+ "devDependencies": {
40
+ "@types/node": "^24.0.0",
41
+ "@vitejs/plugin-vue": "^6.0.1",
42
+ "eslint": "^9.0.0",
43
+ "typescript": "^5.8.3",
44
+ "vite": "^7.0.6",
45
+ "vite-plugin-dts": "^3.9.1",
46
+ "vite-plugin-lib-inject-css": "^2.2.2",
47
+ "vite-plugin-vue-devtools": "^8.0.5",
48
+ "vue": "^3.5.18",
49
+ "vue-tsc": "^3.0.5"
50
+ },
51
+ "dependencies": {
52
+ "@turf/helpers": "^7.3.1",
53
+ "clsx": "^2.0.0",
54
+ "maplibre-gl": "^5.13.0",
55
+ "@phila/phila-ui-core": "2.2.0-beta.2",
56
+ "@phila/phila-ui-search": "1.0.5-beta.2"
57
+ },
58
+ "scripts": {
59
+ "build": "vite build && npm run copy-css",
60
+ "copy-css": "mkdir dist/styles && cp src/styles/*.css dist/styles/",
61
+ "build-win": "vite build && npm run copy-css-win",
62
+ "copy-css-win": "mkdir dist\\styles && copy src\\styles\\*.css dist\\styles\\",
63
+ "dev": "vite",
64
+ "dev:lib": "vite build --watch",
65
+ "lint": "eslint src/**/*.{ts,vue}",
66
+ "lint:fix": "eslint src/**/*.{ts,vue} --fix",
67
+ "type-check": "tsc --noEmit",
68
+ "clean": "rm -rf dist",
69
+ "format": "prettier --write .",
70
+ "format:check": "prettier --check ."
71
+ }
72
+ }