@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 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.3.3",
14
+ version: "0.3.4",
15
15
  components: [
16
16
  {
17
17
  name: "ActionHeader",
@@ -809,19 +809,7 @@ var component_catalog_default = {
809
809
  description: "Additional CSS classes for the content box"
810
810
  }
811
811
  ],
812
- variants: [
813
- {
814
- name: "ratio",
815
- values: [
816
- "square",
817
- "video",
818
- "photo",
819
- "portrait",
820
- "wide"
821
- ],
822
- default: "video"
823
- }
824
- ],
812
+ variants: [],
825
813
  slots: [
826
814
  {
827
815
  name: "children",
@@ -1920,8 +1908,56 @@ var component_catalog_default = {
1920
1908
  description: "Container component for grouping related content",
1921
1909
  category: "layout",
1922
1910
  importPath: "@classic-homes/theme-svelte",
1923
- props: [],
1924
- variants: [],
1911
+ props: [
1912
+ {
1913
+ name: "variant",
1914
+ type: "'default' | 'featured' | 'highlight' | 'warning'",
1915
+ default: "'default'",
1916
+ required: false,
1917
+ description: "Card style variant"
1918
+ },
1919
+ {
1920
+ name: "borderColor",
1921
+ type: "'default' | 'primary' | 'muted'",
1922
+ default: "'default'",
1923
+ required: false,
1924
+ description: "Border color (ignored for highlight/warning)"
1925
+ },
1926
+ {
1927
+ name: "interactive",
1928
+ type: "boolean",
1929
+ default: "false",
1930
+ required: false,
1931
+ description: "Enables hover shadow effect"
1932
+ },
1933
+ {
1934
+ name: "class",
1935
+ type: "string",
1936
+ required: false,
1937
+ description: "Additional CSS classes"
1938
+ }
1939
+ ],
1940
+ variants: [
1941
+ {
1942
+ name: "variant",
1943
+ values: [
1944
+ "default",
1945
+ "featured",
1946
+ "highlight",
1947
+ "warning"
1948
+ ],
1949
+ default: "default"
1950
+ },
1951
+ {
1952
+ name: "borderColor",
1953
+ values: [
1954
+ "default",
1955
+ "primary",
1956
+ "muted"
1957
+ ],
1958
+ default: "default"
1959
+ }
1960
+ ],
1925
1961
  slots: [
1926
1962
  {
1927
1963
  name: "children",
@@ -2789,6 +2825,114 @@ var component_catalog_default = {
2789
2825
  "Label"
2790
2826
  ]
2791
2827
  },
2828
+ {
2829
+ name: "CodeField",
2830
+ description: "Monospaced text area for code, markup or diagram source, where Tab indents",
2831
+ category: "form",
2832
+ importPath: "@classic-homes/theme-svelte",
2833
+ props: [
2834
+ {
2835
+ name: "value",
2836
+ type: "string",
2837
+ default: "''",
2838
+ required: false,
2839
+ description: "The text (bindable)"
2840
+ },
2841
+ {
2842
+ name: "label",
2843
+ type: "string",
2844
+ required: false,
2845
+ description: "Accessible name; or use `aria-labelledby`"
2846
+ },
2847
+ {
2848
+ name: "id",
2849
+ type: "string",
2850
+ required: false,
2851
+ description: "For a visible `<Label for>`"
2852
+ },
2853
+ {
2854
+ name: "rows",
2855
+ type: "number",
2856
+ default: "8",
2857
+ required: false,
2858
+ description: "Visible lines"
2859
+ },
2860
+ {
2861
+ name: "indent",
2862
+ type: "number",
2863
+ default: "2",
2864
+ required: false,
2865
+ description: "Spaces per indent level"
2866
+ },
2867
+ {
2868
+ name: "wrap",
2869
+ type: "boolean",
2870
+ default: "false",
2871
+ required: false,
2872
+ description: "Soft-wrap long lines instead of scrolling sideways"
2873
+ },
2874
+ {
2875
+ name: "placeholder",
2876
+ type: "string",
2877
+ required: false,
2878
+ description: "Placeholder text"
2879
+ },
2880
+ {
2881
+ name: "disabled",
2882
+ type: "boolean",
2883
+ default: "false",
2884
+ required: false,
2885
+ description: "Disable the field"
2886
+ },
2887
+ {
2888
+ name: "readonly",
2889
+ type: "boolean",
2890
+ default: "false",
2891
+ required: false,
2892
+ description: "Read only; Tab moves focus as usual"
2893
+ },
2894
+ {
2895
+ name: "aria-invalid",
2896
+ type: "boolean",
2897
+ required: false,
2898
+ description: "Error styling"
2899
+ },
2900
+ {
2901
+ name: "aria-describedby",
2902
+ type: "string",
2903
+ required: false,
2904
+ description: "Extra description ids (the Tab hint is always added)"
2905
+ },
2906
+ {
2907
+ name: "onValueChange",
2908
+ type: "(value: string) => void",
2909
+ required: false,
2910
+ description: "Called on every change"
2911
+ }
2912
+ ],
2913
+ variants: [],
2914
+ slots: [
2915
+ {
2916
+ name: "children",
2917
+ description: "Main content",
2918
+ required: false
2919
+ }
2920
+ ],
2921
+ events: [],
2922
+ examples: [
2923
+ {
2924
+ title: "Basic Usage",
2925
+ code: `<script>
2926
+ import { CodeField } from '@classic-homes/theme-svelte';
2927
+
2928
+ let source = $state('flowchart TD\\n A --> B');
2929
+ </script>
2930
+
2931
+ <CodeField label="Diagram source" bind:value={source} rows={6} />`
2932
+ }
2933
+ ],
2934
+ relatedComponents: []
2935
+ },
2792
2936
  {
2793
2937
  name: "Combobox",
2794
2938
  description: "Searchable select with async loading support",
@@ -3874,13 +4018,6 @@ var component_catalog_default = {
3874
4018
  "desc"
3875
4019
  ],
3876
4020
  default: "asc"
3877
- },
3878
- {
3879
- name: "onSort",
3880
- values: [
3881
- "asc",
3882
- "desc"
3883
- ]
3884
4021
  }
3885
4022
  ],
3886
4023
  slots: [
@@ -6553,15 +6690,6 @@ var component_catalog_default = {
6553
6690
  "lg"
6554
6691
  ],
6555
6692
  default: "lg"
6556
- },
6557
- {
6558
- name: "maxWidth",
6559
- values: [
6560
- "none",
6561
- "sm",
6562
- "7xl"
6563
- ],
6564
- default: "none"
6565
6693
  }
6566
6694
  ],
6567
6695
  slots: [
@@ -7149,16 +7277,6 @@ var component_catalog_default = {
7149
7277
  }
7150
7278
  ],
7151
7279
  variants: [
7152
- {
7153
- name: "ratio",
7154
- values: [
7155
- "square",
7156
- "video",
7157
- "photo",
7158
- "portrait",
7159
- "wide"
7160
- ]
7161
- },
7162
7280
  {
7163
7281
  name: "fit",
7164
7282
  values: [
@@ -8621,19 +8739,7 @@ var component_catalog_default = {
8621
8739
  description: "Additional CSS classes"
8622
8740
  }
8623
8741
  ],
8624
- variants: [
8625
- {
8626
- name: "ratio",
8627
- values: [
8628
- "square",
8629
- "video",
8630
- "photo",
8631
- "portrait",
8632
- "wide"
8633
- ],
8634
- default: "video"
8635
- }
8636
- ],
8742
+ variants: [],
8637
8743
  slots: [
8638
8744
  {
8639
8745
  name: "children",
@@ -8790,17 +8896,6 @@ var component_catalog_default = {
8790
8896
  "cloudflare",
8791
8897
  "matterport"
8792
8898
  ]
8793
- },
8794
- {
8795
- name: "ratio",
8796
- values: [
8797
- "square",
8798
- "video",
8799
- "photo",
8800
- "portrait",
8801
- "wide"
8802
- ],
8803
- default: "video"
8804
8899
  }
8805
8900
  ],
8806
8901
  slots: [
@@ -8920,17 +9015,6 @@ var component_catalog_default = {
8920
9015
  "lg"
8921
9016
  ],
8922
9017
  default: "md"
8923
- },
8924
- {
8925
- name: "ratio",
8926
- values: [
8927
- "square",
8928
- "video",
8929
- "photo",
8930
- "portrait",
8931
- "wide"
8932
- ],
8933
- default: "square"
8934
9018
  }
8935
9019
  ],
8936
9020
  slots: [
@@ -14532,17 +14616,6 @@ var component_catalog_default = {
14532
14616
  }
14533
14617
  ],
14534
14618
  variants: [
14535
- {
14536
- name: "ratio",
14537
- values: [
14538
- "square",
14539
- "video",
14540
- "photo",
14541
- "portrait",
14542
- "wide"
14543
- ],
14544
- default: "video"
14545
- },
14546
14619
  {
14547
14620
  name: "fit",
14548
14621
  values: [
@@ -14751,7 +14824,7 @@ function registerComponentResources(server) {
14751
14824
 
14752
14825
  // src/data/token-definitions.json
14753
14826
  var token_definitions_default = {
14754
- version: "0.3.3",
14827
+ version: "0.3.4",
14755
14828
  colors: {
14756
14829
  brand: [
14757
14830
  {
@@ -15734,7 +15807,7 @@ function registerTokenResources(server) {
15734
15807
 
15735
15808
  // src/data/styles-catalog.json
15736
15809
  var styles_catalog_default = {
15737
- version: "0.3.3",
15810
+ version: "0.3.4",
15738
15811
  package: "@classic-homes/theme-styles",
15739
15812
  description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
15740
15813
  integration: {
@@ -16117,7 +16190,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
16117
16190
 
16118
16191
  // src/data/pattern-library.json
16119
16192
  var pattern_library_default = {
16120
- version: "0.3.3",
16193
+ version: "0.3.4",
16121
16194
  layouts: [
16122
16195
  {
16123
16196
  id: "dashboard-page",
@@ -17211,7 +17284,7 @@ function registerLayoutResources(server) {
17211
17284
 
17212
17285
  // src/data/schema-catalog.json
17213
17286
  var schema_catalog_default = {
17214
- version: "0.3.3",
17287
+ version: "0.3.4",
17215
17288
  packageName: "@classic-homes/theme-svelte",
17216
17289
  importPath: "@classic-homes/theme-svelte",
17217
17290
  generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
@@ -18019,7 +18092,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
18019
18092
 
18020
18093
  // src/data/auth-catalog.json
18021
18094
  var auth_catalog_default = {
18022
- version: "0.3.3",
18095
+ version: "0.3.4",
18023
18096
  packageName: "@classic-homes/auth",
18024
18097
  description: "Authentication services and Svelte bindings for Classic Theme apps",
18025
18098
  subpackages: {
@@ -21056,7 +21129,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
21056
21129
 
21057
21130
  // src/data/notifications-catalog.json
21058
21131
  var notifications_catalog_default = {
21059
- version: "0.3.3",
21132
+ version: "0.3.4",
21060
21133
  packageName: "@classic-homes/notifications",
21061
21134
  description: "Notification services and Svelte bindings for Classic Theme apps",
21062
21135
  subpackages: {
@@ -21167,7 +21240,7 @@ var notifications_catalog_default = {
21167
21240
  {
21168
21241
  name: "getNotificationIconColor",
21169
21242
  signature: "(type: NotificationType) => string",
21170
- description: "Get the Tailwind color class for a notification type (security\u2192text-red-500, system\u2192text-blue-500, feature\u2192text-purple-500, update\u2192text-green-500, alert\u2192text-yellow-500, info\u2192text-gray-500)"
21243
+ 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)"
21171
21244
  },
21172
21245
  {
21173
21246
  name: "getPriorityBadgeVariant",
@@ -21949,7 +22022,7 @@ function registerNotificationsResources(server) {
21949
22022
  description: "Direct API access without Svelte store"
21950
22023
  },
21951
22024
  utilities: {
21952
- code: "import {\n getNotificationIconName,\n getNotificationIconColor,\n getPriorityBadgeVariant,\n formatRelativeTime,\n} from '@classic-homes/notifications/core';\n\ngetNotificationIconName('security'); // 'shield'\ngetNotificationIconColor('security'); // 'text-red-500'\ngetPriorityBadgeVariant('urgent'); // 'destructive'\nformatRelativeTime('2024-01-22T10:00:00Z'); // '2h ago'",
22025
+ 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'",
21953
22026
  description: "Utility functions for display"
21954
22027
  },
21955
22028
  preferences: {
@@ -21968,7 +22041,7 @@ function registerNotificationsResources(server) {
21968
22041
 
21969
22042
  // src/data/docs-catalog.json
21970
22043
  var docs_catalog_default = {
21971
- version: "0.3.3",
22044
+ version: "0.3.4",
21972
22045
  packageName: "@classic-homes/theme-docs",
21973
22046
  description: "Markdown documentation components for the Classic theme system",
21974
22047
  exports: {
@@ -21980,10 +22053,18 @@ var docs_catalog_default = {
21980
22053
  importPath: "@classic-homes/theme-docs/parser",
21981
22054
  description: "Markdown pipeline without Svelte imports (parseMarkdown, extractToc, createSlugger, extensions) for Node build scripts, server loaders and CMS previews"
21982
22055
  },
22056
+ "./prose": {
22057
+ importPath: "@classic-homes/theme-docs/prose",
22058
+ description: "Subpath export for prose"
22059
+ },
21983
22060
  "./sanitize": {
21984
22061
  importPath: "@classic-homes/theme-docs/sanitize",
21985
22062
  description: "sanitizeDocsHtml: allowlist sanitizer for parseMarkdown output (server/build-time only)"
21986
22063
  },
22064
+ "./sanitize/browser": {
22065
+ importPath: "@classic-homes/theme-docs/sanitize/browser",
22066
+ description: "Subpath export for sanitize/browser"
22067
+ },
21987
22068
  "./content": {
21988
22069
  importPath: "@classic-homes/theme-docs/content",
21989
22070
  description: "loadDocs/renderDocs: a Docusaurus-style docs directory as routes, autogenerated sidebars, generated-index pages, tags and rendered HTML (Node, build time)"
@@ -22055,6 +22136,154 @@ var docs_catalog_default = {
22055
22136
  ],
22056
22137
  example: '<MarkdownPage content={markdownString} theme="github-dark">\n {#snippet header(frontmatter)}\n <h1>{frontmatter.title}</h1>\n {/snippet}\n</MarkdownPage>'
22057
22138
  },
22139
+ {
22140
+ name: "ProseEditor",
22141
+ 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.",
22142
+ category: "content",
22143
+ props: [
22144
+ {
22145
+ name: "value",
22146
+ type: "string",
22147
+ required: true,
22148
+ description: "Markdown. Changes from outside replace the content."
22149
+ },
22150
+ {
22151
+ name: "onChange",
22152
+ type: "(markdown: string, doc: ProseNode) => void",
22153
+ required: false,
22154
+ description: "Called on every edit with the new markdown and the document behind it"
22155
+ },
22156
+ {
22157
+ name: "label",
22158
+ type: "string",
22159
+ required: true,
22160
+ description: "Accessible name for the text area"
22161
+ },
22162
+ {
22163
+ name: "placeholder",
22164
+ type: "string",
22165
+ required: false,
22166
+ description: "Placeholder shown while empty"
22167
+ },
22168
+ {
22169
+ name: "hardBreak",
22170
+ type: "'backslash' | 'html'",
22171
+ required: false,
22172
+ default: "'backslash'",
22173
+ description: "How line breaks are written; html for single-line contexts such as table cells"
22174
+ },
22175
+ {
22176
+ name: "inline",
22177
+ type: "boolean",
22178
+ required: false,
22179
+ default: "false",
22180
+ description: "Hide list buttons, for fields where a list makes no sense"
22181
+ },
22182
+ {
22183
+ name: "disabled",
22184
+ type: "boolean",
22185
+ required: false,
22186
+ default: "false",
22187
+ description: "Read-only"
22188
+ },
22189
+ {
22190
+ name: "variant",
22191
+ type: "'field' | 'bare'",
22192
+ required: false,
22193
+ default: "'field'",
22194
+ description: "field is a form field; bare edits in place on a rendered page with a floating (or docked) toolbar"
22195
+ },
22196
+ {
22197
+ name: "singleLine",
22198
+ type: "boolean",
22199
+ required: false,
22200
+ default: "false",
22201
+ description: "One paragraph only, no lists; Enter calls onEnter"
22202
+ },
22203
+ {
22204
+ name: "as",
22205
+ type: "'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
22206
+ required: false,
22207
+ default: "'p'",
22208
+ description: "Element the paragraph renders as, e.g. h2 to edit a heading in place"
22209
+ },
22210
+ {
22211
+ name: "onEnter",
22212
+ type: "() => void",
22213
+ required: false,
22214
+ description: "Enter in a single-line editor, e.g. move on to the next block"
22215
+ },
22216
+ {
22217
+ name: "onDeleteEmpty",
22218
+ type: "() => void",
22219
+ required: false,
22220
+ description: "Backspace while the editor is empty, e.g. remove the block"
22221
+ },
22222
+ {
22223
+ name: "onExit",
22224
+ type: "(direction: 'up' | 'down') => boolean | void",
22225
+ required: false,
22226
+ description: "Arrow keys past the first or last line; return false to decline"
22227
+ },
22228
+ {
22229
+ name: "class",
22230
+ type: "string",
22231
+ required: false,
22232
+ description: "Additional CSS classes"
22233
+ }
22234
+ ],
22235
+ features: [
22236
+ "Markdown in and out in the house style (proseToMarkdown)",
22237
+ "Keyboard: Mod-B/I/E bold/italic/code, Mod-K link, Shift-Enter line break, Tab/Shift-Tab list indent",
22238
+ "Typing '- ' or '1. ' starts a list",
22239
+ "Links limited to http(s), mailto, tel and relative addresses",
22240
+ "focus({ x, y }) places the caret at a point on screen",
22241
+ "Under setProseToolbar(createProseToolbar()), bare editors lend their tools to a docked ProseToolbar"
22242
+ ],
22243
+ example: `<script lang="ts">
22244
+ import { ProseEditor } from '@classic-homes/theme-docs';
22245
+ import { isProseMarkdown } from '@classic-homes/theme-docs/prose';
22246
+
22247
+ let body = $state('Open **Start**, then *Settings*.');
22248
+ </script>
22249
+
22250
+ {#if isProseMarkdown(body)}
22251
+ <ProseEditor label="Body" value={body} onChange={(md) => (body = md)} />
22252
+ {/if}`
22253
+ },
22254
+ {
22255
+ name: "ProseToolbar",
22256
+ 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.',
22257
+ category: "content",
22258
+ props: [
22259
+ {
22260
+ name: "label",
22261
+ type: "string",
22262
+ required: false,
22263
+ default: "'Formatting'",
22264
+ description: "Accessible name for the toolbar group"
22265
+ },
22266
+ {
22267
+ name: "class",
22268
+ type: "string",
22269
+ required: false,
22270
+ description: "Additional CSS classes"
22271
+ }
22272
+ ],
22273
+ features: [
22274
+ "Shares one toolbar between many bare ProseEditors",
22275
+ "Stable layout: unavailable tools stay in place, disabled"
22276
+ ],
22277
+ example: `<script lang="ts">
22278
+ import { ProseEditor, ProseToolbar, createProseToolbar, setProseToolbar } from '@classic-homes/theme-docs';
22279
+
22280
+ setProseToolbar(createProseToolbar());
22281
+ let title = $state('Getting started');
22282
+ </script>
22283
+
22284
+ <ProseToolbar class="sticky top-0" />
22285
+ <ProseEditor variant="bare" singleLine as="h1" label="Title" value={title} onChange={(md) => (title = md)} />`
22286
+ },
22058
22287
  {
22059
22288
  name: "CodeBlock",
22060
22289
  description: "Standalone syntax-highlighted code block using Shiki",
@@ -23298,9 +23527,18 @@ var docs_catalog_default = {
23298
23527
  dependencies: {
23299
23528
  "@classic-homes/theme-tokens": "*",
23300
23529
  clsx: "^2.1.0",
23530
+ dompurify: "3.4.16",
23301
23531
  "js-yaml": "^4.3.2",
23302
23532
  marked: "^17.0.0",
23303
23533
  minisearch: "7.2.0",
23534
+ "prosemirror-commands": "1.7.2",
23535
+ "prosemirror-history": "1.5.1",
23536
+ "prosemirror-inputrules": "1.5.1",
23537
+ "prosemirror-keymap": "1.2.3",
23538
+ "prosemirror-model": "1.25.12",
23539
+ "prosemirror-schema-list": "1.5.1",
23540
+ "prosemirror-state": "1.4.4",
23541
+ "prosemirror-view": "1.42.6",
23304
23542
  "sanitize-html": "2.18.0",
23305
23543
  shiki: "^1.0.0",
23306
23544
  "tailwind-merge": "^2.2.0",
@@ -23464,7 +23702,7 @@ function registerDocsResources(server) {
23464
23702
 
23465
23703
  // src/data/charts-catalog.json
23466
23704
  var charts_catalog_default = {
23467
- version: "0.3.3",
23705
+ version: "0.3.4",
23468
23706
  packageName: "@classic-homes/charts-core",
23469
23707
  description: "Core utilities, types, and themes for Classic Theme chart components",
23470
23708
  subpackages: {
@@ -23543,6 +23781,16 @@ var charts_catalog_default = {
23543
23781
  name: "createTooltipFormatter",
23544
23782
  signature: "(options?: { showSeriesName?: boolean; valueFormatter?: (value: number) => string; showPercent?: boolean }) => TooltipFormatter",
23545
23783
  description: "Create an ECharts-compatible tooltip formatter function"
23784
+ },
23785
+ {
23786
+ name: "escapeHtml",
23787
+ signature: "(value: unknown) => string",
23788
+ description: "Escape a value for HTML. Use it on user data in custom function tooltip formatters, whose output ECharts renders as innerHTML"
23789
+ },
23790
+ {
23791
+ name: "getReplaceMerge",
23792
+ signature: "(prev: object | null | undefined, next: object, isComponentType: (mainType: string) => boolean) => string[]",
23793
+ 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"
23546
23794
  }
23547
23795
  ]
23548
23796
  },
@@ -23614,6 +23862,26 @@ var charts_catalog_default = {
23614
23862
  name: "THEME_DARK",
23615
23863
  signature: "'classic-dark'",
23616
23864
  description: "Theme name constant"
23865
+ },
23866
+ {
23867
+ name: "getChartColors",
23868
+ signature: "(themeName: string) => ChartSemanticColors",
23869
+ description: "Token-derived per-element chart colours (series palette, foreground, mutedForeground, axisPointerLabel, divider, success, destructive) for THEME_LIGHT or THEME_DARK"
23870
+ },
23871
+ {
23872
+ name: "lightChartColors",
23873
+ signature: "ChartSemanticColors",
23874
+ description: "Semantic chart colours for the light theme"
23875
+ },
23876
+ {
23877
+ name: "darkChartColors",
23878
+ signature: "ChartSemanticColors",
23879
+ description: "Semantic chart colours for the dark theme"
23880
+ },
23881
+ {
23882
+ name: "colorWithAlpha",
23883
+ signature: "(color: string, alpha: number) => string",
23884
+ description: "Convert a #rgb/#rrggbb colour to rgba() with the given alpha; other colour strings are returned unchanged"
23617
23885
  }
23618
23886
  ]
23619
23887
  }
@@ -25204,6 +25472,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
25204
25472
  - \`darkTheme\` - Pre-generated dark theme
25205
25473
  - \`THEME_LIGHT\` - Constant: 'classic-light'
25206
25474
  - \`THEME_DARK\` - Constant: 'classic-dark'
25475
+ - \`getChartColors(themeName)\` - Token-derived per-element colours for a theme
25476
+ - \`colorWithAlpha(color, alpha)\` - Hex colour to rgba()
25207
25477
 
25208
25478
  ## Formatting Utilities
25209
25479
 
@@ -25213,6 +25483,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
25213
25483
  - \`formatDate(date, options?, locale?)\` - Format date
25214
25484
  - \`abbreviateNumber(value, decimals?)\` - Abbreviate to K/M/B/T
25215
25485
  - \`createTooltipFormatter(options?)\` - Create ECharts tooltip formatter
25486
+ - \`escapeHtml(value)\` - Escape user data in custom tooltip formatters
25487
+ - \`getReplaceMerge(prev, next, isComponentType)\` - setOption replaceMerge list that drops removed series/components but keeps legend and dataZoom state
25216
25488
 
25217
25489
  ## Accessibility Utilities
25218
25490
 
@@ -25301,7 +25573,7 @@ interface SankeyData {
25301
25573
 
25302
25574
  // src/data/maps-catalog.json
25303
25575
  var maps_catalog_default = {
25304
- version: "0.3.3",
25576
+ version: "0.3.4",
25305
25577
  packageName: "@classic-homes/maps-core",
25306
25578
  description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
25307
25579
  subpackages: {
@@ -30632,7 +30904,7 @@ ${catalog5.quickReference.tailwindConfig}
30632
30904
 
30633
30905
  // src/data/native-catalog.json
30634
30906
  var native_catalog_default = {
30635
- version: "0.3.3",
30907
+ version: "0.3.4",
30636
30908
  packageName: "@classic-homes/native",
30637
30909
  description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
30638
30910
  subpackages: {
@@ -32352,19 +32624,10 @@ function registerResources(server) {
32352
32624
  // src/tools/searchComponents.ts
32353
32625
  import { z } from "zod";
32354
32626
  var catalog7 = component_catalog_default;
32627
+ var categories = [...new Set(catalog7.components.map((c) => c.category))].sort();
32355
32628
  var SearchComponentsSchema = z.object({
32356
32629
  query: z.string().describe("Search query (component name, description, or functionality)"),
32357
- category: z.enum([
32358
- "core",
32359
- "form",
32360
- "layout",
32361
- "feedback",
32362
- "data",
32363
- "overlay",
32364
- "navigation",
32365
- "branding",
32366
- "chart"
32367
- ]).optional().describe("Filter by component category"),
32630
+ category: z.enum(categories).optional().describe("Filter by component category"),
32368
32631
  limit: z.number().min(1).max(50).default(10).describe("Maximum number of results")
32369
32632
  });
32370
32633
  function registerSearchComponentsTool(server) {
@@ -32508,34 +32771,15 @@ function registerGetComponentPropsTool(server) {
32508
32771
  // src/tools/suggestPattern.ts
32509
32772
  import { z as z3 } from "zod";
32510
32773
  var patterns2 = pattern_library_default;
32774
+ var patternIds = [
32775
+ ...patterns2.layouts,
32776
+ ...patterns2.forms,
32777
+ ...patterns2.auth ?? [],
32778
+ ...patterns2.notifications ?? [],
32779
+ ...patterns2.panels ?? []
32780
+ ].map((p) => p.id);
32511
32781
  var SuggestPatternSchema = z3.object({
32512
- useCase: z3.enum([
32513
- // Layout patterns
32514
- "dashboard-page",
32515
- "public-page",
32516
- "auth-page",
32517
- "error-page",
32518
- "form-page",
32519
- // Form patterns
32520
- "login-form",
32521
- "registration-form",
32522
- "contact-form",
32523
- // MFA and password form patterns
32524
- "mfa-verification-form",
32525
- "mfa-setup-form",
32526
- "profile-update-form",
32527
- "change-password-form",
32528
- "forgot-password-form",
32529
- "reset-password-form",
32530
- // Auth flow patterns
32531
- "login-with-mfa",
32532
- "sso-login",
32533
- "session-management",
32534
- "protected-route",
32535
- // Notification patterns
32536
- "notification-center",
32537
- "notification-dropdown"
32538
- ]).describe("The use case you need a pattern for"),
32782
+ useCase: z3.enum(patternIds).describe("The use case you need a pattern for"),
32539
32783
  requirements: z3.array(z3.string()).optional().describe("Additional requirements or constraints")
32540
32784
  });
32541
32785
  function registerSuggestPatternTool(server) {
@@ -32549,7 +32793,8 @@ function registerSuggestPatternTool(server) {
32549
32793
  const form = patterns2.forms.find((f) => f.id === useCase);
32550
32794
  const auth = patterns2.auth?.find((a) => a.id === useCase);
32551
32795
  const notification = patterns2.notifications?.find((n) => n.id === useCase);
32552
- const pattern = layout || form || auth || notification;
32796
+ const panel = patterns2.panels?.find((p) => p.id === useCase);
32797
+ const pattern = layout || form || auth || notification || panel;
32553
32798
  if (!pattern) {
32554
32799
  const availablePatterns = [
32555
32800
  ...patterns2.layouts.map((l) => ({ id: l.id, type: "layout", name: l.name })),
@@ -32559,7 +32804,8 @@ function registerSuggestPatternTool(server) {
32559
32804
  id: n.id,
32560
32805
  type: "notification",
32561
32806
  name: n.name
32562
- })) || []
32807
+ })) || [],
32808
+ ...patterns2.panels?.map((p) => ({ id: p.id, type: "panel", name: p.name })) || []
32563
32809
  ];
32564
32810
  return {
32565
32811
  content: [
@@ -32611,6 +32857,18 @@ var ValidateUsageSchema = z4.object({
32611
32857
  props: z4.record(z4.unknown()).describe("Props being passed to the component"),
32612
32858
  context: z4.string().optional().describe('Where the component is being used (e.g., "inside a form", "in modal")')
32613
32859
  });
32860
+ var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set([
32861
+ "class",
32862
+ "children",
32863
+ "id",
32864
+ "style",
32865
+ "title",
32866
+ "role",
32867
+ "tabindex"
32868
+ ]);
32869
+ function isPassThroughAttribute(name) {
32870
+ return GLOBAL_ATTRIBUTES.has(name) || /^(aria-|data-|on[a-z])/.test(name);
32871
+ }
32614
32872
  function registerValidateUsageTool(server) {
32615
32873
  server.tool(
32616
32874
  "validate_component_usage",
@@ -32641,7 +32899,7 @@ function registerValidateUsageTool(server) {
32641
32899
  const issues = [];
32642
32900
  const knownProps = new Set(component.props.map((p) => p.name));
32643
32901
  for (const propName of Object.keys(props)) {
32644
- if (!knownProps.has(propName) && propName !== "class" && propName !== "children") {
32902
+ if (!knownProps.has(propName) && !isPassThroughAttribute(propName)) {
32645
32903
  issues.push({
32646
32904
  type: "warning",
32647
32905
  message: `Unknown prop "${propName}" - not in component API`,
@@ -33007,7 +33265,7 @@ function registerPrompts(server) {
33007
33265
  // package.json
33008
33266
  var package_default = {
33009
33267
  name: "@classic-homes/theme-mcp",
33010
- version: "0.3.3",
33268
+ version: "0.3.4",
33011
33269
  description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
33012
33270
  type: "module",
33013
33271
  main: "dist/index.js",
@@ -33057,7 +33315,7 @@ var package_default = {
33057
33315
  start: "node dist/cli.js",
33058
33316
  typecheck: "tsc --noEmit",
33059
33317
  validate: "tsx scripts/validate-catalog-integrity.ts",
33060
- test: "npm run validate",
33318
+ test: "npm run validate && vitest run",
33061
33319
  clean: "node ../../scripts/rm.mjs dist",
33062
33320
  prepublishOnly: "npm run build"
33063
33321
  },