@kjaniec-dev/ui-mcp 0.9.3 → 1.0.0
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/data/components.json +1222 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/data/components.json
CHANGED
|
@@ -4666,5 +4666,1227 @@
|
|
|
4666
4666
|
],
|
|
4667
4667
|
"cva": null,
|
|
4668
4668
|
"usageSnippet": "<InPostGeowidgetModal sandbox={true} value={point} onSelect={(p) => setPoint(p)} />"
|
|
4669
|
+
},
|
|
4670
|
+
{
|
|
4671
|
+
"name": "ChartContainer",
|
|
4672
|
+
"importPath": "import { ChartContainer } from \"@kjaniec-dev/ui\";",
|
|
4673
|
+
"description": "Responsive chart container managing SVG viewBox coordinate space and absolute HTML overlay slot.",
|
|
4674
|
+
"props": [
|
|
4675
|
+
{
|
|
4676
|
+
"name": "width",
|
|
4677
|
+
"type": "number",
|
|
4678
|
+
"optional": true,
|
|
4679
|
+
"defaultValue": null,
|
|
4680
|
+
"description": ""
|
|
4681
|
+
},
|
|
4682
|
+
{
|
|
4683
|
+
"name": "height",
|
|
4684
|
+
"type": "number | string",
|
|
4685
|
+
"optional": true,
|
|
4686
|
+
"defaultValue": null,
|
|
4687
|
+
"description": ""
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
"name": "viewBox",
|
|
4691
|
+
"type": "string",
|
|
4692
|
+
"optional": true,
|
|
4693
|
+
"defaultValue": null,
|
|
4694
|
+
"description": ""
|
|
4695
|
+
},
|
|
4696
|
+
{
|
|
4697
|
+
"name": "\"aria-label\"",
|
|
4698
|
+
"type": "string",
|
|
4699
|
+
"optional": true,
|
|
4700
|
+
"defaultValue": null,
|
|
4701
|
+
"description": ""
|
|
4702
|
+
},
|
|
4703
|
+
{
|
|
4704
|
+
"name": "ariaLabel",
|
|
4705
|
+
"type": "string",
|
|
4706
|
+
"optional": true,
|
|
4707
|
+
"defaultValue": null,
|
|
4708
|
+
"description": ""
|
|
4709
|
+
},
|
|
4710
|
+
{
|
|
4711
|
+
"name": "overlay",
|
|
4712
|
+
"type": "React.ReactNode",
|
|
4713
|
+
"optional": true,
|
|
4714
|
+
"defaultValue": null,
|
|
4715
|
+
"description": ""
|
|
4716
|
+
},
|
|
4717
|
+
{
|
|
4718
|
+
"name": "svgClassName",
|
|
4719
|
+
"type": "string",
|
|
4720
|
+
"optional": true,
|
|
4721
|
+
"defaultValue": null,
|
|
4722
|
+
"description": ""
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
"name": "svgRef",
|
|
4726
|
+
"type": "React.Ref<SVGSVGElement>",
|
|
4727
|
+
"optional": true,
|
|
4728
|
+
"defaultValue": null,
|
|
4729
|
+
"description": ""
|
|
4730
|
+
},
|
|
4731
|
+
{
|
|
4732
|
+
"name": "plotWrapperClassName",
|
|
4733
|
+
"type": "string",
|
|
4734
|
+
"optional": true,
|
|
4735
|
+
"defaultValue": null,
|
|
4736
|
+
"description": ""
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
"name": "plotWrapperStyle",
|
|
4740
|
+
"type": "React.CSSProperties",
|
|
4741
|
+
"optional": true,
|
|
4742
|
+
"defaultValue": null,
|
|
4743
|
+
"description": ""
|
|
4744
|
+
},
|
|
4745
|
+
{
|
|
4746
|
+
"name": "children",
|
|
4747
|
+
"type": "React.ReactNode",
|
|
4748
|
+
"optional": true,
|
|
4749
|
+
"defaultValue": null,
|
|
4750
|
+
"description": ""
|
|
4751
|
+
}
|
|
4752
|
+
],
|
|
4753
|
+
"cva": null,
|
|
4754
|
+
"usageSnippet": "<ChartContainer>\n <!-- Content -->\n</ChartContainer>"
|
|
4755
|
+
},
|
|
4756
|
+
{
|
|
4757
|
+
"name": "ChartGrid",
|
|
4758
|
+
"importPath": "import { ChartGrid } from \"@kjaniec-dev/ui\";",
|
|
4759
|
+
"description": "Background horizontal and vertical reference lines with custom tick intervals and dashing.",
|
|
4760
|
+
"props": [
|
|
4761
|
+
{
|
|
4762
|
+
"name": "width",
|
|
4763
|
+
"type": "number",
|
|
4764
|
+
"optional": true,
|
|
4765
|
+
"defaultValue": "0",
|
|
4766
|
+
"description": ""
|
|
4767
|
+
},
|
|
4768
|
+
{
|
|
4769
|
+
"name": "height",
|
|
4770
|
+
"type": "number",
|
|
4771
|
+
"optional": true,
|
|
4772
|
+
"defaultValue": "0",
|
|
4773
|
+
"description": ""
|
|
4774
|
+
},
|
|
4775
|
+
{
|
|
4776
|
+
"name": "yTicks",
|
|
4777
|
+
"type": "number[]",
|
|
4778
|
+
"optional": true,
|
|
4779
|
+
"defaultValue": null,
|
|
4780
|
+
"description": ""
|
|
4781
|
+
},
|
|
4782
|
+
{
|
|
4783
|
+
"name": "xTicks",
|
|
4784
|
+
"type": "number[]",
|
|
4785
|
+
"optional": true,
|
|
4786
|
+
"defaultValue": null,
|
|
4787
|
+
"description": ""
|
|
4788
|
+
},
|
|
4789
|
+
{
|
|
4790
|
+
"name": "scaleY",
|
|
4791
|
+
"type": "(value: number) => number",
|
|
4792
|
+
"optional": true,
|
|
4793
|
+
"defaultValue": null,
|
|
4794
|
+
"description": ""
|
|
4795
|
+
},
|
|
4796
|
+
{
|
|
4797
|
+
"name": "scaleX",
|
|
4798
|
+
"type": "(value: number) => number",
|
|
4799
|
+
"optional": true,
|
|
4800
|
+
"defaultValue": null,
|
|
4801
|
+
"description": ""
|
|
4802
|
+
},
|
|
4803
|
+
{
|
|
4804
|
+
"name": "yDomain",
|
|
4805
|
+
"type": "[number, number]",
|
|
4806
|
+
"optional": true,
|
|
4807
|
+
"defaultValue": null,
|
|
4808
|
+
"description": ""
|
|
4809
|
+
},
|
|
4810
|
+
{
|
|
4811
|
+
"name": "yRange",
|
|
4812
|
+
"type": "[number, number]",
|
|
4813
|
+
"optional": true,
|
|
4814
|
+
"defaultValue": null,
|
|
4815
|
+
"description": ""
|
|
4816
|
+
},
|
|
4817
|
+
{
|
|
4818
|
+
"name": "xDomain",
|
|
4819
|
+
"type": "[number, number]",
|
|
4820
|
+
"optional": true,
|
|
4821
|
+
"defaultValue": null,
|
|
4822
|
+
"description": ""
|
|
4823
|
+
},
|
|
4824
|
+
{
|
|
4825
|
+
"name": "xRange",
|
|
4826
|
+
"type": "[number, number]",
|
|
4827
|
+
"optional": true,
|
|
4828
|
+
"defaultValue": null,
|
|
4829
|
+
"description": ""
|
|
4830
|
+
},
|
|
4831
|
+
{
|
|
4832
|
+
"name": "stroke",
|
|
4833
|
+
"type": "string",
|
|
4834
|
+
"optional": true,
|
|
4835
|
+
"defaultValue": "\"var(--kj-border-subtle, #e5e7eb)\"",
|
|
4836
|
+
"description": ""
|
|
4837
|
+
},
|
|
4838
|
+
{
|
|
4839
|
+
"name": "strokeDasharray",
|
|
4840
|
+
"type": "string",
|
|
4841
|
+
"optional": true,
|
|
4842
|
+
"defaultValue": "\"3 3\"",
|
|
4843
|
+
"description": ""
|
|
4844
|
+
},
|
|
4845
|
+
{
|
|
4846
|
+
"name": "strokeWidth",
|
|
4847
|
+
"type": "number",
|
|
4848
|
+
"optional": true,
|
|
4849
|
+
"defaultValue": "1",
|
|
4850
|
+
"description": ""
|
|
4851
|
+
},
|
|
4852
|
+
{
|
|
4853
|
+
"name": "strokeOpacity",
|
|
4854
|
+
"type": "number",
|
|
4855
|
+
"optional": true,
|
|
4856
|
+
"defaultValue": "1",
|
|
4857
|
+
"description": ""
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
"name": "horizontal",
|
|
4861
|
+
"type": "boolean",
|
|
4862
|
+
"optional": true,
|
|
4863
|
+
"defaultValue": "true",
|
|
4864
|
+
"description": ""
|
|
4865
|
+
},
|
|
4866
|
+
{
|
|
4867
|
+
"name": "vertical",
|
|
4868
|
+
"type": "boolean",
|
|
4869
|
+
"optional": true,
|
|
4870
|
+
"defaultValue": null,
|
|
4871
|
+
"description": ""
|
|
4872
|
+
},
|
|
4873
|
+
{
|
|
4874
|
+
"name": "className",
|
|
4875
|
+
"type": "string",
|
|
4876
|
+
"optional": true,
|
|
4877
|
+
"defaultValue": null,
|
|
4878
|
+
"description": ""
|
|
4879
|
+
}
|
|
4880
|
+
],
|
|
4881
|
+
"cva": null,
|
|
4882
|
+
"usageSnippet": "<ChartGrid>\n <!-- Content -->\n</ChartGrid>"
|
|
4883
|
+
},
|
|
4884
|
+
{
|
|
4885
|
+
"name": "ChartXAxis",
|
|
4886
|
+
"importPath": "import { ChartXAxis } from \"@kjaniec-dev/ui\";",
|
|
4887
|
+
"description": "SVG horizontal axis ticks rendering aligned category or timestamp labels.",
|
|
4888
|
+
"props": [
|
|
4889
|
+
{
|
|
4890
|
+
"name": "ticks",
|
|
4891
|
+
"type": "ChartXAxisTick[]",
|
|
4892
|
+
"optional": false,
|
|
4893
|
+
"defaultValue": null,
|
|
4894
|
+
"description": ""
|
|
4895
|
+
},
|
|
4896
|
+
{
|
|
4897
|
+
"name": "y",
|
|
4898
|
+
"type": "number",
|
|
4899
|
+
"optional": false,
|
|
4900
|
+
"defaultValue": null,
|
|
4901
|
+
"description": ""
|
|
4902
|
+
},
|
|
4903
|
+
{
|
|
4904
|
+
"name": "formatter",
|
|
4905
|
+
"type": "(value: unknown) => string",
|
|
4906
|
+
"optional": true,
|
|
4907
|
+
"defaultValue": null,
|
|
4908
|
+
"description": ""
|
|
4909
|
+
},
|
|
4910
|
+
{
|
|
4911
|
+
"name": "valueFormatter",
|
|
4912
|
+
"type": "(value: unknown) => string",
|
|
4913
|
+
"optional": true,
|
|
4914
|
+
"defaultValue": null,
|
|
4915
|
+
"description": ""
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
"name": "textAnchor",
|
|
4919
|
+
"type": "\"start\" | \"middle\" | \"end\"",
|
|
4920
|
+
"optional": true,
|
|
4921
|
+
"defaultValue": "\"middle\"",
|
|
4922
|
+
"description": ""
|
|
4923
|
+
},
|
|
4924
|
+
{
|
|
4925
|
+
"name": "dy",
|
|
4926
|
+
"type": "string | number",
|
|
4927
|
+
"optional": true,
|
|
4928
|
+
"defaultValue": "\"1.2em\"",
|
|
4929
|
+
"description": ""
|
|
4930
|
+
},
|
|
4931
|
+
{
|
|
4932
|
+
"name": "className",
|
|
4933
|
+
"type": "string",
|
|
4934
|
+
"optional": true,
|
|
4935
|
+
"defaultValue": null,
|
|
4936
|
+
"description": ""
|
|
4937
|
+
},
|
|
4938
|
+
{
|
|
4939
|
+
"name": "tickClassName",
|
|
4940
|
+
"type": "string",
|
|
4941
|
+
"optional": true,
|
|
4942
|
+
"defaultValue": null,
|
|
4943
|
+
"description": ""
|
|
4944
|
+
}
|
|
4945
|
+
],
|
|
4946
|
+
"cva": null,
|
|
4947
|
+
"usageSnippet": "<ChartXAxis>\n <!-- Content -->\n</ChartXAxis>"
|
|
4948
|
+
},
|
|
4949
|
+
{
|
|
4950
|
+
"name": "ChartYAxis",
|
|
4951
|
+
"importPath": "import { ChartYAxis } from \"@kjaniec-dev/ui\";",
|
|
4952
|
+
"description": "SVG vertical axis ticks rendering numeric or value labels.",
|
|
4953
|
+
"props": [
|
|
4954
|
+
{
|
|
4955
|
+
"name": "ticks",
|
|
4956
|
+
"type": "ChartYAxisTick[]",
|
|
4957
|
+
"optional": false,
|
|
4958
|
+
"defaultValue": null,
|
|
4959
|
+
"description": ""
|
|
4960
|
+
},
|
|
4961
|
+
{
|
|
4962
|
+
"name": "x",
|
|
4963
|
+
"type": "number",
|
|
4964
|
+
"optional": false,
|
|
4965
|
+
"defaultValue": null,
|
|
4966
|
+
"description": ""
|
|
4967
|
+
},
|
|
4968
|
+
{
|
|
4969
|
+
"name": "formatter",
|
|
4970
|
+
"type": "(value: unknown) => string",
|
|
4971
|
+
"optional": true,
|
|
4972
|
+
"defaultValue": null,
|
|
4973
|
+
"description": ""
|
|
4974
|
+
},
|
|
4975
|
+
{
|
|
4976
|
+
"name": "valueFormatter",
|
|
4977
|
+
"type": "(value: unknown) => string",
|
|
4978
|
+
"optional": true,
|
|
4979
|
+
"defaultValue": null,
|
|
4980
|
+
"description": ""
|
|
4981
|
+
},
|
|
4982
|
+
{
|
|
4983
|
+
"name": "textAnchor",
|
|
4984
|
+
"type": "\"start\" | \"middle\" | \"end\"",
|
|
4985
|
+
"optional": true,
|
|
4986
|
+
"defaultValue": "\"end\"",
|
|
4987
|
+
"description": ""
|
|
4988
|
+
},
|
|
4989
|
+
{
|
|
4990
|
+
"name": "dx",
|
|
4991
|
+
"type": "string | number",
|
|
4992
|
+
"optional": true,
|
|
4993
|
+
"defaultValue": "\"-0.5em\"",
|
|
4994
|
+
"description": ""
|
|
4995
|
+
},
|
|
4996
|
+
{
|
|
4997
|
+
"name": "dominantBaseline",
|
|
4998
|
+
"type": "\"auto\" | \"middle\" | \"central\" | \"hanging\" | \"alphabetic\"",
|
|
4999
|
+
"optional": true,
|
|
5000
|
+
"defaultValue": "\"middle\"",
|
|
5001
|
+
"description": ""
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
"name": "className",
|
|
5005
|
+
"type": "string",
|
|
5006
|
+
"optional": true,
|
|
5007
|
+
"defaultValue": null,
|
|
5008
|
+
"description": ""
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
"name": "tickClassName",
|
|
5012
|
+
"type": "string",
|
|
5013
|
+
"optional": true,
|
|
5014
|
+
"defaultValue": null,
|
|
5015
|
+
"description": ""
|
|
5016
|
+
}
|
|
5017
|
+
],
|
|
5018
|
+
"cva": null,
|
|
5019
|
+
"usageSnippet": "<ChartYAxis>\n <!-- Content -->\n</ChartYAxis>"
|
|
5020
|
+
},
|
|
5021
|
+
{
|
|
5022
|
+
"name": "ChartTooltip",
|
|
5023
|
+
"importPath": "import { ChartTooltip } from \"@kjaniec-dev/ui\";",
|
|
5024
|
+
"description": "Absolute-positioned HTML floating tooltip card with series indicators and crosshair line.",
|
|
5025
|
+
"props": [
|
|
5026
|
+
{
|
|
5027
|
+
"name": "title",
|
|
5028
|
+
"type": "React.ReactNode",
|
|
5029
|
+
"optional": true,
|
|
5030
|
+
"defaultValue": null,
|
|
5031
|
+
"description": ""
|
|
5032
|
+
},
|
|
5033
|
+
{
|
|
5034
|
+
"name": "items",
|
|
5035
|
+
"type": "ChartTooltipItem[]",
|
|
5036
|
+
"optional": true,
|
|
5037
|
+
"defaultValue": null,
|
|
5038
|
+
"description": ""
|
|
5039
|
+
},
|
|
5040
|
+
{
|
|
5041
|
+
"name": "x",
|
|
5042
|
+
"type": "number",
|
|
5043
|
+
"optional": true,
|
|
5044
|
+
"defaultValue": null,
|
|
5045
|
+
"description": ""
|
|
5046
|
+
},
|
|
5047
|
+
{
|
|
5048
|
+
"name": "y",
|
|
5049
|
+
"type": "number",
|
|
5050
|
+
"optional": true,
|
|
5051
|
+
"defaultValue": null,
|
|
5052
|
+
"description": ""
|
|
5053
|
+
},
|
|
5054
|
+
{
|
|
5055
|
+
"name": "open",
|
|
5056
|
+
"type": "boolean",
|
|
5057
|
+
"optional": true,
|
|
5058
|
+
"defaultValue": "true",
|
|
5059
|
+
"description": ""
|
|
5060
|
+
},
|
|
5061
|
+
{
|
|
5062
|
+
"name": "crosshairX",
|
|
5063
|
+
"type": "number",
|
|
5064
|
+
"optional": true,
|
|
5065
|
+
"defaultValue": null,
|
|
5066
|
+
"description": ""
|
|
5067
|
+
},
|
|
5068
|
+
{
|
|
5069
|
+
"name": "crosshairHeight",
|
|
5070
|
+
"type": "number",
|
|
5071
|
+
"optional": true,
|
|
5072
|
+
"defaultValue": null,
|
|
5073
|
+
"description": ""
|
|
5074
|
+
},
|
|
5075
|
+
{
|
|
5076
|
+
"name": "showCrosshair",
|
|
5077
|
+
"type": "boolean",
|
|
5078
|
+
"optional": true,
|
|
5079
|
+
"defaultValue": "false",
|
|
5080
|
+
"description": ""
|
|
5081
|
+
},
|
|
5082
|
+
{
|
|
5083
|
+
"name": "valueFormatter",
|
|
5084
|
+
"type": "(value: number) => string",
|
|
5085
|
+
"optional": true,
|
|
5086
|
+
"defaultValue": null,
|
|
5087
|
+
"description": ""
|
|
5088
|
+
},
|
|
5089
|
+
{
|
|
5090
|
+
"name": "content",
|
|
5091
|
+
"type": "React.ReactNode",
|
|
5092
|
+
"optional": true,
|
|
5093
|
+
"defaultValue": null,
|
|
5094
|
+
"description": ""
|
|
5095
|
+
}
|
|
5096
|
+
],
|
|
5097
|
+
"cva": null,
|
|
5098
|
+
"usageSnippet": "<ChartTooltip>\n <!-- Content -->\n</ChartTooltip>"
|
|
5099
|
+
},
|
|
5100
|
+
{
|
|
5101
|
+
"name": "ChartLegend",
|
|
5102
|
+
"importPath": "import { ChartLegend } from \"@kjaniec-dev/ui\";",
|
|
5103
|
+
"description": "Series labels list with colored indicator dots and optional click/keyboard toggling.",
|
|
5104
|
+
"props": [
|
|
5105
|
+
{
|
|
5106
|
+
"name": "series",
|
|
5107
|
+
"type": "ChartSeries[]",
|
|
5108
|
+
"optional": false,
|
|
5109
|
+
"defaultValue": null,
|
|
5110
|
+
"description": ""
|
|
5111
|
+
},
|
|
5112
|
+
{
|
|
5113
|
+
"name": "activeSeries",
|
|
5114
|
+
"type": "string[]",
|
|
5115
|
+
"optional": true,
|
|
5116
|
+
"defaultValue": null,
|
|
5117
|
+
"description": ""
|
|
5118
|
+
},
|
|
5119
|
+
{
|
|
5120
|
+
"name": "disabledSeries",
|
|
5121
|
+
"type": "string[]",
|
|
5122
|
+
"optional": true,
|
|
5123
|
+
"defaultValue": null,
|
|
5124
|
+
"description": ""
|
|
5125
|
+
},
|
|
5126
|
+
{
|
|
5127
|
+
"name": "onToggle",
|
|
5128
|
+
"type": "(key: string) => void",
|
|
5129
|
+
"optional": true,
|
|
5130
|
+
"defaultValue": null,
|
|
5131
|
+
"description": ""
|
|
5132
|
+
},
|
|
5133
|
+
{
|
|
5134
|
+
"name": "orientation",
|
|
5135
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
5136
|
+
"optional": true,
|
|
5137
|
+
"defaultValue": "\"horizontal\"",
|
|
5138
|
+
"description": ""
|
|
5139
|
+
},
|
|
5140
|
+
{
|
|
5141
|
+
"name": "className",
|
|
5142
|
+
"type": "string",
|
|
5143
|
+
"optional": true,
|
|
5144
|
+
"defaultValue": null,
|
|
5145
|
+
"description": ""
|
|
5146
|
+
},
|
|
5147
|
+
{
|
|
5148
|
+
"name": "itemClassName",
|
|
5149
|
+
"type": "string",
|
|
5150
|
+
"optional": true,
|
|
5151
|
+
"defaultValue": null,
|
|
5152
|
+
"description": ""
|
|
5153
|
+
}
|
|
5154
|
+
],
|
|
5155
|
+
"cva": null,
|
|
5156
|
+
"usageSnippet": "<ChartLegend>\n <!-- Content -->\n</ChartLegend>"
|
|
5157
|
+
},
|
|
5158
|
+
{
|
|
5159
|
+
"name": "ChartA11yTable",
|
|
5160
|
+
"importPath": "import { ChartA11yTable } from \"@kjaniec-dev/ui\";",
|
|
5161
|
+
"description": "Screen reader accessible semantic table hidden with sr-only class complying with WCAG 2.1 AA.",
|
|
5162
|
+
"props": [
|
|
5163
|
+
{
|
|
5164
|
+
"name": "caption",
|
|
5165
|
+
"type": "string",
|
|
5166
|
+
"optional": true,
|
|
5167
|
+
"defaultValue": null,
|
|
5168
|
+
"description": ""
|
|
5169
|
+
},
|
|
5170
|
+
{
|
|
5171
|
+
"name": "categories",
|
|
5172
|
+
"type": "string[]",
|
|
5173
|
+
"optional": true,
|
|
5174
|
+
"defaultValue": null,
|
|
5175
|
+
"description": ""
|
|
5176
|
+
},
|
|
5177
|
+
{
|
|
5178
|
+
"name": "series",
|
|
5179
|
+
"type": "ChartSeries[]",
|
|
5180
|
+
"optional": false,
|
|
5181
|
+
"defaultValue": null,
|
|
5182
|
+
"description": ""
|
|
5183
|
+
},
|
|
5184
|
+
{
|
|
5185
|
+
"name": "data",
|
|
5186
|
+
"type": "Array<Record<string, unknown>> | number[]",
|
|
5187
|
+
"optional": false,
|
|
5188
|
+
"defaultValue": null,
|
|
5189
|
+
"description": ""
|
|
5190
|
+
},
|
|
5191
|
+
{
|
|
5192
|
+
"name": "indexKey",
|
|
5193
|
+
"type": "string",
|
|
5194
|
+
"optional": true,
|
|
5195
|
+
"defaultValue": null,
|
|
5196
|
+
"description": ""
|
|
5197
|
+
},
|
|
5198
|
+
{
|
|
5199
|
+
"name": "index",
|
|
5200
|
+
"type": "string",
|
|
5201
|
+
"optional": true,
|
|
5202
|
+
"defaultValue": null,
|
|
5203
|
+
"description": ""
|
|
5204
|
+
},
|
|
5205
|
+
{
|
|
5206
|
+
"name": "valueFormatter",
|
|
5207
|
+
"type": "(value: unknown) => string",
|
|
5208
|
+
"optional": true,
|
|
5209
|
+
"defaultValue": null,
|
|
5210
|
+
"description": ""
|
|
5211
|
+
},
|
|
5212
|
+
{
|
|
5213
|
+
"name": "className",
|
|
5214
|
+
"type": "string",
|
|
5215
|
+
"optional": true,
|
|
5216
|
+
"defaultValue": null,
|
|
5217
|
+
"description": ""
|
|
5218
|
+
}
|
|
5219
|
+
],
|
|
5220
|
+
"cva": null,
|
|
5221
|
+
"usageSnippet": "<ChartA11yTable>\n <!-- Content -->\n</ChartA11yTable>"
|
|
5222
|
+
},
|
|
5223
|
+
{
|
|
5224
|
+
"name": "CHART_COLOR_VARS",
|
|
5225
|
+
"importPath": "import { CHART_COLOR_VARS } from \"@kjaniec-dev/ui\";",
|
|
5226
|
+
"description": "Map of chart token keys to CSS custom properties with fallback hex values.",
|
|
5227
|
+
"props": [],
|
|
5228
|
+
"cva": null,
|
|
5229
|
+
"usageSnippet": "<CHART_COLOR_VARS>\n <!-- Content -->\n</CHART_COLOR_VARS>"
|
|
5230
|
+
},
|
|
5231
|
+
{
|
|
5232
|
+
"name": "DEFAULT_CHART_COLORS",
|
|
5233
|
+
"importPath": "import { DEFAULT_CHART_COLORS } from \"@kjaniec-dev/ui\";",
|
|
5234
|
+
"description": "Default color sequence cycling through chart1 to chart6.",
|
|
5235
|
+
"props": [],
|
|
5236
|
+
"cva": null,
|
|
5237
|
+
"usageSnippet": "<DEFAULT_CHART_COLORS>\n <!-- Content -->\n</DEFAULT_CHART_COLORS>"
|
|
5238
|
+
},
|
|
5239
|
+
{
|
|
5240
|
+
"name": "Sparkline",
|
|
5241
|
+
"importPath": "import { Sparkline } from \"@kjaniec-dev/ui\";",
|
|
5242
|
+
"description": "Compact, lightweight data visualization sparkline for KPI cards, metric widgets, and data tables.",
|
|
5243
|
+
"props": [
|
|
5244
|
+
{
|
|
5245
|
+
"name": "data",
|
|
5246
|
+
"type": "Array<number | Record<string, unknown>>",
|
|
5247
|
+
"optional": true,
|
|
5248
|
+
"defaultValue": null,
|
|
5249
|
+
"description": "Numerical values or objects containing data points to plot."
|
|
5250
|
+
},
|
|
5251
|
+
{
|
|
5252
|
+
"name": "dataKey",
|
|
5253
|
+
"type": "string",
|
|
5254
|
+
"optional": true,
|
|
5255
|
+
"defaultValue": null,
|
|
5256
|
+
"description": "Key to extract numeric values when `data` contains objects."
|
|
5257
|
+
},
|
|
5258
|
+
{
|
|
5259
|
+
"name": "variant",
|
|
5260
|
+
"type": "SparklineVariant",
|
|
5261
|
+
"optional": true,
|
|
5262
|
+
"defaultValue": "\"line\"",
|
|
5263
|
+
"description": "Visual presentation mode: continuous line, gradient area, or discrete bars. Defaults to \"line\"."
|
|
5264
|
+
},
|
|
5265
|
+
{
|
|
5266
|
+
"name": "curve",
|
|
5267
|
+
"type": "SparklineCurve",
|
|
5268
|
+
"optional": true,
|
|
5269
|
+
"defaultValue": "\"smooth\"",
|
|
5270
|
+
"description": "Interpolation method between data points. Defaults to \"smooth\"."
|
|
5271
|
+
},
|
|
5272
|
+
{
|
|
5273
|
+
"name": "color",
|
|
5274
|
+
"type": "ChartColor",
|
|
5275
|
+
"optional": true,
|
|
5276
|
+
"defaultValue": "\"chart1\"",
|
|
5277
|
+
"description": "Theme token identifier or raw CSS color string for line, fill, and bars. Defaults to \"chart1\"."
|
|
5278
|
+
},
|
|
5279
|
+
{
|
|
5280
|
+
"name": "strokeWidth",
|
|
5281
|
+
"type": "number",
|
|
5282
|
+
"optional": true,
|
|
5283
|
+
"defaultValue": "2",
|
|
5284
|
+
"description": "Line stroke width in pixels for line and area variants. Defaults to 2."
|
|
5285
|
+
},
|
|
5286
|
+
{
|
|
5287
|
+
"name": "showEndDot",
|
|
5288
|
+
"type": "boolean",
|
|
5289
|
+
"optional": true,
|
|
5290
|
+
"defaultValue": "false",
|
|
5291
|
+
"description": "Whether to highlight the final data point with an accent dot. Defaults to false."
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
"name": "showGradient",
|
|
5295
|
+
"type": "boolean",
|
|
5296
|
+
"optional": true,
|
|
5297
|
+
"defaultValue": "true",
|
|
5298
|
+
"description": "Whether to apply a fading vertical gradient to area fills. Defaults to true."
|
|
5299
|
+
},
|
|
5300
|
+
{
|
|
5301
|
+
"name": "height",
|
|
5302
|
+
"type": "number",
|
|
5303
|
+
"optional": true,
|
|
5304
|
+
"defaultValue": "36",
|
|
5305
|
+
"description": "Overall component height in pixels. Defaults to 36."
|
|
5306
|
+
},
|
|
5307
|
+
{
|
|
5308
|
+
"name": "width",
|
|
5309
|
+
"type": "number | string",
|
|
5310
|
+
"optional": true,
|
|
5311
|
+
"defaultValue": "\"100%\"",
|
|
5312
|
+
"description": "Component width in pixels or CSS units. Defaults to \"100%\"."
|
|
5313
|
+
},
|
|
5314
|
+
{
|
|
5315
|
+
"name": "barRadius",
|
|
5316
|
+
"type": "number",
|
|
5317
|
+
"optional": true,
|
|
5318
|
+
"defaultValue": "2",
|
|
5319
|
+
"description": "Corner radius in pixels for bar rectangles. Defaults to 2."
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
"name": "barPadding",
|
|
5323
|
+
"type": "number",
|
|
5324
|
+
"optional": true,
|
|
5325
|
+
"defaultValue": "2",
|
|
5326
|
+
"description": "Spacing between discrete bars in pixels. Defaults to 2."
|
|
5327
|
+
},
|
|
5328
|
+
{
|
|
5329
|
+
"name": "ariaLabel",
|
|
5330
|
+
"type": "string",
|
|
5331
|
+
"optional": true,
|
|
5332
|
+
"defaultValue": null,
|
|
5333
|
+
"description": "Accessible label alias for assistive technologies."
|
|
5334
|
+
}
|
|
5335
|
+
],
|
|
5336
|
+
"cva": null,
|
|
5337
|
+
"usageSnippet": "<Sparkline data={sampleData} variant=\"line\" color=\"chart1\" showEndDot height={40} />"
|
|
5338
|
+
},
|
|
5339
|
+
{
|
|
5340
|
+
"name": "LineChart",
|
|
5341
|
+
"importPath": "import { LineChart } from \"@kjaniec-dev/ui\";",
|
|
5342
|
+
"description": "Responsive multi-series LineChart with SVG rendering, background grid, nice-scale axes,\ninteractive HTML tooltip overlay with crosshair, toggleable legend, and WCAG AA accessible table.",
|
|
5343
|
+
"props": [
|
|
5344
|
+
{
|
|
5345
|
+
"name": "data",
|
|
5346
|
+
"type": "Array<Record<string, unknown>>",
|
|
5347
|
+
"optional": false,
|
|
5348
|
+
"defaultValue": null,
|
|
5349
|
+
"description": "Array of tabular data records to plot."
|
|
5350
|
+
},
|
|
5351
|
+
{
|
|
5352
|
+
"name": "index",
|
|
5353
|
+
"type": "string",
|
|
5354
|
+
"optional": false,
|
|
5355
|
+
"defaultValue": null,
|
|
5356
|
+
"description": "Key identifying category or timestamp in each data item (e.g. \"date\", \"month\")."
|
|
5357
|
+
},
|
|
5358
|
+
{
|
|
5359
|
+
"name": "series",
|
|
5360
|
+
"type": "ChartSeries[]",
|
|
5361
|
+
"optional": false,
|
|
5362
|
+
"defaultValue": null,
|
|
5363
|
+
"description": "Series configurations defining data keys, labels, and color assignments."
|
|
5364
|
+
},
|
|
5365
|
+
{
|
|
5366
|
+
"name": "variant",
|
|
5367
|
+
"type": "LineChartVariant",
|
|
5368
|
+
"optional": true,
|
|
5369
|
+
"defaultValue": "\"line\"",
|
|
5370
|
+
"description": "Visual presentation mode: continuous line or filled area. Defaults to \"line\"."
|
|
5371
|
+
},
|
|
5372
|
+
{
|
|
5373
|
+
"name": "curve",
|
|
5374
|
+
"type": "LineChartCurve",
|
|
5375
|
+
"optional": true,
|
|
5376
|
+
"defaultValue": "\"linear\"",
|
|
5377
|
+
"description": "Interpolation method between data points: linear polyline, smooth cubic curve, or step lines. Defaults to \"linear\"."
|
|
5378
|
+
},
|
|
5379
|
+
{
|
|
5380
|
+
"name": "showGrid",
|
|
5381
|
+
"type": "boolean",
|
|
5382
|
+
"optional": true,
|
|
5383
|
+
"defaultValue": "true",
|
|
5384
|
+
"description": "Whether to render background horizontal reference grid lines. Defaults to true."
|
|
5385
|
+
},
|
|
5386
|
+
{
|
|
5387
|
+
"name": "showXAxis",
|
|
5388
|
+
"type": "boolean",
|
|
5389
|
+
"optional": true,
|
|
5390
|
+
"defaultValue": "true",
|
|
5391
|
+
"description": "Whether to render horizontal X-axis tick labels. Defaults to true."
|
|
5392
|
+
},
|
|
5393
|
+
{
|
|
5394
|
+
"name": "showYAxis",
|
|
5395
|
+
"type": "boolean",
|
|
5396
|
+
"optional": true,
|
|
5397
|
+
"defaultValue": "true",
|
|
5398
|
+
"description": "Whether to render vertical Y-axis numeric ticks. Defaults to true."
|
|
5399
|
+
},
|
|
5400
|
+
{
|
|
5401
|
+
"name": "showLegend",
|
|
5402
|
+
"type": "boolean",
|
|
5403
|
+
"optional": true,
|
|
5404
|
+
"defaultValue": null,
|
|
5405
|
+
"description": "Whether to render series legend. Defaults to true when series.length > 1."
|
|
5406
|
+
},
|
|
5407
|
+
{
|
|
5408
|
+
"name": "showTooltip",
|
|
5409
|
+
"type": "boolean",
|
|
5410
|
+
"optional": true,
|
|
5411
|
+
"defaultValue": "true",
|
|
5412
|
+
"description": "Whether to display interactive floating tooltip card on hover/touch. Defaults to true."
|
|
5413
|
+
},
|
|
5414
|
+
{
|
|
5415
|
+
"name": "showDots",
|
|
5416
|
+
"type": "boolean",
|
|
5417
|
+
"optional": true,
|
|
5418
|
+
"defaultValue": "false",
|
|
5419
|
+
"description": "Whether to render accent dots on data points. Defaults to false."
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
"name": "showGradient",
|
|
5423
|
+
"type": "boolean",
|
|
5424
|
+
"optional": true,
|
|
5425
|
+
"defaultValue": "true",
|
|
5426
|
+
"description": "Whether to apply a subtle vertical gradient to area fills. Defaults to true."
|
|
5427
|
+
},
|
|
5428
|
+
{
|
|
5429
|
+
"name": "showA11yTable",
|
|
5430
|
+
"type": "boolean",
|
|
5431
|
+
"optional": true,
|
|
5432
|
+
"defaultValue": null,
|
|
5433
|
+
"description": "Whether to render a semantic hidden table for screen readers. Defaults to true when caption is provided."
|
|
5434
|
+
},
|
|
5435
|
+
{
|
|
5436
|
+
"name": "valueFormatter",
|
|
5437
|
+
"type": "(value: number) => string",
|
|
5438
|
+
"optional": true,
|
|
5439
|
+
"defaultValue": null,
|
|
5440
|
+
"description": "Value formatter for Y-axis labels and tooltip metrics."
|
|
5441
|
+
},
|
|
5442
|
+
{
|
|
5443
|
+
"name": "indexFormatter",
|
|
5444
|
+
"type": "(value: unknown) => string",
|
|
5445
|
+
"optional": true,
|
|
5446
|
+
"defaultValue": null,
|
|
5447
|
+
"description": "Label formatter for X-axis ticks and tooltip header."
|
|
5448
|
+
},
|
|
5449
|
+
{
|
|
5450
|
+
"name": "emptyMessage",
|
|
5451
|
+
"type": "string",
|
|
5452
|
+
"optional": true,
|
|
5453
|
+
"defaultValue": "\"Brak danych do wyświetlenia\"",
|
|
5454
|
+
"description": "Text to render when `data` is empty. Defaults to \"Brak danych do wyświetlenia\"."
|
|
5455
|
+
},
|
|
5456
|
+
{
|
|
5457
|
+
"name": "height",
|
|
5458
|
+
"type": "number | string",
|
|
5459
|
+
"optional": true,
|
|
5460
|
+
"defaultValue": "280",
|
|
5461
|
+
"description": "Height of the chart in pixels or CSS units. Defaults to 280."
|
|
5462
|
+
},
|
|
5463
|
+
{
|
|
5464
|
+
"name": "width",
|
|
5465
|
+
"type": "number | string",
|
|
5466
|
+
"optional": true,
|
|
5467
|
+
"defaultValue": "\"100%\"",
|
|
5468
|
+
"description": "Width of the chart in pixels or CSS units. Defaults to \"100%\"."
|
|
5469
|
+
},
|
|
5470
|
+
{
|
|
5471
|
+
"name": "margin",
|
|
5472
|
+
"type": "ChartMargin",
|
|
5473
|
+
"optional": true,
|
|
5474
|
+
"defaultValue": null,
|
|
5475
|
+
"description": "Inner chart margins in pixels."
|
|
5476
|
+
},
|
|
5477
|
+
{
|
|
5478
|
+
"name": "ariaLabel",
|
|
5479
|
+
"type": "string",
|
|
5480
|
+
"optional": true,
|
|
5481
|
+
"defaultValue": null,
|
|
5482
|
+
"description": "Accessible label for screen readers."
|
|
5483
|
+
},
|
|
5484
|
+
{
|
|
5485
|
+
"name": "caption",
|
|
5486
|
+
"type": "string",
|
|
5487
|
+
"optional": true,
|
|
5488
|
+
"defaultValue": null,
|
|
5489
|
+
"description": "Screen reader semantic table caption."
|
|
5490
|
+
},
|
|
5491
|
+
{
|
|
5492
|
+
"name": "strokeWidth",
|
|
5493
|
+
"type": "number",
|
|
5494
|
+
"optional": true,
|
|
5495
|
+
"defaultValue": "2",
|
|
5496
|
+
"description": "Stroke width in pixels for line paths. Defaults to 2."
|
|
5497
|
+
},
|
|
5498
|
+
{
|
|
5499
|
+
"name": "activeSeries",
|
|
5500
|
+
"type": "string[]",
|
|
5501
|
+
"optional": true,
|
|
5502
|
+
"defaultValue": null,
|
|
5503
|
+
"description": "Controlled list of active series keys."
|
|
5504
|
+
},
|
|
5505
|
+
{
|
|
5506
|
+
"name": "onSeriesToggle",
|
|
5507
|
+
"type": "(key: string) => void",
|
|
5508
|
+
"optional": true,
|
|
5509
|
+
"defaultValue": null,
|
|
5510
|
+
"description": "Callback fired when user clicks a legend item to toggle series visibility."
|
|
5511
|
+
},
|
|
5512
|
+
{
|
|
5513
|
+
"name": "yTicksCount",
|
|
5514
|
+
"type": "number",
|
|
5515
|
+
"optional": true,
|
|
5516
|
+
"defaultValue": "5",
|
|
5517
|
+
"description": "Number of Y-axis ticks to target in nice scale calculation. Defaults to 5."
|
|
5518
|
+
},
|
|
5519
|
+
{
|
|
5520
|
+
"name": "yDomain",
|
|
5521
|
+
"type": "[number, number]",
|
|
5522
|
+
"optional": true,
|
|
5523
|
+
"defaultValue": null,
|
|
5524
|
+
"description": "Explicit [min, max] domain override for Y-axis."
|
|
5525
|
+
},
|
|
5526
|
+
{
|
|
5527
|
+
"name": "autoScale",
|
|
5528
|
+
"type": "boolean",
|
|
5529
|
+
"optional": true,
|
|
5530
|
+
"defaultValue": "false",
|
|
5531
|
+
"description": "Whether Y-axis auto-scales to data minimum rather than anchoring at zero. Defaults to false."
|
|
5532
|
+
}
|
|
5533
|
+
],
|
|
5534
|
+
"cva": null,
|
|
5535
|
+
"usageSnippet": "<LineChart\n data={monthlyData}\n index=\"month\"\n series={standardSeries}\n curve=\"smooth\"\n height={240}\n/>"
|
|
5536
|
+
},
|
|
5537
|
+
{
|
|
5538
|
+
"name": "AreaChart",
|
|
5539
|
+
"importPath": "import { AreaChart } from \"@kjaniec-dev/ui\";",
|
|
5540
|
+
"description": "Specialized variant of LineChart with subtle SVG vertical gradient fills beneath lines.",
|
|
5541
|
+
"props": [],
|
|
5542
|
+
"cva": null,
|
|
5543
|
+
"usageSnippet": "<AreaChart\n data={monthlyData}\n index=\"month\"\n series={[\n { key: \"revenue\", label: \"Przychód\", color: \"chart1\" },\n { key: \"profit\", label: \"Zysk\", color: \"chart2\" },\n ]}\n curve=\"smooth\"\n valueFormatter={(val) => `${(val / 1000).toFixed(0)}k zł`}\n height={320}\n/>"
|
|
5544
|
+
},
|
|
5545
|
+
{
|
|
5546
|
+
"name": "BarChart",
|
|
5547
|
+
"importPath": "import { BarChart } from \"@kjaniec-dev/ui\";",
|
|
5548
|
+
"description": "Responsive multi-series BarChart supporting grouped and stacked modes,\nvertical and horizontal orientations, rounded corners, tooltips, legend toggling,\nand WCAG AA accessibility table.",
|
|
5549
|
+
"props": [
|
|
5550
|
+
{
|
|
5551
|
+
"name": "data",
|
|
5552
|
+
"type": "Array<Record<string, unknown>>",
|
|
5553
|
+
"optional": false,
|
|
5554
|
+
"defaultValue": null,
|
|
5555
|
+
"description": "Array of tabular data records to plot."
|
|
5556
|
+
},
|
|
5557
|
+
{
|
|
5558
|
+
"name": "index",
|
|
5559
|
+
"type": "string",
|
|
5560
|
+
"optional": false,
|
|
5561
|
+
"defaultValue": null,
|
|
5562
|
+
"description": "Key identifying category or timestamp in each data item (e.g. \"category\", \"month\")."
|
|
5563
|
+
},
|
|
5564
|
+
{
|
|
5565
|
+
"name": "series",
|
|
5566
|
+
"type": "ChartSeries[]",
|
|
5567
|
+
"optional": false,
|
|
5568
|
+
"defaultValue": null,
|
|
5569
|
+
"description": "Series configurations defining data keys, labels, and color assignments."
|
|
5570
|
+
},
|
|
5571
|
+
{
|
|
5572
|
+
"name": "type",
|
|
5573
|
+
"type": "BarChartType",
|
|
5574
|
+
"optional": true,
|
|
5575
|
+
"defaultValue": "\"grouped\"",
|
|
5576
|
+
"description": "Mode of bar presentation: grouped side-by-side or stacked. Defaults to \"grouped\"."
|
|
5577
|
+
},
|
|
5578
|
+
{
|
|
5579
|
+
"name": "layout",
|
|
5580
|
+
"type": "BarChartLayout",
|
|
5581
|
+
"optional": true,
|
|
5582
|
+
"defaultValue": "\"vertical\"",
|
|
5583
|
+
"description": "Orientation of bars: vertical columns or horizontal bars. Defaults to \"vertical\"."
|
|
5584
|
+
},
|
|
5585
|
+
{
|
|
5586
|
+
"name": "radius",
|
|
5587
|
+
"type": "number",
|
|
5588
|
+
"optional": true,
|
|
5589
|
+
"defaultValue": "4",
|
|
5590
|
+
"description": "Corner radius in pixels for rounded bar edges. Defaults to 4."
|
|
5591
|
+
},
|
|
5592
|
+
{
|
|
5593
|
+
"name": "showGrid",
|
|
5594
|
+
"type": "boolean",
|
|
5595
|
+
"optional": true,
|
|
5596
|
+
"defaultValue": "true",
|
|
5597
|
+
"description": "Whether to render background reference grid lines. Defaults to true."
|
|
5598
|
+
},
|
|
5599
|
+
{
|
|
5600
|
+
"name": "showXAxis",
|
|
5601
|
+
"type": "boolean",
|
|
5602
|
+
"optional": true,
|
|
5603
|
+
"defaultValue": "true",
|
|
5604
|
+
"description": "Whether to render horizontal X-axis tick labels. Defaults to true."
|
|
5605
|
+
},
|
|
5606
|
+
{
|
|
5607
|
+
"name": "showYAxis",
|
|
5608
|
+
"type": "boolean",
|
|
5609
|
+
"optional": true,
|
|
5610
|
+
"defaultValue": "true",
|
|
5611
|
+
"description": "Whether to render vertical Y-axis numeric or category ticks. Defaults to true."
|
|
5612
|
+
},
|
|
5613
|
+
{
|
|
5614
|
+
"name": "showLegend",
|
|
5615
|
+
"type": "boolean",
|
|
5616
|
+
"optional": true,
|
|
5617
|
+
"defaultValue": null,
|
|
5618
|
+
"description": "Whether to render series legend. Defaults to true when series.length > 1."
|
|
5619
|
+
},
|
|
5620
|
+
{
|
|
5621
|
+
"name": "showTooltip",
|
|
5622
|
+
"type": "boolean",
|
|
5623
|
+
"optional": true,
|
|
5624
|
+
"defaultValue": "true",
|
|
5625
|
+
"description": "Whether to display interactive floating tooltip card on bar hover/touch. Defaults to true."
|
|
5626
|
+
},
|
|
5627
|
+
{
|
|
5628
|
+
"name": "showA11yTable",
|
|
5629
|
+
"type": "boolean",
|
|
5630
|
+
"optional": true,
|
|
5631
|
+
"defaultValue": null,
|
|
5632
|
+
"description": "Whether to render a semantic hidden table for screen readers. Defaults to true when caption is provided."
|
|
5633
|
+
},
|
|
5634
|
+
{
|
|
5635
|
+
"name": "valueFormatter",
|
|
5636
|
+
"type": "(value: number) => string",
|
|
5637
|
+
"optional": true,
|
|
5638
|
+
"defaultValue": null,
|
|
5639
|
+
"description": "Value formatter for numeric axis labels and tooltip metrics."
|
|
5640
|
+
},
|
|
5641
|
+
{
|
|
5642
|
+
"name": "indexFormatter",
|
|
5643
|
+
"type": "(value: unknown) => string",
|
|
5644
|
+
"optional": true,
|
|
5645
|
+
"defaultValue": null,
|
|
5646
|
+
"description": "Label formatter for category axis ticks and tooltip header."
|
|
5647
|
+
},
|
|
5648
|
+
{
|
|
5649
|
+
"name": "emptyMessage",
|
|
5650
|
+
"type": "string",
|
|
5651
|
+
"optional": true,
|
|
5652
|
+
"defaultValue": "\"Brak danych do wyświetlenia\"",
|
|
5653
|
+
"description": "Text to render when `data` is empty. Defaults to \"Brak danych do wyświetlenia\"."
|
|
5654
|
+
},
|
|
5655
|
+
{
|
|
5656
|
+
"name": "height",
|
|
5657
|
+
"type": "number | string",
|
|
5658
|
+
"optional": true,
|
|
5659
|
+
"defaultValue": "280",
|
|
5660
|
+
"description": "Height of the chart in pixels or CSS units. Defaults to 280."
|
|
5661
|
+
},
|
|
5662
|
+
{
|
|
5663
|
+
"name": "width",
|
|
5664
|
+
"type": "number | string",
|
|
5665
|
+
"optional": true,
|
|
5666
|
+
"defaultValue": "\"100%\"",
|
|
5667
|
+
"description": "Width of the chart in pixels or CSS units. Defaults to \"100%\"."
|
|
5668
|
+
},
|
|
5669
|
+
{
|
|
5670
|
+
"name": "margin",
|
|
5671
|
+
"type": "ChartMargin",
|
|
5672
|
+
"optional": true,
|
|
5673
|
+
"defaultValue": null,
|
|
5674
|
+
"description": "Inner chart margins in pixels."
|
|
5675
|
+
},
|
|
5676
|
+
{
|
|
5677
|
+
"name": "ariaLabel",
|
|
5678
|
+
"type": "string",
|
|
5679
|
+
"optional": true,
|
|
5680
|
+
"defaultValue": null,
|
|
5681
|
+
"description": "Accessible label for screen readers."
|
|
5682
|
+
},
|
|
5683
|
+
{
|
|
5684
|
+
"name": "caption",
|
|
5685
|
+
"type": "string",
|
|
5686
|
+
"optional": true,
|
|
5687
|
+
"defaultValue": null,
|
|
5688
|
+
"description": "Screen reader semantic table caption."
|
|
5689
|
+
},
|
|
5690
|
+
{
|
|
5691
|
+
"name": "activeSeries",
|
|
5692
|
+
"type": "string[]",
|
|
5693
|
+
"optional": true,
|
|
5694
|
+
"defaultValue": null,
|
|
5695
|
+
"description": "Controlled list of active series keys."
|
|
5696
|
+
},
|
|
5697
|
+
{
|
|
5698
|
+
"name": "onSeriesToggle",
|
|
5699
|
+
"type": "(key: string) => void",
|
|
5700
|
+
"optional": true,
|
|
5701
|
+
"defaultValue": null,
|
|
5702
|
+
"description": "Callback fired when user clicks a legend item to toggle series visibility."
|
|
5703
|
+
},
|
|
5704
|
+
{
|
|
5705
|
+
"name": "yTicksCount",
|
|
5706
|
+
"type": "number",
|
|
5707
|
+
"optional": true,
|
|
5708
|
+
"defaultValue": "5",
|
|
5709
|
+
"description": "Number of numeric ticks to target in nice scale calculation. Defaults to 5."
|
|
5710
|
+
},
|
|
5711
|
+
{
|
|
5712
|
+
"name": "yDomain",
|
|
5713
|
+
"type": "[number, number]",
|
|
5714
|
+
"optional": true,
|
|
5715
|
+
"defaultValue": null,
|
|
5716
|
+
"description": "Explicit [min, max] domain override for the numeric value axis."
|
|
5717
|
+
},
|
|
5718
|
+
{
|
|
5719
|
+
"name": "autoScale",
|
|
5720
|
+
"type": "boolean",
|
|
5721
|
+
"optional": true,
|
|
5722
|
+
"defaultValue": "false",
|
|
5723
|
+
"description": "Whether numeric axis auto-scales to data minimum rather than anchoring at zero. Defaults to false."
|
|
5724
|
+
},
|
|
5725
|
+
{
|
|
5726
|
+
"name": "barMaxWidth",
|
|
5727
|
+
"type": "number",
|
|
5728
|
+
"optional": true,
|
|
5729
|
+
"defaultValue": null,
|
|
5730
|
+
"description": "Maximum bar thickness in pixels."
|
|
5731
|
+
},
|
|
5732
|
+
{
|
|
5733
|
+
"name": "groupPadding",
|
|
5734
|
+
"type": "number",
|
|
5735
|
+
"optional": true,
|
|
5736
|
+
"defaultValue": "0.2",
|
|
5737
|
+
"description": "Fractional padding between category groups (0 to 1). Defaults to 0.2."
|
|
5738
|
+
},
|
|
5739
|
+
{
|
|
5740
|
+
"name": "barPadding",
|
|
5741
|
+
"type": "number",
|
|
5742
|
+
"optional": true,
|
|
5743
|
+
"defaultValue": "2",
|
|
5744
|
+
"description": "Pixel gap between bars within a grouped category. Defaults to 2."
|
|
5745
|
+
},
|
|
5746
|
+
{
|
|
5747
|
+
"name": "barClassName",
|
|
5748
|
+
"type": "string",
|
|
5749
|
+
"optional": true,
|
|
5750
|
+
"defaultValue": null,
|
|
5751
|
+
"description": "Additional CSS class applied to each SVG bar rect."
|
|
5752
|
+
}
|
|
5753
|
+
],
|
|
5754
|
+
"cva": null,
|
|
5755
|
+
"usageSnippet": "<BarChart\n data={[]}\n index=\"month\"\n series={standardSeries}\n emptyMessage=\"Brak danych historycznych dla wybranego okresu\"\n height={220}\n/>"
|
|
5756
|
+
},
|
|
5757
|
+
{
|
|
5758
|
+
"name": "DonutChart",
|
|
5759
|
+
"importPath": "import { DonutChart } from \"@kjaniec-dev/ui\";",
|
|
5760
|
+
"description": "Responsive DonutChart component rendering SVG annular ring segments,\ncenter content slot, hover highlights, interactive legend toggling,\nfloating tooltip, and WCAG AA screen reader table.",
|
|
5761
|
+
"props": [
|
|
5762
|
+
{
|
|
5763
|
+
"name": "data",
|
|
5764
|
+
"type": "Array<Record<string, unknown>>",
|
|
5765
|
+
"optional": false,
|
|
5766
|
+
"defaultValue": null,
|
|
5767
|
+
"description": "Array of data records to plot."
|
|
5768
|
+
},
|
|
5769
|
+
{
|
|
5770
|
+
"name": "category",
|
|
5771
|
+
"type": "string",
|
|
5772
|
+
"optional": false,
|
|
5773
|
+
"defaultValue": null,
|
|
5774
|
+
"description": "Key identifying category label in each data item (e.g. \"source\", \"name\")."
|
|
5775
|
+
},
|
|
5776
|
+
{
|
|
5777
|
+
"name": "value",
|
|
5778
|
+
"type": "string",
|
|
5779
|
+
"optional": false,
|
|
5780
|
+
"defaultValue": null,
|
|
5781
|
+
"description": "Key identifying numeric value in each data item (e.g. \"visitors\", \"amount\")."
|
|
5782
|
+
},
|
|
5783
|
+
{
|
|
5784
|
+
"name": "centerLabel",
|
|
5785
|
+
"type": "React.ReactNode",
|
|
5786
|
+
"optional": true,
|
|
5787
|
+
"defaultValue": null,
|
|
5788
|
+
"description": "Custom label or metric element rendered in the center hole of the donut ring."
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
"name": "size",
|
|
5792
|
+
"type": "DonutChartSize",
|
|
5793
|
+
"optional": true,
|
|
5794
|
+
"defaultValue": "\"md\"",
|
|
5795
|
+
"description": "Chart diameter: predefined \"sm\" (160px), \"md\" (220px), \"lg\" (280px) or custom pixel number. Defaults to \"md\"."
|
|
5796
|
+
},
|
|
5797
|
+
{
|
|
5798
|
+
"name": "innerRadius",
|
|
5799
|
+
"type": "number",
|
|
5800
|
+
"optional": true,
|
|
5801
|
+
"defaultValue": null,
|
|
5802
|
+
"description": "Inner radius ratio (0 to 1, relative to outerRadius) or absolute pixel radius (> 1). Defaults to 0.65. Set to 0 for pie chart."
|
|
5803
|
+
},
|
|
5804
|
+
{
|
|
5805
|
+
"name": "colors",
|
|
5806
|
+
"type": "(ChartColor | string)[]",
|
|
5807
|
+
"optional": true,
|
|
5808
|
+
"defaultValue": null,
|
|
5809
|
+
"description": "Custom color palette or token sequence (e.g. [\"chart1\", \"chart2\"] or hex strings)."
|
|
5810
|
+
},
|
|
5811
|
+
{
|
|
5812
|
+
"name": "showLegend",
|
|
5813
|
+
"type": "boolean",
|
|
5814
|
+
"optional": true,
|
|
5815
|
+
"defaultValue": "true",
|
|
5816
|
+
"description": "Whether to render series legend. Defaults to true."
|
|
5817
|
+
},
|
|
5818
|
+
{
|
|
5819
|
+
"name": "showTooltip",
|
|
5820
|
+
"type": "boolean",
|
|
5821
|
+
"optional": true,
|
|
5822
|
+
"defaultValue": "true",
|
|
5823
|
+
"description": "Whether to display interactive floating tooltip card on slice hover/touch. Defaults to true."
|
|
5824
|
+
},
|
|
5825
|
+
{
|
|
5826
|
+
"name": "showA11yTable",
|
|
5827
|
+
"type": "boolean",
|
|
5828
|
+
"optional": true,
|
|
5829
|
+
"defaultValue": null,
|
|
5830
|
+
"description": "Whether to render a semantic hidden table for screen readers. Defaults to true when caption is provided."
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
"name": "valueFormatter",
|
|
5834
|
+
"type": "(value: number) => string",
|
|
5835
|
+
"optional": true,
|
|
5836
|
+
"defaultValue": null,
|
|
5837
|
+
"description": "Value formatter for numeric tooltip metrics and accessible table values."
|
|
5838
|
+
},
|
|
5839
|
+
{
|
|
5840
|
+
"name": "emptyMessage",
|
|
5841
|
+
"type": "string",
|
|
5842
|
+
"optional": true,
|
|
5843
|
+
"defaultValue": "\"Brak danych do wyświetlenia\"",
|
|
5844
|
+
"description": "Text to render when `data` is empty. Defaults to \"Brak danych do wyświetlenia\"."
|
|
5845
|
+
},
|
|
5846
|
+
{
|
|
5847
|
+
"name": "ariaLabel",
|
|
5848
|
+
"type": "string",
|
|
5849
|
+
"optional": true,
|
|
5850
|
+
"defaultValue": null,
|
|
5851
|
+
"description": "Accessible label for screen readers."
|
|
5852
|
+
},
|
|
5853
|
+
{
|
|
5854
|
+
"name": "caption",
|
|
5855
|
+
"type": "string",
|
|
5856
|
+
"optional": true,
|
|
5857
|
+
"defaultValue": null,
|
|
5858
|
+
"description": "Screen reader semantic table caption."
|
|
5859
|
+
},
|
|
5860
|
+
{
|
|
5861
|
+
"name": "valueLabel",
|
|
5862
|
+
"type": "string",
|
|
5863
|
+
"optional": true,
|
|
5864
|
+
"defaultValue": "\"Wartość\"",
|
|
5865
|
+
"description": "Column header label for numeric metric in screen reader table. Defaults to \"Wartość\"."
|
|
5866
|
+
},
|
|
5867
|
+
{
|
|
5868
|
+
"name": "activeCategories",
|
|
5869
|
+
"type": "string[]",
|
|
5870
|
+
"optional": true,
|
|
5871
|
+
"defaultValue": null,
|
|
5872
|
+
"description": "Controlled list of active category keys."
|
|
5873
|
+
},
|
|
5874
|
+
{
|
|
5875
|
+
"name": "onCategoryToggle",
|
|
5876
|
+
"type": "(category: string) => void",
|
|
5877
|
+
"optional": true,
|
|
5878
|
+
"defaultValue": null,
|
|
5879
|
+
"description": "Callback fired when user clicks a legend item to toggle category visibility."
|
|
5880
|
+
},
|
|
5881
|
+
{
|
|
5882
|
+
"name": "sliceClassName",
|
|
5883
|
+
"type": "string",
|
|
5884
|
+
"optional": true,
|
|
5885
|
+
"defaultValue": null,
|
|
5886
|
+
"description": "Additional CSS class applied to each SVG path slice."
|
|
5887
|
+
}
|
|
5888
|
+
],
|
|
5889
|
+
"cva": null,
|
|
5890
|
+
"usageSnippet": "<DonutChart\n data={trafficSourcesData.slice(0, 3)}\n category=\"source\"\n value=\"visitors\"\n size=\"sm\"\n centerLabel={<span className=\"text-xs font-bold\">SM</span>}\n/>"
|
|
4669
5891
|
}
|
|
4670
5892
|
]
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { McpServer, ResourceTemplate } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { z } from \"zod\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n// Data directory is located at ../data relative to dist/index.js\nconst dataDir = path.join(__dirname, \"../data\");\nconst componentsJsonPath = path.join(dataDir, \"components.json\");\nconst tokensJsonPath = path.join(dataDir, \"tokens.json\");\n\nlet components: any[] = [];\nlet tokens: any[] = [];\n\ntry {\n if (fs.existsSync(componentsJsonPath)) {\n components = JSON.parse(fs.readFileSync(componentsJsonPath, \"utf8\"));\n } else {\n console.error(\n `Warning: components.json not found at ${componentsJsonPath}. Run 'npm run build' first.`\n );\n }\n\n if (fs.existsSync(tokensJsonPath)) {\n tokens = JSON.parse(fs.readFileSync(tokensJsonPath, \"utf8\"));\n } else {\n console.error(\n `Warning: tokens.json not found at ${tokensJsonPath}. Run 'npm run build' first.`\n );\n }\n} catch (error) {\n console.error(\"Error loading component/token metadata files:\", error);\n}\n\nconst server = new McpServer({\n name: \"kj-product-kit-ui-mcp\",\n version: \"0.9.1\",\n});\n\n// Helper function to generate reference markdown for a component\nfunction generateComponentMarkdown(c: any): string {\n let md = `# ${c.name}\\n\\n`;\n md += `${c.description}\\n\\n`;\n\n md += `## Import\\n\\`\\`\\`tsx\\n${c.importPath}\\n\\`\\`\\`\\n\\n`;\n\n if (c.props && c.props.length > 0) {\n md += `## Props\\n\\n`;\n md += \"| Prop | Type | Optional | Default | Description |\\n\";\n md += \"| --- | --- | --- | --- | --- |\\n\";\n for (const p of c.props) {\n const opt = p.optional ? \"Yes\" : \"No\";\n const def = p.defaultValue !== null ? `\\`${p.defaultValue}\\`` : \"-\";\n md += `| \\`${p.name}\\` | \\`${p.type}\\` | ${opt} | ${def} | ${p.description || \"-\"} |\\n`;\n }\n md += \"\\n\";\n }\n\n if (c.cva) {\n md += `## Style Variants (CVA)\\n\\n`;\n for (const group of Object.keys(c.cva.variants)) {\n md += `### ${group}\\n`;\n md += `Options: ${c.cva.variants[group].map((v: string) => `\\`\"${v}\"\\``).join(\", \")}\\n\\n`;\n }\n\n if (Object.keys(c.cva.defaultVariants).length > 0) {\n md += `**Default Variants:**\\n`;\n for (const group of Object.keys(c.cva.defaultVariants)) {\n md += `- \\`${group}\\`: \\`\"${c.cva.defaultVariants[group]}\"\\`\\n`;\n }\n md += \"\\n\";\n }\n }\n\n if (c.usageSnippet) {\n md += `## Usage Example\\n\\`\\`\\`tsx\\n${c.usageSnippet}\\n\\`\\`\\`\\n`;\n }\n\n return md;\n}\n\n// --- TOOLS IMPLEMENTATION ---\n\n// 1. list_components\nserver.tool(\n \"list_components\",\n \"List all React components available in the UI library. Provides component names, descriptions, and variant groups.\",\n {},\n async () => {\n const list = components.map((c) => ({\n name: c.name,\n description: c.description,\n variants: c.cva ? Object.keys(c.cva.variants) : [],\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(list, null, 2),\n },\n ],\n };\n }\n);\n\n// 2. get_component\nserver.tool(\n \"get_component\",\n \"Get details of a specific component including its imports, props table, style variants, and usage snippet.\",\n {\n name: z\n .string()\n .describe(\"The name of the component (e.g. 'Button', 'Alert'). Case-insensitive.\"),\n },\n async ({ name }) => {\n const cleanName = name.toLowerCase();\n const comp = components.find((c) => c.name.toLowerCase() === cleanName);\n\n if (!comp) {\n return {\n content: [\n {\n type: \"text\",\n text: `Component \"${name}\" not found.`,\n },\n ],\n };\n }\n\n const md = generateComponentMarkdown(comp);\n return {\n content: [\n {\n type: \"text\",\n text: md,\n },\n ],\n };\n }\n);\n\n// 3. search_components\nserver.tool(\n \"search_components\",\n \"Search the component library to find components matching keywords in names, descriptions, props, or usage snippets.\",\n {\n query: z\n .string()\n .describe(\n \"The search term or description of the use-case (e.g., 'avatar cluster', 'input with icon', 'interactive link').\"\n ),\n },\n async ({ query }) => {\n const q = query.toLowerCase();\n const results = components.filter((c) => {\n const nameMatch = c.name.toLowerCase().includes(q);\n const descMatch = c.description.toLowerCase().includes(q);\n const propMatch = c.props.some(\n (p: any) =>\n p.name.toLowerCase().includes(q) ||\n (p.description && p.description.toLowerCase().includes(q))\n );\n const usageMatch = c.usageSnippet && c.usageSnippet.toLowerCase().includes(q);\n return nameMatch || descMatch || propMatch || usageMatch;\n });\n\n if (results.length === 0) {\n return {\n content: [\n {\n type: \"text\",\n text: `No components matched the query \"${query}\".`,\n },\n ],\n };\n }\n\n const matchedList = results.map((c) => ({\n name: c.name,\n description: c.description,\n importPath: c.importPath,\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(matchedList, null, 2),\n },\n ],\n };\n }\n);\n\n// 4. get_tokens\nserver.tool(\n \"get_tokens\",\n \"Get the design tokens filtered optionally by category (e.g. 'color', 'radius', 'shadow', 'font'). Returns light/dark values and Tailwind utility mapping.\",\n {\n category: z\n .string()\n .optional()\n .describe(\"Optional token category filter, e.g. 'color', 'radius', 'shadow', 'font'.\"),\n },\n async ({ category }) => {\n let filteredTokens = tokens;\n if (category) {\n const cat = category.toLowerCase();\n filteredTokens = tokens.filter((t) => t.category.startsWith(cat) || t.name.startsWith(cat));\n }\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(filteredTokens, null, 2),\n },\n ],\n };\n }\n);\n\n// 5. get_setup\nserver.tool(\n \"get_setup\",\n \"Get setup details for the design kit, including npm installation instructions and CSS import order.\",\n {},\n async () => {\n const setup = {\n installCommand: \"npm install @kjaniec-dev/ui @kjaniec-dev/design\",\n requiredImports: [\n `@import \"tailwindcss\"; /* imports Tailwind CSS v4 */`,\n `@source \"../node_modules/@kjaniec-dev/ui\"; /* instructs Tailwind v4 to scan UI kit components for utility classes */`,\n `@import \"@kjaniec-dev/design/tailwind.css\"; /* registers all --kj-* tokens as Tailwind utilities */`,\n `@import \"@kjaniec-dev/ui/ui.css\"; /* imports component-specific layouts and styles */`,\n ],\n description:\n \"In Tailwind v4, registering these imports and the @source directive in your root CSS automatically sets up background, border-radius, shadows, and color utilities.\",\n };\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(setup, null, 2),\n },\n ],\n };\n }\n);\n\n// --- RESOURCES IMPLEMENTATION ---\n\n// 1. Raw tokens.json\nserver.resource(\"tokens\", \"design://tokens\", { mimeType: \"application/json\" }, async (uri) => ({\n contents: [\n {\n uri: uri.href,\n text: JSON.stringify(tokens, null, 2),\n },\n ],\n}));\n\n// 2. Generated components index (markdown)\nserver.resource(\n \"components-index\",\n \"ui://components/index\",\n { mimeType: \"text/markdown\" },\n async (uri) => {\n let md = \"# Component Index\\n\\n\";\n md +=\n \"A complete index of all exported UI components available in the `@kjaniec-dev/ui` library.\\n\\n\";\n md += \"| Component | Import Statement | Description |\\n\";\n md += \"| --- | --- | --- |\\n\";\n for (const c of components) {\n md += `| **[${c.name}](ui://component/${c.name.toLowerCase()})** | \\`${c.importPath}\\` | ${c.description} |\\n`;\n }\n return {\n contents: [\n {\n uri: uri.href,\n text: md,\n },\n ],\n };\n }\n);\n\n// 3. Dynamic per-component reference docs (markdown)\nserver.resource(\n \"component-docs\",\n new ResourceTemplate(\"ui://component/{name}\", { list: undefined }),\n async (uri, { name }) => {\n const nameStr = Array.isArray(name) ? name[0] : name;\n const cleanName = nameStr.toLowerCase();\n const comp = components.find((c) => c.name.toLowerCase() === cleanName);\n\n if (!comp) {\n throw new Error(`Component \"${nameStr}\" not found.`);\n }\n\n const md = generateComponentMarkdown(comp);\n return {\n contents: [\n {\n uri: uri.href,\n text: md,\n mimeType: \"text/markdown\",\n },\n ],\n };\n }\n);\n\nasync function run() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error(\"KJ UI MCP server running on stdio transport.\");\n}\n\nrun().catch((error) => {\n console.error(\"Fatal error starting MCP server:\", error);\n process.exit(1);\n});\n"],"mappings":";;;AAAA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,4BAA4B;AACrC,SAAS,SAAS;AAClB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAE9B,IAAM,aAAa,cAAc,YAAY,GAAG;AAChD,IAAM,YAAY,KAAK,QAAQ,UAAU;AAGzC,IAAM,UAAU,KAAK,KAAK,WAAW,SAAS;AAC9C,IAAM,qBAAqB,KAAK,KAAK,SAAS,iBAAiB;AAC/D,IAAM,iBAAiB,KAAK,KAAK,SAAS,aAAa;AAEvD,IAAI,aAAoB,CAAC;AACzB,IAAI,SAAgB,CAAC;AAErB,IAAI;AACF,MAAI,GAAG,WAAW,kBAAkB,GAAG;AACrC,iBAAa,KAAK,MAAM,GAAG,aAAa,oBAAoB,MAAM,CAAC;AAAA,EACrE,OAAO;AACL,YAAQ;AAAA,MACN,yCAAyC,kBAAkB;AAAA,IAC7D;AAAA,EACF;AAEA,MAAI,GAAG,WAAW,cAAc,GAAG;AACjC,aAAS,KAAK,MAAM,GAAG,aAAa,gBAAgB,MAAM,CAAC;AAAA,EAC7D,OAAO;AACL,YAAQ;AAAA,MACN,qCAAqC,cAAc;AAAA,IACrD;AAAA,EACF;AACF,SAAS,OAAO;AACd,UAAQ,MAAM,iDAAiD,KAAK;AACtE;AAEA,IAAM,SAAS,IAAI,UAAU;AAAA,EAC3B,MAAM;AAAA,EACN,S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EtE,QAAI,CAAC,MAAM;AACT,YAAM,IAAI,MAAM,cAAc,OAAO,cAAc;AAAA,IACrD;AAEA,UAAM,KAAK,0BAA0B,IAAI;AACzC,WAAO;AAAA,MACL,UAAU;AAAA,QACR;AAAA,UACE,KAAK,IAAI;AAAA,UACT,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,eAAe,MAAM;AACnB,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC9B,UAAQ,MAAM,8CAA8C;AAC9D;AAEA,IAAI,EAAE,MAAM,CAAC,UAAU;AACrB,UAAQ,MAAM,oCAAoC,KAAK;AACvD,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { McpServer, ResourceTemplate } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { z } from \"zod\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\nimport type { ComponentInfo, ParsedToken, PropInfo } from \"./extractor.js\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n// Data directory is located at ../data relative to dist/index.js\nconst dataDir = path.join(__dirname, \"../data\");\nconst componentsJsonPath = path.join(dataDir, \"components.json\");\nconst tokensJsonPath = path.join(dataDir, \"tokens.json\");\n\nlet components: ComponentInfo[] = [];\nlet tokens: ParsedToken[] = [];\n\ntry {\n if (fs.existsSync(componentsJsonPath)) {\n components = JSON.parse(fs.readFileSync(componentsJsonPath, \"utf8\"));\n } else {\n console.error(\n `Warning: components.json not found at ${componentsJsonPath}. Run 'npm run build' first.`\n );\n }\n\n if (fs.existsSync(tokensJsonPath)) {\n tokens = JSON.parse(fs.readFileSync(tokensJsonPath, \"utf8\"));\n } else {\n console.error(\n `Warning: tokens.json not found at ${tokensJsonPath}. Run 'npm run build' first.`\n );\n }\n} catch (error) {\n console.error(\"Error loading component/token metadata files:\", error);\n}\n\nconst server = new McpServer({\n name: \"kj-product-kit-ui-mcp\",\n version: \"1.0.0\",\n});\n\n// Helper function to generate reference markdown for a component\nfunction generateComponentMarkdown(c: ComponentInfo): string {\n let md = `# ${c.name}\\n\\n`;\n md += `${c.description}\\n\\n`;\n\n md += `## Import\\n\\`\\`\\`tsx\\n${c.importPath}\\n\\`\\`\\`\\n\\n`;\n\n if (c.props && c.props.length > 0) {\n md += `## Props\\n\\n`;\n md += \"| Prop | Type | Optional | Default | Description |\\n\";\n md += \"| --- | --- | --- | --- | --- |\\n\";\n for (const p of c.props) {\n const opt = p.optional ? \"Yes\" : \"No\";\n const def = p.defaultValue !== null ? `\\`${p.defaultValue}\\`` : \"-\";\n md += `| \\`${p.name}\\` | \\`${p.type}\\` | ${opt} | ${def} | ${p.description || \"-\"} |\\n`;\n }\n md += \"\\n\";\n }\n\n if (c.cva) {\n md += `## Style Variants (CVA)\\n\\n`;\n for (const group of Object.keys(c.cva.variants)) {\n md += `### ${group}\\n`;\n md += `Options: ${c.cva.variants[group].map((v: string) => `\\`\"${v}\"\\``).join(\", \")}\\n\\n`;\n }\n\n if (Object.keys(c.cva.defaultVariants).length > 0) {\n md += `**Default Variants:**\\n`;\n for (const group of Object.keys(c.cva.defaultVariants)) {\n md += `- \\`${group}\\`: \\`\"${c.cva.defaultVariants[group]}\"\\`\\n`;\n }\n md += \"\\n\";\n }\n }\n\n if (c.usageSnippet) {\n md += `## Usage Example\\n\\`\\`\\`tsx\\n${c.usageSnippet}\\n\\`\\`\\`\\n`;\n }\n\n return md;\n}\n\n// --- TOOLS IMPLEMENTATION ---\n\n// 1. list_components\nserver.tool(\n \"list_components\",\n \"List all React components available in the UI library. Provides component names, descriptions, and variant groups.\",\n {},\n async () => {\n const list = components.map((c) => ({\n name: c.name,\n description: c.description,\n variants: c.cva ? Object.keys(c.cva.variants) : [],\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(list, null, 2),\n },\n ],\n };\n }\n);\n\n// 2. get_component\nserver.tool(\n \"get_component\",\n \"Get details of a specific component including its imports, props table, style variants, and usage snippet.\",\n {\n name: z\n .string()\n .describe(\"The name of the component (e.g. 'Button', 'Alert'). Case-insensitive.\"),\n },\n async ({ name }) => {\n const cleanName = name.toLowerCase();\n const comp = components.find((c) => c.name.toLowerCase() === cleanName);\n\n if (!comp) {\n return {\n content: [\n {\n type: \"text\",\n text: `Component \"${name}\" not found.`,\n },\n ],\n };\n }\n\n const md = generateComponentMarkdown(comp);\n return {\n content: [\n {\n type: \"text\",\n text: md,\n },\n ],\n };\n }\n);\n\n// 3. search_components\nserver.tool(\n \"search_components\",\n \"Search the component library to find components matching keywords in names, descriptions, props, or usage snippets.\",\n {\n query: z\n .string()\n .describe(\n \"The search term or description of the use-case (e.g., 'avatar cluster', 'input with icon', 'interactive link').\"\n ),\n },\n async ({ query }) => {\n const q = query.toLowerCase();\n const results = components.filter((c) => {\n const nameMatch = c.name.toLowerCase().includes(q);\n const descMatch = c.description.toLowerCase().includes(q);\n const propMatch = c.props.some(\n (p: PropInfo) =>\n p.name.toLowerCase().includes(q) ||\n (p.description && p.description.toLowerCase().includes(q))\n );\n const usageMatch = c.usageSnippet && c.usageSnippet.toLowerCase().includes(q);\n return nameMatch || descMatch || propMatch || usageMatch;\n });\n\n if (results.length === 0) {\n return {\n content: [\n {\n type: \"text\",\n text: `No components matched the query \"${query}\".`,\n },\n ],\n };\n }\n\n const matchedList = results.map((c) => ({\n name: c.name,\n description: c.description,\n importPath: c.importPath,\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(matchedList, null, 2),\n },\n ],\n };\n }\n);\n\n// 4. get_tokens\nserver.tool(\n \"get_tokens\",\n \"Get the design tokens filtered optionally by category (e.g. 'color', 'radius', 'shadow', 'font'). Returns light/dark values and Tailwind utility mapping.\",\n {\n category: z\n .string()\n .optional()\n .describe(\"Optional token category filter, e.g. 'color', 'radius', 'shadow', 'font'.\"),\n },\n async ({ category }) => {\n let filteredTokens = tokens;\n if (category) {\n const cat = category.toLowerCase();\n filteredTokens = tokens.filter((t) => t.category.startsWith(cat) || t.name.startsWith(cat));\n }\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(filteredTokens, null, 2),\n },\n ],\n };\n }\n);\n\n// 5. get_setup\nserver.tool(\n \"get_setup\",\n \"Get setup details for the design kit, including npm installation instructions and CSS import order.\",\n {},\n async () => {\n const setup = {\n installCommand: \"npm install @kjaniec-dev/ui @kjaniec-dev/design\",\n requiredImports: [\n `@import \"tailwindcss\"; /* imports Tailwind CSS v4 */`,\n `@source \"../node_modules/@kjaniec-dev/ui\"; /* instructs Tailwind v4 to scan UI kit components for utility classes */`,\n `@import \"@kjaniec-dev/design/tailwind.css\"; /* registers all --kj-* tokens as Tailwind utilities */`,\n `@import \"@kjaniec-dev/ui/ui.css\"; /* imports component-specific layouts and styles */`,\n ],\n description:\n \"In Tailwind v4, registering these imports and the @source directive in your root CSS automatically sets up background, border-radius, shadows, and color utilities.\",\n };\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(setup, null, 2),\n },\n ],\n };\n }\n);\n\n// --- RESOURCES IMPLEMENTATION ---\n\n// 1. Raw tokens.json\nserver.resource(\"tokens\", \"design://tokens\", { mimeType: \"application/json\" }, async (uri) => ({\n contents: [\n {\n uri: uri.href,\n text: JSON.stringify(tokens, null, 2),\n },\n ],\n}));\n\n// 2. Generated components index (markdown)\nserver.resource(\n \"components-index\",\n \"ui://components/index\",\n { mimeType: \"text/markdown\" },\n async (uri) => {\n let md = \"# Component Index\\n\\n\";\n md +=\n \"A complete index of all exported UI components available in the `@kjaniec-dev/ui` library.\\n\\n\";\n md += \"| Component | Import Statement | Description |\\n\";\n md += \"| --- | --- | --- |\\n\";\n for (const c of components) {\n md += `| **[${c.name}](ui://component/${c.name.toLowerCase()})** | \\`${c.importPath}\\` | ${c.description} |\\n`;\n }\n return {\n contents: [\n {\n uri: uri.href,\n text: md,\n },\n ],\n };\n }\n);\n\n// 3. Dynamic per-component reference docs (markdown)\nserver.resource(\n \"component-docs\",\n new ResourceTemplate(\"ui://component/{name}\", { list: undefined }),\n async (uri, { name }) => {\n const nameStr = Array.isArray(name) ? name[0] : name;\n const cleanName = nameStr.toLowerCase();\n const comp = components.find((c) => c.name.toLowerCase() === cleanName);\n\n if (!comp) {\n throw new Error(`Component \"${nameStr}\" not found.`);\n }\n\n const md = generateComponentMarkdown(comp);\n return {\n contents: [\n {\n uri: uri.href,\n text: md,\n mimeType: \"text/markdown\",\n },\n ],\n };\n }\n);\n\nasync function run() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error(\"KJ UI MCP server running on stdio transport.\");\n}\n\nrun().catch((error) => {\n console.error(\"Fatal error starting MCP server:\", error);\n process.exit(1);\n});\n"],"mappings":";;;AAAA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,4BAA4B;AACrC,SAAS,SAAS;AAClB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAG9B,IAAM,aAAa,cAAc,YAAY,GAAG;AAChD,IAAM,YAAY,KAAK,QAAQ,UAAU;AAGzC,IAAM,UAAU,KAAK,KAAK,WAAW,SAAS;AAC9C,IAAM,qBAAqB,KAAK,KAAK,SAAS,iBAAiB;AAC/D,IAAM,iBAAiB,KAAK,KAAK,SAAS,aAAa;AAEvD,IAAI,aAA8B,CAAC;AACnC,IAAI,SAAwB,CAAC;AAE7B,IAAI;AACF,MAAI,GAAG,WAAW,kBAAkB,GAAG;AACrC,iBAAa,KAAK,MAAM,GAAG,aAAa,oBAAoB,MAAM,CAAC;AAAA,EACrE,OAAO;AACL,YAAQ;AAAA,MACN,yCAAyC,kBAAkB;AAAA,IAC7D;AAAA,EACF;AAEA,MAAI,GAAG,WAAW,cAAc,GAAG;AACjC,aAAS,KAAK,MAAM,GAAG,aAAa,gBAAgB,MAAM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