@classic-homes/theme-mcp 0.3.3 → 0.3.4
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/cli.js +401 -143
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +401 -143
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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.3.
|
|
9
|
+
version: "0.3.4",
|
|
10
10
|
components: [
|
|
11
11
|
{
|
|
12
12
|
name: "ActionHeader",
|
|
@@ -804,19 +804,7 @@ var component_catalog_default = {
|
|
|
804
804
|
description: "Additional CSS classes for the content box"
|
|
805
805
|
}
|
|
806
806
|
],
|
|
807
|
-
variants: [
|
|
808
|
-
{
|
|
809
|
-
name: "ratio",
|
|
810
|
-
values: [
|
|
811
|
-
"square",
|
|
812
|
-
"video",
|
|
813
|
-
"photo",
|
|
814
|
-
"portrait",
|
|
815
|
-
"wide"
|
|
816
|
-
],
|
|
817
|
-
default: "video"
|
|
818
|
-
}
|
|
819
|
-
],
|
|
807
|
+
variants: [],
|
|
820
808
|
slots: [
|
|
821
809
|
{
|
|
822
810
|
name: "children",
|
|
@@ -1915,8 +1903,56 @@ var component_catalog_default = {
|
|
|
1915
1903
|
description: "Container component for grouping related content",
|
|
1916
1904
|
category: "layout",
|
|
1917
1905
|
importPath: "@classic-homes/theme-svelte",
|
|
1918
|
-
props: [
|
|
1919
|
-
|
|
1906
|
+
props: [
|
|
1907
|
+
{
|
|
1908
|
+
name: "variant",
|
|
1909
|
+
type: "'default' | 'featured' | 'highlight' | 'warning'",
|
|
1910
|
+
default: "'default'",
|
|
1911
|
+
required: false,
|
|
1912
|
+
description: "Card style variant"
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
name: "borderColor",
|
|
1916
|
+
type: "'default' | 'primary' | 'muted'",
|
|
1917
|
+
default: "'default'",
|
|
1918
|
+
required: false,
|
|
1919
|
+
description: "Border color (ignored for highlight/warning)"
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
name: "interactive",
|
|
1923
|
+
type: "boolean",
|
|
1924
|
+
default: "false",
|
|
1925
|
+
required: false,
|
|
1926
|
+
description: "Enables hover shadow effect"
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
name: "class",
|
|
1930
|
+
type: "string",
|
|
1931
|
+
required: false,
|
|
1932
|
+
description: "Additional CSS classes"
|
|
1933
|
+
}
|
|
1934
|
+
],
|
|
1935
|
+
variants: [
|
|
1936
|
+
{
|
|
1937
|
+
name: "variant",
|
|
1938
|
+
values: [
|
|
1939
|
+
"default",
|
|
1940
|
+
"featured",
|
|
1941
|
+
"highlight",
|
|
1942
|
+
"warning"
|
|
1943
|
+
],
|
|
1944
|
+
default: "default"
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
name: "borderColor",
|
|
1948
|
+
values: [
|
|
1949
|
+
"default",
|
|
1950
|
+
"primary",
|
|
1951
|
+
"muted"
|
|
1952
|
+
],
|
|
1953
|
+
default: "default"
|
|
1954
|
+
}
|
|
1955
|
+
],
|
|
1920
1956
|
slots: [
|
|
1921
1957
|
{
|
|
1922
1958
|
name: "children",
|
|
@@ -2784,6 +2820,114 @@ var component_catalog_default = {
|
|
|
2784
2820
|
"Label"
|
|
2785
2821
|
]
|
|
2786
2822
|
},
|
|
2823
|
+
{
|
|
2824
|
+
name: "CodeField",
|
|
2825
|
+
description: "Monospaced text area for code, markup or diagram source, where Tab indents",
|
|
2826
|
+
category: "form",
|
|
2827
|
+
importPath: "@classic-homes/theme-svelte",
|
|
2828
|
+
props: [
|
|
2829
|
+
{
|
|
2830
|
+
name: "value",
|
|
2831
|
+
type: "string",
|
|
2832
|
+
default: "''",
|
|
2833
|
+
required: false,
|
|
2834
|
+
description: "The text (bindable)"
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
name: "label",
|
|
2838
|
+
type: "string",
|
|
2839
|
+
required: false,
|
|
2840
|
+
description: "Accessible name; or use `aria-labelledby`"
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
name: "id",
|
|
2844
|
+
type: "string",
|
|
2845
|
+
required: false,
|
|
2846
|
+
description: "For a visible `<Label for>`"
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
name: "rows",
|
|
2850
|
+
type: "number",
|
|
2851
|
+
default: "8",
|
|
2852
|
+
required: false,
|
|
2853
|
+
description: "Visible lines"
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
name: "indent",
|
|
2857
|
+
type: "number",
|
|
2858
|
+
default: "2",
|
|
2859
|
+
required: false,
|
|
2860
|
+
description: "Spaces per indent level"
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
name: "wrap",
|
|
2864
|
+
type: "boolean",
|
|
2865
|
+
default: "false",
|
|
2866
|
+
required: false,
|
|
2867
|
+
description: "Soft-wrap long lines instead of scrolling sideways"
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
name: "placeholder",
|
|
2871
|
+
type: "string",
|
|
2872
|
+
required: false,
|
|
2873
|
+
description: "Placeholder text"
|
|
2874
|
+
},
|
|
2875
|
+
{
|
|
2876
|
+
name: "disabled",
|
|
2877
|
+
type: "boolean",
|
|
2878
|
+
default: "false",
|
|
2879
|
+
required: false,
|
|
2880
|
+
description: "Disable the field"
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
name: "readonly",
|
|
2884
|
+
type: "boolean",
|
|
2885
|
+
default: "false",
|
|
2886
|
+
required: false,
|
|
2887
|
+
description: "Read only; Tab moves focus as usual"
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
name: "aria-invalid",
|
|
2891
|
+
type: "boolean",
|
|
2892
|
+
required: false,
|
|
2893
|
+
description: "Error styling"
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
name: "aria-describedby",
|
|
2897
|
+
type: "string",
|
|
2898
|
+
required: false,
|
|
2899
|
+
description: "Extra description ids (the Tab hint is always added)"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
name: "onValueChange",
|
|
2903
|
+
type: "(value: string) => void",
|
|
2904
|
+
required: false,
|
|
2905
|
+
description: "Called on every change"
|
|
2906
|
+
}
|
|
2907
|
+
],
|
|
2908
|
+
variants: [],
|
|
2909
|
+
slots: [
|
|
2910
|
+
{
|
|
2911
|
+
name: "children",
|
|
2912
|
+
description: "Main content",
|
|
2913
|
+
required: false
|
|
2914
|
+
}
|
|
2915
|
+
],
|
|
2916
|
+
events: [],
|
|
2917
|
+
examples: [
|
|
2918
|
+
{
|
|
2919
|
+
title: "Basic Usage",
|
|
2920
|
+
code: `<script>
|
|
2921
|
+
import { CodeField } from '@classic-homes/theme-svelte';
|
|
2922
|
+
|
|
2923
|
+
let source = $state('flowchart TD\\n A --> B');
|
|
2924
|
+
</script>
|
|
2925
|
+
|
|
2926
|
+
<CodeField label="Diagram source" bind:value={source} rows={6} />`
|
|
2927
|
+
}
|
|
2928
|
+
],
|
|
2929
|
+
relatedComponents: []
|
|
2930
|
+
},
|
|
2787
2931
|
{
|
|
2788
2932
|
name: "Combobox",
|
|
2789
2933
|
description: "Searchable select with async loading support",
|
|
@@ -3869,13 +4013,6 @@ var component_catalog_default = {
|
|
|
3869
4013
|
"desc"
|
|
3870
4014
|
],
|
|
3871
4015
|
default: "asc"
|
|
3872
|
-
},
|
|
3873
|
-
{
|
|
3874
|
-
name: "onSort",
|
|
3875
|
-
values: [
|
|
3876
|
-
"asc",
|
|
3877
|
-
"desc"
|
|
3878
|
-
]
|
|
3879
4016
|
}
|
|
3880
4017
|
],
|
|
3881
4018
|
slots: [
|
|
@@ -6548,15 +6685,6 @@ var component_catalog_default = {
|
|
|
6548
6685
|
"lg"
|
|
6549
6686
|
],
|
|
6550
6687
|
default: "lg"
|
|
6551
|
-
},
|
|
6552
|
-
{
|
|
6553
|
-
name: "maxWidth",
|
|
6554
|
-
values: [
|
|
6555
|
-
"none",
|
|
6556
|
-
"sm",
|
|
6557
|
-
"7xl"
|
|
6558
|
-
],
|
|
6559
|
-
default: "none"
|
|
6560
6688
|
}
|
|
6561
6689
|
],
|
|
6562
6690
|
slots: [
|
|
@@ -7144,16 +7272,6 @@ var component_catalog_default = {
|
|
|
7144
7272
|
}
|
|
7145
7273
|
],
|
|
7146
7274
|
variants: [
|
|
7147
|
-
{
|
|
7148
|
-
name: "ratio",
|
|
7149
|
-
values: [
|
|
7150
|
-
"square",
|
|
7151
|
-
"video",
|
|
7152
|
-
"photo",
|
|
7153
|
-
"portrait",
|
|
7154
|
-
"wide"
|
|
7155
|
-
]
|
|
7156
|
-
},
|
|
7157
7275
|
{
|
|
7158
7276
|
name: "fit",
|
|
7159
7277
|
values: [
|
|
@@ -8616,19 +8734,7 @@ var component_catalog_default = {
|
|
|
8616
8734
|
description: "Additional CSS classes"
|
|
8617
8735
|
}
|
|
8618
8736
|
],
|
|
8619
|
-
variants: [
|
|
8620
|
-
{
|
|
8621
|
-
name: "ratio",
|
|
8622
|
-
values: [
|
|
8623
|
-
"square",
|
|
8624
|
-
"video",
|
|
8625
|
-
"photo",
|
|
8626
|
-
"portrait",
|
|
8627
|
-
"wide"
|
|
8628
|
-
],
|
|
8629
|
-
default: "video"
|
|
8630
|
-
}
|
|
8631
|
-
],
|
|
8737
|
+
variants: [],
|
|
8632
8738
|
slots: [
|
|
8633
8739
|
{
|
|
8634
8740
|
name: "children",
|
|
@@ -8785,17 +8891,6 @@ var component_catalog_default = {
|
|
|
8785
8891
|
"cloudflare",
|
|
8786
8892
|
"matterport"
|
|
8787
8893
|
]
|
|
8788
|
-
},
|
|
8789
|
-
{
|
|
8790
|
-
name: "ratio",
|
|
8791
|
-
values: [
|
|
8792
|
-
"square",
|
|
8793
|
-
"video",
|
|
8794
|
-
"photo",
|
|
8795
|
-
"portrait",
|
|
8796
|
-
"wide"
|
|
8797
|
-
],
|
|
8798
|
-
default: "video"
|
|
8799
8894
|
}
|
|
8800
8895
|
],
|
|
8801
8896
|
slots: [
|
|
@@ -8915,17 +9010,6 @@ var component_catalog_default = {
|
|
|
8915
9010
|
"lg"
|
|
8916
9011
|
],
|
|
8917
9012
|
default: "md"
|
|
8918
|
-
},
|
|
8919
|
-
{
|
|
8920
|
-
name: "ratio",
|
|
8921
|
-
values: [
|
|
8922
|
-
"square",
|
|
8923
|
-
"video",
|
|
8924
|
-
"photo",
|
|
8925
|
-
"portrait",
|
|
8926
|
-
"wide"
|
|
8927
|
-
],
|
|
8928
|
-
default: "square"
|
|
8929
9013
|
}
|
|
8930
9014
|
],
|
|
8931
9015
|
slots: [
|
|
@@ -14527,17 +14611,6 @@ var component_catalog_default = {
|
|
|
14527
14611
|
}
|
|
14528
14612
|
],
|
|
14529
14613
|
variants: [
|
|
14530
|
-
{
|
|
14531
|
-
name: "ratio",
|
|
14532
|
-
values: [
|
|
14533
|
-
"square",
|
|
14534
|
-
"video",
|
|
14535
|
-
"photo",
|
|
14536
|
-
"portrait",
|
|
14537
|
-
"wide"
|
|
14538
|
-
],
|
|
14539
|
-
default: "video"
|
|
14540
|
-
},
|
|
14541
14614
|
{
|
|
14542
14615
|
name: "fit",
|
|
14543
14616
|
values: [
|
|
@@ -14746,7 +14819,7 @@ function registerComponentResources(server) {
|
|
|
14746
14819
|
|
|
14747
14820
|
// src/data/token-definitions.json
|
|
14748
14821
|
var token_definitions_default = {
|
|
14749
|
-
version: "0.3.
|
|
14822
|
+
version: "0.3.4",
|
|
14750
14823
|
colors: {
|
|
14751
14824
|
brand: [
|
|
14752
14825
|
{
|
|
@@ -15729,7 +15802,7 @@ function registerTokenResources(server) {
|
|
|
15729
15802
|
|
|
15730
15803
|
// src/data/styles-catalog.json
|
|
15731
15804
|
var styles_catalog_default = {
|
|
15732
|
-
version: "0.3.
|
|
15805
|
+
version: "0.3.4",
|
|
15733
15806
|
package: "@classic-homes/theme-styles",
|
|
15734
15807
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
15735
15808
|
integration: {
|
|
@@ -16112,7 +16185,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
16112
16185
|
|
|
16113
16186
|
// src/data/pattern-library.json
|
|
16114
16187
|
var pattern_library_default = {
|
|
16115
|
-
version: "0.3.
|
|
16188
|
+
version: "0.3.4",
|
|
16116
16189
|
layouts: [
|
|
16117
16190
|
{
|
|
16118
16191
|
id: "dashboard-page",
|
|
@@ -17206,7 +17279,7 @@ function registerLayoutResources(server) {
|
|
|
17206
17279
|
|
|
17207
17280
|
// src/data/schema-catalog.json
|
|
17208
17281
|
var schema_catalog_default = {
|
|
17209
|
-
version: "0.3.
|
|
17282
|
+
version: "0.3.4",
|
|
17210
17283
|
packageName: "@classic-homes/theme-svelte",
|
|
17211
17284
|
importPath: "@classic-homes/theme-svelte",
|
|
17212
17285
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -18014,7 +18087,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
18014
18087
|
|
|
18015
18088
|
// src/data/auth-catalog.json
|
|
18016
18089
|
var auth_catalog_default = {
|
|
18017
|
-
version: "0.3.
|
|
18090
|
+
version: "0.3.4",
|
|
18018
18091
|
packageName: "@classic-homes/auth",
|
|
18019
18092
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
18020
18093
|
subpackages: {
|
|
@@ -21051,7 +21124,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
21051
21124
|
|
|
21052
21125
|
// src/data/notifications-catalog.json
|
|
21053
21126
|
var notifications_catalog_default = {
|
|
21054
|
-
version: "0.3.
|
|
21127
|
+
version: "0.3.4",
|
|
21055
21128
|
packageName: "@classic-homes/notifications",
|
|
21056
21129
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
21057
21130
|
subpackages: {
|
|
@@ -21162,7 +21235,7 @@ var notifications_catalog_default = {
|
|
|
21162
21235
|
{
|
|
21163
21236
|
name: "getNotificationIconColor",
|
|
21164
21237
|
signature: "(type: NotificationType) => string",
|
|
21165
|
-
description: "Get the Tailwind color class for a notification type (security\u2192text-
|
|
21238
|
+
description: "Get the Tailwind color class for a notification type (security\u2192text-destructive, system\u2192text-info, feature\u2192text-primary, update\u2192text-success, alert\u2192text-warning, info\u2192text-muted-foreground)"
|
|
21166
21239
|
},
|
|
21167
21240
|
{
|
|
21168
21241
|
name: "getPriorityBadgeVariant",
|
|
@@ -21944,7 +22017,7 @@ function registerNotificationsResources(server) {
|
|
|
21944
22017
|
description: "Direct API access without Svelte store"
|
|
21945
22018
|
},
|
|
21946
22019
|
utilities: {
|
|
21947
|
-
code: "import {\n getNotificationIconName,\n getNotificationIconColor,\n getPriorityBadgeVariant,\n formatRelativeTime,\n} from '@classic-homes/notifications/core';\n\ngetNotificationIconName('security'); // 'shield'\ngetNotificationIconColor('security'); // 'text-
|
|
22020
|
+
code: "import {\n getNotificationIconName,\n getNotificationIconColor,\n getPriorityBadgeVariant,\n formatRelativeTime,\n} from '@classic-homes/notifications/core';\n\ngetNotificationIconName('security'); // 'shield'\ngetNotificationIconColor('security'); // 'text-destructive'\ngetPriorityBadgeVariant('urgent'); // 'destructive'\nformatRelativeTime('2024-01-22T10:00:00Z'); // '2h ago'",
|
|
21948
22021
|
description: "Utility functions for display"
|
|
21949
22022
|
},
|
|
21950
22023
|
preferences: {
|
|
@@ -21963,7 +22036,7 @@ function registerNotificationsResources(server) {
|
|
|
21963
22036
|
|
|
21964
22037
|
// src/data/docs-catalog.json
|
|
21965
22038
|
var docs_catalog_default = {
|
|
21966
|
-
version: "0.3.
|
|
22039
|
+
version: "0.3.4",
|
|
21967
22040
|
packageName: "@classic-homes/theme-docs",
|
|
21968
22041
|
description: "Markdown documentation components for the Classic theme system",
|
|
21969
22042
|
exports: {
|
|
@@ -21975,10 +22048,18 @@ var docs_catalog_default = {
|
|
|
21975
22048
|
importPath: "@classic-homes/theme-docs/parser",
|
|
21976
22049
|
description: "Markdown pipeline without Svelte imports (parseMarkdown, extractToc, createSlugger, extensions) for Node build scripts, server loaders and CMS previews"
|
|
21977
22050
|
},
|
|
22051
|
+
"./prose": {
|
|
22052
|
+
importPath: "@classic-homes/theme-docs/prose",
|
|
22053
|
+
description: "Subpath export for prose"
|
|
22054
|
+
},
|
|
21978
22055
|
"./sanitize": {
|
|
21979
22056
|
importPath: "@classic-homes/theme-docs/sanitize",
|
|
21980
22057
|
description: "sanitizeDocsHtml: allowlist sanitizer for parseMarkdown output (server/build-time only)"
|
|
21981
22058
|
},
|
|
22059
|
+
"./sanitize/browser": {
|
|
22060
|
+
importPath: "@classic-homes/theme-docs/sanitize/browser",
|
|
22061
|
+
description: "Subpath export for sanitize/browser"
|
|
22062
|
+
},
|
|
21982
22063
|
"./content": {
|
|
21983
22064
|
importPath: "@classic-homes/theme-docs/content",
|
|
21984
22065
|
description: "loadDocs/renderDocs: a Docusaurus-style docs directory as routes, autogenerated sidebars, generated-index pages, tags and rendered HTML (Node, build time)"
|
|
@@ -22050,6 +22131,154 @@ var docs_catalog_default = {
|
|
|
22050
22131
|
],
|
|
22051
22132
|
example: '<MarkdownPage content={markdownString} theme="github-dark">\n {#snippet header(frontmatter)}\n <h1>{frontmatter.title}</h1>\n {/snippet}\n</MarkdownPage>'
|
|
22052
22133
|
},
|
|
22134
|
+
{
|
|
22135
|
+
name: "ProseEditor",
|
|
22136
|
+
description: "Rich-text field that reads and writes markdown prose (paragraphs, lists, bold, italic, code, links, kbd). Authors see formatted text and a toolbar, never markdown syntax. Check the value with isProseMarkdown first and offer a source editor for anything else.",
|
|
22137
|
+
category: "content",
|
|
22138
|
+
props: [
|
|
22139
|
+
{
|
|
22140
|
+
name: "value",
|
|
22141
|
+
type: "string",
|
|
22142
|
+
required: true,
|
|
22143
|
+
description: "Markdown. Changes from outside replace the content."
|
|
22144
|
+
},
|
|
22145
|
+
{
|
|
22146
|
+
name: "onChange",
|
|
22147
|
+
type: "(markdown: string, doc: ProseNode) => void",
|
|
22148
|
+
required: false,
|
|
22149
|
+
description: "Called on every edit with the new markdown and the document behind it"
|
|
22150
|
+
},
|
|
22151
|
+
{
|
|
22152
|
+
name: "label",
|
|
22153
|
+
type: "string",
|
|
22154
|
+
required: true,
|
|
22155
|
+
description: "Accessible name for the text area"
|
|
22156
|
+
},
|
|
22157
|
+
{
|
|
22158
|
+
name: "placeholder",
|
|
22159
|
+
type: "string",
|
|
22160
|
+
required: false,
|
|
22161
|
+
description: "Placeholder shown while empty"
|
|
22162
|
+
},
|
|
22163
|
+
{
|
|
22164
|
+
name: "hardBreak",
|
|
22165
|
+
type: "'backslash' | 'html'",
|
|
22166
|
+
required: false,
|
|
22167
|
+
default: "'backslash'",
|
|
22168
|
+
description: "How line breaks are written; html for single-line contexts such as table cells"
|
|
22169
|
+
},
|
|
22170
|
+
{
|
|
22171
|
+
name: "inline",
|
|
22172
|
+
type: "boolean",
|
|
22173
|
+
required: false,
|
|
22174
|
+
default: "false",
|
|
22175
|
+
description: "Hide list buttons, for fields where a list makes no sense"
|
|
22176
|
+
},
|
|
22177
|
+
{
|
|
22178
|
+
name: "disabled",
|
|
22179
|
+
type: "boolean",
|
|
22180
|
+
required: false,
|
|
22181
|
+
default: "false",
|
|
22182
|
+
description: "Read-only"
|
|
22183
|
+
},
|
|
22184
|
+
{
|
|
22185
|
+
name: "variant",
|
|
22186
|
+
type: "'field' | 'bare'",
|
|
22187
|
+
required: false,
|
|
22188
|
+
default: "'field'",
|
|
22189
|
+
description: "field is a form field; bare edits in place on a rendered page with a floating (or docked) toolbar"
|
|
22190
|
+
},
|
|
22191
|
+
{
|
|
22192
|
+
name: "singleLine",
|
|
22193
|
+
type: "boolean",
|
|
22194
|
+
required: false,
|
|
22195
|
+
default: "false",
|
|
22196
|
+
description: "One paragraph only, no lists; Enter calls onEnter"
|
|
22197
|
+
},
|
|
22198
|
+
{
|
|
22199
|
+
name: "as",
|
|
22200
|
+
type: "'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
|
|
22201
|
+
required: false,
|
|
22202
|
+
default: "'p'",
|
|
22203
|
+
description: "Element the paragraph renders as, e.g. h2 to edit a heading in place"
|
|
22204
|
+
},
|
|
22205
|
+
{
|
|
22206
|
+
name: "onEnter",
|
|
22207
|
+
type: "() => void",
|
|
22208
|
+
required: false,
|
|
22209
|
+
description: "Enter in a single-line editor, e.g. move on to the next block"
|
|
22210
|
+
},
|
|
22211
|
+
{
|
|
22212
|
+
name: "onDeleteEmpty",
|
|
22213
|
+
type: "() => void",
|
|
22214
|
+
required: false,
|
|
22215
|
+
description: "Backspace while the editor is empty, e.g. remove the block"
|
|
22216
|
+
},
|
|
22217
|
+
{
|
|
22218
|
+
name: "onExit",
|
|
22219
|
+
type: "(direction: 'up' | 'down') => boolean | void",
|
|
22220
|
+
required: false,
|
|
22221
|
+
description: "Arrow keys past the first or last line; return false to decline"
|
|
22222
|
+
},
|
|
22223
|
+
{
|
|
22224
|
+
name: "class",
|
|
22225
|
+
type: "string",
|
|
22226
|
+
required: false,
|
|
22227
|
+
description: "Additional CSS classes"
|
|
22228
|
+
}
|
|
22229
|
+
],
|
|
22230
|
+
features: [
|
|
22231
|
+
"Markdown in and out in the house style (proseToMarkdown)",
|
|
22232
|
+
"Keyboard: Mod-B/I/E bold/italic/code, Mod-K link, Shift-Enter line break, Tab/Shift-Tab list indent",
|
|
22233
|
+
"Typing '- ' or '1. ' starts a list",
|
|
22234
|
+
"Links limited to http(s), mailto, tel and relative addresses",
|
|
22235
|
+
"focus({ x, y }) places the caret at a point on screen",
|
|
22236
|
+
"Under setProseToolbar(createProseToolbar()), bare editors lend their tools to a docked ProseToolbar"
|
|
22237
|
+
],
|
|
22238
|
+
example: `<script lang="ts">
|
|
22239
|
+
import { ProseEditor } from '@classic-homes/theme-docs';
|
|
22240
|
+
import { isProseMarkdown } from '@classic-homes/theme-docs/prose';
|
|
22241
|
+
|
|
22242
|
+
let body = $state('Open **Start**, then *Settings*.');
|
|
22243
|
+
</script>
|
|
22244
|
+
|
|
22245
|
+
{#if isProseMarkdown(body)}
|
|
22246
|
+
<ProseEditor label="Body" value={body} onChange={(md) => (body = md)} />
|
|
22247
|
+
{/if}`
|
|
22248
|
+
},
|
|
22249
|
+
{
|
|
22250
|
+
name: "ProseToolbar",
|
|
22251
|
+
description: 'Formatting buttons docked outside the text for in-place (variant="bare") ProseEditors. Acts on whichever editor has focus; with none, every button is shown disabled so the bar never changes size. Needs setProseToolbar(createProseToolbar()) in a parent component.',
|
|
22252
|
+
category: "content",
|
|
22253
|
+
props: [
|
|
22254
|
+
{
|
|
22255
|
+
name: "label",
|
|
22256
|
+
type: "string",
|
|
22257
|
+
required: false,
|
|
22258
|
+
default: "'Formatting'",
|
|
22259
|
+
description: "Accessible name for the toolbar group"
|
|
22260
|
+
},
|
|
22261
|
+
{
|
|
22262
|
+
name: "class",
|
|
22263
|
+
type: "string",
|
|
22264
|
+
required: false,
|
|
22265
|
+
description: "Additional CSS classes"
|
|
22266
|
+
}
|
|
22267
|
+
],
|
|
22268
|
+
features: [
|
|
22269
|
+
"Shares one toolbar between many bare ProseEditors",
|
|
22270
|
+
"Stable layout: unavailable tools stay in place, disabled"
|
|
22271
|
+
],
|
|
22272
|
+
example: `<script lang="ts">
|
|
22273
|
+
import { ProseEditor, ProseToolbar, createProseToolbar, setProseToolbar } from '@classic-homes/theme-docs';
|
|
22274
|
+
|
|
22275
|
+
setProseToolbar(createProseToolbar());
|
|
22276
|
+
let title = $state('Getting started');
|
|
22277
|
+
</script>
|
|
22278
|
+
|
|
22279
|
+
<ProseToolbar class="sticky top-0" />
|
|
22280
|
+
<ProseEditor variant="bare" singleLine as="h1" label="Title" value={title} onChange={(md) => (title = md)} />`
|
|
22281
|
+
},
|
|
22053
22282
|
{
|
|
22054
22283
|
name: "CodeBlock",
|
|
22055
22284
|
description: "Standalone syntax-highlighted code block using Shiki",
|
|
@@ -23293,9 +23522,18 @@ var docs_catalog_default = {
|
|
|
23293
23522
|
dependencies: {
|
|
23294
23523
|
"@classic-homes/theme-tokens": "*",
|
|
23295
23524
|
clsx: "^2.1.0",
|
|
23525
|
+
dompurify: "3.4.16",
|
|
23296
23526
|
"js-yaml": "^4.3.2",
|
|
23297
23527
|
marked: "^17.0.0",
|
|
23298
23528
|
minisearch: "7.2.0",
|
|
23529
|
+
"prosemirror-commands": "1.7.2",
|
|
23530
|
+
"prosemirror-history": "1.5.1",
|
|
23531
|
+
"prosemirror-inputrules": "1.5.1",
|
|
23532
|
+
"prosemirror-keymap": "1.2.3",
|
|
23533
|
+
"prosemirror-model": "1.25.12",
|
|
23534
|
+
"prosemirror-schema-list": "1.5.1",
|
|
23535
|
+
"prosemirror-state": "1.4.4",
|
|
23536
|
+
"prosemirror-view": "1.42.6",
|
|
23299
23537
|
"sanitize-html": "2.18.0",
|
|
23300
23538
|
shiki: "^1.0.0",
|
|
23301
23539
|
"tailwind-merge": "^2.2.0",
|
|
@@ -23459,7 +23697,7 @@ function registerDocsResources(server) {
|
|
|
23459
23697
|
|
|
23460
23698
|
// src/data/charts-catalog.json
|
|
23461
23699
|
var charts_catalog_default = {
|
|
23462
|
-
version: "0.3.
|
|
23700
|
+
version: "0.3.4",
|
|
23463
23701
|
packageName: "@classic-homes/charts-core",
|
|
23464
23702
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
23465
23703
|
subpackages: {
|
|
@@ -23538,6 +23776,16 @@ var charts_catalog_default = {
|
|
|
23538
23776
|
name: "createTooltipFormatter",
|
|
23539
23777
|
signature: "(options?: { showSeriesName?: boolean; valueFormatter?: (value: number) => string; showPercent?: boolean }) => TooltipFormatter",
|
|
23540
23778
|
description: "Create an ECharts-compatible tooltip formatter function"
|
|
23779
|
+
},
|
|
23780
|
+
{
|
|
23781
|
+
name: "escapeHtml",
|
|
23782
|
+
signature: "(value: unknown) => string",
|
|
23783
|
+
description: "Escape a value for HTML. Use it on user data in custom function tooltip formatters, whose output ECharts renders as innerHTML"
|
|
23784
|
+
},
|
|
23785
|
+
{
|
|
23786
|
+
name: "getReplaceMerge",
|
|
23787
|
+
signature: "(prev: object | null | undefined, next: object, isComponentType: (mainType: string) => boolean) => string[]",
|
|
23788
|
+
description: "replaceMerge list for setOption when a complete option supersedes the previous one: always series and graphic, plus component types that were removed or shrank. Pass echarts.ComponentModel.hasClass as isComponentType. Keeps legend selection and dataZoom state, unlike notMerge"
|
|
23541
23789
|
}
|
|
23542
23790
|
]
|
|
23543
23791
|
},
|
|
@@ -23609,6 +23857,26 @@ var charts_catalog_default = {
|
|
|
23609
23857
|
name: "THEME_DARK",
|
|
23610
23858
|
signature: "'classic-dark'",
|
|
23611
23859
|
description: "Theme name constant"
|
|
23860
|
+
},
|
|
23861
|
+
{
|
|
23862
|
+
name: "getChartColors",
|
|
23863
|
+
signature: "(themeName: string) => ChartSemanticColors",
|
|
23864
|
+
description: "Token-derived per-element chart colours (series palette, foreground, mutedForeground, axisPointerLabel, divider, success, destructive) for THEME_LIGHT or THEME_DARK"
|
|
23865
|
+
},
|
|
23866
|
+
{
|
|
23867
|
+
name: "lightChartColors",
|
|
23868
|
+
signature: "ChartSemanticColors",
|
|
23869
|
+
description: "Semantic chart colours for the light theme"
|
|
23870
|
+
},
|
|
23871
|
+
{
|
|
23872
|
+
name: "darkChartColors",
|
|
23873
|
+
signature: "ChartSemanticColors",
|
|
23874
|
+
description: "Semantic chart colours for the dark theme"
|
|
23875
|
+
},
|
|
23876
|
+
{
|
|
23877
|
+
name: "colorWithAlpha",
|
|
23878
|
+
signature: "(color: string, alpha: number) => string",
|
|
23879
|
+
description: "Convert a #rgb/#rrggbb colour to rgba() with the given alpha; other colour strings are returned unchanged"
|
|
23612
23880
|
}
|
|
23613
23881
|
]
|
|
23614
23882
|
}
|
|
@@ -25199,6 +25467,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
|
|
|
25199
25467
|
- \`darkTheme\` - Pre-generated dark theme
|
|
25200
25468
|
- \`THEME_LIGHT\` - Constant: 'classic-light'
|
|
25201
25469
|
- \`THEME_DARK\` - Constant: 'classic-dark'
|
|
25470
|
+
- \`getChartColors(themeName)\` - Token-derived per-element colours for a theme
|
|
25471
|
+
- \`colorWithAlpha(color, alpha)\` - Hex colour to rgba()
|
|
25202
25472
|
|
|
25203
25473
|
## Formatting Utilities
|
|
25204
25474
|
|
|
@@ -25208,6 +25478,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
|
|
|
25208
25478
|
- \`formatDate(date, options?, locale?)\` - Format date
|
|
25209
25479
|
- \`abbreviateNumber(value, decimals?)\` - Abbreviate to K/M/B/T
|
|
25210
25480
|
- \`createTooltipFormatter(options?)\` - Create ECharts tooltip formatter
|
|
25481
|
+
- \`escapeHtml(value)\` - Escape user data in custom tooltip formatters
|
|
25482
|
+
- \`getReplaceMerge(prev, next, isComponentType)\` - setOption replaceMerge list that drops removed series/components but keeps legend and dataZoom state
|
|
25211
25483
|
|
|
25212
25484
|
## Accessibility Utilities
|
|
25213
25485
|
|
|
@@ -25296,7 +25568,7 @@ interface SankeyData {
|
|
|
25296
25568
|
|
|
25297
25569
|
// src/data/maps-catalog.json
|
|
25298
25570
|
var maps_catalog_default = {
|
|
25299
|
-
version: "0.3.
|
|
25571
|
+
version: "0.3.4",
|
|
25300
25572
|
packageName: "@classic-homes/maps-core",
|
|
25301
25573
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
25302
25574
|
subpackages: {
|
|
@@ -30627,7 +30899,7 @@ ${catalog5.quickReference.tailwindConfig}
|
|
|
30627
30899
|
|
|
30628
30900
|
// src/data/native-catalog.json
|
|
30629
30901
|
var native_catalog_default = {
|
|
30630
|
-
version: "0.3.
|
|
30902
|
+
version: "0.3.4",
|
|
30631
30903
|
packageName: "@classic-homes/native",
|
|
30632
30904
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
30633
30905
|
subpackages: {
|
|
@@ -32347,19 +32619,10 @@ function registerResources(server) {
|
|
|
32347
32619
|
// src/tools/searchComponents.ts
|
|
32348
32620
|
import { z } from "zod";
|
|
32349
32621
|
var catalog7 = component_catalog_default;
|
|
32622
|
+
var categories = [...new Set(catalog7.components.map((c) => c.category))].sort();
|
|
32350
32623
|
var SearchComponentsSchema = z.object({
|
|
32351
32624
|
query: z.string().describe("Search query (component name, description, or functionality)"),
|
|
32352
|
-
category: z.enum(
|
|
32353
|
-
"core",
|
|
32354
|
-
"form",
|
|
32355
|
-
"layout",
|
|
32356
|
-
"feedback",
|
|
32357
|
-
"data",
|
|
32358
|
-
"overlay",
|
|
32359
|
-
"navigation",
|
|
32360
|
-
"branding",
|
|
32361
|
-
"chart"
|
|
32362
|
-
]).optional().describe("Filter by component category"),
|
|
32625
|
+
category: z.enum(categories).optional().describe("Filter by component category"),
|
|
32363
32626
|
limit: z.number().min(1).max(50).default(10).describe("Maximum number of results")
|
|
32364
32627
|
});
|
|
32365
32628
|
function registerSearchComponentsTool(server) {
|
|
@@ -32503,34 +32766,15 @@ function registerGetComponentPropsTool(server) {
|
|
|
32503
32766
|
// src/tools/suggestPattern.ts
|
|
32504
32767
|
import { z as z3 } from "zod";
|
|
32505
32768
|
var patterns2 = pattern_library_default;
|
|
32769
|
+
var patternIds = [
|
|
32770
|
+
...patterns2.layouts,
|
|
32771
|
+
...patterns2.forms,
|
|
32772
|
+
...patterns2.auth ?? [],
|
|
32773
|
+
...patterns2.notifications ?? [],
|
|
32774
|
+
...patterns2.panels ?? []
|
|
32775
|
+
].map((p) => p.id);
|
|
32506
32776
|
var SuggestPatternSchema = z3.object({
|
|
32507
|
-
useCase: z3.enum(
|
|
32508
|
-
// Layout patterns
|
|
32509
|
-
"dashboard-page",
|
|
32510
|
-
"public-page",
|
|
32511
|
-
"auth-page",
|
|
32512
|
-
"error-page",
|
|
32513
|
-
"form-page",
|
|
32514
|
-
// Form patterns
|
|
32515
|
-
"login-form",
|
|
32516
|
-
"registration-form",
|
|
32517
|
-
"contact-form",
|
|
32518
|
-
// MFA and password form patterns
|
|
32519
|
-
"mfa-verification-form",
|
|
32520
|
-
"mfa-setup-form",
|
|
32521
|
-
"profile-update-form",
|
|
32522
|
-
"change-password-form",
|
|
32523
|
-
"forgot-password-form",
|
|
32524
|
-
"reset-password-form",
|
|
32525
|
-
// Auth flow patterns
|
|
32526
|
-
"login-with-mfa",
|
|
32527
|
-
"sso-login",
|
|
32528
|
-
"session-management",
|
|
32529
|
-
"protected-route",
|
|
32530
|
-
// Notification patterns
|
|
32531
|
-
"notification-center",
|
|
32532
|
-
"notification-dropdown"
|
|
32533
|
-
]).describe("The use case you need a pattern for"),
|
|
32777
|
+
useCase: z3.enum(patternIds).describe("The use case you need a pattern for"),
|
|
32534
32778
|
requirements: z3.array(z3.string()).optional().describe("Additional requirements or constraints")
|
|
32535
32779
|
});
|
|
32536
32780
|
function registerSuggestPatternTool(server) {
|
|
@@ -32544,7 +32788,8 @@ function registerSuggestPatternTool(server) {
|
|
|
32544
32788
|
const form = patterns2.forms.find((f) => f.id === useCase);
|
|
32545
32789
|
const auth = patterns2.auth?.find((a) => a.id === useCase);
|
|
32546
32790
|
const notification = patterns2.notifications?.find((n) => n.id === useCase);
|
|
32547
|
-
const
|
|
32791
|
+
const panel = patterns2.panels?.find((p) => p.id === useCase);
|
|
32792
|
+
const pattern = layout || form || auth || notification || panel;
|
|
32548
32793
|
if (!pattern) {
|
|
32549
32794
|
const availablePatterns = [
|
|
32550
32795
|
...patterns2.layouts.map((l) => ({ id: l.id, type: "layout", name: l.name })),
|
|
@@ -32554,7 +32799,8 @@ function registerSuggestPatternTool(server) {
|
|
|
32554
32799
|
id: n.id,
|
|
32555
32800
|
type: "notification",
|
|
32556
32801
|
name: n.name
|
|
32557
|
-
})) || []
|
|
32802
|
+
})) || [],
|
|
32803
|
+
...patterns2.panels?.map((p) => ({ id: p.id, type: "panel", name: p.name })) || []
|
|
32558
32804
|
];
|
|
32559
32805
|
return {
|
|
32560
32806
|
content: [
|
|
@@ -32606,6 +32852,18 @@ var ValidateUsageSchema = z4.object({
|
|
|
32606
32852
|
props: z4.record(z4.unknown()).describe("Props being passed to the component"),
|
|
32607
32853
|
context: z4.string().optional().describe('Where the component is being used (e.g., "inside a form", "in modal")')
|
|
32608
32854
|
});
|
|
32855
|
+
var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
32856
|
+
"class",
|
|
32857
|
+
"children",
|
|
32858
|
+
"id",
|
|
32859
|
+
"style",
|
|
32860
|
+
"title",
|
|
32861
|
+
"role",
|
|
32862
|
+
"tabindex"
|
|
32863
|
+
]);
|
|
32864
|
+
function isPassThroughAttribute(name) {
|
|
32865
|
+
return GLOBAL_ATTRIBUTES.has(name) || /^(aria-|data-|on[a-z])/.test(name);
|
|
32866
|
+
}
|
|
32609
32867
|
function registerValidateUsageTool(server) {
|
|
32610
32868
|
server.tool(
|
|
32611
32869
|
"validate_component_usage",
|
|
@@ -32636,7 +32894,7 @@ function registerValidateUsageTool(server) {
|
|
|
32636
32894
|
const issues = [];
|
|
32637
32895
|
const knownProps = new Set(component.props.map((p) => p.name));
|
|
32638
32896
|
for (const propName of Object.keys(props)) {
|
|
32639
|
-
if (!knownProps.has(propName) && propName
|
|
32897
|
+
if (!knownProps.has(propName) && !isPassThroughAttribute(propName)) {
|
|
32640
32898
|
issues.push({
|
|
32641
32899
|
type: "warning",
|
|
32642
32900
|
message: `Unknown prop "${propName}" - not in component API`,
|
|
@@ -33002,7 +33260,7 @@ function registerPrompts(server) {
|
|
|
33002
33260
|
// package.json
|
|
33003
33261
|
var package_default = {
|
|
33004
33262
|
name: "@classic-homes/theme-mcp",
|
|
33005
|
-
version: "0.3.
|
|
33263
|
+
version: "0.3.4",
|
|
33006
33264
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
33007
33265
|
type: "module",
|
|
33008
33266
|
main: "dist/index.js",
|
|
@@ -33052,7 +33310,7 @@ var package_default = {
|
|
|
33052
33310
|
start: "node dist/cli.js",
|
|
33053
33311
|
typecheck: "tsc --noEmit",
|
|
33054
33312
|
validate: "tsx scripts/validate-catalog-integrity.ts",
|
|
33055
|
-
test: "npm run validate",
|
|
33313
|
+
test: "npm run validate && vitest run",
|
|
33056
33314
|
clean: "node ../../scripts/rm.mjs dist",
|
|
33057
33315
|
prepublishOnly: "npm run build"
|
|
33058
33316
|
},
|