@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 +784 -143
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +784 -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: [
|
|
@@ -11819,6 +11903,126 @@ var component_catalog_default = {
|
|
|
11819
11903
|
"DropdownMenu"
|
|
11820
11904
|
]
|
|
11821
11905
|
},
|
|
11906
|
+
{
|
|
11907
|
+
name: "Sheet",
|
|
11908
|
+
description: "Modal panel that slides in from the left, right or bottom edge",
|
|
11909
|
+
category: "overlay",
|
|
11910
|
+
importPath: "@classic-homes/theme-svelte",
|
|
11911
|
+
props: [
|
|
11912
|
+
{
|
|
11913
|
+
name: "open",
|
|
11914
|
+
type: "boolean",
|
|
11915
|
+
default: "false",
|
|
11916
|
+
required: false,
|
|
11917
|
+
description: "Bindable"
|
|
11918
|
+
},
|
|
11919
|
+
{
|
|
11920
|
+
name: "onOpenChange",
|
|
11921
|
+
type: "(open: boolean) => void",
|
|
11922
|
+
required: false,
|
|
11923
|
+
description: "Called when opened or closed"
|
|
11924
|
+
},
|
|
11925
|
+
{
|
|
11926
|
+
name: "side",
|
|
11927
|
+
type: "'left' | 'right' | 'bottom'",
|
|
11928
|
+
default: "'right'",
|
|
11929
|
+
required: false,
|
|
11930
|
+
description: "Edge it slides in from"
|
|
11931
|
+
},
|
|
11932
|
+
{
|
|
11933
|
+
name: "size",
|
|
11934
|
+
type: "'sm' | 'md' | 'lg'",
|
|
11935
|
+
default: "'md'",
|
|
11936
|
+
required: false,
|
|
11937
|
+
description: "Width of left/right sheets from `sm` up; phones get full width"
|
|
11938
|
+
},
|
|
11939
|
+
{
|
|
11940
|
+
name: "title",
|
|
11941
|
+
type: "string",
|
|
11942
|
+
required: false,
|
|
11943
|
+
description: "Heading and accessible name (required)"
|
|
11944
|
+
},
|
|
11945
|
+
{
|
|
11946
|
+
name: "hideTitle",
|
|
11947
|
+
type: "boolean",
|
|
11948
|
+
default: "false",
|
|
11949
|
+
required: false,
|
|
11950
|
+
description: "Drop the heading row; title still names the sheet"
|
|
11951
|
+
},
|
|
11952
|
+
{
|
|
11953
|
+
name: "description",
|
|
11954
|
+
type: "string",
|
|
11955
|
+
required: false,
|
|
11956
|
+
description: "Line under the title"
|
|
11957
|
+
},
|
|
11958
|
+
{
|
|
11959
|
+
name: "headerActions",
|
|
11960
|
+
type: "Snippet",
|
|
11961
|
+
required: false,
|
|
11962
|
+
description: "Buttons beside the close button"
|
|
11963
|
+
},
|
|
11964
|
+
{
|
|
11965
|
+
name: "footer",
|
|
11966
|
+
type: "Snippet",
|
|
11967
|
+
required: false,
|
|
11968
|
+
description: "Pinned footer"
|
|
11969
|
+
},
|
|
11970
|
+
{
|
|
11971
|
+
name: "class",
|
|
11972
|
+
type: "string",
|
|
11973
|
+
required: false,
|
|
11974
|
+
description: "Additional classes for the panel"
|
|
11975
|
+
}
|
|
11976
|
+
],
|
|
11977
|
+
variants: [
|
|
11978
|
+
{
|
|
11979
|
+
name: "side",
|
|
11980
|
+
values: [
|
|
11981
|
+
"left",
|
|
11982
|
+
"right",
|
|
11983
|
+
"bottom"
|
|
11984
|
+
],
|
|
11985
|
+
default: "right"
|
|
11986
|
+
},
|
|
11987
|
+
{
|
|
11988
|
+
name: "size",
|
|
11989
|
+
values: [
|
|
11990
|
+
"sm",
|
|
11991
|
+
"md",
|
|
11992
|
+
"lg"
|
|
11993
|
+
],
|
|
11994
|
+
default: "md"
|
|
11995
|
+
}
|
|
11996
|
+
],
|
|
11997
|
+
slots: [
|
|
11998
|
+
{
|
|
11999
|
+
name: "children",
|
|
12000
|
+
description: "Main content",
|
|
12001
|
+
required: false
|
|
12002
|
+
}
|
|
12003
|
+
],
|
|
12004
|
+
events: [],
|
|
12005
|
+
examples: [
|
|
12006
|
+
{
|
|
12007
|
+
title: "Basic Usage",
|
|
12008
|
+
code: `<script>
|
|
12009
|
+
import { Sheet, Button } from '@classic-homes/theme-svelte';
|
|
12010
|
+
let open = $state(false);
|
|
12011
|
+
</script>
|
|
12012
|
+
|
|
12013
|
+
<Button onclick={() => (open = true)}>Version history</Button>
|
|
12014
|
+
|
|
12015
|
+
<Sheet bind:open title="Version history" description="Every save is kept.">
|
|
12016
|
+
<ul>...</ul>
|
|
12017
|
+
{#snippet footer()}<Button onclick={() => (open = false)}>Done</Button>{/snippet}
|
|
12018
|
+
</Sheet>`
|
|
12019
|
+
}
|
|
12020
|
+
],
|
|
12021
|
+
relatedComponents: [
|
|
12022
|
+
"Dialog",
|
|
12023
|
+
"Studio"
|
|
12024
|
+
]
|
|
12025
|
+
},
|
|
11822
12026
|
{
|
|
11823
12027
|
name: "Sidebar",
|
|
11824
12028
|
description: "Responsive sidebar navigation with collapsible sections",
|
|
@@ -12937,6 +13141,117 @@ var component_catalog_default = {
|
|
|
12937
13141
|
"Input"
|
|
12938
13142
|
]
|
|
12939
13143
|
},
|
|
13144
|
+
{
|
|
13145
|
+
name: "SortableList",
|
|
13146
|
+
description: "Vertical list reordered by drag handle or keyboard, with announcements",
|
|
13147
|
+
category: "core",
|
|
13148
|
+
importPath: "@classic-homes/theme-svelte",
|
|
13149
|
+
props: [
|
|
13150
|
+
{
|
|
13151
|
+
name: "items",
|
|
13152
|
+
type: "T[]",
|
|
13153
|
+
required: false,
|
|
13154
|
+
description: "Items in order (required)"
|
|
13155
|
+
},
|
|
13156
|
+
{
|
|
13157
|
+
name: "getKey",
|
|
13158
|
+
type: "(item, index) => string | number",
|
|
13159
|
+
required: false,
|
|
13160
|
+
description: "Stable key (required)"
|
|
13161
|
+
},
|
|
13162
|
+
{
|
|
13163
|
+
name: "onReorder",
|
|
13164
|
+
type: "(from: number, to: number) => void",
|
|
13165
|
+
required: false,
|
|
13166
|
+
description: "Move item `from` to index `to` (required)"
|
|
13167
|
+
},
|
|
13168
|
+
{
|
|
13169
|
+
name: "item",
|
|
13170
|
+
type: "Snippet<[{ item, index, handle, dragging }]>",
|
|
13171
|
+
required: false,
|
|
13172
|
+
description: "Renders one item (required)"
|
|
13173
|
+
},
|
|
13174
|
+
{
|
|
13175
|
+
name: "label",
|
|
13176
|
+
type: "string",
|
|
13177
|
+
required: false,
|
|
13178
|
+
description: "Accessible name of the list (required)"
|
|
13179
|
+
},
|
|
13180
|
+
{
|
|
13181
|
+
name: "getItemLabel",
|
|
13182
|
+
type: "(item, index) => string",
|
|
13183
|
+
default: '"Item n"',
|
|
13184
|
+
required: false,
|
|
13185
|
+
description: "Name used in announcements and handle labels"
|
|
13186
|
+
},
|
|
13187
|
+
{
|
|
13188
|
+
name: "disabled",
|
|
13189
|
+
type: "boolean",
|
|
13190
|
+
default: "false",
|
|
13191
|
+
required: false,
|
|
13192
|
+
description: "Turns reordering off"
|
|
13193
|
+
},
|
|
13194
|
+
{
|
|
13195
|
+
name: "class",
|
|
13196
|
+
type: "string",
|
|
13197
|
+
required: false,
|
|
13198
|
+
description: "Classes for the `ul`"
|
|
13199
|
+
},
|
|
13200
|
+
{
|
|
13201
|
+
name: "itemClass",
|
|
13202
|
+
type: "string",
|
|
13203
|
+
required: false,
|
|
13204
|
+
description: "Classes for each `li`"
|
|
13205
|
+
}
|
|
13206
|
+
],
|
|
13207
|
+
variants: [],
|
|
13208
|
+
slots: [
|
|
13209
|
+
{
|
|
13210
|
+
name: "children",
|
|
13211
|
+
description: "Main content",
|
|
13212
|
+
required: false
|
|
13213
|
+
}
|
|
13214
|
+
],
|
|
13215
|
+
events: [],
|
|
13216
|
+
examples: [
|
|
13217
|
+
{
|
|
13218
|
+
title: "Basic Usage",
|
|
13219
|
+
code: `<script>
|
|
13220
|
+
import { SortableList, Icon } from '@classic-homes/theme-svelte';
|
|
13221
|
+
|
|
13222
|
+
let steps = $state([
|
|
13223
|
+
{ id: 'a', label: 'Frame inspection' },
|
|
13224
|
+
{ id: 'b', label: 'Drywall' },
|
|
13225
|
+
{ id: 'c', label: 'Final walk' },
|
|
13226
|
+
]);
|
|
13227
|
+
|
|
13228
|
+
function move(from, to) {
|
|
13229
|
+
const [item] = steps.splice(from, 1);
|
|
13230
|
+
steps.splice(to, 0, item);
|
|
13231
|
+
}
|
|
13232
|
+
</script>
|
|
13233
|
+
|
|
13234
|
+
<SortableList
|
|
13235
|
+
items={steps}
|
|
13236
|
+
getKey={(s) => s.id}
|
|
13237
|
+
getItemLabel={(s) => s.label}
|
|
13238
|
+
onReorder={move}
|
|
13239
|
+
label="Steps"
|
|
13240
|
+
class="space-y-1"
|
|
13241
|
+
>
|
|
13242
|
+
{#snippet item({ item, handle, dragging })}
|
|
13243
|
+
<div class="flex items-center gap-2 rounded border p-2" class:shadow-lg={dragging}>
|
|
13244
|
+
<button {...handle} class="cursor-grab touch-none"><Icon name="grip" size={14} /></button>
|
|
13245
|
+
{item.label}
|
|
13246
|
+
</div>
|
|
13247
|
+
{/snippet}
|
|
13248
|
+
</SortableList>`
|
|
13249
|
+
}
|
|
13250
|
+
],
|
|
13251
|
+
relatedComponents: [
|
|
13252
|
+
"Studio"
|
|
13253
|
+
]
|
|
13254
|
+
},
|
|
12940
13255
|
{
|
|
12941
13256
|
name: "Spinner",
|
|
12942
13257
|
description: "Loading indicator for async operations",
|
|
@@ -13027,6 +13342,158 @@ var component_catalog_default = {
|
|
|
13027
13342
|
"Button"
|
|
13028
13343
|
]
|
|
13029
13344
|
},
|
|
13345
|
+
{
|
|
13346
|
+
name: "Studio",
|
|
13347
|
+
description: "Full-screen editor frame - outline, live canvas and inspector - for survey, slide and page builders",
|
|
13348
|
+
category: "layout",
|
|
13349
|
+
importPath: "@classic-homes/theme-svelte",
|
|
13350
|
+
props: [
|
|
13351
|
+
{
|
|
13352
|
+
name: "bar",
|
|
13353
|
+
type: "Snippet",
|
|
13354
|
+
required: false,
|
|
13355
|
+
description: "Top bar, normally a `StudioBar` (required)"
|
|
13356
|
+
},
|
|
13357
|
+
{
|
|
13358
|
+
name: "canvas",
|
|
13359
|
+
type: "Snippet",
|
|
13360
|
+
required: false,
|
|
13361
|
+
description: "Main area: a `StudioCanvas` or `StudioPage` (required)"
|
|
13362
|
+
},
|
|
13363
|
+
{
|
|
13364
|
+
name: "rail",
|
|
13365
|
+
type: "Snippet",
|
|
13366
|
+
required: false,
|
|
13367
|
+
description: "Left column, normally a `StudioOutline`"
|
|
13368
|
+
},
|
|
13369
|
+
{
|
|
13370
|
+
name: "inspector",
|
|
13371
|
+
type: "Snippet",
|
|
13372
|
+
required: false,
|
|
13373
|
+
description: "Right column, normally a `StudioInspector`"
|
|
13374
|
+
},
|
|
13375
|
+
{
|
|
13376
|
+
name: "banner",
|
|
13377
|
+
type: "Snippet",
|
|
13378
|
+
required: false,
|
|
13379
|
+
description: "One slot under the bar for conflicts and blocking decisions"
|
|
13380
|
+
},
|
|
13381
|
+
{
|
|
13382
|
+
name: "railLabel",
|
|
13383
|
+
type: "string",
|
|
13384
|
+
default: "'Outline'",
|
|
13385
|
+
required: false,
|
|
13386
|
+
description: "Name of the rail and its sheet button"
|
|
13387
|
+
},
|
|
13388
|
+
{
|
|
13389
|
+
name: "inspectorLabel",
|
|
13390
|
+
type: "string",
|
|
13391
|
+
default: "'Properties'",
|
|
13392
|
+
required: false,
|
|
13393
|
+
description: "Name of the inspector and its sheet button"
|
|
13394
|
+
},
|
|
13395
|
+
{
|
|
13396
|
+
name: "railOpen",
|
|
13397
|
+
type: "boolean",
|
|
13398
|
+
default: "false",
|
|
13399
|
+
required: false,
|
|
13400
|
+
description: "Rail sheet open below 1280px (bindable)"
|
|
13401
|
+
},
|
|
13402
|
+
{
|
|
13403
|
+
name: "inspectorOpen",
|
|
13404
|
+
type: "boolean",
|
|
13405
|
+
default: "false",
|
|
13406
|
+
required: false,
|
|
13407
|
+
description: "Inspector sheet open below 768px (bindable)"
|
|
13408
|
+
}
|
|
13409
|
+
],
|
|
13410
|
+
variants: [],
|
|
13411
|
+
slots: [
|
|
13412
|
+
{
|
|
13413
|
+
name: "children",
|
|
13414
|
+
description: "Main content",
|
|
13415
|
+
required: false
|
|
13416
|
+
}
|
|
13417
|
+
],
|
|
13418
|
+
events: [],
|
|
13419
|
+
examples: [
|
|
13420
|
+
{
|
|
13421
|
+
title: "Basic Usage",
|
|
13422
|
+
code: `<script>
|
|
13423
|
+
let questions = $state(loadQuestions());
|
|
13424
|
+
let selected = $state(questions[0].id);
|
|
13425
|
+
let mode = $state('build');
|
|
13426
|
+
let adding = $state(false);
|
|
13427
|
+
</script>
|
|
13428
|
+
|
|
13429
|
+
{#snippet bar()}
|
|
13430
|
+
<StudioBar
|
|
13431
|
+
bind:title
|
|
13432
|
+
backHref="/surveys"
|
|
13433
|
+
backLabel="Surveys"
|
|
13434
|
+
bind:mode
|
|
13435
|
+
modes={[
|
|
13436
|
+
{ value: 'build', label: 'Build', icon: 'edit' },
|
|
13437
|
+
{ value: 'settings', label: 'Settings', icon: 'settings' },
|
|
13438
|
+
]}
|
|
13439
|
+
menuItems={[{ label: 'Delete survey', icon: 'trash', destructive: true, onSelect: remove }]}
|
|
13440
|
+
>
|
|
13441
|
+
{#snippet status()}<SaveStatus state={saveState} onRetry={save} />{/snippet}
|
|
13442
|
+
{#snippet issues()}<IssuesButton {issues} bind:open={issuesOpen} onSelect={jump} />{/snippet}
|
|
13443
|
+
{#snippet actions()}<Button size="sm" onclick={publish}>Publish</Button>{/snippet}
|
|
13444
|
+
</StudioBar>
|
|
13445
|
+
{/snippet}
|
|
13446
|
+
|
|
13447
|
+
{#snippet rail()}
|
|
13448
|
+
<StudioOutline
|
|
13449
|
+
items={questions.map((q) => ({ id: q.id, title: q.title, subtitle: q.typeLabel }))}
|
|
13450
|
+
bind:selected
|
|
13451
|
+
onReorder={move}
|
|
13452
|
+
onAdd={() => (adding = true)}
|
|
13453
|
+
addLabel="Add question"
|
|
13454
|
+
label="Questions"
|
|
13455
|
+
/>
|
|
13456
|
+
{/snippet}
|
|
13457
|
+
|
|
13458
|
+
{#snippet canvas()}
|
|
13459
|
+
<StudioCanvas deviceToggle>
|
|
13460
|
+
{#each questions as q, i (q.id)}
|
|
13461
|
+
<StudioCanvasItem
|
|
13462
|
+
label="Question {i + 1}"
|
|
13463
|
+
selected={q.id === selected}
|
|
13464
|
+
onSelect={() => (selected = q.id)}
|
|
13465
|
+
onInsert={() => (adding = true)}
|
|
13466
|
+
>
|
|
13467
|
+
<QuestionPreview question={q} />
|
|
13468
|
+
</StudioCanvasItem>
|
|
13469
|
+
{/each}
|
|
13470
|
+
</StudioCanvas>
|
|
13471
|
+
{/snippet}
|
|
13472
|
+
|
|
13473
|
+
{#snippet inspector()}
|
|
13474
|
+
<StudioInspector title="Question 1" description="Single choice">
|
|
13475
|
+
<StudioInspectorSection><!-- content fields --></StudioInspectorSection>
|
|
13476
|
+
<StudioInspectorSection title="Advanced" collapsible
|
|
13477
|
+
><!-- rarely used --></StudioInspectorSection
|
|
13478
|
+
>
|
|
13479
|
+
</StudioInspector>
|
|
13480
|
+
{/snippet}
|
|
13481
|
+
|
|
13482
|
+
{#if mode === 'build'}
|
|
13483
|
+
<Studio {bar} {rail} {canvas} {inspector} railLabel="Questions" />
|
|
13484
|
+
{:else}
|
|
13485
|
+
<Studio {bar} canvas={settingsPage} />
|
|
13486
|
+
{/if}
|
|
13487
|
+
|
|
13488
|
+
<InsertPalette bind:open={adding} groups={questionTypes} onSelect={add} title="Add a question" />`
|
|
13489
|
+
}
|
|
13490
|
+
],
|
|
13491
|
+
relatedComponents: [
|
|
13492
|
+
"Sheet",
|
|
13493
|
+
"SortableList",
|
|
13494
|
+
"SegmentedControl"
|
|
13495
|
+
]
|
|
13496
|
+
},
|
|
13030
13497
|
{
|
|
13031
13498
|
name: "Switch",
|
|
13032
13499
|
description: "Toggle switch for binary on/off settings",
|
|
@@ -14144,17 +14611,6 @@ var component_catalog_default = {
|
|
|
14144
14611
|
}
|
|
14145
14612
|
],
|
|
14146
14613
|
variants: [
|
|
14147
|
-
{
|
|
14148
|
-
name: "ratio",
|
|
14149
|
-
values: [
|
|
14150
|
-
"square",
|
|
14151
|
-
"video",
|
|
14152
|
-
"photo",
|
|
14153
|
-
"portrait",
|
|
14154
|
-
"wide"
|
|
14155
|
-
],
|
|
14156
|
-
default: "video"
|
|
14157
|
-
},
|
|
14158
14614
|
{
|
|
14159
14615
|
name: "fit",
|
|
14160
14616
|
values: [
|
|
@@ -14363,7 +14819,7 @@ function registerComponentResources(server) {
|
|
|
14363
14819
|
|
|
14364
14820
|
// src/data/token-definitions.json
|
|
14365
14821
|
var token_definitions_default = {
|
|
14366
|
-
version: "0.3.
|
|
14822
|
+
version: "0.3.4",
|
|
14367
14823
|
colors: {
|
|
14368
14824
|
brand: [
|
|
14369
14825
|
{
|
|
@@ -15346,7 +15802,7 @@ function registerTokenResources(server) {
|
|
|
15346
15802
|
|
|
15347
15803
|
// src/data/styles-catalog.json
|
|
15348
15804
|
var styles_catalog_default = {
|
|
15349
|
-
version: "0.3.
|
|
15805
|
+
version: "0.3.4",
|
|
15350
15806
|
package: "@classic-homes/theme-styles",
|
|
15351
15807
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
15352
15808
|
integration: {
|
|
@@ -15729,7 +16185,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
15729
16185
|
|
|
15730
16186
|
// src/data/pattern-library.json
|
|
15731
16187
|
var pattern_library_default = {
|
|
15732
|
-
version: "0.3.
|
|
16188
|
+
version: "0.3.4",
|
|
15733
16189
|
layouts: [
|
|
15734
16190
|
{
|
|
15735
16191
|
id: "dashboard-page",
|
|
@@ -16823,7 +17279,7 @@ function registerLayoutResources(server) {
|
|
|
16823
17279
|
|
|
16824
17280
|
// src/data/schema-catalog.json
|
|
16825
17281
|
var schema_catalog_default = {
|
|
16826
|
-
version: "0.3.
|
|
17282
|
+
version: "0.3.4",
|
|
16827
17283
|
packageName: "@classic-homes/theme-svelte",
|
|
16828
17284
|
importPath: "@classic-homes/theme-svelte",
|
|
16829
17285
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -17631,7 +18087,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
17631
18087
|
|
|
17632
18088
|
// src/data/auth-catalog.json
|
|
17633
18089
|
var auth_catalog_default = {
|
|
17634
|
-
version: "0.3.
|
|
18090
|
+
version: "0.3.4",
|
|
17635
18091
|
packageName: "@classic-homes/auth",
|
|
17636
18092
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
17637
18093
|
subpackages: {
|
|
@@ -20668,7 +21124,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
20668
21124
|
|
|
20669
21125
|
// src/data/notifications-catalog.json
|
|
20670
21126
|
var notifications_catalog_default = {
|
|
20671
|
-
version: "0.3.
|
|
21127
|
+
version: "0.3.4",
|
|
20672
21128
|
packageName: "@classic-homes/notifications",
|
|
20673
21129
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
20674
21130
|
subpackages: {
|
|
@@ -20779,7 +21235,7 @@ var notifications_catalog_default = {
|
|
|
20779
21235
|
{
|
|
20780
21236
|
name: "getNotificationIconColor",
|
|
20781
21237
|
signature: "(type: NotificationType) => string",
|
|
20782
|
-
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)"
|
|
20783
21239
|
},
|
|
20784
21240
|
{
|
|
20785
21241
|
name: "getPriorityBadgeVariant",
|
|
@@ -21561,7 +22017,7 @@ function registerNotificationsResources(server) {
|
|
|
21561
22017
|
description: "Direct API access without Svelte store"
|
|
21562
22018
|
},
|
|
21563
22019
|
utilities: {
|
|
21564
|
-
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'",
|
|
21565
22021
|
description: "Utility functions for display"
|
|
21566
22022
|
},
|
|
21567
22023
|
preferences: {
|
|
@@ -21580,7 +22036,7 @@ function registerNotificationsResources(server) {
|
|
|
21580
22036
|
|
|
21581
22037
|
// src/data/docs-catalog.json
|
|
21582
22038
|
var docs_catalog_default = {
|
|
21583
|
-
version: "0.3.
|
|
22039
|
+
version: "0.3.4",
|
|
21584
22040
|
packageName: "@classic-homes/theme-docs",
|
|
21585
22041
|
description: "Markdown documentation components for the Classic theme system",
|
|
21586
22042
|
exports: {
|
|
@@ -21592,10 +22048,18 @@ var docs_catalog_default = {
|
|
|
21592
22048
|
importPath: "@classic-homes/theme-docs/parser",
|
|
21593
22049
|
description: "Markdown pipeline without Svelte imports (parseMarkdown, extractToc, createSlugger, extensions) for Node build scripts, server loaders and CMS previews"
|
|
21594
22050
|
},
|
|
22051
|
+
"./prose": {
|
|
22052
|
+
importPath: "@classic-homes/theme-docs/prose",
|
|
22053
|
+
description: "Subpath export for prose"
|
|
22054
|
+
},
|
|
21595
22055
|
"./sanitize": {
|
|
21596
22056
|
importPath: "@classic-homes/theme-docs/sanitize",
|
|
21597
22057
|
description: "sanitizeDocsHtml: allowlist sanitizer for parseMarkdown output (server/build-time only)"
|
|
21598
22058
|
},
|
|
22059
|
+
"./sanitize/browser": {
|
|
22060
|
+
importPath: "@classic-homes/theme-docs/sanitize/browser",
|
|
22061
|
+
description: "Subpath export for sanitize/browser"
|
|
22062
|
+
},
|
|
21599
22063
|
"./content": {
|
|
21600
22064
|
importPath: "@classic-homes/theme-docs/content",
|
|
21601
22065
|
description: "loadDocs/renderDocs: a Docusaurus-style docs directory as routes, autogenerated sidebars, generated-index pages, tags and rendered HTML (Node, build time)"
|
|
@@ -21667,6 +22131,154 @@ var docs_catalog_default = {
|
|
|
21667
22131
|
],
|
|
21668
22132
|
example: '<MarkdownPage content={markdownString} theme="github-dark">\n {#snippet header(frontmatter)}\n <h1>{frontmatter.title}</h1>\n {/snippet}\n</MarkdownPage>'
|
|
21669
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
|
+
},
|
|
21670
22282
|
{
|
|
21671
22283
|
name: "CodeBlock",
|
|
21672
22284
|
description: "Standalone syntax-highlighted code block using Shiki",
|
|
@@ -22910,9 +23522,18 @@ var docs_catalog_default = {
|
|
|
22910
23522
|
dependencies: {
|
|
22911
23523
|
"@classic-homes/theme-tokens": "*",
|
|
22912
23524
|
clsx: "^2.1.0",
|
|
23525
|
+
dompurify: "3.4.16",
|
|
22913
23526
|
"js-yaml": "^4.3.2",
|
|
22914
23527
|
marked: "^17.0.0",
|
|
22915
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",
|
|
22916
23537
|
"sanitize-html": "2.18.0",
|
|
22917
23538
|
shiki: "^1.0.0",
|
|
22918
23539
|
"tailwind-merge": "^2.2.0",
|
|
@@ -23076,7 +23697,7 @@ function registerDocsResources(server) {
|
|
|
23076
23697
|
|
|
23077
23698
|
// src/data/charts-catalog.json
|
|
23078
23699
|
var charts_catalog_default = {
|
|
23079
|
-
version: "0.3.
|
|
23700
|
+
version: "0.3.4",
|
|
23080
23701
|
packageName: "@classic-homes/charts-core",
|
|
23081
23702
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
23082
23703
|
subpackages: {
|
|
@@ -23155,6 +23776,16 @@ var charts_catalog_default = {
|
|
|
23155
23776
|
name: "createTooltipFormatter",
|
|
23156
23777
|
signature: "(options?: { showSeriesName?: boolean; valueFormatter?: (value: number) => string; showPercent?: boolean }) => TooltipFormatter",
|
|
23157
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"
|
|
23158
23789
|
}
|
|
23159
23790
|
]
|
|
23160
23791
|
},
|
|
@@ -23226,6 +23857,26 @@ var charts_catalog_default = {
|
|
|
23226
23857
|
name: "THEME_DARK",
|
|
23227
23858
|
signature: "'classic-dark'",
|
|
23228
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"
|
|
23229
23880
|
}
|
|
23230
23881
|
]
|
|
23231
23882
|
}
|
|
@@ -24816,6 +25467,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
|
|
|
24816
25467
|
- \`darkTheme\` - Pre-generated dark theme
|
|
24817
25468
|
- \`THEME_LIGHT\` - Constant: 'classic-light'
|
|
24818
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()
|
|
24819
25472
|
|
|
24820
25473
|
## Formatting Utilities
|
|
24821
25474
|
|
|
@@ -24825,6 +25478,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
|
|
|
24825
25478
|
- \`formatDate(date, options?, locale?)\` - Format date
|
|
24826
25479
|
- \`abbreviateNumber(value, decimals?)\` - Abbreviate to K/M/B/T
|
|
24827
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
|
|
24828
25483
|
|
|
24829
25484
|
## Accessibility Utilities
|
|
24830
25485
|
|
|
@@ -24913,7 +25568,7 @@ interface SankeyData {
|
|
|
24913
25568
|
|
|
24914
25569
|
// src/data/maps-catalog.json
|
|
24915
25570
|
var maps_catalog_default = {
|
|
24916
|
-
version: "0.3.
|
|
25571
|
+
version: "0.3.4",
|
|
24917
25572
|
packageName: "@classic-homes/maps-core",
|
|
24918
25573
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
24919
25574
|
subpackages: {
|
|
@@ -30244,7 +30899,7 @@ ${catalog5.quickReference.tailwindConfig}
|
|
|
30244
30899
|
|
|
30245
30900
|
// src/data/native-catalog.json
|
|
30246
30901
|
var native_catalog_default = {
|
|
30247
|
-
version: "0.3.
|
|
30902
|
+
version: "0.3.4",
|
|
30248
30903
|
packageName: "@classic-homes/native",
|
|
30249
30904
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
30250
30905
|
subpackages: {
|
|
@@ -31964,19 +32619,10 @@ function registerResources(server) {
|
|
|
31964
32619
|
// src/tools/searchComponents.ts
|
|
31965
32620
|
import { z } from "zod";
|
|
31966
32621
|
var catalog7 = component_catalog_default;
|
|
32622
|
+
var categories = [...new Set(catalog7.components.map((c) => c.category))].sort();
|
|
31967
32623
|
var SearchComponentsSchema = z.object({
|
|
31968
32624
|
query: z.string().describe("Search query (component name, description, or functionality)"),
|
|
31969
|
-
category: z.enum(
|
|
31970
|
-
"core",
|
|
31971
|
-
"form",
|
|
31972
|
-
"layout",
|
|
31973
|
-
"feedback",
|
|
31974
|
-
"data",
|
|
31975
|
-
"overlay",
|
|
31976
|
-
"navigation",
|
|
31977
|
-
"branding",
|
|
31978
|
-
"chart"
|
|
31979
|
-
]).optional().describe("Filter by component category"),
|
|
32625
|
+
category: z.enum(categories).optional().describe("Filter by component category"),
|
|
31980
32626
|
limit: z.number().min(1).max(50).default(10).describe("Maximum number of results")
|
|
31981
32627
|
});
|
|
31982
32628
|
function registerSearchComponentsTool(server) {
|
|
@@ -32120,34 +32766,15 @@ function registerGetComponentPropsTool(server) {
|
|
|
32120
32766
|
// src/tools/suggestPattern.ts
|
|
32121
32767
|
import { z as z3 } from "zod";
|
|
32122
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);
|
|
32123
32776
|
var SuggestPatternSchema = z3.object({
|
|
32124
|
-
useCase: z3.enum(
|
|
32125
|
-
// Layout patterns
|
|
32126
|
-
"dashboard-page",
|
|
32127
|
-
"public-page",
|
|
32128
|
-
"auth-page",
|
|
32129
|
-
"error-page",
|
|
32130
|
-
"form-page",
|
|
32131
|
-
// Form patterns
|
|
32132
|
-
"login-form",
|
|
32133
|
-
"registration-form",
|
|
32134
|
-
"contact-form",
|
|
32135
|
-
// MFA and password form patterns
|
|
32136
|
-
"mfa-verification-form",
|
|
32137
|
-
"mfa-setup-form",
|
|
32138
|
-
"profile-update-form",
|
|
32139
|
-
"change-password-form",
|
|
32140
|
-
"forgot-password-form",
|
|
32141
|
-
"reset-password-form",
|
|
32142
|
-
// Auth flow patterns
|
|
32143
|
-
"login-with-mfa",
|
|
32144
|
-
"sso-login",
|
|
32145
|
-
"session-management",
|
|
32146
|
-
"protected-route",
|
|
32147
|
-
// Notification patterns
|
|
32148
|
-
"notification-center",
|
|
32149
|
-
"notification-dropdown"
|
|
32150
|
-
]).describe("The use case you need a pattern for"),
|
|
32777
|
+
useCase: z3.enum(patternIds).describe("The use case you need a pattern for"),
|
|
32151
32778
|
requirements: z3.array(z3.string()).optional().describe("Additional requirements or constraints")
|
|
32152
32779
|
});
|
|
32153
32780
|
function registerSuggestPatternTool(server) {
|
|
@@ -32161,7 +32788,8 @@ function registerSuggestPatternTool(server) {
|
|
|
32161
32788
|
const form = patterns2.forms.find((f) => f.id === useCase);
|
|
32162
32789
|
const auth = patterns2.auth?.find((a) => a.id === useCase);
|
|
32163
32790
|
const notification = patterns2.notifications?.find((n) => n.id === useCase);
|
|
32164
|
-
const
|
|
32791
|
+
const panel = patterns2.panels?.find((p) => p.id === useCase);
|
|
32792
|
+
const pattern = layout || form || auth || notification || panel;
|
|
32165
32793
|
if (!pattern) {
|
|
32166
32794
|
const availablePatterns = [
|
|
32167
32795
|
...patterns2.layouts.map((l) => ({ id: l.id, type: "layout", name: l.name })),
|
|
@@ -32171,7 +32799,8 @@ function registerSuggestPatternTool(server) {
|
|
|
32171
32799
|
id: n.id,
|
|
32172
32800
|
type: "notification",
|
|
32173
32801
|
name: n.name
|
|
32174
|
-
})) || []
|
|
32802
|
+
})) || [],
|
|
32803
|
+
...patterns2.panels?.map((p) => ({ id: p.id, type: "panel", name: p.name })) || []
|
|
32175
32804
|
];
|
|
32176
32805
|
return {
|
|
32177
32806
|
content: [
|
|
@@ -32223,6 +32852,18 @@ var ValidateUsageSchema = z4.object({
|
|
|
32223
32852
|
props: z4.record(z4.unknown()).describe("Props being passed to the component"),
|
|
32224
32853
|
context: z4.string().optional().describe('Where the component is being used (e.g., "inside a form", "in modal")')
|
|
32225
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
|
+
}
|
|
32226
32867
|
function registerValidateUsageTool(server) {
|
|
32227
32868
|
server.tool(
|
|
32228
32869
|
"validate_component_usage",
|
|
@@ -32253,7 +32894,7 @@ function registerValidateUsageTool(server) {
|
|
|
32253
32894
|
const issues = [];
|
|
32254
32895
|
const knownProps = new Set(component.props.map((p) => p.name));
|
|
32255
32896
|
for (const propName of Object.keys(props)) {
|
|
32256
|
-
if (!knownProps.has(propName) && propName
|
|
32897
|
+
if (!knownProps.has(propName) && !isPassThroughAttribute(propName)) {
|
|
32257
32898
|
issues.push({
|
|
32258
32899
|
type: "warning",
|
|
32259
32900
|
message: `Unknown prop "${propName}" - not in component API`,
|
|
@@ -32619,7 +33260,7 @@ function registerPrompts(server) {
|
|
|
32619
33260
|
// package.json
|
|
32620
33261
|
var package_default = {
|
|
32621
33262
|
name: "@classic-homes/theme-mcp",
|
|
32622
|
-
version: "0.3.
|
|
33263
|
+
version: "0.3.4",
|
|
32623
33264
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
32624
33265
|
type: "module",
|
|
32625
33266
|
main: "dist/index.js",
|
|
@@ -32669,7 +33310,7 @@ var package_default = {
|
|
|
32669
33310
|
start: "node dist/cli.js",
|
|
32670
33311
|
typecheck: "tsc --noEmit",
|
|
32671
33312
|
validate: "tsx scripts/validate-catalog-integrity.ts",
|
|
32672
|
-
test: "npm run validate",
|
|
33313
|
+
test: "npm run validate && vitest run",
|
|
32673
33314
|
clean: "node ../../scripts/rm.mjs dist",
|
|
32674
33315
|
prepublishOnly: "npm run build"
|
|
32675
33316
|
},
|