@classic-homes/theme-mcp 0.5.7 → 0.5.8
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.
|
@@ -6,8 +6,54 @@ 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.5.
|
|
9
|
+
version: "0.5.8",
|
|
10
10
|
components: [
|
|
11
|
+
{
|
|
12
|
+
name: "AccessInspector",
|
|
13
|
+
description: "Admin-only overlay that shows which role or permission gates UI and data, lists denials including API 403s, and previews the page as another role",
|
|
14
|
+
category: "core",
|
|
15
|
+
importPath: "@classic-homes/access-inspector-svelte",
|
|
16
|
+
props: [
|
|
17
|
+
{
|
|
18
|
+
name: "config",
|
|
19
|
+
type: "AccessInspectorConfig",
|
|
20
|
+
default: "{}",
|
|
21
|
+
required: false,
|
|
22
|
+
description: "Who may use it and how it opens (see below)"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
variants: [],
|
|
26
|
+
slots: [
|
|
27
|
+
{
|
|
28
|
+
name: "children",
|
|
29
|
+
description: "Main content",
|
|
30
|
+
required: false
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
events: [],
|
|
34
|
+
examples: [
|
|
35
|
+
{
|
|
36
|
+
title: "RequireAccess (gate and mark)",
|
|
37
|
+
code: `<script>
|
|
38
|
+
import { RequireAccess } from '@classic-homes/access-inspector-svelte';
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<RequireAccess permissions={['reports:read']} label="Reports">
|
|
42
|
+
<ReportsCard />
|
|
43
|
+
{#snippet fallback()}
|
|
44
|
+
<p>Ask your manager for report access.</p>
|
|
45
|
+
{/snippet}
|
|
46
|
+
</RequireAccess>`
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "use:requires (mark only)",
|
|
50
|
+
code: "<button use:requires={{ permissions: ['homes:update'], label: 'Edit' }}>Edit</button>"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
relatedComponents: [
|
|
54
|
+
"FeedbackWidget"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
11
57
|
{
|
|
12
58
|
name: "ActionHeader",
|
|
13
59
|
description: "Responsive app page header with back link, badges and actions that fold into an overflow menu instead of wrapping",
|
|
@@ -22682,7 +22728,7 @@ function registerComponentResources(server) {
|
|
|
22682
22728
|
|
|
22683
22729
|
// src/data/token-definitions.json
|
|
22684
22730
|
var token_definitions_default = {
|
|
22685
|
-
version: "0.5.
|
|
22731
|
+
version: "0.5.8",
|
|
22686
22732
|
colors: {
|
|
22687
22733
|
brand: [
|
|
22688
22734
|
{
|
|
@@ -23665,7 +23711,7 @@ function registerTokenResources(server) {
|
|
|
23665
23711
|
|
|
23666
23712
|
// src/data/styles-catalog.json
|
|
23667
23713
|
var styles_catalog_default = {
|
|
23668
|
-
version: "0.5.
|
|
23714
|
+
version: "0.5.8",
|
|
23669
23715
|
package: "@classic-homes/theme-styles",
|
|
23670
23716
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
23671
23717
|
integration: {
|
|
@@ -24048,7 +24094,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
24048
24094
|
|
|
24049
24095
|
// src/data/pattern-library.json
|
|
24050
24096
|
var pattern_library_default = {
|
|
24051
|
-
version: "0.5.
|
|
24097
|
+
version: "0.5.8",
|
|
24052
24098
|
layouts: [
|
|
24053
24099
|
{
|
|
24054
24100
|
id: "dashboard-page",
|
|
@@ -25142,7 +25188,7 @@ function registerLayoutResources(server) {
|
|
|
25142
25188
|
|
|
25143
25189
|
// src/data/schema-catalog.json
|
|
25144
25190
|
var schema_catalog_default = {
|
|
25145
|
-
version: "0.5.
|
|
25191
|
+
version: "0.5.8",
|
|
25146
25192
|
packageName: "@classic-homes/theme-svelte",
|
|
25147
25193
|
importPath: "@classic-homes/theme-svelte",
|
|
25148
25194
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -25950,7 +25996,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
25950
25996
|
|
|
25951
25997
|
// src/data/auth-catalog.json
|
|
25952
25998
|
var auth_catalog_default = {
|
|
25953
|
-
version: "0.5.
|
|
25999
|
+
version: "0.5.8",
|
|
25954
26000
|
packageName: "@classic-homes/auth",
|
|
25955
26001
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
25956
26002
|
subpackages: {
|
|
@@ -26557,6 +26603,17 @@ var auth_catalog_default = {
|
|
|
26557
26603
|
name: "isRoleDeniedError",
|
|
26558
26604
|
signature: "(error: unknown) => error is RoleDeniedError",
|
|
26559
26605
|
description: "Type guard to check if an error is a RoleDeniedError"
|
|
26606
|
+
},
|
|
26607
|
+
{
|
|
26608
|
+
name: "ApiError",
|
|
26609
|
+
signature: "class extends Error { status: number; code?: string; details?: Record<string, unknown>; method: string; endpoint: string }",
|
|
26610
|
+
description: "Thrown by apiRequest/api.* on any non-2xx response. message is the server's message (unchanged from the old plain Error); a CHAPI 403 carries details.required (and details.mode).",
|
|
26611
|
+
example: "import { api, isApiError } from '@classic-homes/auth/core';\n\ntry {\n await api.put('/homes/42', body, true);\n} catch (e) {\n if (isApiError(e) && e.status === 403) {\n console.log(e.details?.required); // ['homes:update']\n }\n}"
|
|
26612
|
+
},
|
|
26613
|
+
{
|
|
26614
|
+
name: "isApiError",
|
|
26615
|
+
signature: "(error: unknown) => error is ApiError",
|
|
26616
|
+
description: "Type guard for ApiError"
|
|
26560
26617
|
}
|
|
26561
26618
|
],
|
|
26562
26619
|
types: [
|
|
@@ -26686,6 +26743,122 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26686
26743
|
]
|
|
26687
26744
|
}
|
|
26688
26745
|
]
|
|
26746
|
+
},
|
|
26747
|
+
"access-probe": {
|
|
26748
|
+
description: "Inert hooks for permission troubleshooting tools (the Access Inspector). setAccessProbe receives every role/permission decision; setAccessSubject previews the UI as another role set for the signed-in user only. Browser-only; UI decisions only (the API still authorizes with the real token).",
|
|
26749
|
+
functions: [
|
|
26750
|
+
{
|
|
26751
|
+
name: "setAccessProbe",
|
|
26752
|
+
signature: "(probe: ((event: AccessCheckEvent) => void) | null) => AccessProbe | null",
|
|
26753
|
+
description: "Install the function that receives every decision: core hasRole*, store has*, checkAuth ('route'), filterByAccess/canAccess ('nav'), API 403s ('http', path only). One probe at a time; no-op on the server."
|
|
26754
|
+
},
|
|
26755
|
+
{
|
|
26756
|
+
name: "setAccessSubject",
|
|
26757
|
+
signature: "(userId: string, subject: { roles: string[]; permissions: string[] }) => void",
|
|
26758
|
+
description: "'View as': access checks for this user id use the given roles/permissions. Checks for other users, authStore.user and sign-in allowedRoles gating are unaffected. Cleared on any login/logout/expiry."
|
|
26759
|
+
},
|
|
26760
|
+
{
|
|
26761
|
+
name: "clearAccessSubject",
|
|
26762
|
+
signature: "() => void",
|
|
26763
|
+
description: "End the 'view as' preview"
|
|
26764
|
+
},
|
|
26765
|
+
{
|
|
26766
|
+
name: "effectiveSubject",
|
|
26767
|
+
signature: "(user) => { roles; permissions; simulated }",
|
|
26768
|
+
description: "Roles/permissions to decide access with: the override when it targets this user, else the user's own"
|
|
26769
|
+
},
|
|
26770
|
+
{
|
|
26771
|
+
name: "evaluateAccess",
|
|
26772
|
+
signature: "(subject: AccessSubject, requirement: AccessRequirement) => { allowed: boolean; missing: { roles: string[]; permissions: string[] } }",
|
|
26773
|
+
description: "Shared any/all decision used by checkAuth and the inspector. Roles and permissions must both pass; empty lists are no restriction; exact membership.",
|
|
26774
|
+
example: "import { evaluateAccess, effectiveSubject } from '@classic-homes/auth/core';\n\nevaluateAccess(effectiveSubject(user), { permissions: ['homes:update'] });"
|
|
26775
|
+
},
|
|
26776
|
+
{
|
|
26777
|
+
name: "requirementFromDenial",
|
|
26778
|
+
signature: "(code: string | undefined, details: unknown) => AccessRequirement | null",
|
|
26779
|
+
description: "Read what a CHAPI 403 required (requirePermissions: string[] + INSUFFICIENT_PERMISSIONS; requireRole: string + FORBIDDEN)"
|
|
26780
|
+
}
|
|
26781
|
+
],
|
|
26782
|
+
types: [
|
|
26783
|
+
{
|
|
26784
|
+
name: "AccessRequirement",
|
|
26785
|
+
description: "What UI or a request requires",
|
|
26786
|
+
properties: [
|
|
26787
|
+
{
|
|
26788
|
+
name: "roles",
|
|
26789
|
+
type: "string[]",
|
|
26790
|
+
required: false,
|
|
26791
|
+
description: "Any one of these roles (all with requireAllRoles)"
|
|
26792
|
+
},
|
|
26793
|
+
{
|
|
26794
|
+
name: "permissions",
|
|
26795
|
+
type: "string[]",
|
|
26796
|
+
required: false,
|
|
26797
|
+
description: "Any one of these permissions (all with requireAllPermissions)"
|
|
26798
|
+
},
|
|
26799
|
+
{
|
|
26800
|
+
name: "requireAllRoles",
|
|
26801
|
+
type: "boolean",
|
|
26802
|
+
required: false,
|
|
26803
|
+
description: "Require every listed role"
|
|
26804
|
+
},
|
|
26805
|
+
{
|
|
26806
|
+
name: "requireAllPermissions",
|
|
26807
|
+
type: "boolean",
|
|
26808
|
+
required: false,
|
|
26809
|
+
description: "Require every listed permission"
|
|
26810
|
+
}
|
|
26811
|
+
]
|
|
26812
|
+
},
|
|
26813
|
+
{
|
|
26814
|
+
name: "AccessCheckEvent",
|
|
26815
|
+
description: "One reported decision",
|
|
26816
|
+
properties: [
|
|
26817
|
+
{
|
|
26818
|
+
name: "source",
|
|
26819
|
+
type: "'check' | 'route' | 'nav' | 'http' | 'element'",
|
|
26820
|
+
required: true,
|
|
26821
|
+
description: "Where the decision came from"
|
|
26822
|
+
},
|
|
26823
|
+
{
|
|
26824
|
+
name: "requirement",
|
|
26825
|
+
type: "AccessRequirement",
|
|
26826
|
+
required: true,
|
|
26827
|
+
description: "What was required"
|
|
26828
|
+
},
|
|
26829
|
+
{
|
|
26830
|
+
name: "allowed",
|
|
26831
|
+
type: "boolean",
|
|
26832
|
+
required: true,
|
|
26833
|
+
description: "Outcome"
|
|
26834
|
+
},
|
|
26835
|
+
{
|
|
26836
|
+
name: "missing",
|
|
26837
|
+
type: "{ roles: string[]; permissions: string[] }",
|
|
26838
|
+
required: true,
|
|
26839
|
+
description: "What the subject lacked"
|
|
26840
|
+
},
|
|
26841
|
+
{
|
|
26842
|
+
name: "subjectId",
|
|
26843
|
+
type: "string | null",
|
|
26844
|
+
required: true,
|
|
26845
|
+
description: "User checked (checks also run for other users)"
|
|
26846
|
+
},
|
|
26847
|
+
{
|
|
26848
|
+
name: "simulated",
|
|
26849
|
+
type: "boolean",
|
|
26850
|
+
required: true,
|
|
26851
|
+
description: "Decided against the 'view as' subject"
|
|
26852
|
+
},
|
|
26853
|
+
{
|
|
26854
|
+
name: "label",
|
|
26855
|
+
type: "string",
|
|
26856
|
+
required: false,
|
|
26857
|
+
description: "Nav item id/href, route path or 'METHOD /path'"
|
|
26858
|
+
}
|
|
26859
|
+
]
|
|
26860
|
+
}
|
|
26861
|
+
]
|
|
26689
26862
|
}
|
|
26690
26863
|
},
|
|
26691
26864
|
types: [
|
|
@@ -28974,6 +29147,22 @@ function registerAuthResources(server) {
|
|
|
28974
29147
|
code: "import { authService, RoleDeniedError } from '@classic-homes/auth/core';\n\ntry {\n await authService.login(credentials, { allowedRoles: ['admin', 'agent'] });\n} catch (e) {\n if (e instanceof RoleDeniedError) {\n // User authenticated but lacks role\n }\n}",
|
|
28975
29148
|
description: "Validate roles during login and handle access denial"
|
|
28976
29149
|
},
|
|
29150
|
+
accessInspector: {
|
|
29151
|
+
code: `<!-- +layout.svelte (once). Admins: Ctrl+Shift+A or ?access-inspector=1 -->
|
|
29152
|
+
<script>
|
|
29153
|
+
import { AccessInspector, RequireAccess, requires } from '@classic-homes/access-inspector-svelte';
|
|
29154
|
+
</script>
|
|
29155
|
+
|
|
29156
|
+
<AccessInspector />
|
|
29157
|
+
|
|
29158
|
+
<RequireAccess permissions={['reports:read']} label="Reports">
|
|
29159
|
+
<ReportsCard />
|
|
29160
|
+
{#snippet fallback()}<p>No access</p>{/snippet}
|
|
29161
|
+
</RequireAccess>
|
|
29162
|
+
|
|
29163
|
+
<button use:requires={{ permissions: ['homes:update'] }}>Edit</button>`,
|
|
29164
|
+
description: "Admin permission troubleshooting: outlines gated UI, lists denials incl. API 403s with the roles that grant each permission (CHAPI /auth/access-catalog), and previews as another role. Import @classic-homes/access-inspector-core/styles.css once."
|
|
29165
|
+
},
|
|
28977
29166
|
testing: {
|
|
28978
29167
|
code: "import { setupTestAuth, mockUser, assertAuthenticated } from '@classic-homes/auth/testing';\n\nconst ctx = setupTestAuth();\n// Run tests\nctx.cleanup();",
|
|
28979
29168
|
description: "Set up mocks for testing auth flows"
|
|
@@ -28992,7 +29181,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
28992
29181
|
|
|
28993
29182
|
// src/data/notifications-catalog.json
|
|
28994
29183
|
var notifications_catalog_default = {
|
|
28995
|
-
version: "0.5.
|
|
29184
|
+
version: "0.5.8",
|
|
28996
29185
|
packageName: "@classic-homes/notifications",
|
|
28997
29186
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
28998
29187
|
subpackages: {
|
|
@@ -29904,7 +30093,7 @@ function registerNotificationsResources(server) {
|
|
|
29904
30093
|
|
|
29905
30094
|
// src/data/docs-catalog.json
|
|
29906
30095
|
var docs_catalog_default = {
|
|
29907
|
-
version: "0.5.
|
|
30096
|
+
version: "0.5.8",
|
|
29908
30097
|
packageName: "@classic-homes/theme-docs",
|
|
29909
30098
|
description: "Markdown documentation components for the Classic theme system",
|
|
29910
30099
|
exports: {
|
|
@@ -31582,7 +31771,7 @@ function registerDocsResources(server) {
|
|
|
31582
31771
|
|
|
31583
31772
|
// src/data/charts-catalog.json
|
|
31584
31773
|
var charts_catalog_default = {
|
|
31585
|
-
version: "0.5.
|
|
31774
|
+
version: "0.5.8",
|
|
31586
31775
|
packageName: "@classic-homes/charts-core",
|
|
31587
31776
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
31588
31777
|
subpackages: {
|
|
@@ -35820,7 +36009,7 @@ interface SankeyData {
|
|
|
35820
36009
|
|
|
35821
36010
|
// src/data/gantt-catalog.json
|
|
35822
36011
|
var gantt_catalog_default = {
|
|
35823
|
-
version: "0.5.
|
|
36012
|
+
version: "0.5.8",
|
|
35824
36013
|
packageName: "@classic-homes/gantt-core",
|
|
35825
36014
|
description: "Framework-agnostic Gantt engine: working calendars, a critical-path scheduler, an editable project model with undo/redo, timeline geometry, drag math, accessible descriptions and import/export. No DOM, no framework, no runtime dependencies. @classic-homes/gantt-svelte renders it; a React package (@classic-homes/gantt-react) is planned.",
|
|
35826
36015
|
packages: {
|
|
@@ -36803,7 +36992,7 @@ function registerGanttResources(server) {
|
|
|
36803
36992
|
|
|
36804
36993
|
// src/data/maps-catalog.json
|
|
36805
36994
|
var maps_catalog_default = {
|
|
36806
|
-
version: "0.5.
|
|
36995
|
+
version: "0.5.8",
|
|
36807
36996
|
packageName: "@classic-homes/maps-core",
|
|
36808
36997
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
36809
36998
|
subpackages: {
|
|
@@ -37446,12 +37635,12 @@ var maps_catalog_default = {
|
|
|
37446
37635
|
]
|
|
37447
37636
|
},
|
|
37448
37637
|
fingerprint: {
|
|
37449
|
-
description: "
|
|
37638
|
+
description: "GeoJSON change detection: count, first/last id and a content hash of every feature",
|
|
37450
37639
|
functions: [
|
|
37451
37640
|
{
|
|
37452
37641
|
name: "createGeoJSONFingerprint",
|
|
37453
37642
|
signature: "(data: GeoJSONFeatureCollection | GeoJSON.GeoJSON | string | null | undefined) => GeoJSONFingerprint",
|
|
37454
|
-
description: "
|
|
37643
|
+
description: "Fingerprint a FeatureCollection (count, first/last id, hash of every id, geometry and properties) in one pass"
|
|
37455
37644
|
},
|
|
37456
37645
|
{
|
|
37457
37646
|
name: "fingerprintEqual",
|
|
@@ -39727,7 +39916,7 @@ var maps_catalog_default = {
|
|
|
39727
39916
|
},
|
|
39728
39917
|
{
|
|
39729
39918
|
name: "GeoJSONFingerprint",
|
|
39730
|
-
description: "
|
|
39919
|
+
description: "Fingerprint for GeoJSON change detection: count, first/last id and a content hash",
|
|
39731
39920
|
properties: [
|
|
39732
39921
|
{
|
|
39733
39922
|
name: "count",
|
|
@@ -39746,6 +39935,12 @@ var maps_catalog_default = {
|
|
|
39746
39935
|
type: "string | number | undefined",
|
|
39747
39936
|
required: true,
|
|
39748
39937
|
description: "ID of the last feature (undefined if no features or no ID)"
|
|
39938
|
+
},
|
|
39939
|
+
{
|
|
39940
|
+
name: "hash",
|
|
39941
|
+
type: "number",
|
|
39942
|
+
required: true,
|
|
39943
|
+
description: "Hash of every feature's id, geometry and properties (0 for no features)"
|
|
39749
39944
|
}
|
|
39750
39945
|
]
|
|
39751
39946
|
},
|
|
@@ -42429,7 +42624,7 @@ ${catalog6.quickReference.tailwindConfig}
|
|
|
42429
42624
|
|
|
42430
42625
|
// src/data/native-catalog.json
|
|
42431
42626
|
var native_catalog_default = {
|
|
42432
|
-
version: "0.5.
|
|
42627
|
+
version: "0.5.8",
|
|
42433
42628
|
packageName: "@classic-homes/native",
|
|
42434
42629
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
42435
42630
|
subpackages: {
|
|
@@ -44139,7 +44334,7 @@ import { NativeGuard, usePlatformCheck } from '@classic-homes/native/react';
|
|
|
44139
44334
|
|
|
44140
44335
|
// src/data/viewer-catalog.json
|
|
44141
44336
|
var viewer_catalog_default = {
|
|
44142
|
-
version: "0.5.
|
|
44337
|
+
version: "0.5.8",
|
|
44143
44338
|
packageName: "@classic-homes/viewer-svelte",
|
|
44144
44339
|
description: "Client-side, view-only document viewers: PDF, Word (.docx), Excel (.xlsx), CSV/TSV and CAD (DXF; DWG through the separate GPL package). Files are parsed and rendered in the browser; nothing is uploaded or converted on a server. Each format is a lazy-loaded subpath with an optional peer dependency, so apps only bundle what they register. Svelte 5 only; a React package (viewer-react) is planned.",
|
|
44145
44340
|
packages: {
|
|
@@ -45198,7 +45393,7 @@ function registerPrompts(server) {
|
|
|
45198
45393
|
// package.json
|
|
45199
45394
|
var package_default = {
|
|
45200
45395
|
name: "@classic-homes/theme-mcp",
|
|
45201
|
-
version: "0.5.
|
|
45396
|
+
version: "0.5.8",
|
|
45202
45397
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
45203
45398
|
type: "module",
|
|
45204
45399
|
main: "dist/index.js",
|
|
@@ -45297,4 +45492,4 @@ function createServer() {
|
|
|
45297
45492
|
export {
|
|
45298
45493
|
createServer
|
|
45299
45494
|
};
|
|
45300
|
-
//# sourceMappingURL=chunk-
|
|
45495
|
+
//# sourceMappingURL=chunk-T45XY5RI.js.map
|