@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/README.md +2 -0
- package/dist/cli.js +216 -13
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +216 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
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.
|
|
14
|
+
version: "0.2.1",
|
|
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",
|
|
@@ -13678,7 +13685,7 @@ function registerComponentResources(server) {
|
|
|
13678
13685
|
|
|
13679
13686
|
// src/data/token-definitions.json
|
|
13680
13687
|
var token_definitions_default = {
|
|
13681
|
-
version: "0.2.
|
|
13688
|
+
version: "0.2.1",
|
|
13682
13689
|
colors: {
|
|
13683
13690
|
brand: [
|
|
13684
13691
|
{
|
|
@@ -14625,7 +14632,7 @@ function registerTokenResources(server) {
|
|
|
14625
14632
|
|
|
14626
14633
|
// src/data/styles-catalog.json
|
|
14627
14634
|
var styles_catalog_default = {
|
|
14628
|
-
version: "0.2.
|
|
14635
|
+
version: "0.2.1",
|
|
14629
14636
|
package: "@classic-homes/theme-styles",
|
|
14630
14637
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
14631
14638
|
integration: {
|
|
@@ -14998,7 +15005,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
14998
15005
|
|
|
14999
15006
|
// src/data/pattern-library.json
|
|
15000
15007
|
var pattern_library_default = {
|
|
15001
|
-
version: "0.2.
|
|
15008
|
+
version: "0.2.1",
|
|
15002
15009
|
layouts: [
|
|
15003
15010
|
{
|
|
15004
15011
|
id: "dashboard-page",
|
|
@@ -16108,7 +16115,7 @@ function registerLayoutResources(server) {
|
|
|
16108
16115
|
|
|
16109
16116
|
// src/data/schema-catalog.json
|
|
16110
16117
|
var schema_catalog_default = {
|
|
16111
|
-
version: "0.2.
|
|
16118
|
+
version: "0.2.1",
|
|
16112
16119
|
packageName: "@classic-homes/theme-svelte",
|
|
16113
16120
|
importPath: "@classic-homes/theme-svelte",
|
|
16114
16121
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -16916,7 +16923,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
16916
16923
|
|
|
16917
16924
|
// src/data/auth-catalog.json
|
|
16918
16925
|
var auth_catalog_default = {
|
|
16919
|
-
version: "0.2.
|
|
16926
|
+
version: "0.2.1",
|
|
16920
16927
|
packageName: "@classic-homes/auth",
|
|
16921
16928
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
16922
16929
|
subpackages: {
|
|
@@ -19953,7 +19960,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
19953
19960
|
|
|
19954
19961
|
// src/data/notifications-catalog.json
|
|
19955
19962
|
var notifications_catalog_default = {
|
|
19956
|
-
version: "0.2.
|
|
19963
|
+
version: "0.2.1",
|
|
19957
19964
|
packageName: "@classic-homes/notifications",
|
|
19958
19965
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
19959
19966
|
subpackages: {
|
|
@@ -20865,7 +20872,7 @@ function registerNotificationsResources(server) {
|
|
|
20865
20872
|
|
|
20866
20873
|
// src/data/docs-catalog.json
|
|
20867
20874
|
var docs_catalog_default = {
|
|
20868
|
-
version: "0.2.
|
|
20875
|
+
version: "0.2.1",
|
|
20869
20876
|
packageName: "@classic-homes/theme-docs",
|
|
20870
20877
|
description: "Markdown documentation components for the Classic theme system",
|
|
20871
20878
|
exports: {
|
|
@@ -21652,7 +21659,7 @@ var docs_catalog_default = {
|
|
|
21652
21659
|
dependencies: {
|
|
21653
21660
|
"@classic-homes/theme-tokens": "*",
|
|
21654
21661
|
clsx: "^2.1.0",
|
|
21655
|
-
"js-yaml": "^4.
|
|
21662
|
+
"js-yaml": "^4.3.2",
|
|
21656
21663
|
marked: "^17.0.0",
|
|
21657
21664
|
shiki: "^1.0.0",
|
|
21658
21665
|
"tailwind-merge": "^2.2.0",
|
|
@@ -21793,7 +21800,7 @@ function registerDocsResources(server) {
|
|
|
21793
21800
|
|
|
21794
21801
|
// src/data/charts-catalog.json
|
|
21795
21802
|
var charts_catalog_default = {
|
|
21796
|
-
version: "0.2.
|
|
21803
|
+
version: "0.2.1",
|
|
21797
21804
|
packageName: "@classic-homes/charts-core",
|
|
21798
21805
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
21799
21806
|
subpackages: {
|
|
@@ -23630,7 +23637,7 @@ interface SankeyData {
|
|
|
23630
23637
|
|
|
23631
23638
|
// src/data/maps-catalog.json
|
|
23632
23639
|
var maps_catalog_default = {
|
|
23633
|
-
version: "0.2.
|
|
23640
|
+
version: "0.2.1",
|
|
23634
23641
|
packageName: "@classic-homes/maps-core",
|
|
23635
23642
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
23636
23643
|
subpackages: {
|
|
@@ -24530,6 +24537,178 @@ var maps_catalog_default = {
|
|
|
24530
24537
|
}
|
|
24531
24538
|
}
|
|
24532
24539
|
},
|
|
24540
|
+
route: {
|
|
24541
|
+
importPath: "@classic-homes/maps-core/route",
|
|
24542
|
+
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.",
|
|
24543
|
+
modules: {
|
|
24544
|
+
geo: {
|
|
24545
|
+
description: "Great-circle distance math. Crow-flies, NOT driving distance - label anything shown to a user as approximate.",
|
|
24546
|
+
functions: [
|
|
24547
|
+
{
|
|
24548
|
+
name: "haversineMiles",
|
|
24549
|
+
signature: "(a: LatLng, b: LatLng) => number",
|
|
24550
|
+
description: "Great-circle distance in statute miles. Returns NaN for non-finite input (null, undefined and numeric strings all count as non-finite)."
|
|
24551
|
+
},
|
|
24552
|
+
{
|
|
24553
|
+
name: "haversineKm",
|
|
24554
|
+
signature: "(a: LatLng, b: LatLng) => number",
|
|
24555
|
+
description: "Great-circle distance in kilometres"
|
|
24556
|
+
},
|
|
24557
|
+
{
|
|
24558
|
+
name: "distanceMatrix",
|
|
24559
|
+
signature: "(points: LatLng[]) => number[][]",
|
|
24560
|
+
description: "Symmetric distance matrix in miles with a zero diagonal"
|
|
24561
|
+
},
|
|
24562
|
+
{
|
|
24563
|
+
name: "EARTH_RADIUS_MILES",
|
|
24564
|
+
signature: "number",
|
|
24565
|
+
description: "Mean earth radius in statute miles (3958.7613)"
|
|
24566
|
+
},
|
|
24567
|
+
{
|
|
24568
|
+
name: "EARTH_RADIUS_KM",
|
|
24569
|
+
signature: "number",
|
|
24570
|
+
description: "Mean earth radius in kilometres (6371.0088)"
|
|
24571
|
+
}
|
|
24572
|
+
],
|
|
24573
|
+
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"
|
|
24574
|
+
},
|
|
24575
|
+
optimize: {
|
|
24576
|
+
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.",
|
|
24577
|
+
functions: [
|
|
24578
|
+
{
|
|
24579
|
+
name: "optimizeOrder",
|
|
24580
|
+
signature: "(origin: LatLng, points: LatLng[], opts?: { twoOpt?: boolean; maxPasses?: number }) => OrderResult",
|
|
24581
|
+
description: "Nearest-neighbour then 2-opt. The one function most callers need."
|
|
24582
|
+
},
|
|
24583
|
+
{
|
|
24584
|
+
name: "nearestNeighborOrder",
|
|
24585
|
+
signature: "(origin: LatLng, points: LatLng[]) => OrderResult",
|
|
24586
|
+
description: "Greedy nearest-neighbour ordering. Deterministic - ties break on the lower index. Non-finite coordinates are appended in input order, never dropped."
|
|
24587
|
+
},
|
|
24588
|
+
{
|
|
24589
|
+
name: "twoOptImprove",
|
|
24590
|
+
signature: "(origin: LatLng, points: LatLng[], order: number[], matrix: number[][], opts?: { maxPasses?: number }) => number[]",
|
|
24591
|
+
description: "Open-path 2-opt improvement over an existing order. O(n^2) per pass."
|
|
24592
|
+
},
|
|
24593
|
+
{
|
|
24594
|
+
name: "measureOrder",
|
|
24595
|
+
signature: "(origin: LatLng, points: LatLng[], order: number[]) => OrderResult",
|
|
24596
|
+
description: "Leg distances for an order the caller chose - no reordering"
|
|
24597
|
+
}
|
|
24598
|
+
],
|
|
24599
|
+
example: "import { optimizeOrder } from '@classic-homes/maps-core/route';\n\nconst { order, legMiles, totalMiles } = optimizeOrder(userLocation, stops);\nconst visitOrder = order.map((i) => stops[i]);"
|
|
24600
|
+
},
|
|
24601
|
+
mapsLinks: {
|
|
24602
|
+
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.",
|
|
24603
|
+
functions: [
|
|
24604
|
+
{
|
|
24605
|
+
name: "googleDirectionsUrl",
|
|
24606
|
+
signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string",
|
|
24607
|
+
description: "Google Maps directions URL - last stop is the destination, the rest are waypoints. Returns '' when no target is usable."
|
|
24608
|
+
},
|
|
24609
|
+
{
|
|
24610
|
+
name: "googleDirectionsLegUrls",
|
|
24611
|
+
signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, travelmode?: TravelMode) => string[]",
|
|
24612
|
+
description: "One URL per leg for routes past Google's waypoint budget, each leg resuming where the last ended. Use instead of truncating."
|
|
24613
|
+
},
|
|
24614
|
+
{
|
|
24615
|
+
name: "appleDirectionsUrl",
|
|
24616
|
+
signature: "(stops: DirectionsTarget[], origin?: DirectionsTarget | null, dirflg?: 'd' | 'w' | 'r') => string",
|
|
24617
|
+
description: "Apple Maps URL. Multi-stop input returns the leg to the FIRST stop only - label the affordance accordingly."
|
|
24618
|
+
},
|
|
24619
|
+
{
|
|
24620
|
+
name: "googleSearchUrl",
|
|
24621
|
+
signature: "(query: string) => string",
|
|
24622
|
+
description: "Google Maps search URL - the fallback for a stop with no coordinate"
|
|
24623
|
+
},
|
|
24624
|
+
{
|
|
24625
|
+
name: "splitIntoLegs",
|
|
24626
|
+
signature: "<T>(stops: T[], maxPerLeg?: number) => T[][]",
|
|
24627
|
+
description: "Chunk stops to fit a waypoint budget, repeating each leg's last stop as the next leg's first"
|
|
24628
|
+
},
|
|
24629
|
+
{
|
|
24630
|
+
name: "targetFromCoords",
|
|
24631
|
+
signature: "(coords: LatLng, address?: string) => DirectionsTarget",
|
|
24632
|
+
description: "Convenience: a directions target from a coordinate"
|
|
24633
|
+
},
|
|
24634
|
+
{
|
|
24635
|
+
name: "GOOGLE_MAX_WAYPOINTS",
|
|
24636
|
+
signature: "number",
|
|
24637
|
+
description: "Google's intermediate waypoint limit (9)"
|
|
24638
|
+
},
|
|
24639
|
+
{
|
|
24640
|
+
name: "GOOGLE_MAX_LEG_STOPS",
|
|
24641
|
+
signature: "number",
|
|
24642
|
+
description: "Targets per leg, counting the destination (10)"
|
|
24643
|
+
}
|
|
24644
|
+
],
|
|
24645
|
+
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"
|
|
24646
|
+
},
|
|
24647
|
+
coords: {
|
|
24648
|
+
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.",
|
|
24649
|
+
functions: [
|
|
24650
|
+
{
|
|
24651
|
+
name: "toLngLat",
|
|
24652
|
+
signature: "(point: LatLng) => LngLat",
|
|
24653
|
+
description: "Convert to the [lng, lat] tuple MapLibre and the rest of maps-core expect"
|
|
24654
|
+
},
|
|
24655
|
+
{
|
|
24656
|
+
name: "fromLngLat",
|
|
24657
|
+
signature: "(point: LngLat) => LatLng",
|
|
24658
|
+
description: "Convert from the [lng, lat] tuple form"
|
|
24659
|
+
},
|
|
24660
|
+
{
|
|
24661
|
+
name: "isValidLatLng",
|
|
24662
|
+
signature: "(point: unknown) => point is LatLng",
|
|
24663
|
+
description: "True when both components are numeric, finite and in range"
|
|
24664
|
+
},
|
|
24665
|
+
{
|
|
24666
|
+
name: "isFiniteNumber",
|
|
24667
|
+
signature: "(value: unknown) => value is number",
|
|
24668
|
+
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."
|
|
24669
|
+
}
|
|
24670
|
+
],
|
|
24671
|
+
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));"
|
|
24672
|
+
}
|
|
24673
|
+
}
|
|
24674
|
+
},
|
|
24675
|
+
geocoding: {
|
|
24676
|
+
importPath: "@classic-homes/maps-core/geocoding",
|
|
24677
|
+
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.",
|
|
24678
|
+
modules: {
|
|
24679
|
+
maptiler: {
|
|
24680
|
+
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.",
|
|
24681
|
+
functions: [
|
|
24682
|
+
{
|
|
24683
|
+
name: "geocodeForward",
|
|
24684
|
+
signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult | null>",
|
|
24685
|
+
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."
|
|
24686
|
+
},
|
|
24687
|
+
{
|
|
24688
|
+
name: "geocodeForwardMany",
|
|
24689
|
+
signature: "(query: string, opts: GeocodeOptions, fetchFn: typeof fetch) => Promise<GeocodeResult[]>",
|
|
24690
|
+
description: "Same, returning every match best-first. Set opts.limit above 1 or MapTiler sends a single feature."
|
|
24691
|
+
},
|
|
24692
|
+
{
|
|
24693
|
+
name: "buildMapTilerGeocodeUrl",
|
|
24694
|
+
signature: "(query: string, opts: GeocodeOptions) => string",
|
|
24695
|
+
description: "Build the request URL. Throws RangeError on an empty query or key."
|
|
24696
|
+
},
|
|
24697
|
+
{
|
|
24698
|
+
name: "parseMapTilerGeocodeResponse",
|
|
24699
|
+
signature: "(body: unknown) => GeocodeResult | null",
|
|
24700
|
+
description: "Parse the best match. Handles the [lng, lat] to {lat, lng} swap."
|
|
24701
|
+
},
|
|
24702
|
+
{
|
|
24703
|
+
name: "parseMapTilerGeocodeResults",
|
|
24704
|
+
signature: "(body: unknown) => GeocodeResult[]",
|
|
24705
|
+
description: "Parse every usable feature, skipping malformed ones rather than failing the batch"
|
|
24706
|
+
}
|
|
24707
|
+
],
|
|
24708
|
+
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]);"
|
|
24709
|
+
}
|
|
24710
|
+
}
|
|
24711
|
+
},
|
|
24533
24712
|
workers: {
|
|
24534
24713
|
importPath: "@classic-homes/maps-core/workers",
|
|
24535
24714
|
description: "Web Worker infrastructure for off-main-thread spatial processing",
|
|
@@ -24749,6 +24928,12 @@ var maps_catalog_default = {
|
|
|
24749
24928
|
required: false,
|
|
24750
24929
|
description: "Enable keyboard navigation"
|
|
24751
24930
|
},
|
|
24931
|
+
{
|
|
24932
|
+
name: "cooperativeGestures",
|
|
24933
|
+
type: "boolean",
|
|
24934
|
+
required: false,
|
|
24935
|
+
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)"
|
|
24936
|
+
},
|
|
24752
24937
|
{
|
|
24753
24938
|
name: "navigationControl",
|
|
24754
24939
|
type: "boolean",
|
|
@@ -28503,6 +28688,24 @@ function registerMapsResources(server) {
|
|
|
28503
28688
|
}
|
|
28504
28689
|
]
|
|
28505
28690
|
}));
|
|
28691
|
+
server.resource("Maps Route Planning", "maps://route", async (uri) => ({
|
|
28692
|
+
contents: [
|
|
28693
|
+
{
|
|
28694
|
+
uri: uri.href,
|
|
28695
|
+
mimeType: "application/json",
|
|
28696
|
+
text: JSON.stringify(catalog5.subpackages.route, null, 2)
|
|
28697
|
+
}
|
|
28698
|
+
]
|
|
28699
|
+
}));
|
|
28700
|
+
server.resource("Maps Geocoding", "maps://geocoding", async (uri) => ({
|
|
28701
|
+
contents: [
|
|
28702
|
+
{
|
|
28703
|
+
uri: uri.href,
|
|
28704
|
+
mimeType: "application/json",
|
|
28705
|
+
text: JSON.stringify(catalog5.subpackages.geocoding, null, 2)
|
|
28706
|
+
}
|
|
28707
|
+
]
|
|
28708
|
+
}));
|
|
28506
28709
|
server.resource("Maps Components", "maps://components", async (uri) => ({
|
|
28507
28710
|
contents: [
|
|
28508
28711
|
{
|
|
@@ -28765,7 +28968,7 @@ ${catalog5.quickReference.tailwindConfig}
|
|
|
28765
28968
|
|
|
28766
28969
|
// src/data/native-catalog.json
|
|
28767
28970
|
var native_catalog_default = {
|
|
28768
|
-
version: "0.2.
|
|
28971
|
+
version: "0.2.1",
|
|
28769
28972
|
packageName: "@classic-homes/native",
|
|
28770
28973
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
28771
28974
|
subpackages: {
|
|
@@ -31140,7 +31343,7 @@ function registerPrompts(server) {
|
|
|
31140
31343
|
// package.json
|
|
31141
31344
|
var package_default = {
|
|
31142
31345
|
name: "@classic-homes/theme-mcp",
|
|
31143
|
-
version: "0.2.
|
|
31346
|
+
version: "0.2.1",
|
|
31144
31347
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
31145
31348
|
type: "module",
|
|
31146
31349
|
main: "dist/index.js",
|