@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/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.2",
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",
@@ -6237,7 +6244,7 @@ var component_catalog_default = {
6237
6244
  type: "SearchResultItem[] | SearchResultGroup[]",
6238
6245
  default: "[]",
6239
6246
  required: false,
6240
- description: "Search results to display"
6247
+ description: "Search results to display; grouped results render a heading per group"
6241
6248
  },
6242
6249
  {
6243
6250
  name: "loading",
@@ -6293,6 +6300,20 @@ var component_catalog_default = {
6293
6300
  required: false,
6294
6301
  description: "Custom empty state renderer"
6295
6302
  },
6303
+ {
6304
+ name: "showIcons",
6305
+ type: "boolean",
6306
+ default: "false",
6307
+ required: false,
6308
+ description: "Show each result's `icon` (Icon name) beside it"
6309
+ },
6310
+ {
6311
+ name: "resultsMaxHeight",
6312
+ type: "string",
6313
+ default: "'300px'",
6314
+ required: false,
6315
+ description: "Max height of the results list (CSS length)"
6316
+ },
6296
6317
  {
6297
6318
  name: "class",
6298
6319
  type: "string",
@@ -13673,7 +13694,7 @@ function registerComponentResources(server) {
13673
13694
 
13674
13695
  // src/data/token-definitions.json
13675
13696
  var token_definitions_default = {
13676
- version: "0.2.0",
13697
+ version: "0.2.2",
13677
13698
  colors: {
13678
13699
  brand: [
13679
13700
  {
@@ -14620,7 +14641,7 @@ function registerTokenResources(server) {
14620
14641
 
14621
14642
  // src/data/styles-catalog.json
14622
14643
  var styles_catalog_default = {
14623
- version: "0.2.0",
14644
+ version: "0.2.2",
14624
14645
  package: "@classic-homes/theme-styles",
14625
14646
  description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
14626
14647
  integration: {
@@ -14993,7 +15014,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
14993
15014
 
14994
15015
  // src/data/pattern-library.json
14995
15016
  var pattern_library_default = {
14996
- version: "0.2.0",
15017
+ version: "0.2.2",
14997
15018
  layouts: [
14998
15019
  {
14999
15020
  id: "dashboard-page",
@@ -16103,7 +16124,7 @@ function registerLayoutResources(server) {
16103
16124
 
16104
16125
  // src/data/schema-catalog.json
16105
16126
  var schema_catalog_default = {
16106
- version: "0.2.0",
16127
+ version: "0.2.2",
16107
16128
  packageName: "@classic-homes/theme-svelte",
16108
16129
  importPath: "@classic-homes/theme-svelte",
16109
16130
  generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
@@ -16911,7 +16932,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
16911
16932
 
16912
16933
  // src/data/auth-catalog.json
16913
16934
  var auth_catalog_default = {
16914
- version: "0.2.0",
16935
+ version: "0.2.2",
16915
16936
  packageName: "@classic-homes/auth",
16916
16937
  description: "Authentication services and Svelte bindings for Classic Theme apps",
16917
16938
  subpackages: {
@@ -19948,7 +19969,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
19948
19969
 
19949
19970
  // src/data/notifications-catalog.json
19950
19971
  var notifications_catalog_default = {
19951
- version: "0.2.0",
19972
+ version: "0.2.2",
19952
19973
  packageName: "@classic-homes/notifications",
19953
19974
  description: "Notification services and Svelte bindings for Classic Theme apps",
19954
19975
  subpackages: {
@@ -20860,7 +20881,7 @@ function registerNotificationsResources(server) {
20860
20881
 
20861
20882
  // src/data/docs-catalog.json
20862
20883
  var docs_catalog_default = {
20863
- version: "0.2.0",
20884
+ version: "0.2.2",
20864
20885
  packageName: "@classic-homes/theme-docs",
20865
20886
  description: "Markdown documentation components for the Classic theme system",
20866
20887
  exports: {
@@ -21647,7 +21668,7 @@ var docs_catalog_default = {
21647
21668
  dependencies: {
21648
21669
  "@classic-homes/theme-tokens": "*",
21649
21670
  clsx: "^2.1.0",
21650
- "js-yaml": "^4.1.0",
21671
+ "js-yaml": "^4.3.2",
21651
21672
  marked: "^17.0.0",
21652
21673
  shiki: "^1.0.0",
21653
21674
  "tailwind-merge": "^2.2.0",
@@ -21788,7 +21809,7 @@ function registerDocsResources(server) {
21788
21809
 
21789
21810
  // src/data/charts-catalog.json
21790
21811
  var charts_catalog_default = {
21791
- version: "0.2.0",
21812
+ version: "0.2.2",
21792
21813
  packageName: "@classic-homes/charts-core",
21793
21814
  description: "Core utilities, types, and themes for Classic Theme chart components",
21794
21815
  subpackages: {
@@ -23625,7 +23646,7 @@ interface SankeyData {
23625
23646
 
23626
23647
  // src/data/maps-catalog.json
23627
23648
  var maps_catalog_default = {
23628
- version: "0.2.0",
23649
+ version: "0.2.2",
23629
23650
  packageName: "@classic-homes/maps-core",
23630
23651
  description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
23631
23652
  subpackages: {
@@ -24525,6 +24546,178 @@ var maps_catalog_default = {
24525
24546
  }
24526
24547
  }
24527
24548
  },
24549
+ route: {
24550
+ importPath: "@classic-homes/maps-core/route",
24551
+ 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.",
24552
+ modules: {
24553
+ geo: {
24554
+ description: "Great-circle distance math. Crow-flies, NOT driving distance - label anything shown to a user as approximate.",
24555
+ functions: [
24556
+ {
24557
+ name: "haversineMiles",
24558
+ signature: "(a: LatLng, b: LatLng) => number",
24559
+ description: "Great-circle distance in statute miles. Returns NaN for non-finite input (null, undefined and numeric strings all count as non-finite)."
24560
+ },
24561
+ {
24562
+ name: "haversineKm",
24563
+ signature: "(a: LatLng, b: LatLng) => number",
24564
+ description: "Great-circle distance in kilometres"
24565
+ },
24566
+ {
24567
+ name: "distanceMatrix",
24568
+ signature: "(points: LatLng[]) => number[][]",
24569
+ description: "Symmetric distance matrix in miles with a zero diagonal"
24570
+ },
24571
+ {
24572
+ name: "EARTH_RADIUS_MILES",
24573
+ signature: "number",
24574
+ description: "Mean earth radius in statute miles (3958.7613)"
24575
+ },
24576
+ {
24577
+ name: "EARTH_RADIUS_KM",
24578
+ signature: "number",
24579
+ description: "Mean earth radius in kilometres (6371.0088)"
24580
+ }
24581
+ ],
24582
+ 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"
24583
+ },
24584
+ optimize: {
24585
+ 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.",
24586
+ functions: [
24587
+ {
24588
+ name: "optimizeOrder",
24589
+ signature: "(origin: LatLng, points: LatLng[], opts?: { twoOpt?: boolean; maxPasses?: number }) => OrderResult",
24590
+ description: "Nearest-neighbour then 2-opt. The one function most callers need."
24591
+ },
24592
+ {
24593
+ name: "nearestNeighborOrder",
24594
+ signature: "(origin: LatLng, points: LatLng[]) => OrderResult",
24595
+ description: "Greedy nearest-neighbour ordering. Deterministic - ties break on the lower index. Non-finite coordinates are appended in input order, never dropped."
24596
+ },
24597
+ {
24598
+ name: "twoOptImprove",
24599
+ signature: "(origin: LatLng, points: LatLng[], order: number[], matrix: number[][], opts?: { maxPasses?: number }) => number[]",
24600
+ description: "Open-path 2-opt improvement over an existing order. O(n^2) per pass."
24601
+ },
24602
+ {
24603
+ name: "measureOrder",
24604
+ signature: "(origin: LatLng, points: LatLng[], order: number[]) => OrderResult",
24605
+ description: "Leg distances for an order the caller chose - no reordering"
24606
+ }
24607
+ ],
24608
+ example: "import { optimizeOrder } from '@classic-homes/maps-core/route';\n\nconst { order, legMiles, totalMiles } = optimizeOrder(userLocation, stops);\nconst visitOrder = order.map((i) => stops[i]);"
24609
+ },
24610
+ mapsLinks: {
24611
+ 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.",
24612
+ functions: [
24613
+ {
24614
+ name: "googleDirectionsUrl",
24615
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string",
24616
+ description: "Google Maps directions URL - last stop is the destination, the rest are waypoints. Returns '' when no target is usable."
24617
+ },
24618
+ {
24619
+ name: "googleDirectionsLegUrls",
24620
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string[]",
24621
+ description: "One URL per leg for routes past Google's waypoint budget, each leg resuming where the last ended. Use instead of truncating."
24622
+ },
24623
+ {
24624
+ name: "appleDirectionsUrl",
24625
+ signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, dirflg?: 'd' | 'w' | 'r') => string",
24626
+ description: "Apple Maps URL. Multi-stop input returns the leg to the FIRST stop only - label the affordance accordingly."
24627
+ },
24628
+ {
24629
+ name: "googleSearchUrl",
24630
+ signature: "(query: string) => string",
24631
+ description: "Google Maps search URL - the fallback for a stop with no coordinate"
24632
+ },
24633
+ {
24634
+ name: "splitIntoLegs",
24635
+ signature: "<T>(stops: T[], maxPerLeg?: number) => T[][]",
24636
+ description: "Chunk stops to fit a waypoint budget, repeating each leg's last stop as the next leg's first"
24637
+ },
24638
+ {
24639
+ name: "targetFromCoords",
24640
+ signature: "(coords: LatLng, address?: string) => DirectionsTarget",
24641
+ description: "Convenience: a directions target from a coordinate"
24642
+ },
24643
+ {
24644
+ name: "GOOGLE_MAX_WAYPOINTS",
24645
+ signature: "number",
24646
+ description: "Google's intermediate waypoint limit (9)"
24647
+ },
24648
+ {
24649
+ name: "GOOGLE_MAX_LEG_STOPS",
24650
+ signature: "number",
24651
+ description: "Targets per leg, counting the destination (10)"
24652
+ }
24653
+ ],
24654
+ 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"
24655
+ },
24656
+ coords: {
24657
+ 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.",
24658
+ functions: [
24659
+ {
24660
+ name: "toLngLat",
24661
+ signature: "(point: LatLng) => LngLat",
24662
+ description: "Convert to the [lng, lat] tuple MapLibre and the rest of maps-core expect"
24663
+ },
24664
+ {
24665
+ name: "fromLngLat",
24666
+ signature: "(point: LngLat) => LatLng",
24667
+ description: "Convert from the [lng, lat] tuple form"
24668
+ },
24669
+ {
24670
+ name: "isValidLatLng",
24671
+ signature: "(point: unknown) => point is LatLng",
24672
+ description: "True when both components are numeric, finite and in range"
24673
+ },
24674
+ {
24675
+ name: "isFiniteNumber",
24676
+ signature: "(value: unknown) => value is number",
24677
+ 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."
24678
+ }
24679
+ ],
24680
+ 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));"
24681
+ }
24682
+ }
24683
+ },
24684
+ geocoding: {
24685
+ importPath: "@classic-homes/maps-core/geocoding",
24686
+ 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.",
24687
+ modules: {
24688
+ maptiler: {
24689
+ 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.",
24690
+ functions: [
24691
+ {
24692
+ name: "geocodeForward",
24693
+ signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult | null>",
24694
+ 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."
24695
+ },
24696
+ {
24697
+ name: "geocodeForwardMany",
24698
+ signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult[]>",
24699
+ description: "Same, returning every match best-first. Set opts.limit above 1 or MapTiler sends a single feature."
24700
+ },
24701
+ {
24702
+ name: "buildMapTilerGeocodeUrl",
24703
+ signature: "(query: string, opts: GeocodeOptions) => string",
24704
+ description: "Build the request URL. Throws RangeError on an empty query or key."
24705
+ },
24706
+ {
24707
+ name: "parseMapTilerGeocodeResponse",
24708
+ signature: "(body: unknown) => GeocodeResult | null",
24709
+ description: "Parse the best match. Handles the [lng, lat] to {lat, lng} swap."
24710
+ },
24711
+ {
24712
+ name: "parseMapTilerGeocodeResults",
24713
+ signature: "(body: unknown) => GeocodeResult[]",
24714
+ description: "Parse every usable feature, skipping malformed ones rather than failing the batch"
24715
+ }
24716
+ ],
24717
+ 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]);"
24718
+ }
24719
+ }
24720
+ },
24528
24721
  workers: {
24529
24722
  importPath: "@classic-homes/maps-core/workers",
24530
24723
  description: "Web Worker infrastructure for off-main-thread spatial processing",
@@ -24744,6 +24937,12 @@ var maps_catalog_default = {
24744
24937
  required: false,
24745
24938
  description: "Enable keyboard navigation"
24746
24939
  },
24940
+ {
24941
+ name: "cooperativeGestures",
24942
+ type: "boolean",
24943
+ required: false,
24944
+ 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)"
24945
+ },
24747
24946
  {
24748
24947
  name: "navigationControl",
24749
24948
  type: "boolean",
@@ -28498,6 +28697,24 @@ function registerMapsResources(server) {
28498
28697
  }
28499
28698
  ]
28500
28699
  }));
28700
+ server.resource("Maps Route Planning", "maps://route", async (uri) => ({
28701
+ contents: [
28702
+ {
28703
+ uri: uri.href,
28704
+ mimeType: "application/json",
28705
+ text: JSON.stringify(catalog5.subpackages.route, null, 2)
28706
+ }
28707
+ ]
28708
+ }));
28709
+ server.resource("Maps Geocoding", "maps://geocoding", async (uri) => ({
28710
+ contents: [
28711
+ {
28712
+ uri: uri.href,
28713
+ mimeType: "application/json",
28714
+ text: JSON.stringify(catalog5.subpackages.geocoding, null, 2)
28715
+ }
28716
+ ]
28717
+ }));
28501
28718
  server.resource("Maps Components", "maps://components", async (uri) => ({
28502
28719
  contents: [
28503
28720
  {
@@ -28760,7 +28977,7 @@ ${catalog5.quickReference.tailwindConfig}
28760
28977
 
28761
28978
  // src/data/native-catalog.json
28762
28979
  var native_catalog_default = {
28763
- version: "0.2.0",
28980
+ version: "0.2.2",
28764
28981
  packageName: "@classic-homes/native",
28765
28982
  description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
28766
28983
  subpackages: {
@@ -31135,7 +31352,7 @@ function registerPrompts(server) {
31135
31352
  // package.json
31136
31353
  var package_default = {
31137
31354
  name: "@classic-homes/theme-mcp",
31138
- version: "0.2.0",
31355
+ version: "0.2.2",
31139
31356
  description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
31140
31357
  type: "module",
31141
31358
  main: "dist/index.js",