@classic-homes/theme-mcp 0.2.0 → 0.2.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/README.md CHANGED
@@ -130,6 +130,8 @@ Package-specific resources:
130
130
  - `maps://theme`
131
131
  - `maps://types`
132
132
  - `maps://utils`
133
+ - `maps://route`
134
+ - `maps://geocoding`
133
135
  - `maps://components`
134
136
  - `maps://quick-reference`
135
137
  - `maps://props`
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
11
11
 
12
12
  // src/data/component-catalog.json
13
13
  var component_catalog_default = {
14
- version: "0.2.0",
14
+ version: "0.2.2",
15
15
  components: [
16
16
  {
17
17
  name: "Alert",
@@ -3065,6 +3065,13 @@ var component_catalog_default = {
3065
3065
  required: false,
3066
3066
  description: "Distance to drag before detaching (px)"
3067
3067
  },
3068
+ {
3069
+ name: "mobileBreakpoint",
3070
+ type: "number",
3071
+ default: "640",
3072
+ required: false,
3073
+ 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"
3074
+ },
3068
3075
  {
3069
3076
  name: "class",
3070
3077
  type: "string",
@@ -6242,7 +6249,7 @@ var component_catalog_default = {
6242
6249
  type: "SearchResultItem[] | SearchResultGroup[]",
6243
6250
  default: "[]",
6244
6251
  required: false,
6245
- description: "Search results to display"
6252
+ description: "Search results to display; grouped results render a heading per group"
6246
6253
  },
6247
6254
  {
6248
6255
  name: "loading",
@@ -6298,6 +6305,20 @@ var component_catalog_default = {
6298
6305
  required: false,
6299
6306
  description: "Custom empty state renderer"
6300
6307
  },
6308
+ {
6309
+ name: "showIcons",
6310
+ type: "boolean",
6311
+ default: "false",
6312
+ required: false,
6313
+ description: "Show each result's `icon` (Icon name) beside it"
6314
+ },
6315
+ {
6316
+ name: "resultsMaxHeight",
6317
+ type: "string",
6318
+ default: "'300px'",
6319
+ required: false,
6320
+ description: "Max height of the results list (CSS length)"
6321
+ },
6301
6322
  {
6302
6323
  name: "class",
6303
6324
  type: "string",
@@ -13678,7 +13699,7 @@ function registerComponentResources(server) {
13678
13699
 
13679
13700
  // src/data/token-definitions.json
13680
13701
  var token_definitions_default = {
13681
- version: "0.2.0",
13702
+ version: "0.2.2",
13682
13703
  colors: {
13683
13704
  brand: [
13684
13705
  {
@@ -14625,7 +14646,7 @@ function registerTokenResources(server) {
14625
14646
 
14626
14647
  // src/data/styles-catalog.json
14627
14648
  var styles_catalog_default = {
14628
- version: "0.2.0",
14649
+ version: "0.2.2",
14629
14650
  package: "@classic-homes/theme-styles",
14630
14651
  description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
14631
14652
  integration: {
@@ -14998,7 +15019,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
14998
15019
 
14999
15020
  // src/data/pattern-library.json
15000
15021
  var pattern_library_default = {
15001
- version: "0.2.0",
15022
+ version: "0.2.2",
15002
15023
  layouts: [
15003
15024
  {
15004
15025
  id: "dashboard-page",
@@ -16108,7 +16129,7 @@ function registerLayoutResources(server) {
16108
16129
 
16109
16130
  // src/data/schema-catalog.json
16110
16131
  var schema_catalog_default = {
16111
- version: "0.2.0",
16132
+ version: "0.2.2",
16112
16133
  packageName: "@classic-homes/theme-svelte",
16113
16134
  importPath: "@classic-homes/theme-svelte",
16114
16135
  generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
@@ -16916,7 +16937,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
16916
16937
 
16917
16938
  // src/data/auth-catalog.json
16918
16939
  var auth_catalog_default = {
16919
- version: "0.2.0",
16940
+ version: "0.2.2",
16920
16941
  packageName: "@classic-homes/auth",
16921
16942
  description: "Authentication services and Svelte bindings for Classic Theme apps",
16922
16943
  subpackages: {
@@ -19953,7 +19974,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
19953
19974
 
19954
19975
  // src/data/notifications-catalog.json
19955
19976
  var notifications_catalog_default = {
19956
- version: "0.2.0",
19977
+ version: "0.2.2",
19957
19978
  packageName: "@classic-homes/notifications",
19958
19979
  description: "Notification services and Svelte bindings for Classic Theme apps",
19959
19980
  subpackages: {
@@ -20865,7 +20886,7 @@ function registerNotificationsResources(server) {
20865
20886
 
20866
20887
  // src/data/docs-catalog.json
20867
20888
  var docs_catalog_default = {
20868
- version: "0.2.0",
20889
+ version: "0.2.2",
20869
20890
  packageName: "@classic-homes/theme-docs",
20870
20891
  description: "Markdown documentation components for the Classic theme system",
20871
20892
  exports: {
@@ -21652,7 +21673,7 @@ var docs_catalog_default = {
21652
21673
  dependencies: {
21653
21674
  "@classic-homes/theme-tokens": "*",
21654
21675
  clsx: "^2.1.0",
21655
- "js-yaml": "^4.1.0",
21676
+ "js-yaml": "^4.3.2",
21656
21677
  marked: "^17.0.0",
21657
21678
  shiki: "^1.0.0",
21658
21679
  "tailwind-merge": "^2.2.0",
@@ -21793,7 +21814,7 @@ function registerDocsResources(server) {
21793
21814
 
21794
21815
  // src/data/charts-catalog.json
21795
21816
  var charts_catalog_default = {
21796
- version: "0.2.0",
21817
+ version: "0.2.2",
21797
21818
  packageName: "@classic-homes/charts-core",
21798
21819
  description: "Core utilities, types, and themes for Classic Theme chart components",
21799
21820
  subpackages: {
@@ -23630,7 +23651,7 @@ interface SankeyData {
23630
23651
 
23631
23652
  // src/data/maps-catalog.json
23632
23653
  var maps_catalog_default = {
23633
- version: "0.2.0",
23654
+ version: "0.2.2",
23634
23655
  packageName: "@classic-homes/maps-core",
23635
23656
  description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
23636
23657
  subpackages: {
@@ -24530,6 +24551,178 @@ var maps_catalog_default = {
24530
24551
  }
24531
24552
  }
24532
24553
  },
24554
+ route: {
24555
+ importPath: "@classic-homes/maps-core/route",
24556
+ 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.",
24557
+ modules: {
24558
+ geo: {
24559
+ description: "Great-circle distance math. Crow-flies, NOT driving distance - label anything shown to a user as approximate.",
24560
+ functions: [
24561
+ {
24562
+ name: "haversineMiles",
24563
+ signature: "(a: LatLng, b: LatLng) => number",
24564
+ description: "Great-circle distance in statute miles. Returns NaN for non-finite input (null, undefined and numeric strings all count as non-finite)."
24565
+ },
24566
+ {
24567
+ name: "haversineKm",
24568
+ signature: "(a: LatLng, b: LatLng) => number",
24569
+ description: "Great-circle distance in kilometres"
24570
+ },
24571
+ {
24572
+ name: "distanceMatrix",
24573
+ signature: "(points: LatLng[]) => number[][]",
24574
+ description: "Symmetric distance matrix in miles with a zero diagonal"
24575
+ },
24576
+ {
24577
+ name: "EARTH_RADIUS_MILES",
24578
+ signature: "number",
24579
+ description: "Mean earth radius in statute miles (3958.7613)"
24580
+ },
24581
+ {
24582
+ name: "EARTH_RADIUS_KM",
24583
+ signature: "number",
24584
+ description: "Mean earth radius in kilometres (6371.0088)"
24585
+ }
24586
+ ],
24587
+ 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"
24588
+ },
24589
+ optimize: {
24590
+ 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.",
24591
+ functions: [
24592
+ {
24593
+ name: "optimizeOrder",
24594
+ signature: "(origin: LatLng, points: LatLng[], opts?: { twoOpt?: boolean; maxPasses?: number }) => OrderResult",
24595
+ description: "Nearest-neighbour then 2-opt. The one function most callers need."
24596
+ },
24597
+ {
24598
+ name: "nearestNeighborOrder",
24599
+ signature: "(origin: LatLng, points: LatLng[]) => OrderResult",
24600
+ description: "Greedy nearest-neighbour ordering. Deterministic - ties break on the lower index. Non-finite coordinates are appended in input order, never dropped."
24601
+ },
24602
+ {
24603
+ name: "twoOptImprove",
24604
+ signature: "(origin: LatLng, points: LatLng[], order: number[], matrix: number[][], opts?: { maxPasses?: number }) => number[]",
24605
+ description: "Open-path 2-opt improvement over an existing order. O(n^2) per pass."
24606
+ },
24607
+ {
24608
+ name: "measureOrder",
24609
+ signature: "(origin: LatLng, points: LatLng[], order: number[]) => OrderResult",
24610
+ description: "Leg distances for an order the caller chose - no reordering"
24611
+ }
24612
+ ],
24613
+ example: "import { optimizeOrder } from '@classic-homes/maps-core/route';\n\nconst { order, legMiles, totalMiles } = optimizeOrder(userLocation, stops);\nconst visitOrder = order.map((i) => stops[i]);"
24614
+ },
24615
+ mapsLinks: {
24616
+ 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.",
24617
+ functions: [
24618
+ {
24619
+ name: "googleDirectionsUrl",
24620
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string",
24621
+ description: "Google Maps directions URL - last stop is the destination, the rest are waypoints. Returns '' when no target is usable."
24622
+ },
24623
+ {
24624
+ name: "googleDirectionsLegUrls",
24625
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string[]",
24626
+ description: "One URL per leg for routes past Google's waypoint budget, each leg resuming where the last ended. Use instead of truncating."
24627
+ },
24628
+ {
24629
+ name: "appleDirectionsUrl",
24630
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, dirflg?: 'd' | 'w' | 'r') => string",
24631
+ description: "Apple Maps URL. Multi-stop input returns the leg to the FIRST stop only - label the affordance accordingly."
24632
+ },
24633
+ {
24634
+ name: "googleSearchUrl",
24635
+ signature: "(query: string) => string",
24636
+ description: "Google Maps search URL - the fallback for a stop with no coordinate"
24637
+ },
24638
+ {
24639
+ name: "splitIntoLegs",
24640
+ signature: "<T>(stops: T[], maxPerLeg?: number) => T[][]",
24641
+ description: "Chunk stops to fit a waypoint budget, repeating each leg's last stop as the next leg's first"
24642
+ },
24643
+ {
24644
+ name: "targetFromCoords",
24645
+ signature: "(coords: LatLng, address?: string) => DirectionsTarget",
24646
+ description: "Convenience: a directions target from a coordinate"
24647
+ },
24648
+ {
24649
+ name: "GOOGLE_MAX_WAYPOINTS",
24650
+ signature: "number",
24651
+ description: "Google's intermediate waypoint limit (9)"
24652
+ },
24653
+ {
24654
+ name: "GOOGLE_MAX_LEG_STOPS",
24655
+ signature: "number",
24656
+ description: "Targets per leg, counting the destination (10)"
24657
+ }
24658
+ ],
24659
+ 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"
24660
+ },
24661
+ coords: {
24662
+ 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.",
24663
+ functions: [
24664
+ {
24665
+ name: "toLngLat",
24666
+ signature: "(point: LatLng) => LngLat",
24667
+ description: "Convert to the [lng, lat] tuple MapLibre and the rest of maps-core expect"
24668
+ },
24669
+ {
24670
+ name: "fromLngLat",
24671
+ signature: "(point: LngLat) => LatLng",
24672
+ description: "Convert from the [lng, lat] tuple form"
24673
+ },
24674
+ {
24675
+ name: "isValidLatLng",
24676
+ signature: "(point: unknown) => point is LatLng",
24677
+ description: "True when both components are numeric, finite and in range"
24678
+ },
24679
+ {
24680
+ name: "isFiniteNumber",
24681
+ signature: "(value: unknown) => value is number",
24682
+ 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."
24683
+ }
24684
+ ],
24685
+ 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));"
24686
+ }
24687
+ }
24688
+ },
24689
+ geocoding: {
24690
+ importPath: "@classic-homes/maps-core/geocoding",
24691
+ 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.",
24692
+ modules: {
24693
+ maptiler: {
24694
+ 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.",
24695
+ functions: [
24696
+ {
24697
+ name: "geocodeForward",
24698
+ signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult | null>",
24699
+ 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."
24700
+ },
24701
+ {
24702
+ name: "geocodeForwardMany",
24703
+ signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult[]>",
24704
+ description: "Same, returning every match best-first. Set opts.limit above 1 or MapTiler sends a single feature."
24705
+ },
24706
+ {
24707
+ name: "buildMapTilerGeocodeUrl",
24708
+ signature: "(query: string, opts: GeocodeOptions) => string",
24709
+ description: "Build the request URL. Throws RangeError on an empty query or key."
24710
+ },
24711
+ {
24712
+ name: "parseMapTilerGeocodeResponse",
24713
+ signature: "(body: unknown) => GeocodeResult | null",
24714
+ description: "Parse the best match. Handles the [lng, lat] to {lat, lng} swap."
24715
+ },
24716
+ {
24717
+ name: "parseMapTilerGeocodeResults",
24718
+ signature: "(body: unknown) => GeocodeResult[]",
24719
+ description: "Parse every usable feature, skipping malformed ones rather than failing the batch"
24720
+ }
24721
+ ],
24722
+ 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]);"
24723
+ }
24724
+ }
24725
+ },
24533
24726
  workers: {
24534
24727
  importPath: "@classic-homes/maps-core/workers",
24535
24728
  description: "Web Worker infrastructure for off-main-thread spatial processing",
@@ -24749,6 +24942,12 @@ var maps_catalog_default = {
24749
24942
  required: false,
24750
24943
  description: "Enable keyboard navigation"
24751
24944
  },
24945
+ {
24946
+ name: "cooperativeGestures",
24947
+ type: "boolean",
24948
+ required: false,
24949
+ 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)"
24950
+ },
24752
24951
  {
24753
24952
  name: "navigationControl",
24754
24953
  type: "boolean",
@@ -28503,6 +28702,24 @@ function registerMapsResources(server) {
28503
28702
  }
28504
28703
  ]
28505
28704
  }));
28705
+ server.resource("Maps Route Planning", "maps://route", async (uri) => ({
28706
+ contents: [
28707
+ {
28708
+ uri: uri.href,
28709
+ mimeType: "application/json",
28710
+ text: JSON.stringify(catalog5.subpackages.route, null, 2)
28711
+ }
28712
+ ]
28713
+ }));
28714
+ server.resource("Maps Geocoding", "maps://geocoding", async (uri) => ({
28715
+ contents: [
28716
+ {
28717
+ uri: uri.href,
28718
+ mimeType: "application/json",
28719
+ text: JSON.stringify(catalog5.subpackages.geocoding, null, 2)
28720
+ }
28721
+ ]
28722
+ }));
28506
28723
  server.resource("Maps Components", "maps://components", async (uri) => ({
28507
28724
  contents: [
28508
28725
  {
@@ -28765,7 +28982,7 @@ ${catalog5.quickReference.tailwindConfig}
28765
28982
 
28766
28983
  // src/data/native-catalog.json
28767
28984
  var native_catalog_default = {
28768
- version: "0.2.0",
28985
+ version: "0.2.2",
28769
28986
  packageName: "@classic-homes/native",
28770
28987
  description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
28771
28988
  subpackages: {
@@ -31140,7 +31357,7 @@ function registerPrompts(server) {
31140
31357
  // package.json
31141
31358
  var package_default = {
31142
31359
  name: "@classic-homes/theme-mcp",
31143
- version: "0.2.0",
31360
+ version: "0.2.2",
31144
31361
  description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
31145
31362
  type: "module",
31146
31363
  main: "dist/index.js",