@classic-homes/theme-mcp 0.3.2 → 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.2",
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: [
@@ -11824,6 +11908,126 @@ var component_catalog_default = {
11824
11908
  "DropdownMenu"
11825
11909
  ]
11826
11910
  },
11911
+ {
11912
+ name: "Sheet",
11913
+ description: "Modal panel that slides in from the left, right or bottom edge",
11914
+ category: "overlay",
11915
+ importPath: "@classic-homes/theme-svelte",
11916
+ props: [
11917
+ {
11918
+ name: "open",
11919
+ type: "boolean",
11920
+ default: "false",
11921
+ required: false,
11922
+ description: "Bindable"
11923
+ },
11924
+ {
11925
+ name: "onOpenChange",
11926
+ type: "(open: boolean) => void",
11927
+ required: false,
11928
+ description: "Called when opened or closed"
11929
+ },
11930
+ {
11931
+ name: "side",
11932
+ type: "'left' | 'right' | 'bottom'",
11933
+ default: "'right'",
11934
+ required: false,
11935
+ description: "Edge it slides in from"
11936
+ },
11937
+ {
11938
+ name: "size",
11939
+ type: "'sm' | 'md' | 'lg'",
11940
+ default: "'md'",
11941
+ required: false,
11942
+ description: "Width of left/right sheets from `sm` up; phones get full width"
11943
+ },
11944
+ {
11945
+ name: "title",
11946
+ type: "string",
11947
+ required: false,
11948
+ description: "Heading and accessible name (required)"
11949
+ },
11950
+ {
11951
+ name: "hideTitle",
11952
+ type: "boolean",
11953
+ default: "false",
11954
+ required: false,
11955
+ description: "Drop the heading row; title still names the sheet"
11956
+ },
11957
+ {
11958
+ name: "description",
11959
+ type: "string",
11960
+ required: false,
11961
+ description: "Line under the title"
11962
+ },
11963
+ {
11964
+ name: "headerActions",
11965
+ type: "Snippet",
11966
+ required: false,
11967
+ description: "Buttons beside the close button"
11968
+ },
11969
+ {
11970
+ name: "footer",
11971
+ type: "Snippet",
11972
+ required: false,
11973
+ description: "Pinned footer"
11974
+ },
11975
+ {
11976
+ name: "class",
11977
+ type: "string",
11978
+ required: false,
11979
+ description: "Additional classes for the panel"
11980
+ }
11981
+ ],
11982
+ variants: [
11983
+ {
11984
+ name: "side",
11985
+ values: [
11986
+ "left",
11987
+ "right",
11988
+ "bottom"
11989
+ ],
11990
+ default: "right"
11991
+ },
11992
+ {
11993
+ name: "size",
11994
+ values: [
11995
+ "sm",
11996
+ "md",
11997
+ "lg"
11998
+ ],
11999
+ default: "md"
12000
+ }
12001
+ ],
12002
+ slots: [
12003
+ {
12004
+ name: "children",
12005
+ description: "Main content",
12006
+ required: false
12007
+ }
12008
+ ],
12009
+ events: [],
12010
+ examples: [
12011
+ {
12012
+ title: "Basic Usage",
12013
+ code: `<script>
12014
+ import { Sheet, Button } from '@classic-homes/theme-svelte';
12015
+ let open = $state(false);
12016
+ </script>
12017
+
12018
+ <Button onclick={() => (open = true)}>Version history</Button>
12019
+
12020
+ <Sheet bind:open title="Version history" description="Every save is kept.">
12021
+ <ul>...</ul>
12022
+ {#snippet footer()}<Button onclick={() => (open = false)}>Done</Button>{/snippet}
12023
+ </Sheet>`
12024
+ }
12025
+ ],
12026
+ relatedComponents: [
12027
+ "Dialog",
12028
+ "Studio"
12029
+ ]
12030
+ },
11827
12031
  {
11828
12032
  name: "Sidebar",
11829
12033
  description: "Responsive sidebar navigation with collapsible sections",
@@ -12942,6 +13146,117 @@ var component_catalog_default = {
12942
13146
  "Input"
12943
13147
  ]
12944
13148
  },
13149
+ {
13150
+ name: "SortableList",
13151
+ description: "Vertical list reordered by drag handle or keyboard, with announcements",
13152
+ category: "core",
13153
+ importPath: "@classic-homes/theme-svelte",
13154
+ props: [
13155
+ {
13156
+ name: "items",
13157
+ type: "T[]",
13158
+ required: false,
13159
+ description: "Items in order (required)"
13160
+ },
13161
+ {
13162
+ name: "getKey",
13163
+ type: "(item, index) => string | number",
13164
+ required: false,
13165
+ description: "Stable key (required)"
13166
+ },
13167
+ {
13168
+ name: "onReorder",
13169
+ type: "(from: number, to: number) => void",
13170
+ required: false,
13171
+ description: "Move item `from` to index `to` (required)"
13172
+ },
13173
+ {
13174
+ name: "item",
13175
+ type: "Snippet<[{ item, index, handle, dragging }]>",
13176
+ required: false,
13177
+ description: "Renders one item (required)"
13178
+ },
13179
+ {
13180
+ name: "label",
13181
+ type: "string",
13182
+ required: false,
13183
+ description: "Accessible name of the list (required)"
13184
+ },
13185
+ {
13186
+ name: "getItemLabel",
13187
+ type: "(item, index) => string",
13188
+ default: '"Item n"',
13189
+ required: false,
13190
+ description: "Name used in announcements and handle labels"
13191
+ },
13192
+ {
13193
+ name: "disabled",
13194
+ type: "boolean",
13195
+ default: "false",
13196
+ required: false,
13197
+ description: "Turns reordering off"
13198
+ },
13199
+ {
13200
+ name: "class",
13201
+ type: "string",
13202
+ required: false,
13203
+ description: "Classes for the `ul`"
13204
+ },
13205
+ {
13206
+ name: "itemClass",
13207
+ type: "string",
13208
+ required: false,
13209
+ description: "Classes for each `li`"
13210
+ }
13211
+ ],
13212
+ variants: [],
13213
+ slots: [
13214
+ {
13215
+ name: "children",
13216
+ description: "Main content",
13217
+ required: false
13218
+ }
13219
+ ],
13220
+ events: [],
13221
+ examples: [
13222
+ {
13223
+ title: "Basic Usage",
13224
+ code: `<script>
13225
+ import { SortableList, Icon } from '@classic-homes/theme-svelte';
13226
+
13227
+ let steps = $state([
13228
+ { id: 'a', label: 'Frame inspection' },
13229
+ { id: 'b', label: 'Drywall' },
13230
+ { id: 'c', label: 'Final walk' },
13231
+ ]);
13232
+
13233
+ function move(from, to) {
13234
+ const [item] = steps.splice(from, 1);
13235
+ steps.splice(to, 0, item);
13236
+ }
13237
+ </script>
13238
+
13239
+ <SortableList
13240
+ items={steps}
13241
+ getKey={(s) => s.id}
13242
+ getItemLabel={(s) => s.label}
13243
+ onReorder={move}
13244
+ label="Steps"
13245
+ class="space-y-1"
13246
+ >
13247
+ {#snippet item({ item, handle, dragging })}
13248
+ <div class="flex items-center gap-2 rounded border p-2" class:shadow-lg={dragging}>
13249
+ <button {...handle} class="cursor-grab touch-none"><Icon name="grip" size={14} /></button>
13250
+ {item.label}
13251
+ </div>
13252
+ {/snippet}
13253
+ </SortableList>`
13254
+ }
13255
+ ],
13256
+ relatedComponents: [
13257
+ "Studio"
13258
+ ]
13259
+ },
12945
13260
  {
12946
13261
  name: "Spinner",
12947
13262
  description: "Loading indicator for async operations",
@@ -13032,6 +13347,158 @@ var component_catalog_default = {
13032
13347
  "Button"
13033
13348
  ]
13034
13349
  },
13350
+ {
13351
+ name: "Studio",
13352
+ description: "Full-screen editor frame - outline, live canvas and inspector - for survey, slide and page builders",
13353
+ category: "layout",
13354
+ importPath: "@classic-homes/theme-svelte",
13355
+ props: [
13356
+ {
13357
+ name: "bar",
13358
+ type: "Snippet",
13359
+ required: false,
13360
+ description: "Top bar, normally a `StudioBar` (required)"
13361
+ },
13362
+ {
13363
+ name: "canvas",
13364
+ type: "Snippet",
13365
+ required: false,
13366
+ description: "Main area: a `StudioCanvas` or `StudioPage` (required)"
13367
+ },
13368
+ {
13369
+ name: "rail",
13370
+ type: "Snippet",
13371
+ required: false,
13372
+ description: "Left column, normally a `StudioOutline`"
13373
+ },
13374
+ {
13375
+ name: "inspector",
13376
+ type: "Snippet",
13377
+ required: false,
13378
+ description: "Right column, normally a `StudioInspector`"
13379
+ },
13380
+ {
13381
+ name: "banner",
13382
+ type: "Snippet",
13383
+ required: false,
13384
+ description: "One slot under the bar for conflicts and blocking decisions"
13385
+ },
13386
+ {
13387
+ name: "railLabel",
13388
+ type: "string",
13389
+ default: "'Outline'",
13390
+ required: false,
13391
+ description: "Name of the rail and its sheet button"
13392
+ },
13393
+ {
13394
+ name: "inspectorLabel",
13395
+ type: "string",
13396
+ default: "'Properties'",
13397
+ required: false,
13398
+ description: "Name of the inspector and its sheet button"
13399
+ },
13400
+ {
13401
+ name: "railOpen",
13402
+ type: "boolean",
13403
+ default: "false",
13404
+ required: false,
13405
+ description: "Rail sheet open below 1280px (bindable)"
13406
+ },
13407
+ {
13408
+ name: "inspectorOpen",
13409
+ type: "boolean",
13410
+ default: "false",
13411
+ required: false,
13412
+ description: "Inspector sheet open below 768px (bindable)"
13413
+ }
13414
+ ],
13415
+ variants: [],
13416
+ slots: [
13417
+ {
13418
+ name: "children",
13419
+ description: "Main content",
13420
+ required: false
13421
+ }
13422
+ ],
13423
+ events: [],
13424
+ examples: [
13425
+ {
13426
+ title: "Basic Usage",
13427
+ code: `<script>
13428
+ let questions = $state(loadQuestions());
13429
+ let selected = $state(questions[0].id);
13430
+ let mode = $state('build');
13431
+ let adding = $state(false);
13432
+ </script>
13433
+
13434
+ {#snippet bar()}
13435
+ <StudioBar
13436
+ bind:title
13437
+ backHref="/surveys"
13438
+ backLabel="Surveys"
13439
+ bind:mode
13440
+ modes={[
13441
+ { value: 'build', label: 'Build', icon: 'edit' },
13442
+ { value: 'settings', label: 'Settings', icon: 'settings' },
13443
+ ]}
13444
+ menuItems={[{ label: 'Delete survey', icon: 'trash', destructive: true, onSelect: remove }]}
13445
+ >
13446
+ {#snippet status()}<SaveStatus state={saveState} onRetry={save} />{/snippet}
13447
+ {#snippet issues()}<IssuesButton {issues} bind:open={issuesOpen} onSelect={jump} />{/snippet}
13448
+ {#snippet actions()}<Button size="sm" onclick={publish}>Publish</Button>{/snippet}
13449
+ </StudioBar>
13450
+ {/snippet}
13451
+
13452
+ {#snippet rail()}
13453
+ <StudioOutline
13454
+ items={questions.map((q) => ({ id: q.id, title: q.title, subtitle: q.typeLabel }))}
13455
+ bind:selected
13456
+ onReorder={move}
13457
+ onAdd={() => (adding = true)}
13458
+ addLabel="Add question"
13459
+ label="Questions"
13460
+ />
13461
+ {/snippet}
13462
+
13463
+ {#snippet canvas()}
13464
+ <StudioCanvas deviceToggle>
13465
+ {#each questions as q, i (q.id)}
13466
+ <StudioCanvasItem
13467
+ label="Question {i + 1}"
13468
+ selected={q.id === selected}
13469
+ onSelect={() => (selected = q.id)}
13470
+ onInsert={() => (adding = true)}
13471
+ >
13472
+ <QuestionPreview question={q} />
13473
+ </StudioCanvasItem>
13474
+ {/each}
13475
+ </StudioCanvas>
13476
+ {/snippet}
13477
+
13478
+ {#snippet inspector()}
13479
+ <StudioInspector title="Question 1" description="Single choice">
13480
+ <StudioInspectorSection><!-- content fields --></StudioInspectorSection>
13481
+ <StudioInspectorSection title="Advanced" collapsible
13482
+ ><!-- rarely used --></StudioInspectorSection
13483
+ >
13484
+ </StudioInspector>
13485
+ {/snippet}
13486
+
13487
+ {#if mode === 'build'}
13488
+ <Studio {bar} {rail} {canvas} {inspector} railLabel="Questions" />
13489
+ {:else}
13490
+ <Studio {bar} canvas={settingsPage} />
13491
+ {/if}
13492
+
13493
+ <InsertPalette bind:open={adding} groups={questionTypes} onSelect={add} title="Add a question" />`
13494
+ }
13495
+ ],
13496
+ relatedComponents: [
13497
+ "Sheet",
13498
+ "SortableList",
13499
+ "SegmentedControl"
13500
+ ]
13501
+ },
13035
13502
  {
13036
13503
  name: "Switch",
13037
13504
  description: "Toggle switch for binary on/off settings",
@@ -14149,17 +14616,6 @@ var component_catalog_default = {
14149
14616
  }
14150
14617
  ],
14151
14618
  variants: [
14152
- {
14153
- name: "ratio",
14154
- values: [
14155
- "square",
14156
- "video",
14157
- "photo",
14158
- "portrait",
14159
- "wide"
14160
- ],
14161
- default: "video"
14162
- },
14163
14619
  {
14164
14620
  name: "fit",
14165
14621
  values: [
@@ -14368,7 +14824,7 @@ function registerComponentResources(server) {
14368
14824
 
14369
14825
  // src/data/token-definitions.json
14370
14826
  var token_definitions_default = {
14371
- version: "0.3.2",
14827
+ version: "0.3.4",
14372
14828
  colors: {
14373
14829
  brand: [
14374
14830
  {
@@ -15351,7 +15807,7 @@ function registerTokenResources(server) {
15351
15807
 
15352
15808
  // src/data/styles-catalog.json
15353
15809
  var styles_catalog_default = {
15354
- version: "0.3.2",
15810
+ version: "0.3.4",
15355
15811
  package: "@classic-homes/theme-styles",
15356
15812
  description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
15357
15813
  integration: {
@@ -15734,7 +16190,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
15734
16190
 
15735
16191
  // src/data/pattern-library.json
15736
16192
  var pattern_library_default = {
15737
- version: "0.3.2",
16193
+ version: "0.3.4",
15738
16194
  layouts: [
15739
16195
  {
15740
16196
  id: "dashboard-page",
@@ -16828,7 +17284,7 @@ function registerLayoutResources(server) {
16828
17284
 
16829
17285
  // src/data/schema-catalog.json
16830
17286
  var schema_catalog_default = {
16831
- version: "0.3.2",
17287
+ version: "0.3.4",
16832
17288
  packageName: "@classic-homes/theme-svelte",
16833
17289
  importPath: "@classic-homes/theme-svelte",
16834
17290
  generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
@@ -17636,7 +18092,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
17636
18092
 
17637
18093
  // src/data/auth-catalog.json
17638
18094
  var auth_catalog_default = {
17639
- version: "0.3.2",
18095
+ version: "0.3.4",
17640
18096
  packageName: "@classic-homes/auth",
17641
18097
  description: "Authentication services and Svelte bindings for Classic Theme apps",
17642
18098
  subpackages: {
@@ -20673,7 +21129,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
20673
21129
 
20674
21130
  // src/data/notifications-catalog.json
20675
21131
  var notifications_catalog_default = {
20676
- version: "0.3.2",
21132
+ version: "0.3.4",
20677
21133
  packageName: "@classic-homes/notifications",
20678
21134
  description: "Notification services and Svelte bindings for Classic Theme apps",
20679
21135
  subpackages: {
@@ -20784,7 +21240,7 @@ var notifications_catalog_default = {
20784
21240
  {
20785
21241
  name: "getNotificationIconColor",
20786
21242
  signature: "(type: NotificationType) => string",
20787
- 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)"
20788
21244
  },
20789
21245
  {
20790
21246
  name: "getPriorityBadgeVariant",
@@ -21566,7 +22022,7 @@ function registerNotificationsResources(server) {
21566
22022
  description: "Direct API access without Svelte store"
21567
22023
  },
21568
22024
  utilities: {
21569
- 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'",
21570
22026
  description: "Utility functions for display"
21571
22027
  },
21572
22028
  preferences: {
@@ -21585,7 +22041,7 @@ function registerNotificationsResources(server) {
21585
22041
 
21586
22042
  // src/data/docs-catalog.json
21587
22043
  var docs_catalog_default = {
21588
- version: "0.3.2",
22044
+ version: "0.3.4",
21589
22045
  packageName: "@classic-homes/theme-docs",
21590
22046
  description: "Markdown documentation components for the Classic theme system",
21591
22047
  exports: {
@@ -21597,10 +22053,18 @@ var docs_catalog_default = {
21597
22053
  importPath: "@classic-homes/theme-docs/parser",
21598
22054
  description: "Markdown pipeline without Svelte imports (parseMarkdown, extractToc, createSlugger, extensions) for Node build scripts, server loaders and CMS previews"
21599
22055
  },
22056
+ "./prose": {
22057
+ importPath: "@classic-homes/theme-docs/prose",
22058
+ description: "Subpath export for prose"
22059
+ },
21600
22060
  "./sanitize": {
21601
22061
  importPath: "@classic-homes/theme-docs/sanitize",
21602
22062
  description: "sanitizeDocsHtml: allowlist sanitizer for parseMarkdown output (server/build-time only)"
21603
22063
  },
22064
+ "./sanitize/browser": {
22065
+ importPath: "@classic-homes/theme-docs/sanitize/browser",
22066
+ description: "Subpath export for sanitize/browser"
22067
+ },
21604
22068
  "./content": {
21605
22069
  importPath: "@classic-homes/theme-docs/content",
21606
22070
  description: "loadDocs/renderDocs: a Docusaurus-style docs directory as routes, autogenerated sidebars, generated-index pages, tags and rendered HTML (Node, build time)"
@@ -21672,6 +22136,154 @@ var docs_catalog_default = {
21672
22136
  ],
21673
22137
  example: '<MarkdownPage content={markdownString} theme="github-dark">\n {#snippet header(frontmatter)}\n <h1>{frontmatter.title}</h1>\n {/snippet}\n</MarkdownPage>'
21674
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
+ },
21675
22287
  {
21676
22288
  name: "CodeBlock",
21677
22289
  description: "Standalone syntax-highlighted code block using Shiki",
@@ -22915,9 +23527,18 @@ var docs_catalog_default = {
22915
23527
  dependencies: {
22916
23528
  "@classic-homes/theme-tokens": "*",
22917
23529
  clsx: "^2.1.0",
23530
+ dompurify: "3.4.16",
22918
23531
  "js-yaml": "^4.3.2",
22919
23532
  marked: "^17.0.0",
22920
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",
22921
23542
  "sanitize-html": "2.18.0",
22922
23543
  shiki: "^1.0.0",
22923
23544
  "tailwind-merge": "^2.2.0",
@@ -23081,7 +23702,7 @@ function registerDocsResources(server) {
23081
23702
 
23082
23703
  // src/data/charts-catalog.json
23083
23704
  var charts_catalog_default = {
23084
- version: "0.3.2",
23705
+ version: "0.3.4",
23085
23706
  packageName: "@classic-homes/charts-core",
23086
23707
  description: "Core utilities, types, and themes for Classic Theme chart components",
23087
23708
  subpackages: {
@@ -23160,6 +23781,16 @@ var charts_catalog_default = {
23160
23781
  name: "createTooltipFormatter",
23161
23782
  signature: "(options?: { showSeriesName?: boolean; valueFormatter?: (value: number) => string; showPercent?: boolean }) => TooltipFormatter",
23162
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"
23163
23794
  }
23164
23795
  ]
23165
23796
  },
@@ -23231,6 +23862,26 @@ var charts_catalog_default = {
23231
23862
  name: "THEME_DARK",
23232
23863
  signature: "'classic-dark'",
23233
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"
23234
23885
  }
23235
23886
  ]
23236
23887
  }
@@ -24821,6 +25472,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
24821
25472
  - \`darkTheme\` - Pre-generated dark theme
24822
25473
  - \`THEME_LIGHT\` - Constant: 'classic-light'
24823
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()
24824
25477
 
24825
25478
  ## Formatting Utilities
24826
25479
 
@@ -24830,6 +25483,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
24830
25483
  - \`formatDate(date, options?, locale?)\` - Format date
24831
25484
  - \`abbreviateNumber(value, decimals?)\` - Abbreviate to K/M/B/T
24832
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
24833
25488
 
24834
25489
  ## Accessibility Utilities
24835
25490
 
@@ -24918,7 +25573,7 @@ interface SankeyData {
24918
25573
 
24919
25574
  // src/data/maps-catalog.json
24920
25575
  var maps_catalog_default = {
24921
- version: "0.3.2",
25576
+ version: "0.3.4",
24922
25577
  packageName: "@classic-homes/maps-core",
24923
25578
  description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
24924
25579
  subpackages: {
@@ -30249,7 +30904,7 @@ ${catalog5.quickReference.tailwindConfig}
30249
30904
 
30250
30905
  // src/data/native-catalog.json
30251
30906
  var native_catalog_default = {
30252
- version: "0.3.2",
30907
+ version: "0.3.4",
30253
30908
  packageName: "@classic-homes/native",
30254
30909
  description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
30255
30910
  subpackages: {
@@ -31969,19 +32624,10 @@ function registerResources(server) {
31969
32624
  // src/tools/searchComponents.ts
31970
32625
  import { z } from "zod";
31971
32626
  var catalog7 = component_catalog_default;
32627
+ var categories = [...new Set(catalog7.components.map((c) => c.category))].sort();
31972
32628
  var SearchComponentsSchema = z.object({
31973
32629
  query: z.string().describe("Search query (component name, description, or functionality)"),
31974
- category: z.enum([
31975
- "core",
31976
- "form",
31977
- "layout",
31978
- "feedback",
31979
- "data",
31980
- "overlay",
31981
- "navigation",
31982
- "branding",
31983
- "chart"
31984
- ]).optional().describe("Filter by component category"),
32630
+ category: z.enum(categories).optional().describe("Filter by component category"),
31985
32631
  limit: z.number().min(1).max(50).default(10).describe("Maximum number of results")
31986
32632
  });
31987
32633
  function registerSearchComponentsTool(server) {
@@ -32125,34 +32771,15 @@ function registerGetComponentPropsTool(server) {
32125
32771
  // src/tools/suggestPattern.ts
32126
32772
  import { z as z3 } from "zod";
32127
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);
32128
32781
  var SuggestPatternSchema = z3.object({
32129
- useCase: z3.enum([
32130
- // Layout patterns
32131
- "dashboard-page",
32132
- "public-page",
32133
- "auth-page",
32134
- "error-page",
32135
- "form-page",
32136
- // Form patterns
32137
- "login-form",
32138
- "registration-form",
32139
- "contact-form",
32140
- // MFA and password form patterns
32141
- "mfa-verification-form",
32142
- "mfa-setup-form",
32143
- "profile-update-form",
32144
- "change-password-form",
32145
- "forgot-password-form",
32146
- "reset-password-form",
32147
- // Auth flow patterns
32148
- "login-with-mfa",
32149
- "sso-login",
32150
- "session-management",
32151
- "protected-route",
32152
- // Notification patterns
32153
- "notification-center",
32154
- "notification-dropdown"
32155
- ]).describe("The use case you need a pattern for"),
32782
+ useCase: z3.enum(patternIds).describe("The use case you need a pattern for"),
32156
32783
  requirements: z3.array(z3.string()).optional().describe("Additional requirements or constraints")
32157
32784
  });
32158
32785
  function registerSuggestPatternTool(server) {
@@ -32166,7 +32793,8 @@ function registerSuggestPatternTool(server) {
32166
32793
  const form = patterns2.forms.find((f) => f.id === useCase);
32167
32794
  const auth = patterns2.auth?.find((a) => a.id === useCase);
32168
32795
  const notification = patterns2.notifications?.find((n) => n.id === useCase);
32169
- const pattern = layout || form || auth || notification;
32796
+ const panel = patterns2.panels?.find((p) => p.id === useCase);
32797
+ const pattern = layout || form || auth || notification || panel;
32170
32798
  if (!pattern) {
32171
32799
  const availablePatterns = [
32172
32800
  ...patterns2.layouts.map((l) => ({ id: l.id, type: "layout", name: l.name })),
@@ -32176,7 +32804,8 @@ function registerSuggestPatternTool(server) {
32176
32804
  id: n.id,
32177
32805
  type: "notification",
32178
32806
  name: n.name
32179
- })) || []
32807
+ })) || [],
32808
+ ...patterns2.panels?.map((p) => ({ id: p.id, type: "panel", name: p.name })) || []
32180
32809
  ];
32181
32810
  return {
32182
32811
  content: [
@@ -32228,6 +32857,18 @@ var ValidateUsageSchema = z4.object({
32228
32857
  props: z4.record(z4.unknown()).describe("Props being passed to the component"),
32229
32858
  context: z4.string().optional().describe('Where the component is being used (e.g., "inside a form", "in modal")')
32230
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
+ }
32231
32872
  function registerValidateUsageTool(server) {
32232
32873
  server.tool(
32233
32874
  "validate_component_usage",
@@ -32258,7 +32899,7 @@ function registerValidateUsageTool(server) {
32258
32899
  const issues = [];
32259
32900
  const knownProps = new Set(component.props.map((p) => p.name));
32260
32901
  for (const propName of Object.keys(props)) {
32261
- if (!knownProps.has(propName) && propName !== "class" && propName !== "children") {
32902
+ if (!knownProps.has(propName) && !isPassThroughAttribute(propName)) {
32262
32903
  issues.push({
32263
32904
  type: "warning",
32264
32905
  message: `Unknown prop "${propName}" - not in component API`,
@@ -32624,7 +33265,7 @@ function registerPrompts(server) {
32624
33265
  // package.json
32625
33266
  var package_default = {
32626
33267
  name: "@classic-homes/theme-mcp",
32627
- version: "0.3.2",
33268
+ version: "0.3.4",
32628
33269
  description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
32629
33270
  type: "module",
32630
33271
  main: "dist/index.js",
@@ -32674,7 +33315,7 @@ var package_default = {
32674
33315
  start: "node dist/cli.js",
32675
33316
  typecheck: "tsc --noEmit",
32676
33317
  validate: "tsx scripts/validate-catalog-integrity.ts",
32677
- test: "npm run validate",
33318
+ test: "npm run validate && vitest run",
32678
33319
  clean: "node ../../scripts/rm.mjs dist",
32679
33320
  prepublishOnly: "npm run build"
32680
33321
  },