@classic-homes/theme-mcp 0.3.3 → 0.3.5
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 +1828 -148
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1828 -148
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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.
|
|
14
|
+
version: "0.3.5",
|
|
15
15
|
components: [
|
|
16
16
|
{
|
|
17
17
|
name: "ActionHeader",
|
|
@@ -689,6 +689,49 @@ var component_catalog_default = {
|
|
|
689
689
|
required: false,
|
|
690
690
|
description: "Apply gradient fill to areas"
|
|
691
691
|
},
|
|
692
|
+
{
|
|
693
|
+
name: "showLabels",
|
|
694
|
+
type: "boolean",
|
|
695
|
+
default: "false",
|
|
696
|
+
required: false,
|
|
697
|
+
description: "Show data labels"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
name: "labelFormatter",
|
|
701
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
702
|
+
required: false,
|
|
703
|
+
description: "Data label template or function"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
name: "xAxisConfig",
|
|
707
|
+
type: "AxisConfig",
|
|
708
|
+
required: false,
|
|
709
|
+
description: "Horizontal axis name, tick formatter, rotation and range"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: "yAxisConfig",
|
|
713
|
+
type: "AxisConfig",
|
|
714
|
+
required: false,
|
|
715
|
+
description: "Vertical axis name, tick formatter, rotation and range"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
name: "legend",
|
|
719
|
+
type: "ChartLegendConfig",
|
|
720
|
+
required: false,
|
|
721
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: "onLegendChange",
|
|
725
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
726
|
+
required: false,
|
|
727
|
+
description: "Called when legend items are shown or hidden"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: "renderLegend",
|
|
731
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
732
|
+
required: false,
|
|
733
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
734
|
+
},
|
|
692
735
|
{
|
|
693
736
|
name: "onClick",
|
|
694
737
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -735,6 +778,24 @@ var component_catalog_default = {
|
|
|
735
778
|
default: "true",
|
|
736
779
|
required: false,
|
|
737
780
|
description: "Show grid lines"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
name: "tooltipFormatter",
|
|
784
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
785
|
+
required: false,
|
|
786
|
+
description: "Custom tooltip template or HTML function"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
name: "tooltipValueFormatter",
|
|
790
|
+
type: "(value: number) => string",
|
|
791
|
+
required: false,
|
|
792
|
+
description: "Format values in the default tooltip"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
name: "option",
|
|
796
|
+
type: "EChartsOption",
|
|
797
|
+
required: false,
|
|
798
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
738
799
|
}
|
|
739
800
|
],
|
|
740
801
|
variants: [
|
|
@@ -809,19 +870,7 @@ var component_catalog_default = {
|
|
|
809
870
|
description: "Additional CSS classes for the content box"
|
|
810
871
|
}
|
|
811
872
|
],
|
|
812
|
-
variants: [
|
|
813
|
-
{
|
|
814
|
-
name: "ratio",
|
|
815
|
-
values: [
|
|
816
|
-
"square",
|
|
817
|
-
"video",
|
|
818
|
-
"photo",
|
|
819
|
-
"portrait",
|
|
820
|
-
"wide"
|
|
821
|
-
],
|
|
822
|
-
default: "video"
|
|
823
|
-
}
|
|
824
|
-
],
|
|
873
|
+
variants: [],
|
|
825
874
|
slots: [
|
|
826
875
|
{
|
|
827
876
|
name: "children",
|
|
@@ -1525,6 +1574,42 @@ var component_catalog_default = {
|
|
|
1525
1574
|
required: false,
|
|
1526
1575
|
description: "Show value labels on bars"
|
|
1527
1576
|
},
|
|
1577
|
+
{
|
|
1578
|
+
name: "labelFormatter",
|
|
1579
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
1580
|
+
required: false,
|
|
1581
|
+
description: "Data label template or function"
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
name: "xAxisConfig",
|
|
1585
|
+
type: "AxisConfig",
|
|
1586
|
+
required: false,
|
|
1587
|
+
description: "Horizontal axis name, tick formatter, rotation and range"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
name: "yAxisConfig",
|
|
1591
|
+
type: "AxisConfig",
|
|
1592
|
+
required: false,
|
|
1593
|
+
description: "Vertical axis name, tick formatter, rotation and range"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: "legend",
|
|
1597
|
+
type: "ChartLegendConfig",
|
|
1598
|
+
required: false,
|
|
1599
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
name: "onLegendChange",
|
|
1603
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
1604
|
+
required: false,
|
|
1605
|
+
description: "Called when legend items are shown or hidden"
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
name: "renderLegend",
|
|
1609
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
1610
|
+
required: false,
|
|
1611
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
1612
|
+
},
|
|
1528
1613
|
{
|
|
1529
1614
|
name: "onClick",
|
|
1530
1615
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -1577,6 +1662,24 @@ var component_catalog_default = {
|
|
|
1577
1662
|
default: "true",
|
|
1578
1663
|
required: false,
|
|
1579
1664
|
description: "Show grid lines"
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
name: "tooltipFormatter",
|
|
1668
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
1669
|
+
required: false,
|
|
1670
|
+
description: "Custom tooltip template or HTML function"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
name: "tooltipValueFormatter",
|
|
1674
|
+
type: "(value: number) => string",
|
|
1675
|
+
required: false,
|
|
1676
|
+
description: "Format values in the default tooltip"
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
name: "option",
|
|
1680
|
+
type: "EChartsOption",
|
|
1681
|
+
required: false,
|
|
1682
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
1580
1683
|
}
|
|
1581
1684
|
],
|
|
1582
1685
|
variants: [
|
|
@@ -1628,6 +1731,10 @@ var component_catalog_default = {
|
|
|
1628
1731
|
{
|
|
1629
1732
|
title: "With Value Labels",
|
|
1630
1733
|
code: '<BarChart title="Monthly Performance" {data} showValues height={400} />'
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
title: "Legend Placement",
|
|
1737
|
+
code: `<BarChart title="Weekly Sales" {data} legend={{ position: 'right', icon: 'circle' }} />`
|
|
1631
1738
|
}
|
|
1632
1739
|
],
|
|
1633
1740
|
relatedComponents: [
|
|
@@ -1815,6 +1922,18 @@ var component_catalog_default = {
|
|
|
1815
1922
|
required: false,
|
|
1816
1923
|
description: "Display volume bars below chart"
|
|
1817
1924
|
},
|
|
1925
|
+
{
|
|
1926
|
+
name: "xAxisConfig",
|
|
1927
|
+
type: "AxisConfig",
|
|
1928
|
+
required: false,
|
|
1929
|
+
description: "Horizontal axis name, tick formatter, rotation and range"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
name: "yAxisConfig",
|
|
1933
|
+
type: "AxisConfig",
|
|
1934
|
+
required: false,
|
|
1935
|
+
description: "Vertical axis name, tick formatter, rotation and range"
|
|
1936
|
+
},
|
|
1818
1937
|
{
|
|
1819
1938
|
name: "onClick",
|
|
1820
1939
|
type: "(params: CandlestickEventParams) => void",
|
|
@@ -1854,6 +1973,24 @@ var component_catalog_default = {
|
|
|
1854
1973
|
default: "true",
|
|
1855
1974
|
required: false,
|
|
1856
1975
|
description: "Show grid lines"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
name: "tooltipFormatter",
|
|
1979
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
1980
|
+
required: false,
|
|
1981
|
+
description: "Custom tooltip template or HTML function"
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
name: "tooltipValueFormatter",
|
|
1985
|
+
type: "(value: number) => string",
|
|
1986
|
+
required: false,
|
|
1987
|
+
description: "Format values in the default tooltip"
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: "option",
|
|
1991
|
+
type: "EChartsOption",
|
|
1992
|
+
required: false,
|
|
1993
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
1857
1994
|
}
|
|
1858
1995
|
],
|
|
1859
1996
|
variants: [
|
|
@@ -1920,8 +2057,56 @@ var component_catalog_default = {
|
|
|
1920
2057
|
description: "Container component for grouping related content",
|
|
1921
2058
|
category: "layout",
|
|
1922
2059
|
importPath: "@classic-homes/theme-svelte",
|
|
1923
|
-
props: [
|
|
1924
|
-
|
|
2060
|
+
props: [
|
|
2061
|
+
{
|
|
2062
|
+
name: "variant",
|
|
2063
|
+
type: "'default' | 'featured' | 'highlight' | 'warning'",
|
|
2064
|
+
default: "'default'",
|
|
2065
|
+
required: false,
|
|
2066
|
+
description: "Card style variant"
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
name: "borderColor",
|
|
2070
|
+
type: "'default' | 'primary' | 'muted'",
|
|
2071
|
+
default: "'default'",
|
|
2072
|
+
required: false,
|
|
2073
|
+
description: "Border color (ignored for highlight/warning)"
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
name: "interactive",
|
|
2077
|
+
type: "boolean",
|
|
2078
|
+
default: "false",
|
|
2079
|
+
required: false,
|
|
2080
|
+
description: "Enables hover shadow effect"
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
name: "class",
|
|
2084
|
+
type: "string",
|
|
2085
|
+
required: false,
|
|
2086
|
+
description: "Additional CSS classes"
|
|
2087
|
+
}
|
|
2088
|
+
],
|
|
2089
|
+
variants: [
|
|
2090
|
+
{
|
|
2091
|
+
name: "variant",
|
|
2092
|
+
values: [
|
|
2093
|
+
"default",
|
|
2094
|
+
"featured",
|
|
2095
|
+
"highlight",
|
|
2096
|
+
"warning"
|
|
2097
|
+
],
|
|
2098
|
+
default: "default"
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
name: "borderColor",
|
|
2102
|
+
values: [
|
|
2103
|
+
"default",
|
|
2104
|
+
"primary",
|
|
2105
|
+
"muted"
|
|
2106
|
+
],
|
|
2107
|
+
default: "default"
|
|
2108
|
+
}
|
|
2109
|
+
],
|
|
1925
2110
|
slots: [
|
|
1926
2111
|
{
|
|
1927
2112
|
name: "children",
|
|
@@ -2319,9 +2504,33 @@ var component_catalog_default = {
|
|
|
2319
2504
|
type: "string",
|
|
2320
2505
|
required: false,
|
|
2321
2506
|
description: "Additional CSS classes for outer wrapper"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
name: "legend",
|
|
2510
|
+
type: "Snippet",
|
|
2511
|
+
required: false,
|
|
2512
|
+
description: 'Custom legend rendered beside the chart, outside the `role="img"` element'
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
name: "legendPosition",
|
|
2516
|
+
type: "'top' | 'right' | 'bottom' | 'left'",
|
|
2517
|
+
default: "'bottom'",
|
|
2518
|
+
required: false,
|
|
2519
|
+
description: "Where the custom legend sits"
|
|
2520
|
+
}
|
|
2521
|
+
],
|
|
2522
|
+
variants: [
|
|
2523
|
+
{
|
|
2524
|
+
name: "legendPosition",
|
|
2525
|
+
values: [
|
|
2526
|
+
"top",
|
|
2527
|
+
"right",
|
|
2528
|
+
"bottom",
|
|
2529
|
+
"left"
|
|
2530
|
+
],
|
|
2531
|
+
default: "bottom"
|
|
2322
2532
|
}
|
|
2323
2533
|
],
|
|
2324
|
-
variants: [],
|
|
2325
2534
|
slots: [],
|
|
2326
2535
|
events: [],
|
|
2327
2536
|
examples: [
|
|
@@ -2560,6 +2769,89 @@ var component_catalog_default = {
|
|
|
2560
2769
|
"ChartSkeleton"
|
|
2561
2770
|
]
|
|
2562
2771
|
},
|
|
2772
|
+
{
|
|
2773
|
+
name: "ChartLegend",
|
|
2774
|
+
description: "Accessible HTML legend for charts, used with the renderLegend prop",
|
|
2775
|
+
category: "chart",
|
|
2776
|
+
importPath: "@classic-homes/charts-svelte",
|
|
2777
|
+
props: [
|
|
2778
|
+
{
|
|
2779
|
+
name: "items",
|
|
2780
|
+
type: "LegendItem[]",
|
|
2781
|
+
required: true,
|
|
2782
|
+
description: "Entries with `name`, `color` and `visible`"
|
|
2783
|
+
},
|
|
2784
|
+
{
|
|
2785
|
+
name: "toggle",
|
|
2786
|
+
type: "(name: string) => void",
|
|
2787
|
+
required: true,
|
|
2788
|
+
description: "Show or hide an item"
|
|
2789
|
+
},
|
|
2790
|
+
{
|
|
2791
|
+
name: "position",
|
|
2792
|
+
type: "'top' | 'right' | 'bottom' | 'left'",
|
|
2793
|
+
default: "'bottom'",
|
|
2794
|
+
required: false,
|
|
2795
|
+
description: "Placement, used to pick the orientation"
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
name: "chartTitle",
|
|
2799
|
+
type: "string",
|
|
2800
|
+
required: false,
|
|
2801
|
+
description: 'Labels the list as "{chartTitle} legend"'
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
name: "orientation",
|
|
2805
|
+
type: "'horizontal' | 'vertical'",
|
|
2806
|
+
default: "vertical for left and right",
|
|
2807
|
+
required: false,
|
|
2808
|
+
description: "Item flow"
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
name: "class",
|
|
2812
|
+
type: "string",
|
|
2813
|
+
required: false,
|
|
2814
|
+
description: "Additional classes (`className` in React)"
|
|
2815
|
+
}
|
|
2816
|
+
],
|
|
2817
|
+
variants: [
|
|
2818
|
+
{
|
|
2819
|
+
name: "position",
|
|
2820
|
+
values: [
|
|
2821
|
+
"top",
|
|
2822
|
+
"right",
|
|
2823
|
+
"bottom",
|
|
2824
|
+
"left"
|
|
2825
|
+
],
|
|
2826
|
+
default: "bottom"
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
name: "orientation",
|
|
2830
|
+
values: [
|
|
2831
|
+
"horizontal",
|
|
2832
|
+
"vertical"
|
|
2833
|
+
],
|
|
2834
|
+
default: "vertical for left and right"
|
|
2835
|
+
}
|
|
2836
|
+
],
|
|
2837
|
+
slots: [],
|
|
2838
|
+
events: [],
|
|
2839
|
+
examples: [
|
|
2840
|
+
{
|
|
2841
|
+
title: "Basic Usage",
|
|
2842
|
+
code: `<script>
|
|
2843
|
+
import { LineChart, ChartLegend } from '@classic-homes/charts-svelte';
|
|
2844
|
+
</script>
|
|
2845
|
+
|
|
2846
|
+
{#snippet legend(props)}
|
|
2847
|
+
<ChartLegend {...props} />
|
|
2848
|
+
{/snippet}
|
|
2849
|
+
|
|
2850
|
+
<LineChart title="Revenue" {data} renderLegend={legend} legend={{ position: 'right' }} />`
|
|
2851
|
+
}
|
|
2852
|
+
],
|
|
2853
|
+
relatedComponents: []
|
|
2854
|
+
},
|
|
2563
2855
|
{
|
|
2564
2856
|
name: "ChartSkeleton",
|
|
2565
2857
|
description: "Loading skeleton placeholder for charts with animated bars",
|
|
@@ -2789,6 +3081,114 @@ var component_catalog_default = {
|
|
|
2789
3081
|
"Label"
|
|
2790
3082
|
]
|
|
2791
3083
|
},
|
|
3084
|
+
{
|
|
3085
|
+
name: "CodeField",
|
|
3086
|
+
description: "Monospaced text area for code, markup or diagram source, where Tab indents",
|
|
3087
|
+
category: "form",
|
|
3088
|
+
importPath: "@classic-homes/theme-svelte",
|
|
3089
|
+
props: [
|
|
3090
|
+
{
|
|
3091
|
+
name: "value",
|
|
3092
|
+
type: "string",
|
|
3093
|
+
default: "''",
|
|
3094
|
+
required: false,
|
|
3095
|
+
description: "The text (bindable)"
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
name: "label",
|
|
3099
|
+
type: "string",
|
|
3100
|
+
required: false,
|
|
3101
|
+
description: "Accessible name; or use `aria-labelledby`"
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
name: "id",
|
|
3105
|
+
type: "string",
|
|
3106
|
+
required: false,
|
|
3107
|
+
description: "For a visible `<Label for>`"
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
name: "rows",
|
|
3111
|
+
type: "number",
|
|
3112
|
+
default: "8",
|
|
3113
|
+
required: false,
|
|
3114
|
+
description: "Visible lines"
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
name: "indent",
|
|
3118
|
+
type: "number",
|
|
3119
|
+
default: "2",
|
|
3120
|
+
required: false,
|
|
3121
|
+
description: "Spaces per indent level"
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
name: "wrap",
|
|
3125
|
+
type: "boolean",
|
|
3126
|
+
default: "false",
|
|
3127
|
+
required: false,
|
|
3128
|
+
description: "Soft-wrap long lines instead of scrolling sideways"
|
|
3129
|
+
},
|
|
3130
|
+
{
|
|
3131
|
+
name: "placeholder",
|
|
3132
|
+
type: "string",
|
|
3133
|
+
required: false,
|
|
3134
|
+
description: "Placeholder text"
|
|
3135
|
+
},
|
|
3136
|
+
{
|
|
3137
|
+
name: "disabled",
|
|
3138
|
+
type: "boolean",
|
|
3139
|
+
default: "false",
|
|
3140
|
+
required: false,
|
|
3141
|
+
description: "Disable the field"
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
name: "readonly",
|
|
3145
|
+
type: "boolean",
|
|
3146
|
+
default: "false",
|
|
3147
|
+
required: false,
|
|
3148
|
+
description: "Read only; Tab moves focus as usual"
|
|
3149
|
+
},
|
|
3150
|
+
{
|
|
3151
|
+
name: "aria-invalid",
|
|
3152
|
+
type: "boolean",
|
|
3153
|
+
required: false,
|
|
3154
|
+
description: "Error styling"
|
|
3155
|
+
},
|
|
3156
|
+
{
|
|
3157
|
+
name: "aria-describedby",
|
|
3158
|
+
type: "string",
|
|
3159
|
+
required: false,
|
|
3160
|
+
description: "Extra description ids (the Tab hint is always added)"
|
|
3161
|
+
},
|
|
3162
|
+
{
|
|
3163
|
+
name: "onValueChange",
|
|
3164
|
+
type: "(value: string) => void",
|
|
3165
|
+
required: false,
|
|
3166
|
+
description: "Called on every change"
|
|
3167
|
+
}
|
|
3168
|
+
],
|
|
3169
|
+
variants: [],
|
|
3170
|
+
slots: [
|
|
3171
|
+
{
|
|
3172
|
+
name: "children",
|
|
3173
|
+
description: "Main content",
|
|
3174
|
+
required: false
|
|
3175
|
+
}
|
|
3176
|
+
],
|
|
3177
|
+
events: [],
|
|
3178
|
+
examples: [
|
|
3179
|
+
{
|
|
3180
|
+
title: "Basic Usage",
|
|
3181
|
+
code: `<script>
|
|
3182
|
+
import { CodeField } from '@classic-homes/theme-svelte';
|
|
3183
|
+
|
|
3184
|
+
let source = $state('flowchart TD\\n A --> B');
|
|
3185
|
+
</script>
|
|
3186
|
+
|
|
3187
|
+
<CodeField label="Diagram source" bind:value={source} rows={6} />`
|
|
3188
|
+
}
|
|
3189
|
+
],
|
|
3190
|
+
relatedComponents: []
|
|
3191
|
+
},
|
|
2792
3192
|
{
|
|
2793
3193
|
name: "Combobox",
|
|
2794
3194
|
description: "Searchable select with async loading support",
|
|
@@ -3874,13 +4274,6 @@ var component_catalog_default = {
|
|
|
3874
4274
|
"desc"
|
|
3875
4275
|
],
|
|
3876
4276
|
default: "asc"
|
|
3877
|
-
},
|
|
3878
|
-
{
|
|
3879
|
-
name: "onSort",
|
|
3880
|
-
values: [
|
|
3881
|
-
"asc",
|
|
3882
|
-
"desc"
|
|
3883
|
-
]
|
|
3884
4277
|
}
|
|
3885
4278
|
],
|
|
3886
4279
|
slots: [
|
|
@@ -4916,7 +5309,7 @@ var component_catalog_default = {
|
|
|
4916
5309
|
{
|
|
4917
5310
|
name: "showLabels",
|
|
4918
5311
|
type: "boolean",
|
|
4919
|
-
default: "
|
|
5312
|
+
default: "true",
|
|
4920
5313
|
required: false,
|
|
4921
5314
|
description: "Show labels on slices"
|
|
4922
5315
|
},
|
|
@@ -4946,6 +5339,30 @@ var component_catalog_default = {
|
|
|
4946
5339
|
required: false,
|
|
4947
5340
|
description: "Value displayed in the center"
|
|
4948
5341
|
},
|
|
5342
|
+
{
|
|
5343
|
+
name: "labelFormatter",
|
|
5344
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
5345
|
+
required: false,
|
|
5346
|
+
description: "Data label template or function"
|
|
5347
|
+
},
|
|
5348
|
+
{
|
|
5349
|
+
name: "legend",
|
|
5350
|
+
type: "ChartLegendConfig",
|
|
5351
|
+
required: false,
|
|
5352
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
5353
|
+
},
|
|
5354
|
+
{
|
|
5355
|
+
name: "onLegendChange",
|
|
5356
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
5357
|
+
required: false,
|
|
5358
|
+
description: "Called when legend items are shown or hidden"
|
|
5359
|
+
},
|
|
5360
|
+
{
|
|
5361
|
+
name: "renderLegend",
|
|
5362
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
5363
|
+
required: false,
|
|
5364
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
5365
|
+
},
|
|
4949
5366
|
{
|
|
4950
5367
|
name: "onClick",
|
|
4951
5368
|
type: "(params: SliceEventParams) => void",
|
|
@@ -4985,6 +5402,24 @@ var component_catalog_default = {
|
|
|
4985
5402
|
default: "true",
|
|
4986
5403
|
required: false,
|
|
4987
5404
|
description: "Show tooltip on hover"
|
|
5405
|
+
},
|
|
5406
|
+
{
|
|
5407
|
+
name: "tooltipFormatter",
|
|
5408
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
5409
|
+
required: false,
|
|
5410
|
+
description: "Custom tooltip template or HTML function"
|
|
5411
|
+
},
|
|
5412
|
+
{
|
|
5413
|
+
name: "tooltipValueFormatter",
|
|
5414
|
+
type: "(value: number) => string",
|
|
5415
|
+
required: false,
|
|
5416
|
+
description: "Format values in the default tooltip"
|
|
5417
|
+
},
|
|
5418
|
+
{
|
|
5419
|
+
name: "option",
|
|
5420
|
+
type: "EChartsOption",
|
|
5421
|
+
required: false,
|
|
5422
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
4988
5423
|
}
|
|
4989
5424
|
],
|
|
4990
5425
|
variants: [
|
|
@@ -5370,6 +5805,132 @@ var component_catalog_default = {
|
|
|
5370
5805
|
"AppShell"
|
|
5371
5806
|
]
|
|
5372
5807
|
},
|
|
5808
|
+
{
|
|
5809
|
+
name: "FeedbackWidget",
|
|
5810
|
+
description: "Edge tab and dialog that sends page feedback, quoted passages and screenshots to chapi",
|
|
5811
|
+
category: "feedback",
|
|
5812
|
+
importPath: "@classic-homes/feedback-svelte",
|
|
5813
|
+
props: [
|
|
5814
|
+
{
|
|
5815
|
+
name: "apiBase",
|
|
5816
|
+
type: "string",
|
|
5817
|
+
required: false,
|
|
5818
|
+
description: "chapi origin. `/v2/feedback` is appended; a trailing `/v1` or `/` is stripped (required)"
|
|
5819
|
+
},
|
|
5820
|
+
{
|
|
5821
|
+
name: "source",
|
|
5822
|
+
type: "string",
|
|
5823
|
+
required: false,
|
|
5824
|
+
description: "Host app id, `/^[a-z0-9-]{1,40}$/`, e.g. `app`, `field-app`, `homeowner-guide` (required)"
|
|
5825
|
+
},
|
|
5826
|
+
{
|
|
5827
|
+
name: "getToken",
|
|
5828
|
+
type: "() => Promise<string | null> | string | null",
|
|
5829
|
+
required: false,
|
|
5830
|
+
description: "Bearer token for chapi. Return `null` for anonymous use"
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
name: "user",
|
|
5834
|
+
type: "{ name?: string; email?: string }",
|
|
5835
|
+
required: false,
|
|
5836
|
+
description: "Prefills name and email. Without it the fields are marked optional"
|
|
5837
|
+
},
|
|
5838
|
+
{
|
|
5839
|
+
name: "turnstileSiteKey",
|
|
5840
|
+
type: "string",
|
|
5841
|
+
required: false,
|
|
5842
|
+
description: "Cloudflare Turnstile site key, used when there is no bearer token"
|
|
5843
|
+
},
|
|
5844
|
+
{
|
|
5845
|
+
name: "selection",
|
|
5846
|
+
type: "{ container: string } | false",
|
|
5847
|
+
default: "false",
|
|
5848
|
+
required: false,
|
|
5849
|
+
description: "Enables comments on selected text inside `container`"
|
|
5850
|
+
},
|
|
5851
|
+
{
|
|
5852
|
+
name: "categories",
|
|
5853
|
+
type: "FeedbackCategoryOption[]",
|
|
5854
|
+
default: "see below",
|
|
5855
|
+
required: false,
|
|
5856
|
+
description: "Category chips. `value` is sent as `payload.category`"
|
|
5857
|
+
},
|
|
5858
|
+
{
|
|
5859
|
+
name: "getContext",
|
|
5860
|
+
type: "() => Record<string, string | undefined>",
|
|
5861
|
+
required: false,
|
|
5862
|
+
description: "Host context added to `payload.metadata` at submit time"
|
|
5863
|
+
},
|
|
5864
|
+
{
|
|
5865
|
+
name: "trigger",
|
|
5866
|
+
type: "'tab' | 'none'",
|
|
5867
|
+
default: "'tab'",
|
|
5868
|
+
required: false,
|
|
5869
|
+
description: "`'none'` hides the edge tab; open the dialog with `openFeedback()`"
|
|
5870
|
+
},
|
|
5871
|
+
{
|
|
5872
|
+
name: "tabLabel",
|
|
5873
|
+
type: "string",
|
|
5874
|
+
default: "'Feedback'",
|
|
5875
|
+
required: false,
|
|
5876
|
+
description: "Edge tab text"
|
|
5877
|
+
},
|
|
5878
|
+
{
|
|
5879
|
+
name: "maxAttachments",
|
|
5880
|
+
type: "number",
|
|
5881
|
+
default: "1",
|
|
5882
|
+
required: false,
|
|
5883
|
+
description: "Screenshots per submission, 0 to 3"
|
|
5884
|
+
},
|
|
5885
|
+
{
|
|
5886
|
+
name: "allowScreenshotCapture",
|
|
5887
|
+
type: "boolean",
|
|
5888
|
+
default: "true",
|
|
5889
|
+
required: false,
|
|
5890
|
+
description: 'Shows "Capture this page"'
|
|
5891
|
+
},
|
|
5892
|
+
{
|
|
5893
|
+
name: "submit",
|
|
5894
|
+
type: "(payload: FeedbackPayload, files: Blob[]) => Promise<SubmitResult>",
|
|
5895
|
+
required: false,
|
|
5896
|
+
description: "Replaces the built-in POST, e.g. with an offline queue"
|
|
5897
|
+
},
|
|
5898
|
+
{
|
|
5899
|
+
name: "onSubmitted",
|
|
5900
|
+
type: "(result: SubmitResult) => void",
|
|
5901
|
+
required: false,
|
|
5902
|
+
description: "Called after a successful (or queued) submission"
|
|
5903
|
+
}
|
|
5904
|
+
],
|
|
5905
|
+
variants: [
|
|
5906
|
+
{
|
|
5907
|
+
name: "trigger",
|
|
5908
|
+
values: [
|
|
5909
|
+
"tab",
|
|
5910
|
+
"none"
|
|
5911
|
+
],
|
|
5912
|
+
default: "tab"
|
|
5913
|
+
}
|
|
5914
|
+
],
|
|
5915
|
+
slots: [
|
|
5916
|
+
{
|
|
5917
|
+
name: "children",
|
|
5918
|
+
description: "Main content",
|
|
5919
|
+
required: false
|
|
5920
|
+
}
|
|
5921
|
+
],
|
|
5922
|
+
events: [],
|
|
5923
|
+
examples: [
|
|
5924
|
+
{
|
|
5925
|
+
title: "Open from an error card",
|
|
5926
|
+
code: "<script>\n import { openFeedback } from '@classic-homes/feedback-svelte';\n</script>\n\n<button onclick={() => openFeedback({ context: { card: 'schedule', error: 'E_TIMEOUT' } })}>\n Report this problem\n</button>"
|
|
5927
|
+
}
|
|
5928
|
+
],
|
|
5929
|
+
relatedComponents: [
|
|
5930
|
+
"Dialog",
|
|
5931
|
+
"FileUpload"
|
|
5932
|
+
]
|
|
5933
|
+
},
|
|
5373
5934
|
{
|
|
5374
5935
|
name: "FileUpload",
|
|
5375
5936
|
description: "File upload component with drag-and-drop support",
|
|
@@ -6190,6 +6751,30 @@ var component_catalog_default = {
|
|
|
6190
6751
|
required: false,
|
|
6191
6752
|
description: "Show value labels"
|
|
6192
6753
|
},
|
|
6754
|
+
{
|
|
6755
|
+
name: "labelFormatter",
|
|
6756
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
6757
|
+
required: false,
|
|
6758
|
+
description: "Data label template or function"
|
|
6759
|
+
},
|
|
6760
|
+
{
|
|
6761
|
+
name: "legend",
|
|
6762
|
+
type: "ChartLegendConfig",
|
|
6763
|
+
required: false,
|
|
6764
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
6765
|
+
},
|
|
6766
|
+
{
|
|
6767
|
+
name: "onLegendChange",
|
|
6768
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
6769
|
+
required: false,
|
|
6770
|
+
description: "Called when legend items are shown or hidden"
|
|
6771
|
+
},
|
|
6772
|
+
{
|
|
6773
|
+
name: "renderLegend",
|
|
6774
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
6775
|
+
required: false,
|
|
6776
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
6777
|
+
},
|
|
6193
6778
|
{
|
|
6194
6779
|
name: "onClick",
|
|
6195
6780
|
type: "(params: SliceEventParams) => void",
|
|
@@ -6229,6 +6814,24 @@ var component_catalog_default = {
|
|
|
6229
6814
|
default: "true",
|
|
6230
6815
|
required: false,
|
|
6231
6816
|
description: "Show tooltip on hover"
|
|
6817
|
+
},
|
|
6818
|
+
{
|
|
6819
|
+
name: "tooltipFormatter",
|
|
6820
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
6821
|
+
required: false,
|
|
6822
|
+
description: "Custom tooltip template or HTML function"
|
|
6823
|
+
},
|
|
6824
|
+
{
|
|
6825
|
+
name: "tooltipValueFormatter",
|
|
6826
|
+
type: "(value: number) => string",
|
|
6827
|
+
required: false,
|
|
6828
|
+
description: "Format values in the default tooltip"
|
|
6829
|
+
},
|
|
6830
|
+
{
|
|
6831
|
+
name: "option",
|
|
6832
|
+
type: "EChartsOption",
|
|
6833
|
+
required: false,
|
|
6834
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
6232
6835
|
}
|
|
6233
6836
|
],
|
|
6234
6837
|
variants: [
|
|
@@ -6374,6 +6977,24 @@ var component_catalog_default = {
|
|
|
6374
6977
|
default: "true",
|
|
6375
6978
|
required: false,
|
|
6376
6979
|
description: "Enable/disable animations"
|
|
6980
|
+
},
|
|
6981
|
+
{
|
|
6982
|
+
name: "tooltipFormatter",
|
|
6983
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
6984
|
+
required: false,
|
|
6985
|
+
description: "Custom tooltip template or HTML function"
|
|
6986
|
+
},
|
|
6987
|
+
{
|
|
6988
|
+
name: "tooltipValueFormatter",
|
|
6989
|
+
type: "(value: number) => string",
|
|
6990
|
+
required: false,
|
|
6991
|
+
description: "Format values in the default tooltip"
|
|
6992
|
+
},
|
|
6993
|
+
{
|
|
6994
|
+
name: "option",
|
|
6995
|
+
type: "EChartsOption",
|
|
6996
|
+
required: false,
|
|
6997
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
6377
6998
|
}
|
|
6378
6999
|
],
|
|
6379
7000
|
variants: [
|
|
@@ -6553,15 +7174,6 @@ var component_catalog_default = {
|
|
|
6553
7174
|
"lg"
|
|
6554
7175
|
],
|
|
6555
7176
|
default: "lg"
|
|
6556
|
-
},
|
|
6557
|
-
{
|
|
6558
|
-
name: "maxWidth",
|
|
6559
|
-
values: [
|
|
6560
|
-
"none",
|
|
6561
|
-
"sm",
|
|
6562
|
-
"7xl"
|
|
6563
|
-
],
|
|
6564
|
-
default: "none"
|
|
6565
7177
|
}
|
|
6566
7178
|
],
|
|
6567
7179
|
slots: [
|
|
@@ -6806,6 +7418,24 @@ var component_catalog_default = {
|
|
|
6806
7418
|
required: false,
|
|
6807
7419
|
description: "Display values in cells"
|
|
6808
7420
|
},
|
|
7421
|
+
{
|
|
7422
|
+
name: "labelFormatter",
|
|
7423
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
7424
|
+
required: false,
|
|
7425
|
+
description: "Data label template or function"
|
|
7426
|
+
},
|
|
7427
|
+
{
|
|
7428
|
+
name: "xAxisConfig",
|
|
7429
|
+
type: "AxisConfig",
|
|
7430
|
+
required: false,
|
|
7431
|
+
description: "Horizontal axis name, tick formatter, rotation and range"
|
|
7432
|
+
},
|
|
7433
|
+
{
|
|
7434
|
+
name: "yAxisConfig",
|
|
7435
|
+
type: "AxisConfig",
|
|
7436
|
+
required: false,
|
|
7437
|
+
description: "Vertical axis name, tick formatter, rotation and range"
|
|
7438
|
+
},
|
|
6809
7439
|
{
|
|
6810
7440
|
name: "onClick",
|
|
6811
7441
|
type: "(params: HeatmapEventParams) => void",
|
|
@@ -6838,6 +7468,24 @@ var component_catalog_default = {
|
|
|
6838
7468
|
default: "true",
|
|
6839
7469
|
required: false,
|
|
6840
7470
|
description: "Show tooltip on hover"
|
|
7471
|
+
},
|
|
7472
|
+
{
|
|
7473
|
+
name: "tooltipFormatter",
|
|
7474
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
7475
|
+
required: false,
|
|
7476
|
+
description: "Custom tooltip template or HTML function"
|
|
7477
|
+
},
|
|
7478
|
+
{
|
|
7479
|
+
name: "tooltipValueFormatter",
|
|
7480
|
+
type: "(value: number) => string",
|
|
7481
|
+
required: false,
|
|
7482
|
+
description: "Format values in the default tooltip"
|
|
7483
|
+
},
|
|
7484
|
+
{
|
|
7485
|
+
name: "option",
|
|
7486
|
+
type: "EChartsOption",
|
|
7487
|
+
required: false,
|
|
7488
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
6841
7489
|
}
|
|
6842
7490
|
],
|
|
6843
7491
|
variants: [
|
|
@@ -7149,16 +7797,6 @@ var component_catalog_default = {
|
|
|
7149
7797
|
}
|
|
7150
7798
|
],
|
|
7151
7799
|
variants: [
|
|
7152
|
-
{
|
|
7153
|
-
name: "ratio",
|
|
7154
|
-
values: [
|
|
7155
|
-
"square",
|
|
7156
|
-
"video",
|
|
7157
|
-
"photo",
|
|
7158
|
-
"portrait",
|
|
7159
|
-
"wide"
|
|
7160
|
-
]
|
|
7161
|
-
},
|
|
7162
7800
|
{
|
|
7163
7801
|
name: "fit",
|
|
7164
7802
|
values: [
|
|
@@ -7623,6 +8261,49 @@ var component_catalog_default = {
|
|
|
7623
8261
|
required: false,
|
|
7624
8262
|
description: "Stack multiple series on top of each other"
|
|
7625
8263
|
},
|
|
8264
|
+
{
|
|
8265
|
+
name: "showLabels",
|
|
8266
|
+
type: "boolean",
|
|
8267
|
+
default: "false",
|
|
8268
|
+
required: false,
|
|
8269
|
+
description: "Show data labels"
|
|
8270
|
+
},
|
|
8271
|
+
{
|
|
8272
|
+
name: "labelFormatter",
|
|
8273
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
8274
|
+
required: false,
|
|
8275
|
+
description: "Data label template or function"
|
|
8276
|
+
},
|
|
8277
|
+
{
|
|
8278
|
+
name: "xAxisConfig",
|
|
8279
|
+
type: "AxisConfig",
|
|
8280
|
+
required: false,
|
|
8281
|
+
description: "Horizontal axis name, tick formatter, rotation and range"
|
|
8282
|
+
},
|
|
8283
|
+
{
|
|
8284
|
+
name: "yAxisConfig",
|
|
8285
|
+
type: "AxisConfig",
|
|
8286
|
+
required: false,
|
|
8287
|
+
description: "Vertical axis name, tick formatter, rotation and range"
|
|
8288
|
+
},
|
|
8289
|
+
{
|
|
8290
|
+
name: "legend",
|
|
8291
|
+
type: "ChartLegendConfig",
|
|
8292
|
+
required: false,
|
|
8293
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
8294
|
+
},
|
|
8295
|
+
{
|
|
8296
|
+
name: "onLegendChange",
|
|
8297
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
8298
|
+
required: false,
|
|
8299
|
+
description: "Called when legend items are shown or hidden"
|
|
8300
|
+
},
|
|
8301
|
+
{
|
|
8302
|
+
name: "renderLegend",
|
|
8303
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
8304
|
+
required: false,
|
|
8305
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
8306
|
+
},
|
|
7626
8307
|
{
|
|
7627
8308
|
name: "onClick",
|
|
7628
8309
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -7707,6 +8388,24 @@ var component_catalog_default = {
|
|
|
7707
8388
|
type: "string",
|
|
7708
8389
|
required: false,
|
|
7709
8390
|
description: "Custom CSS class"
|
|
8391
|
+
},
|
|
8392
|
+
{
|
|
8393
|
+
name: "tooltipFormatter",
|
|
8394
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
8395
|
+
required: false,
|
|
8396
|
+
description: "Custom tooltip template or HTML function"
|
|
8397
|
+
},
|
|
8398
|
+
{
|
|
8399
|
+
name: "tooltipValueFormatter",
|
|
8400
|
+
type: "(value: number) => string",
|
|
8401
|
+
required: false,
|
|
8402
|
+
description: "Format values in the default tooltip"
|
|
8403
|
+
},
|
|
8404
|
+
{
|
|
8405
|
+
name: "option",
|
|
8406
|
+
type: "EChartsOption",
|
|
8407
|
+
required: false,
|
|
8408
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
7710
8409
|
}
|
|
7711
8410
|
],
|
|
7712
8411
|
variants: [
|
|
@@ -7764,6 +8463,20 @@ var component_catalog_default = {
|
|
|
7764
8463
|
</script>
|
|
7765
8464
|
|
|
7766
8465
|
<LineChart title="Interactive Chart" {data} onClick={handleClick} />`
|
|
8466
|
+
},
|
|
8467
|
+
{
|
|
8468
|
+
title: "Formatted Tooltip and Top Legend",
|
|
8469
|
+
code: "<LineChart\n title=\"Visitors\"\n {data}\n legend={{ position: 'top', align: 'end' }}\n tooltipValueFormatter={(v) => `${v.toLocaleString()} visits`}\n/>"
|
|
8470
|
+
},
|
|
8471
|
+
{
|
|
8472
|
+
title: "Annotating Points",
|
|
8473
|
+
code: `<LineChart
|
|
8474
|
+
title="Visitors"
|
|
8475
|
+
data={{
|
|
8476
|
+
categories: ['Mon', 'Tue', 'Wed'],
|
|
8477
|
+
series: [{ name: 'Visits', data: [120, 340, 180], labels: [null, 'Launch'] }],
|
|
8478
|
+
}}
|
|
8479
|
+
/>`
|
|
7767
8480
|
}
|
|
7768
8481
|
],
|
|
7769
8482
|
relatedComponents: [
|
|
@@ -8621,19 +9334,7 @@ var component_catalog_default = {
|
|
|
8621
9334
|
description: "Additional CSS classes"
|
|
8622
9335
|
}
|
|
8623
9336
|
],
|
|
8624
|
-
variants: [
|
|
8625
|
-
{
|
|
8626
|
-
name: "ratio",
|
|
8627
|
-
values: [
|
|
8628
|
-
"square",
|
|
8629
|
-
"video",
|
|
8630
|
-
"photo",
|
|
8631
|
-
"portrait",
|
|
8632
|
-
"wide"
|
|
8633
|
-
],
|
|
8634
|
-
default: "video"
|
|
8635
|
-
}
|
|
8636
|
-
],
|
|
9337
|
+
variants: [],
|
|
8637
9338
|
slots: [
|
|
8638
9339
|
{
|
|
8639
9340
|
name: "children",
|
|
@@ -8790,17 +9491,6 @@ var component_catalog_default = {
|
|
|
8790
9491
|
"cloudflare",
|
|
8791
9492
|
"matterport"
|
|
8792
9493
|
]
|
|
8793
|
-
},
|
|
8794
|
-
{
|
|
8795
|
-
name: "ratio",
|
|
8796
|
-
values: [
|
|
8797
|
-
"square",
|
|
8798
|
-
"video",
|
|
8799
|
-
"photo",
|
|
8800
|
-
"portrait",
|
|
8801
|
-
"wide"
|
|
8802
|
-
],
|
|
8803
|
-
default: "video"
|
|
8804
9494
|
}
|
|
8805
9495
|
],
|
|
8806
9496
|
slots: [
|
|
@@ -8920,17 +9610,6 @@ var component_catalog_default = {
|
|
|
8920
9610
|
"lg"
|
|
8921
9611
|
],
|
|
8922
9612
|
default: "md"
|
|
8923
|
-
},
|
|
8924
|
-
{
|
|
8925
|
-
name: "ratio",
|
|
8926
|
-
values: [
|
|
8927
|
-
"square",
|
|
8928
|
-
"video",
|
|
8929
|
-
"photo",
|
|
8930
|
-
"portrait",
|
|
8931
|
-
"wide"
|
|
8932
|
-
],
|
|
8933
|
-
default: "square"
|
|
8934
9613
|
}
|
|
8935
9614
|
],
|
|
8936
9615
|
slots: [
|
|
@@ -10288,7 +10967,7 @@ var component_catalog_default = {
|
|
|
10288
10967
|
{
|
|
10289
10968
|
name: "showLabels",
|
|
10290
10969
|
type: "boolean",
|
|
10291
|
-
default: "
|
|
10970
|
+
default: "true",
|
|
10292
10971
|
required: false,
|
|
10293
10972
|
description: "Show labels on slices"
|
|
10294
10973
|
},
|
|
@@ -10306,6 +10985,30 @@ var component_catalog_default = {
|
|
|
10306
10985
|
required: false,
|
|
10307
10986
|
description: "Inner radius (0 for solid pie)"
|
|
10308
10987
|
},
|
|
10988
|
+
{
|
|
10989
|
+
name: "labelFormatter",
|
|
10990
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
10991
|
+
required: false,
|
|
10992
|
+
description: "Data label template or function"
|
|
10993
|
+
},
|
|
10994
|
+
{
|
|
10995
|
+
name: "legend",
|
|
10996
|
+
type: "ChartLegendConfig",
|
|
10997
|
+
required: false,
|
|
10998
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
10999
|
+
},
|
|
11000
|
+
{
|
|
11001
|
+
name: "onLegendChange",
|
|
11002
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
11003
|
+
required: false,
|
|
11004
|
+
description: "Called when legend items are shown or hidden"
|
|
11005
|
+
},
|
|
11006
|
+
{
|
|
11007
|
+
name: "renderLegend",
|
|
11008
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
11009
|
+
required: false,
|
|
11010
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
11011
|
+
},
|
|
10309
11012
|
{
|
|
10310
11013
|
name: "onClick",
|
|
10311
11014
|
type: "(params: SliceEventParams) => void",
|
|
@@ -10345,6 +11048,24 @@ var component_catalog_default = {
|
|
|
10345
11048
|
default: "true",
|
|
10346
11049
|
required: false,
|
|
10347
11050
|
description: "Show tooltip on hover"
|
|
11051
|
+
},
|
|
11052
|
+
{
|
|
11053
|
+
name: "tooltipFormatter",
|
|
11054
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
11055
|
+
required: false,
|
|
11056
|
+
description: "Custom tooltip template or HTML function"
|
|
11057
|
+
},
|
|
11058
|
+
{
|
|
11059
|
+
name: "tooltipValueFormatter",
|
|
11060
|
+
type: "(value: number) => string",
|
|
11061
|
+
required: false,
|
|
11062
|
+
description: "Format values in the default tooltip"
|
|
11063
|
+
},
|
|
11064
|
+
{
|
|
11065
|
+
name: "option",
|
|
11066
|
+
type: "EChartsOption",
|
|
11067
|
+
required: false,
|
|
11068
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
10348
11069
|
}
|
|
10349
11070
|
],
|
|
10350
11071
|
variants: [
|
|
@@ -10401,6 +11122,29 @@ var component_catalog_default = {
|
|
|
10401
11122
|
</script>
|
|
10402
11123
|
|
|
10403
11124
|
<PieChart title="Interactive Pie" {data} onClick={handleClick} />`
|
|
11125
|
+
},
|
|
11126
|
+
{
|
|
11127
|
+
title: "Custom Labels",
|
|
11128
|
+
code: `<PieChart
|
|
11129
|
+
title="Market Share"
|
|
11130
|
+
data={[
|
|
11131
|
+
{ name: 'Product A', value: 335, label: 'Leader' },
|
|
11132
|
+
{ name: 'Product B', value: 310 },
|
|
11133
|
+
]}
|
|
11134
|
+
labelFormatter={'{b}\\n{d}%'}
|
|
11135
|
+
/>`
|
|
11136
|
+
},
|
|
11137
|
+
{
|
|
11138
|
+
title: "Custom Legend on the Right",
|
|
11139
|
+
code: `<script>
|
|
11140
|
+
import { PieChart, ChartLegend } from '@classic-homes/charts-svelte';
|
|
11141
|
+
</script>
|
|
11142
|
+
|
|
11143
|
+
{#snippet legend(props)}
|
|
11144
|
+
<ChartLegend {...props} />
|
|
11145
|
+
{/snippet}
|
|
11146
|
+
|
|
11147
|
+
<PieChart title="Market Share" {data} renderLegend={legend} legend={{ position: 'right' }} />`
|
|
10404
11148
|
}
|
|
10405
11149
|
],
|
|
10406
11150
|
relatedComponents: [
|
|
@@ -10829,6 +11573,37 @@ var component_catalog_default = {
|
|
|
10829
11573
|
required: false,
|
|
10830
11574
|
description: "Shape of the radar grid"
|
|
10831
11575
|
},
|
|
11576
|
+
{
|
|
11577
|
+
name: "showLabels",
|
|
11578
|
+
type: "boolean",
|
|
11579
|
+
default: "false",
|
|
11580
|
+
required: false,
|
|
11581
|
+
description: "Show data labels"
|
|
11582
|
+
},
|
|
11583
|
+
{
|
|
11584
|
+
name: "labelFormatter",
|
|
11585
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
11586
|
+
required: false,
|
|
11587
|
+
description: "Data label template or function"
|
|
11588
|
+
},
|
|
11589
|
+
{
|
|
11590
|
+
name: "legend",
|
|
11591
|
+
type: "ChartLegendConfig",
|
|
11592
|
+
required: false,
|
|
11593
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
11594
|
+
},
|
|
11595
|
+
{
|
|
11596
|
+
name: "onLegendChange",
|
|
11597
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
11598
|
+
required: false,
|
|
11599
|
+
description: "Called when legend items are shown or hidden"
|
|
11600
|
+
},
|
|
11601
|
+
{
|
|
11602
|
+
name: "renderLegend",
|
|
11603
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
11604
|
+
required: false,
|
|
11605
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
11606
|
+
},
|
|
10832
11607
|
{
|
|
10833
11608
|
name: "title",
|
|
10834
11609
|
type: "string",
|
|
@@ -10862,6 +11637,24 @@ var component_catalog_default = {
|
|
|
10862
11637
|
default: "true",
|
|
10863
11638
|
required: false,
|
|
10864
11639
|
description: "Show tooltip on hover"
|
|
11640
|
+
},
|
|
11641
|
+
{
|
|
11642
|
+
name: "tooltipFormatter",
|
|
11643
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
11644
|
+
required: false,
|
|
11645
|
+
description: "Custom tooltip template or HTML function"
|
|
11646
|
+
},
|
|
11647
|
+
{
|
|
11648
|
+
name: "tooltipValueFormatter",
|
|
11649
|
+
type: "(value: number) => string",
|
|
11650
|
+
required: false,
|
|
11651
|
+
description: "Format values in the default tooltip"
|
|
11652
|
+
},
|
|
11653
|
+
{
|
|
11654
|
+
name: "option",
|
|
11655
|
+
type: "EChartsOption",
|
|
11656
|
+
required: false,
|
|
11657
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
10865
11658
|
}
|
|
10866
11659
|
],
|
|
10867
11660
|
variants: [
|
|
@@ -11146,6 +11939,12 @@ var component_catalog_default = {
|
|
|
11146
11939
|
required: false,
|
|
11147
11940
|
description: "Flow direction"
|
|
11148
11941
|
},
|
|
11942
|
+
{
|
|
11943
|
+
name: "labelFormatter",
|
|
11944
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
11945
|
+
required: false,
|
|
11946
|
+
description: "Data label template or function"
|
|
11947
|
+
},
|
|
11149
11948
|
{
|
|
11150
11949
|
name: "onClick",
|
|
11151
11950
|
type: "(params: SankeyEventParams) => void",
|
|
@@ -11178,6 +11977,24 @@ var component_catalog_default = {
|
|
|
11178
11977
|
default: "true",
|
|
11179
11978
|
required: false,
|
|
11180
11979
|
description: "Show tooltip on hover"
|
|
11980
|
+
},
|
|
11981
|
+
{
|
|
11982
|
+
name: "tooltipFormatter",
|
|
11983
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
11984
|
+
required: false,
|
|
11985
|
+
description: "Custom tooltip template or HTML function"
|
|
11986
|
+
},
|
|
11987
|
+
{
|
|
11988
|
+
name: "tooltipValueFormatter",
|
|
11989
|
+
type: "(value: number) => string",
|
|
11990
|
+
required: false,
|
|
11991
|
+
description: "Format values in the default tooltip"
|
|
11992
|
+
},
|
|
11993
|
+
{
|
|
11994
|
+
name: "option",
|
|
11995
|
+
type: "EChartsOption",
|
|
11996
|
+
required: false,
|
|
11997
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
11181
11998
|
}
|
|
11182
11999
|
],
|
|
11183
12000
|
variants: [
|
|
@@ -11302,6 +12119,49 @@ var component_catalog_default = {
|
|
|
11302
12119
|
required: false,
|
|
11303
12120
|
description: "Point size (fixed or dynamic)"
|
|
11304
12121
|
},
|
|
12122
|
+
{
|
|
12123
|
+
name: "showLabels",
|
|
12124
|
+
type: "boolean",
|
|
12125
|
+
default: "false",
|
|
12126
|
+
required: false,
|
|
12127
|
+
description: "Show data labels"
|
|
12128
|
+
},
|
|
12129
|
+
{
|
|
12130
|
+
name: "labelFormatter",
|
|
12131
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
12132
|
+
required: false,
|
|
12133
|
+
description: "Data label template or function"
|
|
12134
|
+
},
|
|
12135
|
+
{
|
|
12136
|
+
name: "xAxisConfig",
|
|
12137
|
+
type: "AxisConfig",
|
|
12138
|
+
required: false,
|
|
12139
|
+
description: "Horizontal axis name, tick formatter, rotation and range"
|
|
12140
|
+
},
|
|
12141
|
+
{
|
|
12142
|
+
name: "yAxisConfig",
|
|
12143
|
+
type: "AxisConfig",
|
|
12144
|
+
required: false,
|
|
12145
|
+
description: "Vertical axis name, tick formatter, rotation and range"
|
|
12146
|
+
},
|
|
12147
|
+
{
|
|
12148
|
+
name: "legend",
|
|
12149
|
+
type: "ChartLegendConfig",
|
|
12150
|
+
required: false,
|
|
12151
|
+
description: "Built-in legend position, alignment, icon and formatter"
|
|
12152
|
+
},
|
|
12153
|
+
{
|
|
12154
|
+
name: "onLegendChange",
|
|
12155
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
12156
|
+
required: false,
|
|
12157
|
+
description: "Called when legend items are shown or hidden"
|
|
12158
|
+
},
|
|
12159
|
+
{
|
|
12160
|
+
name: "renderLegend",
|
|
12161
|
+
type: "Snippet<[LegendRenderProps]>",
|
|
12162
|
+
required: false,
|
|
12163
|
+
description: "Custom HTML legend (e.g. `ChartLegend`) instead of the built-in one; React takes a function returning a node"
|
|
12164
|
+
},
|
|
11305
12165
|
{
|
|
11306
12166
|
name: "onClick",
|
|
11307
12167
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -11341,6 +12201,24 @@ var component_catalog_default = {
|
|
|
11341
12201
|
default: "true",
|
|
11342
12202
|
required: false,
|
|
11343
12203
|
description: "Show tooltip on hover"
|
|
12204
|
+
},
|
|
12205
|
+
{
|
|
12206
|
+
name: "tooltipFormatter",
|
|
12207
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
12208
|
+
required: false,
|
|
12209
|
+
description: "Custom tooltip template or HTML function"
|
|
12210
|
+
},
|
|
12211
|
+
{
|
|
12212
|
+
name: "tooltipValueFormatter",
|
|
12213
|
+
type: "(value: number) => string",
|
|
12214
|
+
required: false,
|
|
12215
|
+
description: "Format values in the default tooltip"
|
|
12216
|
+
},
|
|
12217
|
+
{
|
|
12218
|
+
name: "option",
|
|
12219
|
+
type: "EChartsOption",
|
|
12220
|
+
required: false,
|
|
12221
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
11344
12222
|
}
|
|
11345
12223
|
],
|
|
11346
12224
|
variants: [
|
|
@@ -14266,6 +15144,12 @@ var component_catalog_default = {
|
|
|
14266
15144
|
required: false,
|
|
14267
15145
|
description: "Visual configuration for each level"
|
|
14268
15146
|
},
|
|
15147
|
+
{
|
|
15148
|
+
name: "labelFormatter",
|
|
15149
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
15150
|
+
required: false,
|
|
15151
|
+
description: "Data label template or function"
|
|
15152
|
+
},
|
|
14269
15153
|
{
|
|
14270
15154
|
name: "onClick",
|
|
14271
15155
|
type: "(params: TreemapEventParams) => void",
|
|
@@ -14298,6 +15182,24 @@ var component_catalog_default = {
|
|
|
14298
15182
|
default: "true",
|
|
14299
15183
|
required: false,
|
|
14300
15184
|
description: "Show tooltip on hover"
|
|
15185
|
+
},
|
|
15186
|
+
{
|
|
15187
|
+
name: "tooltipFormatter",
|
|
15188
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
15189
|
+
required: false,
|
|
15190
|
+
description: "Custom tooltip template or HTML function"
|
|
15191
|
+
},
|
|
15192
|
+
{
|
|
15193
|
+
name: "tooltipValueFormatter",
|
|
15194
|
+
type: "(value: number) => string",
|
|
15195
|
+
required: false,
|
|
15196
|
+
description: "Format values in the default tooltip"
|
|
15197
|
+
},
|
|
15198
|
+
{
|
|
15199
|
+
name: "option",
|
|
15200
|
+
type: "EChartsOption",
|
|
15201
|
+
required: false,
|
|
15202
|
+
description: "Raw ECharts option deep-merged over the generated one"
|
|
14301
15203
|
}
|
|
14302
15204
|
],
|
|
14303
15205
|
variants: [
|
|
@@ -14532,17 +15434,6 @@ var component_catalog_default = {
|
|
|
14532
15434
|
}
|
|
14533
15435
|
],
|
|
14534
15436
|
variants: [
|
|
14535
|
-
{
|
|
14536
|
-
name: "ratio",
|
|
14537
|
-
values: [
|
|
14538
|
-
"square",
|
|
14539
|
-
"video",
|
|
14540
|
-
"photo",
|
|
14541
|
-
"portrait",
|
|
14542
|
-
"wide"
|
|
14543
|
-
],
|
|
14544
|
-
default: "video"
|
|
14545
|
-
},
|
|
14546
15437
|
{
|
|
14547
15438
|
name: "fit",
|
|
14548
15439
|
values: [
|
|
@@ -14751,7 +15642,7 @@ function registerComponentResources(server) {
|
|
|
14751
15642
|
|
|
14752
15643
|
// src/data/token-definitions.json
|
|
14753
15644
|
var token_definitions_default = {
|
|
14754
|
-
version: "0.3.
|
|
15645
|
+
version: "0.3.5",
|
|
14755
15646
|
colors: {
|
|
14756
15647
|
brand: [
|
|
14757
15648
|
{
|
|
@@ -15734,7 +16625,7 @@ function registerTokenResources(server) {
|
|
|
15734
16625
|
|
|
15735
16626
|
// src/data/styles-catalog.json
|
|
15736
16627
|
var styles_catalog_default = {
|
|
15737
|
-
version: "0.3.
|
|
16628
|
+
version: "0.3.5",
|
|
15738
16629
|
package: "@classic-homes/theme-styles",
|
|
15739
16630
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
15740
16631
|
integration: {
|
|
@@ -16117,7 +17008,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
16117
17008
|
|
|
16118
17009
|
// src/data/pattern-library.json
|
|
16119
17010
|
var pattern_library_default = {
|
|
16120
|
-
version: "0.3.
|
|
17011
|
+
version: "0.3.5",
|
|
16121
17012
|
layouts: [
|
|
16122
17013
|
{
|
|
16123
17014
|
id: "dashboard-page",
|
|
@@ -17211,7 +18102,7 @@ function registerLayoutResources(server) {
|
|
|
17211
18102
|
|
|
17212
18103
|
// src/data/schema-catalog.json
|
|
17213
18104
|
var schema_catalog_default = {
|
|
17214
|
-
version: "0.3.
|
|
18105
|
+
version: "0.3.5",
|
|
17215
18106
|
packageName: "@classic-homes/theme-svelte",
|
|
17216
18107
|
importPath: "@classic-homes/theme-svelte",
|
|
17217
18108
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -18019,7 +18910,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
18019
18910
|
|
|
18020
18911
|
// src/data/auth-catalog.json
|
|
18021
18912
|
var auth_catalog_default = {
|
|
18022
|
-
version: "0.3.
|
|
18913
|
+
version: "0.3.5",
|
|
18023
18914
|
packageName: "@classic-homes/auth",
|
|
18024
18915
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
18025
18916
|
subpackages: {
|
|
@@ -18593,12 +19484,12 @@ var auth_catalog_default = {
|
|
|
18593
19484
|
{
|
|
18594
19485
|
name: "ROLE_NAMES",
|
|
18595
19486
|
type: "readonly RoleName[]",
|
|
18596
|
-
description: "Every role name, ordered most to least privileged: admin, manager, agent, builder, customer_service, demo, stormwater, accounting_staff, architecture_staff, construction_staff, crl_staff, design_staff, hr_staff, it_staff, landdev_staff, marketing_staff, purchasing_staff, sales_staff, stormwater_staff, warranty_staff, hotsheet_editor, employee, user, vendor, customer, subcontractor, guest. Order is load-bearing - computePrimaryRole takes the first match."
|
|
19487
|
+
description: "Every role name, ordered most to least privileged: admin, manager, agent, builder, customer_service, demo, stormwater, accounting_staff, architecture_staff, construction_staff, crl_staff, design_staff, hr_staff, it_staff, landdev_staff, marketing_staff, purchasing_staff, sales_staff, stormwater_staff, warranty_staff, hotsheet_editor, office_admin, employee, user, vendor, customer, subcontractor, guest. Order is load-bearing - computePrimaryRole takes the first match."
|
|
18597
19488
|
},
|
|
18598
19489
|
{
|
|
18599
19490
|
name: "ROLE_HIERARCHY",
|
|
18600
19491
|
type: "Record<string, number>",
|
|
18601
|
-
description: "Privilege level per role: guest 0; user/vendor/customer/subcontractor 1; employee/agent/builder/customer_service/demo/stormwater, every <department>_staff and
|
|
19492
|
+
description: "Privilege level per role: guest 0; user/vendor/customer/subcontractor 1; employee/agent/builder/customer_service/demo/stormwater, every <department>_staff, hotsheet_editor and office_admin 2; manager 3; admin 4."
|
|
18602
19493
|
}
|
|
18603
19494
|
],
|
|
18604
19495
|
types: [
|
|
@@ -21056,7 +21947,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
21056
21947
|
|
|
21057
21948
|
// src/data/notifications-catalog.json
|
|
21058
21949
|
var notifications_catalog_default = {
|
|
21059
|
-
version: "0.3.
|
|
21950
|
+
version: "0.3.5",
|
|
21060
21951
|
packageName: "@classic-homes/notifications",
|
|
21061
21952
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
21062
21953
|
subpackages: {
|
|
@@ -21167,7 +22058,7 @@ var notifications_catalog_default = {
|
|
|
21167
22058
|
{
|
|
21168
22059
|
name: "getNotificationIconColor",
|
|
21169
22060
|
signature: "(type: NotificationType) => string",
|
|
21170
|
-
description: "Get the Tailwind color class for a notification type (security\u2192text-
|
|
22061
|
+
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
22062
|
},
|
|
21172
22063
|
{
|
|
21173
22064
|
name: "getPriorityBadgeVariant",
|
|
@@ -21949,7 +22840,7 @@ function registerNotificationsResources(server) {
|
|
|
21949
22840
|
description: "Direct API access without Svelte store"
|
|
21950
22841
|
},
|
|
21951
22842
|
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-
|
|
22843
|
+
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
22844
|
description: "Utility functions for display"
|
|
21954
22845
|
},
|
|
21955
22846
|
preferences: {
|
|
@@ -21968,7 +22859,7 @@ function registerNotificationsResources(server) {
|
|
|
21968
22859
|
|
|
21969
22860
|
// src/data/docs-catalog.json
|
|
21970
22861
|
var docs_catalog_default = {
|
|
21971
|
-
version: "0.3.
|
|
22862
|
+
version: "0.3.5",
|
|
21972
22863
|
packageName: "@classic-homes/theme-docs",
|
|
21973
22864
|
description: "Markdown documentation components for the Classic theme system",
|
|
21974
22865
|
exports: {
|
|
@@ -21980,14 +22871,26 @@ var docs_catalog_default = {
|
|
|
21980
22871
|
importPath: "@classic-homes/theme-docs/parser",
|
|
21981
22872
|
description: "Markdown pipeline without Svelte imports (parseMarkdown, extractToc, createSlugger, extensions) for Node build scripts, server loaders and CMS previews"
|
|
21982
22873
|
},
|
|
22874
|
+
"./prose": {
|
|
22875
|
+
importPath: "@classic-homes/theme-docs/prose",
|
|
22876
|
+
description: "Subpath export for prose"
|
|
22877
|
+
},
|
|
21983
22878
|
"./sanitize": {
|
|
21984
22879
|
importPath: "@classic-homes/theme-docs/sanitize",
|
|
21985
22880
|
description: "sanitizeDocsHtml: allowlist sanitizer for parseMarkdown output (server/build-time only)"
|
|
21986
22881
|
},
|
|
22882
|
+
"./sanitize/browser": {
|
|
22883
|
+
importPath: "@classic-homes/theme-docs/sanitize/browser",
|
|
22884
|
+
description: "Subpath export for sanitize/browser"
|
|
22885
|
+
},
|
|
21987
22886
|
"./content": {
|
|
21988
22887
|
importPath: "@classic-homes/theme-docs/content",
|
|
21989
22888
|
description: "loadDocs/renderDocs: a Docusaurus-style docs directory as routes, autogenerated sidebars, generated-index pages, tags and rendered HTML (Node, build time)"
|
|
21990
22889
|
},
|
|
22890
|
+
"./content/core": {
|
|
22891
|
+
importPath: "@classic-homes/theme-docs/content/core",
|
|
22892
|
+
description: "Subpath export for content/core"
|
|
22893
|
+
},
|
|
21991
22894
|
"./nav": {
|
|
21992
22895
|
importPath: "@classic-homes/theme-docs/nav",
|
|
21993
22896
|
description: "Sidebar helpers (neighbours, breadcrumbs, flattenNav, tagCounts) and content-model types, browser-safe"
|
|
@@ -22055,6 +22958,154 @@ var docs_catalog_default = {
|
|
|
22055
22958
|
],
|
|
22056
22959
|
example: '<MarkdownPage content={markdownString} theme="github-dark">\n {#snippet header(frontmatter)}\n <h1>{frontmatter.title}</h1>\n {/snippet}\n</MarkdownPage>'
|
|
22057
22960
|
},
|
|
22961
|
+
{
|
|
22962
|
+
name: "ProseEditor",
|
|
22963
|
+
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.",
|
|
22964
|
+
category: "content",
|
|
22965
|
+
props: [
|
|
22966
|
+
{
|
|
22967
|
+
name: "value",
|
|
22968
|
+
type: "string",
|
|
22969
|
+
required: true,
|
|
22970
|
+
description: "Markdown. Changes from outside replace the content."
|
|
22971
|
+
},
|
|
22972
|
+
{
|
|
22973
|
+
name: "onChange",
|
|
22974
|
+
type: "(markdown: string, doc: ProseNode) => void",
|
|
22975
|
+
required: false,
|
|
22976
|
+
description: "Called on every edit with the new markdown and the document behind it"
|
|
22977
|
+
},
|
|
22978
|
+
{
|
|
22979
|
+
name: "label",
|
|
22980
|
+
type: "string",
|
|
22981
|
+
required: true,
|
|
22982
|
+
description: "Accessible name for the text area"
|
|
22983
|
+
},
|
|
22984
|
+
{
|
|
22985
|
+
name: "placeholder",
|
|
22986
|
+
type: "string",
|
|
22987
|
+
required: false,
|
|
22988
|
+
description: "Placeholder shown while empty"
|
|
22989
|
+
},
|
|
22990
|
+
{
|
|
22991
|
+
name: "hardBreak",
|
|
22992
|
+
type: "'backslash' | 'html'",
|
|
22993
|
+
required: false,
|
|
22994
|
+
default: "'backslash'",
|
|
22995
|
+
description: "How line breaks are written; html for single-line contexts such as table cells"
|
|
22996
|
+
},
|
|
22997
|
+
{
|
|
22998
|
+
name: "inline",
|
|
22999
|
+
type: "boolean",
|
|
23000
|
+
required: false,
|
|
23001
|
+
default: "false",
|
|
23002
|
+
description: "Hide list buttons, for fields where a list makes no sense"
|
|
23003
|
+
},
|
|
23004
|
+
{
|
|
23005
|
+
name: "disabled",
|
|
23006
|
+
type: "boolean",
|
|
23007
|
+
required: false,
|
|
23008
|
+
default: "false",
|
|
23009
|
+
description: "Read-only"
|
|
23010
|
+
},
|
|
23011
|
+
{
|
|
23012
|
+
name: "variant",
|
|
23013
|
+
type: "'field' | 'bare'",
|
|
23014
|
+
required: false,
|
|
23015
|
+
default: "'field'",
|
|
23016
|
+
description: "field is a form field; bare edits in place on a rendered page with a floating (or docked) toolbar"
|
|
23017
|
+
},
|
|
23018
|
+
{
|
|
23019
|
+
name: "singleLine",
|
|
23020
|
+
type: "boolean",
|
|
23021
|
+
required: false,
|
|
23022
|
+
default: "false",
|
|
23023
|
+
description: "One paragraph only, no lists; Enter calls onEnter"
|
|
23024
|
+
},
|
|
23025
|
+
{
|
|
23026
|
+
name: "as",
|
|
23027
|
+
type: "'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
|
|
23028
|
+
required: false,
|
|
23029
|
+
default: "'p'",
|
|
23030
|
+
description: "Element the paragraph renders as, e.g. h2 to edit a heading in place"
|
|
23031
|
+
},
|
|
23032
|
+
{
|
|
23033
|
+
name: "onEnter",
|
|
23034
|
+
type: "() => void",
|
|
23035
|
+
required: false,
|
|
23036
|
+
description: "Enter in a single-line editor, e.g. move on to the next block"
|
|
23037
|
+
},
|
|
23038
|
+
{
|
|
23039
|
+
name: "onDeleteEmpty",
|
|
23040
|
+
type: "() => void",
|
|
23041
|
+
required: false,
|
|
23042
|
+
description: "Backspace while the editor is empty, e.g. remove the block"
|
|
23043
|
+
},
|
|
23044
|
+
{
|
|
23045
|
+
name: "onExit",
|
|
23046
|
+
type: "(direction: 'up' | 'down') => boolean | void",
|
|
23047
|
+
required: false,
|
|
23048
|
+
description: "Arrow keys past the first or last line; return false to decline"
|
|
23049
|
+
},
|
|
23050
|
+
{
|
|
23051
|
+
name: "class",
|
|
23052
|
+
type: "string",
|
|
23053
|
+
required: false,
|
|
23054
|
+
description: "Additional CSS classes"
|
|
23055
|
+
}
|
|
23056
|
+
],
|
|
23057
|
+
features: [
|
|
23058
|
+
"Markdown in and out in the house style (proseToMarkdown)",
|
|
23059
|
+
"Keyboard: Mod-B/I/E bold/italic/code, Mod-K link, Shift-Enter line break, Tab/Shift-Tab list indent",
|
|
23060
|
+
"Typing '- ' or '1. ' starts a list",
|
|
23061
|
+
"Links limited to http(s), mailto, tel and relative addresses",
|
|
23062
|
+
"focus({ x, y }) places the caret at a point on screen",
|
|
23063
|
+
"Under setProseToolbar(createProseToolbar()), bare editors lend their tools to a docked ProseToolbar"
|
|
23064
|
+
],
|
|
23065
|
+
example: `<script lang="ts">
|
|
23066
|
+
import { ProseEditor } from '@classic-homes/theme-docs';
|
|
23067
|
+
import { isProseMarkdown } from '@classic-homes/theme-docs/prose';
|
|
23068
|
+
|
|
23069
|
+
let body = $state('Open **Start**, then *Settings*.');
|
|
23070
|
+
</script>
|
|
23071
|
+
|
|
23072
|
+
{#if isProseMarkdown(body)}
|
|
23073
|
+
<ProseEditor label="Body" value={body} onChange={(md) => (body = md)} />
|
|
23074
|
+
{/if}`
|
|
23075
|
+
},
|
|
23076
|
+
{
|
|
23077
|
+
name: "ProseToolbar",
|
|
23078
|
+
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.',
|
|
23079
|
+
category: "content",
|
|
23080
|
+
props: [
|
|
23081
|
+
{
|
|
23082
|
+
name: "label",
|
|
23083
|
+
type: "string",
|
|
23084
|
+
required: false,
|
|
23085
|
+
default: "'Formatting'",
|
|
23086
|
+
description: "Accessible name for the toolbar group"
|
|
23087
|
+
},
|
|
23088
|
+
{
|
|
23089
|
+
name: "class",
|
|
23090
|
+
type: "string",
|
|
23091
|
+
required: false,
|
|
23092
|
+
description: "Additional CSS classes"
|
|
23093
|
+
}
|
|
23094
|
+
],
|
|
23095
|
+
features: [
|
|
23096
|
+
"Shares one toolbar between many bare ProseEditors",
|
|
23097
|
+
"Stable layout: unavailable tools stay in place, disabled"
|
|
23098
|
+
],
|
|
23099
|
+
example: `<script lang="ts">
|
|
23100
|
+
import { ProseEditor, ProseToolbar, createProseToolbar, setProseToolbar } from '@classic-homes/theme-docs';
|
|
23101
|
+
|
|
23102
|
+
setProseToolbar(createProseToolbar());
|
|
23103
|
+
let title = $state('Getting started');
|
|
23104
|
+
</script>
|
|
23105
|
+
|
|
23106
|
+
<ProseToolbar class="sticky top-0" />
|
|
23107
|
+
<ProseEditor variant="bare" singleLine as="h1" label="Title" value={title} onChange={(md) => (title = md)} />`
|
|
23108
|
+
},
|
|
22058
23109
|
{
|
|
22059
23110
|
name: "CodeBlock",
|
|
22060
23111
|
description: "Standalone syntax-highlighted code block using Shiki",
|
|
@@ -22266,6 +23317,13 @@ var docs_catalog_default = {
|
|
|
22266
23317
|
default: "'lg'",
|
|
22267
23318
|
description: "Breakpoint for desktop sidebar display"
|
|
22268
23319
|
},
|
|
23320
|
+
{
|
|
23321
|
+
name: "desktopPosition",
|
|
23322
|
+
type: "'fixed' | 'inline'",
|
|
23323
|
+
required: false,
|
|
23324
|
+
default: "'fixed'",
|
|
23325
|
+
description: "Desktop sidebar pinned to the viewport's right edge, or a sticky column in the parent flex row (DocPage uses 'inline')"
|
|
23326
|
+
},
|
|
22269
23327
|
{
|
|
22270
23328
|
name: "class",
|
|
22271
23329
|
type: "string",
|
|
@@ -23298,9 +24356,18 @@ var docs_catalog_default = {
|
|
|
23298
24356
|
dependencies: {
|
|
23299
24357
|
"@classic-homes/theme-tokens": "*",
|
|
23300
24358
|
clsx: "^2.1.0",
|
|
24359
|
+
dompurify: "3.4.16",
|
|
23301
24360
|
"js-yaml": "^4.3.2",
|
|
23302
24361
|
marked: "^17.0.0",
|
|
23303
24362
|
minisearch: "7.2.0",
|
|
24363
|
+
"prosemirror-commands": "1.7.2",
|
|
24364
|
+
"prosemirror-history": "1.5.1",
|
|
24365
|
+
"prosemirror-inputrules": "1.5.1",
|
|
24366
|
+
"prosemirror-keymap": "1.2.3",
|
|
24367
|
+
"prosemirror-model": "1.25.12",
|
|
24368
|
+
"prosemirror-schema-list": "1.5.1",
|
|
24369
|
+
"prosemirror-state": "1.4.4",
|
|
24370
|
+
"prosemirror-view": "1.42.6",
|
|
23304
24371
|
"sanitize-html": "2.18.0",
|
|
23305
24372
|
shiki: "^1.0.0",
|
|
23306
24373
|
"tailwind-merge": "^2.2.0",
|
|
@@ -23464,7 +24531,7 @@ function registerDocsResources(server) {
|
|
|
23464
24531
|
|
|
23465
24532
|
// src/data/charts-catalog.json
|
|
23466
24533
|
var charts_catalog_default = {
|
|
23467
|
-
version: "0.3.
|
|
24534
|
+
version: "0.3.5",
|
|
23468
24535
|
packageName: "@classic-homes/charts-core",
|
|
23469
24536
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
23470
24537
|
subpackages: {
|
|
@@ -23543,6 +24610,16 @@ var charts_catalog_default = {
|
|
|
23543
24610
|
name: "createTooltipFormatter",
|
|
23544
24611
|
signature: "(options?: { showSeriesName?: boolean; valueFormatter?: (value: number) => string; showPercent?: boolean }) => TooltipFormatter",
|
|
23545
24612
|
description: "Create an ECharts-compatible tooltip formatter function"
|
|
24613
|
+
},
|
|
24614
|
+
{
|
|
24615
|
+
name: "escapeHtml",
|
|
24616
|
+
signature: "(value: unknown) => string",
|
|
24617
|
+
description: "Escape a value for HTML. Use it on user data in custom function tooltip formatters, whose output ECharts renders as innerHTML"
|
|
24618
|
+
},
|
|
24619
|
+
{
|
|
24620
|
+
name: "getReplaceMerge",
|
|
24621
|
+
signature: "(prev: object | null | undefined, next: object, isComponentType: (mainType: string) => boolean) => string[]",
|
|
24622
|
+
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
24623
|
}
|
|
23547
24624
|
]
|
|
23548
24625
|
},
|
|
@@ -23575,6 +24652,47 @@ var charts_catalog_default = {
|
|
|
23575
24652
|
description: "Generate hidden HTML data table for screen readers (uses sr-only class)"
|
|
23576
24653
|
}
|
|
23577
24654
|
]
|
|
24655
|
+
},
|
|
24656
|
+
options: {
|
|
24657
|
+
description: "Builders for labels, axes, tooltips, legends and option overrides (used by charts-react and charts-svelte)",
|
|
24658
|
+
functions: [
|
|
24659
|
+
{
|
|
24660
|
+
name: "mergeChartOption",
|
|
24661
|
+
signature: "<T extends object>(generated: T, override?: object) => T",
|
|
24662
|
+
description: "Deep-merge a user ECharts option over a generated one; top-level arrays merge by index, nested arrays replace",
|
|
24663
|
+
example: "mergeChartOption(option, { series: [{ label: { show: true } }] })"
|
|
24664
|
+
},
|
|
24665
|
+
{
|
|
24666
|
+
name: "buildLegend",
|
|
24667
|
+
signature: "(names: string[], config: ChartLegendConfig | undefined, opts: { show: boolean; custom?: boolean; defaults?: object }) => object | undefined",
|
|
24668
|
+
description: "Build an ECharts legend; `custom` keeps it hidden so legend actions still work"
|
|
24669
|
+
},
|
|
24670
|
+
{
|
|
24671
|
+
name: "buildAxis",
|
|
24672
|
+
signature: "<T>(base: T, config?: AxisConfig) => T",
|
|
24673
|
+
description: "Apply AxisConfig to a generated axis"
|
|
24674
|
+
},
|
|
24675
|
+
{
|
|
24676
|
+
name: "buildDataLabel",
|
|
24677
|
+
signature: "(base: object, hidden: object | undefined, opts: { show: boolean; formatter?: ChartFormatter<LabelFormatterParams>; getLabel?: PointLabelLookup }) => object | undefined",
|
|
24678
|
+
description: "Build a series label block"
|
|
24679
|
+
},
|
|
24680
|
+
{
|
|
24681
|
+
name: "buildTooltip",
|
|
24682
|
+
signature: "(base: object, opts: { show: boolean; formatter?; valueFormatter?; getLabel? }) => object | undefined",
|
|
24683
|
+
description: "Build a tooltip with formatter / valueFormatter"
|
|
24684
|
+
},
|
|
24685
|
+
{
|
|
24686
|
+
name: "getLegendItems",
|
|
24687
|
+
signature: "(names: string[], palette: string[], overrides: (string | undefined)[], visible: Record<string, boolean>) => LegendItem[]",
|
|
24688
|
+
description: "Legend entries with their drawn colours"
|
|
24689
|
+
},
|
|
24690
|
+
{
|
|
24691
|
+
name: "withPointLabels",
|
|
24692
|
+
signature: "(values, labels, formatter) => data items",
|
|
24693
|
+
description: "Attach per-point label overrides to labelled points"
|
|
24694
|
+
}
|
|
24695
|
+
]
|
|
23578
24696
|
}
|
|
23579
24697
|
}
|
|
23580
24698
|
},
|
|
@@ -23614,6 +24732,26 @@ var charts_catalog_default = {
|
|
|
23614
24732
|
name: "THEME_DARK",
|
|
23615
24733
|
signature: "'classic-dark'",
|
|
23616
24734
|
description: "Theme name constant"
|
|
24735
|
+
},
|
|
24736
|
+
{
|
|
24737
|
+
name: "getChartColors",
|
|
24738
|
+
signature: "(themeName: string) => ChartSemanticColors",
|
|
24739
|
+
description: "Token-derived per-element chart colours (series palette, foreground, mutedForeground, axisPointerLabel, divider, success, destructive) for THEME_LIGHT or THEME_DARK"
|
|
24740
|
+
},
|
|
24741
|
+
{
|
|
24742
|
+
name: "lightChartColors",
|
|
24743
|
+
signature: "ChartSemanticColors",
|
|
24744
|
+
description: "Semantic chart colours for the light theme"
|
|
24745
|
+
},
|
|
24746
|
+
{
|
|
24747
|
+
name: "darkChartColors",
|
|
24748
|
+
signature: "ChartSemanticColors",
|
|
24749
|
+
description: "Semantic chart colours for the dark theme"
|
|
24750
|
+
},
|
|
24751
|
+
{
|
|
24752
|
+
name: "colorWithAlpha",
|
|
24753
|
+
signature: "(color: string, alpha: number) => string",
|
|
24754
|
+
description: "Convert a #rgb/#rrggbb colour to rgba() with the given alpha; other colour strings are returned unchanged"
|
|
23617
24755
|
}
|
|
23618
24756
|
]
|
|
23619
24757
|
}
|
|
@@ -23711,6 +24849,24 @@ var charts_catalog_default = {
|
|
|
23711
24849
|
required: false,
|
|
23712
24850
|
description: "Show grid lines (where applicable)"
|
|
23713
24851
|
},
|
|
24852
|
+
{
|
|
24853
|
+
name: "tooltipFormatter",
|
|
24854
|
+
type: "string | ((items: TooltipFormatterParams[]) => string)",
|
|
24855
|
+
required: false,
|
|
24856
|
+
description: "Custom tooltip content: an ECharts template or a function returning HTML (always receives an array). Escape interpolated data with escapeHtml"
|
|
24857
|
+
},
|
|
24858
|
+
{
|
|
24859
|
+
name: "tooltipValueFormatter",
|
|
24860
|
+
type: "(value: number) => string",
|
|
24861
|
+
required: false,
|
|
24862
|
+
description: "Format the values in the default tooltip, e.g. as currency"
|
|
24863
|
+
},
|
|
24864
|
+
{
|
|
24865
|
+
name: "option",
|
|
24866
|
+
type: "EChartsOption",
|
|
24867
|
+
required: false,
|
|
24868
|
+
description: "Raw ECharts option deep-merged over the generated one (top-level arrays such as series merge by index; nested arrays replace)"
|
|
24869
|
+
},
|
|
23714
24870
|
{
|
|
23715
24871
|
name: "class",
|
|
23716
24872
|
type: "string",
|
|
@@ -23753,6 +24909,48 @@ var charts_catalog_default = {
|
|
|
23753
24909
|
required: false,
|
|
23754
24910
|
description: "Stack multiple series"
|
|
23755
24911
|
},
|
|
24912
|
+
{
|
|
24913
|
+
name: "legend",
|
|
24914
|
+
type: "ChartLegendConfig",
|
|
24915
|
+
required: false,
|
|
24916
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
24917
|
+
},
|
|
24918
|
+
{
|
|
24919
|
+
name: "onLegendChange",
|
|
24920
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
24921
|
+
required: false,
|
|
24922
|
+
description: "Called when legend items are shown or hidden"
|
|
24923
|
+
},
|
|
24924
|
+
{
|
|
24925
|
+
name: "renderLegend",
|
|
24926
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
24927
|
+
required: false,
|
|
24928
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
24929
|
+
},
|
|
24930
|
+
{
|
|
24931
|
+
name: "labelFormatter",
|
|
24932
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
24933
|
+
required: false,
|
|
24934
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
24935
|
+
},
|
|
24936
|
+
{
|
|
24937
|
+
name: "xAxisConfig",
|
|
24938
|
+
type: "AxisConfig",
|
|
24939
|
+
required: false,
|
|
24940
|
+
description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
24941
|
+
},
|
|
24942
|
+
{
|
|
24943
|
+
name: "yAxisConfig",
|
|
24944
|
+
type: "AxisConfig",
|
|
24945
|
+
required: false,
|
|
24946
|
+
description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
24947
|
+
},
|
|
24948
|
+
{
|
|
24949
|
+
name: "showLabels",
|
|
24950
|
+
type: "boolean",
|
|
24951
|
+
required: false,
|
|
24952
|
+
description: "Show data labels (default false)"
|
|
24953
|
+
},
|
|
23756
24954
|
{
|
|
23757
24955
|
name: "onClick",
|
|
23758
24956
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -23795,6 +24993,42 @@ var charts_catalog_default = {
|
|
|
23795
24993
|
required: false,
|
|
23796
24994
|
description: "Show value labels on bars"
|
|
23797
24995
|
},
|
|
24996
|
+
{
|
|
24997
|
+
name: "legend",
|
|
24998
|
+
type: "ChartLegendConfig",
|
|
24999
|
+
required: false,
|
|
25000
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
25001
|
+
},
|
|
25002
|
+
{
|
|
25003
|
+
name: "onLegendChange",
|
|
25004
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
25005
|
+
required: false,
|
|
25006
|
+
description: "Called when legend items are shown or hidden"
|
|
25007
|
+
},
|
|
25008
|
+
{
|
|
25009
|
+
name: "renderLegend",
|
|
25010
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
25011
|
+
required: false,
|
|
25012
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
25013
|
+
},
|
|
25014
|
+
{
|
|
25015
|
+
name: "labelFormatter",
|
|
25016
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25017
|
+
required: false,
|
|
25018
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25019
|
+
},
|
|
25020
|
+
{
|
|
25021
|
+
name: "xAxisConfig",
|
|
25022
|
+
type: "AxisConfig",
|
|
25023
|
+
required: false,
|
|
25024
|
+
description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25025
|
+
},
|
|
25026
|
+
{
|
|
25027
|
+
name: "yAxisConfig",
|
|
25028
|
+
type: "AxisConfig",
|
|
25029
|
+
required: false,
|
|
25030
|
+
description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25031
|
+
},
|
|
23798
25032
|
{
|
|
23799
25033
|
name: "onClick",
|
|
23800
25034
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -23831,6 +25065,30 @@ var charts_catalog_default = {
|
|
|
23831
25065
|
required: false,
|
|
23832
25066
|
description: "Inner radius (0 for pie, percentage for donut)"
|
|
23833
25067
|
},
|
|
25068
|
+
{
|
|
25069
|
+
name: "legend",
|
|
25070
|
+
type: "ChartLegendConfig",
|
|
25071
|
+
required: false,
|
|
25072
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
25073
|
+
},
|
|
25074
|
+
{
|
|
25075
|
+
name: "onLegendChange",
|
|
25076
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
25077
|
+
required: false,
|
|
25078
|
+
description: "Called when legend items are shown or hidden"
|
|
25079
|
+
},
|
|
25080
|
+
{
|
|
25081
|
+
name: "renderLegend",
|
|
25082
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
25083
|
+
required: false,
|
|
25084
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
25085
|
+
},
|
|
25086
|
+
{
|
|
25087
|
+
name: "labelFormatter",
|
|
25088
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25089
|
+
required: false,
|
|
25090
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25091
|
+
},
|
|
23834
25092
|
{
|
|
23835
25093
|
name: "onClick",
|
|
23836
25094
|
type: "(params: SliceEventParams) => void",
|
|
@@ -23891,6 +25149,48 @@ var charts_catalog_default = {
|
|
|
23891
25149
|
required: false,
|
|
23892
25150
|
description: "Use gradient fill"
|
|
23893
25151
|
},
|
|
25152
|
+
{
|
|
25153
|
+
name: "legend",
|
|
25154
|
+
type: "ChartLegendConfig",
|
|
25155
|
+
required: false,
|
|
25156
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
25157
|
+
},
|
|
25158
|
+
{
|
|
25159
|
+
name: "onLegendChange",
|
|
25160
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
25161
|
+
required: false,
|
|
25162
|
+
description: "Called when legend items are shown or hidden"
|
|
25163
|
+
},
|
|
25164
|
+
{
|
|
25165
|
+
name: "renderLegend",
|
|
25166
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
25167
|
+
required: false,
|
|
25168
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
25169
|
+
},
|
|
25170
|
+
{
|
|
25171
|
+
name: "labelFormatter",
|
|
25172
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25173
|
+
required: false,
|
|
25174
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25175
|
+
},
|
|
25176
|
+
{
|
|
25177
|
+
name: "xAxisConfig",
|
|
25178
|
+
type: "AxisConfig",
|
|
25179
|
+
required: false,
|
|
25180
|
+
description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25181
|
+
},
|
|
25182
|
+
{
|
|
25183
|
+
name: "yAxisConfig",
|
|
25184
|
+
type: "AxisConfig",
|
|
25185
|
+
required: false,
|
|
25186
|
+
description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25187
|
+
},
|
|
25188
|
+
{
|
|
25189
|
+
name: "showLabels",
|
|
25190
|
+
type: "boolean",
|
|
25191
|
+
required: false,
|
|
25192
|
+
description: "Show data labels (default false)"
|
|
25193
|
+
},
|
|
23894
25194
|
{
|
|
23895
25195
|
name: "onClick",
|
|
23896
25196
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -23921,6 +25221,48 @@ var charts_catalog_default = {
|
|
|
23921
25221
|
required: false,
|
|
23922
25222
|
description: "Symbol size (fixed or function)"
|
|
23923
25223
|
},
|
|
25224
|
+
{
|
|
25225
|
+
name: "legend",
|
|
25226
|
+
type: "ChartLegendConfig",
|
|
25227
|
+
required: false,
|
|
25228
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
25229
|
+
},
|
|
25230
|
+
{
|
|
25231
|
+
name: "onLegendChange",
|
|
25232
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
25233
|
+
required: false,
|
|
25234
|
+
description: "Called when legend items are shown or hidden"
|
|
25235
|
+
},
|
|
25236
|
+
{
|
|
25237
|
+
name: "renderLegend",
|
|
25238
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
25239
|
+
required: false,
|
|
25240
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
25241
|
+
},
|
|
25242
|
+
{
|
|
25243
|
+
name: "labelFormatter",
|
|
25244
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25245
|
+
required: false,
|
|
25246
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25247
|
+
},
|
|
25248
|
+
{
|
|
25249
|
+
name: "xAxisConfig",
|
|
25250
|
+
type: "AxisConfig",
|
|
25251
|
+
required: false,
|
|
25252
|
+
description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25253
|
+
},
|
|
25254
|
+
{
|
|
25255
|
+
name: "yAxisConfig",
|
|
25256
|
+
type: "AxisConfig",
|
|
25257
|
+
required: false,
|
|
25258
|
+
description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25259
|
+
},
|
|
25260
|
+
{
|
|
25261
|
+
name: "showLabels",
|
|
25262
|
+
type: "boolean",
|
|
25263
|
+
required: false,
|
|
25264
|
+
description: "Show data labels (default false)"
|
|
25265
|
+
},
|
|
23924
25266
|
{
|
|
23925
25267
|
name: "onClick",
|
|
23926
25268
|
type: "(params: DataPointEventParams) => void",
|
|
@@ -23950,6 +25292,36 @@ var charts_catalog_default = {
|
|
|
23950
25292
|
type: "'polygon' | 'circle'",
|
|
23951
25293
|
required: false,
|
|
23952
25294
|
description: "Radar shape"
|
|
25295
|
+
},
|
|
25296
|
+
{
|
|
25297
|
+
name: "legend",
|
|
25298
|
+
type: "ChartLegendConfig",
|
|
25299
|
+
required: false,
|
|
25300
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
25301
|
+
},
|
|
25302
|
+
{
|
|
25303
|
+
name: "onLegendChange",
|
|
25304
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
25305
|
+
required: false,
|
|
25306
|
+
description: "Called when legend items are shown or hidden"
|
|
25307
|
+
},
|
|
25308
|
+
{
|
|
25309
|
+
name: "renderLegend",
|
|
25310
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
25311
|
+
required: false,
|
|
25312
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
25313
|
+
},
|
|
25314
|
+
{
|
|
25315
|
+
name: "labelFormatter",
|
|
25316
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25317
|
+
required: false,
|
|
25318
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25319
|
+
},
|
|
25320
|
+
{
|
|
25321
|
+
name: "showLabels",
|
|
25322
|
+
type: "boolean",
|
|
25323
|
+
required: false,
|
|
25324
|
+
description: "Show data labels (default false)"
|
|
23953
25325
|
}
|
|
23954
25326
|
]
|
|
23955
25327
|
},
|
|
@@ -23981,6 +25353,30 @@ var charts_catalog_default = {
|
|
|
23981
25353
|
required: false,
|
|
23982
25354
|
description: "Show value labels"
|
|
23983
25355
|
},
|
|
25356
|
+
{
|
|
25357
|
+
name: "legend",
|
|
25358
|
+
type: "ChartLegendConfig",
|
|
25359
|
+
required: false,
|
|
25360
|
+
description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
|
|
25361
|
+
},
|
|
25362
|
+
{
|
|
25363
|
+
name: "onLegendChange",
|
|
25364
|
+
type: "(visible: Record<string, boolean>) => void",
|
|
25365
|
+
required: false,
|
|
25366
|
+
description: "Called when legend items are shown or hidden"
|
|
25367
|
+
},
|
|
25368
|
+
{
|
|
25369
|
+
name: "renderLegend",
|
|
25370
|
+
type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
|
|
25371
|
+
required: false,
|
|
25372
|
+
description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
|
|
25373
|
+
},
|
|
25374
|
+
{
|
|
25375
|
+
name: "labelFormatter",
|
|
25376
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25377
|
+
required: false,
|
|
25378
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25379
|
+
},
|
|
23984
25380
|
{
|
|
23985
25381
|
name: "onClick",
|
|
23986
25382
|
type: "(params: SliceEventParams) => void",
|
|
@@ -24059,6 +25455,24 @@ var charts_catalog_default = {
|
|
|
24059
25455
|
required: false,
|
|
24060
25456
|
description: "Show values in cells"
|
|
24061
25457
|
},
|
|
25458
|
+
{
|
|
25459
|
+
name: "labelFormatter",
|
|
25460
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25461
|
+
required: false,
|
|
25462
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25463
|
+
},
|
|
25464
|
+
{
|
|
25465
|
+
name: "xAxisConfig",
|
|
25466
|
+
type: "AxisConfig",
|
|
25467
|
+
required: false,
|
|
25468
|
+
description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25469
|
+
},
|
|
25470
|
+
{
|
|
25471
|
+
name: "yAxisConfig",
|
|
25472
|
+
type: "AxisConfig",
|
|
25473
|
+
required: false,
|
|
25474
|
+
description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25475
|
+
},
|
|
24062
25476
|
{
|
|
24063
25477
|
name: "onClick",
|
|
24064
25478
|
type: "(params: HeatmapEventParams) => void",
|
|
@@ -24083,6 +25497,12 @@ var charts_catalog_default = {
|
|
|
24083
25497
|
required: false,
|
|
24084
25498
|
description: "Level configurations"
|
|
24085
25499
|
},
|
|
25500
|
+
{
|
|
25501
|
+
name: "labelFormatter",
|
|
25502
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25503
|
+
required: false,
|
|
25504
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25505
|
+
},
|
|
24086
25506
|
{
|
|
24087
25507
|
name: "onClick",
|
|
24088
25508
|
type: "(params: TreemapEventParams) => void",
|
|
@@ -24107,6 +25527,18 @@ var charts_catalog_default = {
|
|
|
24107
25527
|
required: false,
|
|
24108
25528
|
description: "Show volume bars"
|
|
24109
25529
|
},
|
|
25530
|
+
{
|
|
25531
|
+
name: "xAxisConfig",
|
|
25532
|
+
type: "AxisConfig",
|
|
25533
|
+
required: false,
|
|
25534
|
+
description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25535
|
+
},
|
|
25536
|
+
{
|
|
25537
|
+
name: "yAxisConfig",
|
|
25538
|
+
type: "AxisConfig",
|
|
25539
|
+
required: false,
|
|
25540
|
+
description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
|
|
25541
|
+
},
|
|
24110
25542
|
{
|
|
24111
25543
|
name: "onClick",
|
|
24112
25544
|
type: "(params: CandlestickEventParams) => void",
|
|
@@ -24131,6 +25563,12 @@ var charts_catalog_default = {
|
|
|
24131
25563
|
required: false,
|
|
24132
25564
|
description: "Flow orientation"
|
|
24133
25565
|
},
|
|
25566
|
+
{
|
|
25567
|
+
name: "labelFormatter",
|
|
25568
|
+
type: "string | ((params: LabelFormatterParams) => string)",
|
|
25569
|
+
required: false,
|
|
25570
|
+
description: "Data label text: an ECharts template or a function (params include per-point `label`)"
|
|
25571
|
+
},
|
|
24134
25572
|
{
|
|
24135
25573
|
name: "onClick",
|
|
24136
25574
|
type: "(params: SankeyEventParams) => void",
|
|
@@ -24138,6 +25576,210 @@ var charts_catalog_default = {
|
|
|
24138
25576
|
description: "Click event handler"
|
|
24139
25577
|
}
|
|
24140
25578
|
]
|
|
25579
|
+
},
|
|
25580
|
+
{
|
|
25581
|
+
name: "AxisConfig",
|
|
25582
|
+
description: "Axis customisation for cartesian charts (refers to the visual axis)",
|
|
25583
|
+
properties: [
|
|
25584
|
+
{
|
|
25585
|
+
name: "show",
|
|
25586
|
+
type: "boolean",
|
|
25587
|
+
required: false,
|
|
25588
|
+
description: "Show the axis"
|
|
25589
|
+
},
|
|
25590
|
+
{
|
|
25591
|
+
name: "name",
|
|
25592
|
+
type: "string",
|
|
25593
|
+
required: false,
|
|
25594
|
+
description: "Axis title"
|
|
25595
|
+
},
|
|
25596
|
+
{
|
|
25597
|
+
name: "nameLocation",
|
|
25598
|
+
type: "'start' | 'middle' | 'end'",
|
|
25599
|
+
required: false,
|
|
25600
|
+
description: "Axis title position (default 'middle')"
|
|
25601
|
+
},
|
|
25602
|
+
{
|
|
25603
|
+
name: "nameGap",
|
|
25604
|
+
type: "number",
|
|
25605
|
+
required: false,
|
|
25606
|
+
description: "Gap between title and axis line"
|
|
25607
|
+
},
|
|
25608
|
+
{
|
|
25609
|
+
name: "formatter",
|
|
25610
|
+
type: "string | ((value: string | number, index: number) => string)",
|
|
25611
|
+
required: false,
|
|
25612
|
+
description: "Tick label template (e.g. '{value} kg') or function"
|
|
25613
|
+
},
|
|
25614
|
+
{
|
|
25615
|
+
name: "rotate",
|
|
25616
|
+
type: "number",
|
|
25617
|
+
required: false,
|
|
25618
|
+
description: "Tick label rotation in degrees"
|
|
25619
|
+
},
|
|
25620
|
+
{
|
|
25621
|
+
name: "min",
|
|
25622
|
+
type: "number | 'dataMin'",
|
|
25623
|
+
required: false,
|
|
25624
|
+
description: "Axis minimum"
|
|
25625
|
+
},
|
|
25626
|
+
{
|
|
25627
|
+
name: "max",
|
|
25628
|
+
type: "number | 'dataMax'",
|
|
25629
|
+
required: false,
|
|
25630
|
+
description: "Axis maximum"
|
|
25631
|
+
},
|
|
25632
|
+
{
|
|
25633
|
+
name: "interval",
|
|
25634
|
+
type: "number",
|
|
25635
|
+
required: false,
|
|
25636
|
+
description: "Fixed tick interval"
|
|
25637
|
+
}
|
|
25638
|
+
]
|
|
25639
|
+
},
|
|
25640
|
+
{
|
|
25641
|
+
name: "ChartLegendConfig",
|
|
25642
|
+
description: "Built-in legend customisation",
|
|
25643
|
+
properties: [
|
|
25644
|
+
{
|
|
25645
|
+
name: "position",
|
|
25646
|
+
type: "'top' | 'right' | 'bottom' | 'left'",
|
|
25647
|
+
required: false,
|
|
25648
|
+
description: "Legend placement (default 'bottom')"
|
|
25649
|
+
},
|
|
25650
|
+
{
|
|
25651
|
+
name: "align",
|
|
25652
|
+
type: "'start' | 'center' | 'end'",
|
|
25653
|
+
required: false,
|
|
25654
|
+
description: "Alignment along the edge (default 'center')"
|
|
25655
|
+
},
|
|
25656
|
+
{
|
|
25657
|
+
name: "orient",
|
|
25658
|
+
type: "'horizontal' | 'vertical'",
|
|
25659
|
+
required: false,
|
|
25660
|
+
description: "Item flow (default horizontal for top/bottom, vertical for left/right)"
|
|
25661
|
+
},
|
|
25662
|
+
{
|
|
25663
|
+
name: "icon",
|
|
25664
|
+
type: "'circle' | 'rect' | 'roundRect' | 'line' | 'none'",
|
|
25665
|
+
required: false,
|
|
25666
|
+
description: "Marker shape"
|
|
25667
|
+
},
|
|
25668
|
+
{
|
|
25669
|
+
name: "formatter",
|
|
25670
|
+
type: "string | ((name: string) => string)",
|
|
25671
|
+
required: false,
|
|
25672
|
+
description: "Item text template ('{name}') or function"
|
|
25673
|
+
},
|
|
25674
|
+
{
|
|
25675
|
+
name: "scroll",
|
|
25676
|
+
type: "boolean",
|
|
25677
|
+
required: false,
|
|
25678
|
+
description: "Page items instead of wrapping"
|
|
25679
|
+
}
|
|
25680
|
+
]
|
|
25681
|
+
},
|
|
25682
|
+
{
|
|
25683
|
+
name: "LabelFormatterParams",
|
|
25684
|
+
description: "Normalised params passed to labelFormatter (and, with marker/axisValue, tooltipFormatter as TooltipFormatterParams)",
|
|
25685
|
+
properties: [
|
|
25686
|
+
{
|
|
25687
|
+
name: "name",
|
|
25688
|
+
type: "string",
|
|
25689
|
+
required: true,
|
|
25690
|
+
description: "Category, slice or node name"
|
|
25691
|
+
},
|
|
25692
|
+
{
|
|
25693
|
+
name: "value",
|
|
25694
|
+
type: "number | number[]",
|
|
25695
|
+
required: true,
|
|
25696
|
+
description: "Data value"
|
|
25697
|
+
},
|
|
25698
|
+
{
|
|
25699
|
+
name: "seriesName",
|
|
25700
|
+
type: "string",
|
|
25701
|
+
required: true,
|
|
25702
|
+
description: "Series name"
|
|
25703
|
+
},
|
|
25704
|
+
{
|
|
25705
|
+
name: "seriesIndex",
|
|
25706
|
+
type: "number",
|
|
25707
|
+
required: true,
|
|
25708
|
+
description: "Series index"
|
|
25709
|
+
},
|
|
25710
|
+
{
|
|
25711
|
+
name: "dataIndex",
|
|
25712
|
+
type: "number",
|
|
25713
|
+
required: true,
|
|
25714
|
+
description: "Data index"
|
|
25715
|
+
},
|
|
25716
|
+
{
|
|
25717
|
+
name: "percent",
|
|
25718
|
+
type: "number",
|
|
25719
|
+
required: false,
|
|
25720
|
+
description: "Share of total (pie, donut, funnel)"
|
|
25721
|
+
},
|
|
25722
|
+
{
|
|
25723
|
+
name: "color",
|
|
25724
|
+
type: "string",
|
|
25725
|
+
required: false,
|
|
25726
|
+
description: "Point colour"
|
|
25727
|
+
},
|
|
25728
|
+
{
|
|
25729
|
+
name: "label",
|
|
25730
|
+
type: "string",
|
|
25731
|
+
required: false,
|
|
25732
|
+
description: "Per-point label text from the data"
|
|
25733
|
+
}
|
|
25734
|
+
]
|
|
25735
|
+
},
|
|
25736
|
+
{
|
|
25737
|
+
name: "LegendRenderProps",
|
|
25738
|
+
description: "Passed to renderLegend; spread into ChartLegend for the default accessible HTML legend",
|
|
25739
|
+
properties: [
|
|
25740
|
+
{
|
|
25741
|
+
name: "items",
|
|
25742
|
+
type: "LegendItem[]",
|
|
25743
|
+
required: true,
|
|
25744
|
+
description: "{ name, color, visible } per entry"
|
|
25745
|
+
},
|
|
25746
|
+
{
|
|
25747
|
+
name: "position",
|
|
25748
|
+
type: "ChartLegendPosition",
|
|
25749
|
+
required: true,
|
|
25750
|
+
description: "Requested placement"
|
|
25751
|
+
},
|
|
25752
|
+
{
|
|
25753
|
+
name: "chartTitle",
|
|
25754
|
+
type: "string",
|
|
25755
|
+
required: true,
|
|
25756
|
+
description: "Chart title"
|
|
25757
|
+
},
|
|
25758
|
+
{
|
|
25759
|
+
name: "toggle",
|
|
25760
|
+
type: "(name: string) => void",
|
|
25761
|
+
required: true,
|
|
25762
|
+
description: "Show/hide an item"
|
|
25763
|
+
},
|
|
25764
|
+
{
|
|
25765
|
+
name: "setVisible",
|
|
25766
|
+
type: "(name: string, visible: boolean) => void",
|
|
25767
|
+
required: true,
|
|
25768
|
+
description: "Set an item's visibility"
|
|
25769
|
+
},
|
|
25770
|
+
{
|
|
25771
|
+
name: "showOnly",
|
|
25772
|
+
type: "(name: string) => void",
|
|
25773
|
+
required: true,
|
|
25774
|
+
description: "Show only this item"
|
|
25775
|
+
},
|
|
25776
|
+
{
|
|
25777
|
+
name: "showAll",
|
|
25778
|
+
type: "() => void",
|
|
25779
|
+
required: true,
|
|
25780
|
+
description: "Show every item"
|
|
25781
|
+
}
|
|
25782
|
+
]
|
|
24141
25783
|
}
|
|
24142
25784
|
]
|
|
24143
25785
|
},
|
|
@@ -24183,6 +25825,12 @@ var charts_catalog_default = {
|
|
|
24183
25825
|
type: "string",
|
|
24184
25826
|
required: false,
|
|
24185
25827
|
description: "Override theme color for this series"
|
|
25828
|
+
},
|
|
25829
|
+
{
|
|
25830
|
+
name: "labels",
|
|
25831
|
+
type: "(string | null | undefined)[]",
|
|
25832
|
+
required: false,
|
|
25833
|
+
description: "Per-point label text by data index (shown on those points; templates allowed)"
|
|
24186
25834
|
}
|
|
24187
25835
|
]
|
|
24188
25836
|
},
|
|
@@ -24225,6 +25873,12 @@ var charts_catalog_default = {
|
|
|
24225
25873
|
type: "string",
|
|
24226
25874
|
required: false,
|
|
24227
25875
|
description: "Override theme color for this series"
|
|
25876
|
+
},
|
|
25877
|
+
{
|
|
25878
|
+
name: "labels",
|
|
25879
|
+
type: "(string | null | undefined)[]",
|
|
25880
|
+
required: false,
|
|
25881
|
+
description: "Per-point label text by data index (shown on those points; templates allowed)"
|
|
24228
25882
|
}
|
|
24229
25883
|
]
|
|
24230
25884
|
},
|
|
@@ -24249,6 +25903,12 @@ var charts_catalog_default = {
|
|
|
24249
25903
|
type: "string",
|
|
24250
25904
|
required: false,
|
|
24251
25905
|
description: "Override theme color"
|
|
25906
|
+
},
|
|
25907
|
+
{
|
|
25908
|
+
name: "label",
|
|
25909
|
+
type: "string",
|
|
25910
|
+
required: false,
|
|
25911
|
+
description: "Label text shown instead of the default (templates allowed)"
|
|
24252
25912
|
}
|
|
24253
25913
|
]
|
|
24254
25914
|
},
|
|
@@ -24291,6 +25951,12 @@ var charts_catalog_default = {
|
|
|
24291
25951
|
type: "string",
|
|
24292
25952
|
required: false,
|
|
24293
25953
|
description: "Override theme color for this series"
|
|
25954
|
+
},
|
|
25955
|
+
{
|
|
25956
|
+
name: "labels",
|
|
25957
|
+
type: "(string | null | undefined)[]",
|
|
25958
|
+
required: false,
|
|
25959
|
+
description: "Per-point label text by data index (shown on those points; templates allowed)"
|
|
24294
25960
|
}
|
|
24295
25961
|
]
|
|
24296
25962
|
},
|
|
@@ -24327,6 +25993,12 @@ var charts_catalog_default = {
|
|
|
24327
25993
|
type: "string",
|
|
24328
25994
|
required: false,
|
|
24329
25995
|
description: "Override theme color"
|
|
25996
|
+
},
|
|
25997
|
+
{
|
|
25998
|
+
name: "labels",
|
|
25999
|
+
type: "(string | null | undefined)[]",
|
|
26000
|
+
required: false,
|
|
26001
|
+
description: "Per-point label text by data index (shown on those points; templates allowed)"
|
|
24330
26002
|
}
|
|
24331
26003
|
]
|
|
24332
26004
|
},
|
|
@@ -24411,6 +26083,12 @@ var charts_catalog_default = {
|
|
|
24411
26083
|
type: "string",
|
|
24412
26084
|
required: false,
|
|
24413
26085
|
description: "Override theme color"
|
|
26086
|
+
},
|
|
26087
|
+
{
|
|
26088
|
+
name: "label",
|
|
26089
|
+
type: "string",
|
|
26090
|
+
required: false,
|
|
26091
|
+
description: "Label text shown instead of the default (templates allowed)"
|
|
24414
26092
|
}
|
|
24415
26093
|
]
|
|
24416
26094
|
},
|
|
@@ -24465,6 +26143,12 @@ var charts_catalog_default = {
|
|
|
24465
26143
|
type: "string",
|
|
24466
26144
|
required: false,
|
|
24467
26145
|
description: "Override theme color"
|
|
26146
|
+
},
|
|
26147
|
+
{
|
|
26148
|
+
name: "label",
|
|
26149
|
+
type: "string",
|
|
26150
|
+
required: false,
|
|
26151
|
+
description: "Label text shown instead of the default (templates allowed)"
|
|
24468
26152
|
}
|
|
24469
26153
|
]
|
|
24470
26154
|
},
|
|
@@ -24579,6 +26263,12 @@ var charts_catalog_default = {
|
|
|
24579
26263
|
type: "string",
|
|
24580
26264
|
required: false,
|
|
24581
26265
|
description: "Override theme color"
|
|
26266
|
+
},
|
|
26267
|
+
{
|
|
26268
|
+
name: "label",
|
|
26269
|
+
type: "string",
|
|
26270
|
+
required: false,
|
|
26271
|
+
description: "Label text shown instead of the default (templates allowed)"
|
|
24582
26272
|
}
|
|
24583
26273
|
]
|
|
24584
26274
|
},
|
|
@@ -25204,6 +26894,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
|
|
|
25204
26894
|
- \`darkTheme\` - Pre-generated dark theme
|
|
25205
26895
|
- \`THEME_LIGHT\` - Constant: 'classic-light'
|
|
25206
26896
|
- \`THEME_DARK\` - Constant: 'classic-dark'
|
|
26897
|
+
- \`getChartColors(themeName)\` - Token-derived per-element colours for a theme
|
|
26898
|
+
- \`colorWithAlpha(color, alpha)\` - Hex colour to rgba()
|
|
25207
26899
|
|
|
25208
26900
|
## Formatting Utilities
|
|
25209
26901
|
|
|
@@ -25213,6 +26905,8 @@ AreaChart, BarChart, LineChart, PieChart, DonutChart, CandlestickChart, FunnelCh
|
|
|
25213
26905
|
- \`formatDate(date, options?, locale?)\` - Format date
|
|
25214
26906
|
- \`abbreviateNumber(value, decimals?)\` - Abbreviate to K/M/B/T
|
|
25215
26907
|
- \`createTooltipFormatter(options?)\` - Create ECharts tooltip formatter
|
|
26908
|
+
- \`escapeHtml(value)\` - Escape user data in custom tooltip formatters
|
|
26909
|
+
- \`getReplaceMerge(prev, next, isComponentType)\` - setOption replaceMerge list that drops removed series/components but keeps legend and dataZoom state
|
|
25216
26910
|
|
|
25217
26911
|
## Accessibility Utilities
|
|
25218
26912
|
|
|
@@ -25301,7 +26995,7 @@ interface SankeyData {
|
|
|
25301
26995
|
|
|
25302
26996
|
// src/data/maps-catalog.json
|
|
25303
26997
|
var maps_catalog_default = {
|
|
25304
|
-
version: "0.3.
|
|
26998
|
+
version: "0.3.5",
|
|
25305
26999
|
packageName: "@classic-homes/maps-core",
|
|
25306
27000
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
25307
27001
|
subpackages: {
|
|
@@ -30632,7 +32326,7 @@ ${catalog5.quickReference.tailwindConfig}
|
|
|
30632
32326
|
|
|
30633
32327
|
// src/data/native-catalog.json
|
|
30634
32328
|
var native_catalog_default = {
|
|
30635
|
-
version: "0.3.
|
|
32329
|
+
version: "0.3.5",
|
|
30636
32330
|
packageName: "@classic-homes/native",
|
|
30637
32331
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
30638
32332
|
subpackages: {
|
|
@@ -32352,19 +34046,10 @@ function registerResources(server) {
|
|
|
32352
34046
|
// src/tools/searchComponents.ts
|
|
32353
34047
|
import { z } from "zod";
|
|
32354
34048
|
var catalog7 = component_catalog_default;
|
|
34049
|
+
var categories = [...new Set(catalog7.components.map((c) => c.category))].sort();
|
|
32355
34050
|
var SearchComponentsSchema = z.object({
|
|
32356
34051
|
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"),
|
|
34052
|
+
category: z.enum(categories).optional().describe("Filter by component category"),
|
|
32368
34053
|
limit: z.number().min(1).max(50).default(10).describe("Maximum number of results")
|
|
32369
34054
|
});
|
|
32370
34055
|
function registerSearchComponentsTool(server) {
|
|
@@ -32508,34 +34193,15 @@ function registerGetComponentPropsTool(server) {
|
|
|
32508
34193
|
// src/tools/suggestPattern.ts
|
|
32509
34194
|
import { z as z3 } from "zod";
|
|
32510
34195
|
var patterns2 = pattern_library_default;
|
|
34196
|
+
var patternIds = [
|
|
34197
|
+
...patterns2.layouts,
|
|
34198
|
+
...patterns2.forms,
|
|
34199
|
+
...patterns2.auth ?? [],
|
|
34200
|
+
...patterns2.notifications ?? [],
|
|
34201
|
+
...patterns2.panels ?? []
|
|
34202
|
+
].map((p) => p.id);
|
|
32511
34203
|
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"),
|
|
34204
|
+
useCase: z3.enum(patternIds).describe("The use case you need a pattern for"),
|
|
32539
34205
|
requirements: z3.array(z3.string()).optional().describe("Additional requirements or constraints")
|
|
32540
34206
|
});
|
|
32541
34207
|
function registerSuggestPatternTool(server) {
|
|
@@ -32549,7 +34215,8 @@ function registerSuggestPatternTool(server) {
|
|
|
32549
34215
|
const form = patterns2.forms.find((f) => f.id === useCase);
|
|
32550
34216
|
const auth = patterns2.auth?.find((a) => a.id === useCase);
|
|
32551
34217
|
const notification = patterns2.notifications?.find((n) => n.id === useCase);
|
|
32552
|
-
const
|
|
34218
|
+
const panel = patterns2.panels?.find((p) => p.id === useCase);
|
|
34219
|
+
const pattern = layout || form || auth || notification || panel;
|
|
32553
34220
|
if (!pattern) {
|
|
32554
34221
|
const availablePatterns = [
|
|
32555
34222
|
...patterns2.layouts.map((l) => ({ id: l.id, type: "layout", name: l.name })),
|
|
@@ -32559,7 +34226,8 @@ function registerSuggestPatternTool(server) {
|
|
|
32559
34226
|
id: n.id,
|
|
32560
34227
|
type: "notification",
|
|
32561
34228
|
name: n.name
|
|
32562
|
-
})) || []
|
|
34229
|
+
})) || [],
|
|
34230
|
+
...patterns2.panels?.map((p) => ({ id: p.id, type: "panel", name: p.name })) || []
|
|
32563
34231
|
];
|
|
32564
34232
|
return {
|
|
32565
34233
|
content: [
|
|
@@ -32611,6 +34279,18 @@ var ValidateUsageSchema = z4.object({
|
|
|
32611
34279
|
props: z4.record(z4.unknown()).describe("Props being passed to the component"),
|
|
32612
34280
|
context: z4.string().optional().describe('Where the component is being used (e.g., "inside a form", "in modal")')
|
|
32613
34281
|
});
|
|
34282
|
+
var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
34283
|
+
"class",
|
|
34284
|
+
"children",
|
|
34285
|
+
"id",
|
|
34286
|
+
"style",
|
|
34287
|
+
"title",
|
|
34288
|
+
"role",
|
|
34289
|
+
"tabindex"
|
|
34290
|
+
]);
|
|
34291
|
+
function isPassThroughAttribute(name) {
|
|
34292
|
+
return GLOBAL_ATTRIBUTES.has(name) || /^(aria-|data-|on[a-z])/.test(name);
|
|
34293
|
+
}
|
|
32614
34294
|
function registerValidateUsageTool(server) {
|
|
32615
34295
|
server.tool(
|
|
32616
34296
|
"validate_component_usage",
|
|
@@ -32641,7 +34321,7 @@ function registerValidateUsageTool(server) {
|
|
|
32641
34321
|
const issues = [];
|
|
32642
34322
|
const knownProps = new Set(component.props.map((p) => p.name));
|
|
32643
34323
|
for (const propName of Object.keys(props)) {
|
|
32644
|
-
if (!knownProps.has(propName) && propName
|
|
34324
|
+
if (!knownProps.has(propName) && !isPassThroughAttribute(propName)) {
|
|
32645
34325
|
issues.push({
|
|
32646
34326
|
type: "warning",
|
|
32647
34327
|
message: `Unknown prop "${propName}" - not in component API`,
|
|
@@ -33007,7 +34687,7 @@ function registerPrompts(server) {
|
|
|
33007
34687
|
// package.json
|
|
33008
34688
|
var package_default = {
|
|
33009
34689
|
name: "@classic-homes/theme-mcp",
|
|
33010
|
-
version: "0.3.
|
|
34690
|
+
version: "0.3.5",
|
|
33011
34691
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
33012
34692
|
type: "module",
|
|
33013
34693
|
main: "dist/index.js",
|
|
@@ -33057,7 +34737,7 @@ var package_default = {
|
|
|
33057
34737
|
start: "node dist/cli.js",
|
|
33058
34738
|
typecheck: "tsc --noEmit",
|
|
33059
34739
|
validate: "tsx scripts/validate-catalog-integrity.ts",
|
|
33060
|
-
test: "npm run validate",
|
|
34740
|
+
test: "npm run validate && vitest run",
|
|
33061
34741
|
clean: "node ../../scripts/rm.mjs dist",
|
|
33062
34742
|
prepublishOnly: "npm run build"
|
|
33063
34743
|
},
|