@classic-homes/theme-mcp 0.2.0 → 0.2.1

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.d.ts CHANGED
@@ -583,8 +583,11 @@ interface MapsCatalog {
583
583
  description: string;
584
584
  subpackages: {
585
585
  main: MapsSubpackage;
586
+ route: MapsSubpackage;
587
+ geocoding: MapsSubpackage;
586
588
  theme: MapsSubpackage;
587
589
  types: MapsSubpackage;
590
+ workers?: MapsSubpackage;
588
591
  };
589
592
  types: {
590
593
  props: MapsTypeCategory;
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
 
7
7
  // src/data/component-catalog.json
8
8
  var component_catalog_default = {
9
- version: "0.2.0",
9
+ version: "0.2.1",
10
10
  components: [
11
11
  {
12
12
  name: "Alert",
@@ -3060,6 +3060,13 @@ var component_catalog_default = {
3060
3060
  required: false,
3061
3061
  description: "Distance to drag before detaching (px)"
3062
3062
  },
3063
+ {
3064
+ name: "mobileBreakpoint",
3065
+ type: "number",
3066
+ default: "640",
3067
+ required: false,
3068
+ description: "Viewport width (px) below which the panel uses mobile behaviors (card scrim, focus trap, card drag). Pass 768 for apps that switch layouts at md"
3069
+ },
3063
3070
  {
3064
3071
  name: "class",
3065
3072
  type: "string",
@@ -13673,7 +13680,7 @@ function registerComponentResources(server) {
13673
13680
 
13674
13681
  // src/data/token-definitions.json
13675
13682
  var token_definitions_default = {
13676
- version: "0.2.0",
13683
+ version: "0.2.1",
13677
13684
  colors: {
13678
13685
  brand: [
13679
13686
  {
@@ -14620,7 +14627,7 @@ function registerTokenResources(server) {
14620
14627
 
14621
14628
  // src/data/styles-catalog.json
14622
14629
  var styles_catalog_default = {
14623
- version: "0.2.0",
14630
+ version: "0.2.1",
14624
14631
  package: "@classic-homes/theme-styles",
14625
14632
  description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
14626
14633
  integration: {
@@ -14993,7 +15000,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
14993
15000
 
14994
15001
  // src/data/pattern-library.json
14995
15002
  var pattern_library_default = {
14996
- version: "0.2.0",
15003
+ version: "0.2.1",
14997
15004
  layouts: [
14998
15005
  {
14999
15006
  id: "dashboard-page",
@@ -16103,7 +16110,7 @@ function registerLayoutResources(server) {
16103
16110
 
16104
16111
  // src/data/schema-catalog.json
16105
16112
  var schema_catalog_default = {
16106
- version: "0.2.0",
16113
+ version: "0.2.1",
16107
16114
  packageName: "@classic-homes/theme-svelte",
16108
16115
  importPath: "@classic-homes/theme-svelte",
16109
16116
  generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
@@ -16911,7 +16918,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
16911
16918
 
16912
16919
  // src/data/auth-catalog.json
16913
16920
  var auth_catalog_default = {
16914
- version: "0.2.0",
16921
+ version: "0.2.1",
16915
16922
  packageName: "@classic-homes/auth",
16916
16923
  description: "Authentication services and Svelte bindings for Classic Theme apps",
16917
16924
  subpackages: {
@@ -19948,7 +19955,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
19948
19955
 
19949
19956
  // src/data/notifications-catalog.json
19950
19957
  var notifications_catalog_default = {
19951
- version: "0.2.0",
19958
+ version: "0.2.1",
19952
19959
  packageName: "@classic-homes/notifications",
19953
19960
  description: "Notification services and Svelte bindings for Classic Theme apps",
19954
19961
  subpackages: {
@@ -20860,7 +20867,7 @@ function registerNotificationsResources(server) {
20860
20867
 
20861
20868
  // src/data/docs-catalog.json
20862
20869
  var docs_catalog_default = {
20863
- version: "0.2.0",
20870
+ version: "0.2.1",
20864
20871
  packageName: "@classic-homes/theme-docs",
20865
20872
  description: "Markdown documentation components for the Classic theme system",
20866
20873
  exports: {
@@ -21647,7 +21654,7 @@ var docs_catalog_default = {
21647
21654
  dependencies: {
21648
21655
  "@classic-homes/theme-tokens": "*",
21649
21656
  clsx: "^2.1.0",
21650
- "js-yaml": "^4.1.0",
21657
+ "js-yaml": "^4.3.2",
21651
21658
  marked: "^17.0.0",
21652
21659
  shiki: "^1.0.0",
21653
21660
  "tailwind-merge": "^2.2.0",
@@ -21788,7 +21795,7 @@ function registerDocsResources(server) {
21788
21795
 
21789
21796
  // src/data/charts-catalog.json
21790
21797
  var charts_catalog_default = {
21791
- version: "0.2.0",
21798
+ version: "0.2.1",
21792
21799
  packageName: "@classic-homes/charts-core",
21793
21800
  description: "Core utilities, types, and themes for Classic Theme chart components",
21794
21801
  subpackages: {
@@ -23625,7 +23632,7 @@ interface SankeyData {
23625
23632
 
23626
23633
  // src/data/maps-catalog.json
23627
23634
  var maps_catalog_default = {
23628
- version: "0.2.0",
23635
+ version: "0.2.1",
23629
23636
  packageName: "@classic-homes/maps-core",
23630
23637
  description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
23631
23638
  subpackages: {
@@ -24525,6 +24532,178 @@ var maps_catalog_default = {
24525
24532
  }
24526
24533
  }
24527
24534
  },
24535
+ route: {
24536
+ importPath: "@classic-homes/maps-core/route",
24537
+ description: "Multi-stop route planning: crow-flies distance, stop ordering, and Google/Apple Maps deep links. Framework-free - imports no maplibre-gl and touches no DOM, so it runs in a browser, a Cloudflare Worker or a test.",
24538
+ modules: {
24539
+ geo: {
24540
+ description: "Great-circle distance math. Crow-flies, NOT driving distance - label anything shown to a user as approximate.",
24541
+ functions: [
24542
+ {
24543
+ name: "haversineMiles",
24544
+ signature: "(a: LatLng, b: LatLng) => number",
24545
+ description: "Great-circle distance in statute miles. Returns NaN for non-finite input (null, undefined and numeric strings all count as non-finite)."
24546
+ },
24547
+ {
24548
+ name: "haversineKm",
24549
+ signature: "(a: LatLng, b: LatLng) => number",
24550
+ description: "Great-circle distance in kilometres"
24551
+ },
24552
+ {
24553
+ name: "distanceMatrix",
24554
+ signature: "(points: LatLng[]) => number[][]",
24555
+ description: "Symmetric distance matrix in miles with a zero diagonal"
24556
+ },
24557
+ {
24558
+ name: "EARTH_RADIUS_MILES",
24559
+ signature: "number",
24560
+ description: "Mean earth radius in statute miles (3958.7613)"
24561
+ },
24562
+ {
24563
+ name: "EARTH_RADIUS_KM",
24564
+ signature: "number",
24565
+ description: "Mean earth radius in kilometres (6371.0088)"
24566
+ }
24567
+ ],
24568
+ example: "import { haversineMiles } from '@classic-homes/maps-core/route';\n\nconst miles = haversineMiles(\n { lat: 38.8339, lng: -104.8214 },\n { lat: 39.7392, lng: -104.9903 }\n); // ~62.9 - approximate, not a drive time"
24569
+ },
24570
+ optimize: {
24571
+ description: "Stop ordering: greedy nearest-neighbour, then an open-path 2-opt pass. There is no return edge to the origin, because a tour ends at the last stop.",
24572
+ functions: [
24573
+ {
24574
+ name: "optimizeOrder",
24575
+ signature: "(origin: LatLng, points: LatLng[], opts?: { twoOpt?: boolean; maxPasses?: number }) => OrderResult",
24576
+ description: "Nearest-neighbour then 2-opt. The one function most callers need."
24577
+ },
24578
+ {
24579
+ name: "nearestNeighborOrder",
24580
+ signature: "(origin: LatLng, points: LatLng[]) => OrderResult",
24581
+ description: "Greedy nearest-neighbour ordering. Deterministic - ties break on the lower index. Non-finite coordinates are appended in input order, never dropped."
24582
+ },
24583
+ {
24584
+ name: "twoOptImprove",
24585
+ signature: "(origin: LatLng, points: LatLng[], order: number[], matrix: number[][], opts?: { maxPasses?: number }) => number[]",
24586
+ description: "Open-path 2-opt improvement over an existing order. O(n^2) per pass."
24587
+ },
24588
+ {
24589
+ name: "measureOrder",
24590
+ signature: "(origin: LatLng, points: LatLng[], order: number[]) => OrderResult",
24591
+ description: "Leg distances for an order the caller chose - no reordering"
24592
+ }
24593
+ ],
24594
+ example: "import { optimizeOrder } from '@classic-homes/maps-core/route';\n\nconst { order, legMiles, totalMiles } = optimizeOrder(userLocation, stops);\nconst visitOrder = order.map((i) => stops[i]);"
24595
+ },
24596
+ mapsLinks: {
24597
+ description: "Deep links into Google Maps and Apple Maps. Google renders at most 9 intermediate waypoints; the Apple Maps URL scheme has no waypoint parameter at all.",
24598
+ functions: [
24599
+ {
24600
+ name: "googleDirectionsUrl",
24601
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string",
24602
+ description: "Google Maps directions URL - last stop is the destination, the rest are waypoints. Returns '' when no target is usable."
24603
+ },
24604
+ {
24605
+ name: "googleDirectionsLegUrls",
24606
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string[]",
24607
+ description: "One URL per leg for routes past Google's waypoint budget, each leg resuming where the last ended. Use instead of truncating."
24608
+ },
24609
+ {
24610
+ name: "appleDirectionsUrl",
24611
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, dirflg?: 'd' | 'w' | 'r') => string",
24612
+ description: "Apple Maps URL. Multi-stop input returns the leg to the FIRST stop only - label the affordance accordingly."
24613
+ },
24614
+ {
24615
+ name: "googleSearchUrl",
24616
+ signature: "(query: string) => string",
24617
+ description: "Google Maps search URL - the fallback for a stop with no coordinate"
24618
+ },
24619
+ {
24620
+ name: "splitIntoLegs",
24621
+ signature: "<T>(stops: T[], maxPerLeg?: number) => T[][]",
24622
+ description: "Chunk stops to fit a waypoint budget, repeating each leg's last stop as the next leg's first"
24623
+ },
24624
+ {
24625
+ name: "targetFromCoords",
24626
+ signature: "(coords: LatLng, address?: string) => DirectionsTarget",
24627
+ description: "Convenience: a directions target from a coordinate"
24628
+ },
24629
+ {
24630
+ name: "GOOGLE_MAX_WAYPOINTS",
24631
+ signature: "number",
24632
+ description: "Google's intermediate waypoint limit (9)"
24633
+ },
24634
+ {
24635
+ name: "GOOGLE_MAX_LEG_STOPS",
24636
+ signature: "number",
24637
+ description: "Targets per leg, counting the destination (10)"
24638
+ }
24639
+ ],
24640
+ example: "import { googleDirectionsUrl, appleDirectionsUrl } from '@classic-homes/maps-core/route';\n\nconst google = googleDirectionsUrl(stops, userLocation, 'driving');\nconst apple = appleDirectionsUrl(stops, userLocation); // first stop only - label it"
24641
+ },
24642
+ coords: {
24643
+ description: "LatLng is an object, deliberately NOT the LngLat tuple the rest of maps-core uses: a silently transposed tuple produces a plausible route on the wrong side of the planet. Convert at the map boundary.",
24644
+ functions: [
24645
+ {
24646
+ name: "toLngLat",
24647
+ signature: "(point: LatLng) => LngLat",
24648
+ description: "Convert to the [lng, lat] tuple MapLibre and the rest of maps-core expect"
24649
+ },
24650
+ {
24651
+ name: "fromLngLat",
24652
+ signature: "(point: LngLat) => LatLng",
24653
+ description: "Convert from the [lng, lat] tuple form"
24654
+ },
24655
+ {
24656
+ name: "isValidLatLng",
24657
+ signature: "(point: unknown) => point is LatLng",
24658
+ description: "True when both components are numeric, finite and in range"
24659
+ },
24660
+ {
24661
+ name: "isFiniteNumber",
24662
+ signature: "(value: unknown) => value is number",
24663
+ description: "True only for a real finite number. Use over the global isFinite, which coerces null and '' to 0 - a real place in the Gulf of Guinea."
24664
+ }
24665
+ ],
24666
+ example: "import { toLngLat, isValidLatLng } from '@classic-homes/maps-core/route';\n\nconst stops = rows.filter((row) => isValidLatLng(row.coords));\nmap.setCenter(toLngLat(stops[0].coords));"
24667
+ }
24668
+ }
24669
+ },
24670
+ geocoding: {
24671
+ importPath: "@classic-homes/maps-core/geocoding",
24672
+ description: "Forward geocoding. The API key and fetch are both injected by the caller, so the key can stay server-side - a key compiled into a client bundle is a public key, and geocoding is billed per request. MapTiler is the only adapter today.",
24673
+ modules: {
24674
+ maptiler: {
24675
+ description: "MapTiler forward geocoding. The request builder and the response parser are separate pure functions, so a caller can put its own cache or retry layer between them.",
24676
+ functions: [
24677
+ {
24678
+ name: "geocodeForward",
24679
+ signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult | null>",
24680
+ description: "Forward-geocode a query, returning the best match. Resolves null on a miss, a non-2xx, a malformed body, an abort or a network error - pass onError to see which."
24681
+ },
24682
+ {
24683
+ name: "geocodeForwardMany",
24684
+ signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult[]>",
24685
+ description: "Same, returning every match best-first. Set opts.limit above 1 or MapTiler sends a single feature."
24686
+ },
24687
+ {
24688
+ name: "buildMapTilerGeocodeUrl",
24689
+ signature: "(query: string, opts: GeocodeOptions) => string",
24690
+ description: "Build the request URL. Throws RangeError on an empty query or key."
24691
+ },
24692
+ {
24693
+ name: "parseMapTilerGeocodeResponse",
24694
+ signature: "(body: unknown) => GeocodeResult | null",
24695
+ description: "Parse the best match. Handles the [lng, lat] to {lat, lng} swap."
24696
+ },
24697
+ {
24698
+ name: "parseMapTilerGeocodeResults",
24699
+ signature: "(body: unknown) => GeocodeResult[]",
24700
+ description: "Parse every usable feature, skipping malformed ones rather than failing the batch"
24701
+ }
24702
+ ],
24703
+ example: "import { geocodeForward } from '@classic-homes/maps-core/geocoding';\n\n// Key held server-side; this runs in a Worker or a route handler\nconst match = await geocodeForward(address, {\n key: env.MAPTILER_KEY,\n proximity: { lat: 38.8339, lng: -104.8214 },\n country: 'us',\n signal: AbortSignal.timeout(5000),\n onError: (err) => console.error('geocode', err),\n}, fetch);\n\nif (match) map.setCenter([match.coords.lng, match.coords.lat]);"
24704
+ }
24705
+ }
24706
+ },
24528
24707
  workers: {
24529
24708
  importPath: "@classic-homes/maps-core/workers",
24530
24709
  description: "Web Worker infrastructure for off-main-thread spatial processing",
@@ -24744,6 +24923,12 @@ var maps_catalog_default = {
24744
24923
  required: false,
24745
24924
  description: "Enable keyboard navigation"
24746
24925
  },
24926
+ {
24927
+ name: "cooperativeGestures",
24928
+ type: "boolean",
24929
+ required: false,
24930
+ description: "Require two-finger touch panning and Ctrl/Cmd + scroll wheel zooming, showing MapLibre's built-in help overlay otherwise. Prevents map scroll-jacking on touch pages. Default: undefined (off)"
24931
+ },
24747
24932
  {
24748
24933
  name: "navigationControl",
24749
24934
  type: "boolean",
@@ -28498,6 +28683,24 @@ function registerMapsResources(server) {
28498
28683
  }
28499
28684
  ]
28500
28685
  }));
28686
+ server.resource("Maps Route Planning", "maps://route", async (uri) => ({
28687
+ contents: [
28688
+ {
28689
+ uri: uri.href,
28690
+ mimeType: "application/json",
28691
+ text: JSON.stringify(catalog5.subpackages.route, null, 2)
28692
+ }
28693
+ ]
28694
+ }));
28695
+ server.resource("Maps Geocoding", "maps://geocoding", async (uri) => ({
28696
+ contents: [
28697
+ {
28698
+ uri: uri.href,
28699
+ mimeType: "application/json",
28700
+ text: JSON.stringify(catalog5.subpackages.geocoding, null, 2)
28701
+ }
28702
+ ]
28703
+ }));
28501
28704
  server.resource("Maps Components", "maps://components", async (uri) => ({
28502
28705
  contents: [
28503
28706
  {
@@ -28760,7 +28963,7 @@ ${catalog5.quickReference.tailwindConfig}
28760
28963
 
28761
28964
  // src/data/native-catalog.json
28762
28965
  var native_catalog_default = {
28763
- version: "0.2.0",
28966
+ version: "0.2.1",
28764
28967
  packageName: "@classic-homes/native",
28765
28968
  description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
28766
28969
  subpackages: {
@@ -31135,7 +31338,7 @@ function registerPrompts(server) {
31135
31338
  // package.json
31136
31339
  var package_default = {
31137
31340
  name: "@classic-homes/theme-mcp",
31138
- version: "0.2.0",
31341
+ version: "0.2.1",
31139
31342
  description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
31140
31343
  type: "module",
31141
31344
  main: "dist/index.js",