@c2n/mcp 0.0.16 → 0.0.17
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/registry.json +920 -8
- package/package.json +2 -2
package/data/registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"c2nVersion": "0.0.
|
|
3
|
+
"c2nVersion": "0.0.17",
|
|
4
4
|
"categories": [
|
|
5
5
|
"Inputs",
|
|
6
6
|
"Buttons",
|
|
@@ -22744,6 +22744,899 @@
|
|
|
22744
22744
|
],
|
|
22745
22745
|
"hasGallery": true
|
|
22746
22746
|
},
|
|
22747
|
+
"log-viewer": {
|
|
22748
|
+
"id": "log-viewer",
|
|
22749
|
+
"package": "@c2n/log-viewer",
|
|
22750
|
+
"title": "Log Viewer",
|
|
22751
|
+
"description": "Explore large logs with variable-height virtual scrolling and sticky tabular attributes.",
|
|
22752
|
+
"intro": "Read thousands of log entries without rendering thousands of rows. `c2-log-viewer` combines **virtual scrolling for variable-height text** with **sticky attributes** that keep a long entry's context visible. Single-line messages, wrapped output and multiline traces can share the same viewport.",
|
|
22753
|
+
"category": "Data display",
|
|
22754
|
+
"status": "stable",
|
|
22755
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/log-viewer",
|
|
22756
|
+
"elements": [
|
|
22757
|
+
{
|
|
22758
|
+
"tag": "c2-log-viewer",
|
|
22759
|
+
"className": "LogViewer",
|
|
22760
|
+
"modulePath": "@c2n/log-viewer",
|
|
22761
|
+
"description": "A text-only, variable-height virtual log viewport. Filters and search are controlled by the application.\nWith the viewport focused, Home jumps to the first entry and End follows the latest; Ctrl/Command variants also work.",
|
|
22762
|
+
"attributes": [
|
|
22763
|
+
{
|
|
22764
|
+
"name": "tabular",
|
|
22765
|
+
"type": "boolean",
|
|
22766
|
+
"default": "true",
|
|
22767
|
+
"description": "Align attributes vertically in columns; false displays concatenated entry text."
|
|
22768
|
+
},
|
|
22769
|
+
{
|
|
22770
|
+
"name": "wrap",
|
|
22771
|
+
"type": "boolean",
|
|
22772
|
+
"default": "false",
|
|
22773
|
+
"description": "Break text to fit the available column or viewport width."
|
|
22774
|
+
}
|
|
22775
|
+
],
|
|
22776
|
+
"slots": [],
|
|
22777
|
+
"events": [],
|
|
22778
|
+
"cssParts": [
|
|
22779
|
+
{
|
|
22780
|
+
"name": "token",
|
|
22781
|
+
"description": "Colored log token; severity and timestamp tokens use the existing level and timestamp colors"
|
|
22782
|
+
},
|
|
22783
|
+
{
|
|
22784
|
+
"name": "copy-icon",
|
|
22785
|
+
"description": "Copy and success SVG icon"
|
|
22786
|
+
},
|
|
22787
|
+
{
|
|
22788
|
+
"name": "copy-button",
|
|
22789
|
+
"description": "Copy the complete message of a visible entry; revealed on hover or keyboard focus"
|
|
22790
|
+
},
|
|
22791
|
+
{
|
|
22792
|
+
"name": "highlight",
|
|
22793
|
+
"description": "Matching visible entry or plain text slice in highlight mode"
|
|
22794
|
+
},
|
|
22795
|
+
{
|
|
22796
|
+
"name": "viewport",
|
|
22797
|
+
"description": "Keyboard accessible scroll surface"
|
|
22798
|
+
},
|
|
22799
|
+
{
|
|
22800
|
+
"name": "content",
|
|
22801
|
+
"description": "Virtual content and its total scroll extent"
|
|
22802
|
+
},
|
|
22803
|
+
{
|
|
22804
|
+
"name": "entry",
|
|
22805
|
+
"description": "Visible tabular entry"
|
|
22806
|
+
},
|
|
22807
|
+
{
|
|
22808
|
+
"name": "cell",
|
|
22809
|
+
"description": "Attribute column containing its sticky text"
|
|
22810
|
+
},
|
|
22811
|
+
{
|
|
22812
|
+
"name": "text",
|
|
22813
|
+
"description": "Plain text content"
|
|
22814
|
+
},
|
|
22815
|
+
{
|
|
22816
|
+
"name": "empty",
|
|
22817
|
+
"description": "Empty state"
|
|
22818
|
+
}
|
|
22819
|
+
],
|
|
22820
|
+
"cssProperties": [
|
|
22821
|
+
{
|
|
22822
|
+
"name": "--c2-log-viewer--height",
|
|
22823
|
+
"type": "CSS value",
|
|
22824
|
+
"default": "480px",
|
|
22825
|
+
"part": "",
|
|
22826
|
+
"property": "height",
|
|
22827
|
+
"description": "Viewport height"
|
|
22828
|
+
},
|
|
22829
|
+
{
|
|
22830
|
+
"name": "--c2-log-viewer--background",
|
|
22831
|
+
"type": "color",
|
|
22832
|
+
"default": "#0b1220",
|
|
22833
|
+
"part": "",
|
|
22834
|
+
"property": "background",
|
|
22835
|
+
"description": "Terminal surface"
|
|
22836
|
+
},
|
|
22837
|
+
{
|
|
22838
|
+
"name": "--c2-log-viewer--color",
|
|
22839
|
+
"type": "color",
|
|
22840
|
+
"default": "#d3deee",
|
|
22841
|
+
"part": "",
|
|
22842
|
+
"property": "color",
|
|
22843
|
+
"description": "Text color"
|
|
22844
|
+
},
|
|
22845
|
+
{
|
|
22846
|
+
"name": "--c2-log-viewer--font-family",
|
|
22847
|
+
"type": "CSS value",
|
|
22848
|
+
"default": "ui-monospace, monospace",
|
|
22849
|
+
"part": "",
|
|
22850
|
+
"property": "font-family",
|
|
22851
|
+
"description": "Text font"
|
|
22852
|
+
},
|
|
22853
|
+
{
|
|
22854
|
+
"name": "--c2-log-viewer--font-size",
|
|
22855
|
+
"type": "CSS value",
|
|
22856
|
+
"default": "13px",
|
|
22857
|
+
"part": "",
|
|
22858
|
+
"property": "font-size",
|
|
22859
|
+
"description": "Text size"
|
|
22860
|
+
},
|
|
22861
|
+
{
|
|
22862
|
+
"name": "--c2-log-viewer--line-height",
|
|
22863
|
+
"type": "CSS value",
|
|
22864
|
+
"default": "1.65",
|
|
22865
|
+
"part": "",
|
|
22866
|
+
"property": "line-height",
|
|
22867
|
+
"description": "Line spacing"
|
|
22868
|
+
},
|
|
22869
|
+
{
|
|
22870
|
+
"name": "--c2-log-viewer--border",
|
|
22871
|
+
"type": "CSS value",
|
|
22872
|
+
"default": "1px solid #263449",
|
|
22873
|
+
"part": "",
|
|
22874
|
+
"property": "border",
|
|
22875
|
+
"description": "Outer edge"
|
|
22876
|
+
},
|
|
22877
|
+
{
|
|
22878
|
+
"name": "--c2-log-viewer--border-radius",
|
|
22879
|
+
"type": "CSS value",
|
|
22880
|
+
"default": "12px",
|
|
22881
|
+
"part": "",
|
|
22882
|
+
"property": "border-radius",
|
|
22883
|
+
"description": "Outer corners"
|
|
22884
|
+
},
|
|
22885
|
+
{
|
|
22886
|
+
"name": "--c2-log-viewer__message--min-width",
|
|
22887
|
+
"type": "CSS value",
|
|
22888
|
+
"default": "240px",
|
|
22889
|
+
"part": "message",
|
|
22890
|
+
"property": "min-width",
|
|
22891
|
+
"description": "Minimum primary column width"
|
|
22892
|
+
},
|
|
22893
|
+
{
|
|
22894
|
+
"name": "--c2-log-viewer__cell--padding",
|
|
22895
|
+
"type": "CSS value",
|
|
22896
|
+
"default": "8px 12px",
|
|
22897
|
+
"part": "cell",
|
|
22898
|
+
"property": "padding",
|
|
22899
|
+
"description": "Attribute cell inset included in row measurements"
|
|
22900
|
+
},
|
|
22901
|
+
{
|
|
22902
|
+
"name": "--c2-log-viewer__text--inset",
|
|
22903
|
+
"type": "CSS value",
|
|
22904
|
+
"default": "12px",
|
|
22905
|
+
"part": "text",
|
|
22906
|
+
"property": "inset",
|
|
22907
|
+
"description": "Horizontal inset for continuous text"
|
|
22908
|
+
},
|
|
22909
|
+
{
|
|
22910
|
+
"name": "--c2-log-viewer__empty--padding",
|
|
22911
|
+
"type": "CSS value",
|
|
22912
|
+
"default": "24px",
|
|
22913
|
+
"part": "empty",
|
|
22914
|
+
"property": "padding",
|
|
22915
|
+
"description": "Empty state inset"
|
|
22916
|
+
},
|
|
22917
|
+
{
|
|
22918
|
+
"name": "--c2-log-viewer__empty--color",
|
|
22919
|
+
"type": "color",
|
|
22920
|
+
"default": "#94a3b8",
|
|
22921
|
+
"part": "empty",
|
|
22922
|
+
"property": "color",
|
|
22923
|
+
"description": "Empty state text"
|
|
22924
|
+
},
|
|
22925
|
+
{
|
|
22926
|
+
"name": "--c2-log-viewer__viewport__focus--outline",
|
|
22927
|
+
"type": "CSS value",
|
|
22928
|
+
"default": "2px solid #60a5fa",
|
|
22929
|
+
"part": "viewport",
|
|
22930
|
+
"state": "focus",
|
|
22931
|
+
"property": "outline",
|
|
22932
|
+
"description": "Keyboard focus indicator"
|
|
22933
|
+
},
|
|
22934
|
+
{
|
|
22935
|
+
"name": "--c2-log-viewer__timestamp--color",
|
|
22936
|
+
"type": "color",
|
|
22937
|
+
"default": "#94a3b8",
|
|
22938
|
+
"part": "timestamp",
|
|
22939
|
+
"property": "color",
|
|
22940
|
+
"description": "Timestamp text"
|
|
22941
|
+
},
|
|
22942
|
+
{
|
|
22943
|
+
"name": "--c2-log-viewer__attribute--color",
|
|
22944
|
+
"type": "color",
|
|
22945
|
+
"default": "#a5b4cc",
|
|
22946
|
+
"part": "attribute",
|
|
22947
|
+
"property": "color",
|
|
22948
|
+
"description": "Secondary attribute text"
|
|
22949
|
+
},
|
|
22950
|
+
{
|
|
22951
|
+
"name": "--c2-log-viewer__level--color",
|
|
22952
|
+
"type": "color",
|
|
22953
|
+
"default": "#c4b5fd",
|
|
22954
|
+
"part": "level",
|
|
22955
|
+
"property": "color",
|
|
22956
|
+
"description": "Unclassified level text"
|
|
22957
|
+
},
|
|
22958
|
+
{
|
|
22959
|
+
"name": "--c2-log-viewer__level__info--color",
|
|
22960
|
+
"type": "color",
|
|
22961
|
+
"default": "#6ee7b7",
|
|
22962
|
+
"part": "level/info",
|
|
22963
|
+
"property": "color",
|
|
22964
|
+
"description": "Info level text"
|
|
22965
|
+
},
|
|
22966
|
+
{
|
|
22967
|
+
"name": "--c2-log-viewer__level__warning--color",
|
|
22968
|
+
"type": "color",
|
|
22969
|
+
"default": "#fcd34d",
|
|
22970
|
+
"part": "level/warning",
|
|
22971
|
+
"property": "color",
|
|
22972
|
+
"description": "Warn and warning level text"
|
|
22973
|
+
},
|
|
22974
|
+
{
|
|
22975
|
+
"name": "--c2-log-viewer__level__error--color",
|
|
22976
|
+
"type": "color",
|
|
22977
|
+
"default": "#fda4af",
|
|
22978
|
+
"part": "level",
|
|
22979
|
+
"state": "error",
|
|
22980
|
+
"property": "color",
|
|
22981
|
+
"description": "Error and fatal level text"
|
|
22982
|
+
},
|
|
22983
|
+
{
|
|
22984
|
+
"name": "--c2-log-viewer__entry--box-shadow",
|
|
22985
|
+
"type": "CSS value",
|
|
22986
|
+
"default": "inset 0 -1px 0 #1b293d",
|
|
22987
|
+
"part": "entry",
|
|
22988
|
+
"property": "box-shadow",
|
|
22989
|
+
"description": "Subtle row divider without changing measured geometry"
|
|
22990
|
+
},
|
|
22991
|
+
{
|
|
22992
|
+
"name": "--c2-log-viewer__entry__hover--background",
|
|
22993
|
+
"type": "color",
|
|
22994
|
+
"default": "#142238",
|
|
22995
|
+
"part": "entry",
|
|
22996
|
+
"state": "hover",
|
|
22997
|
+
"property": "background",
|
|
22998
|
+
"description": "Hovered row surface"
|
|
22999
|
+
},
|
|
23000
|
+
{
|
|
23001
|
+
"name": "--c2-log-viewer__entry__highlighted--background",
|
|
23002
|
+
"type": "color",
|
|
23003
|
+
"default": "#17304c",
|
|
23004
|
+
"part": "entry",
|
|
23005
|
+
"state": "highlighted",
|
|
23006
|
+
"property": "background",
|
|
23007
|
+
"description": "Matching entry surface in highlight mode"
|
|
23008
|
+
},
|
|
23009
|
+
{
|
|
23010
|
+
"name": "--c2-log-viewer__entry__highlighted--box-shadow",
|
|
23011
|
+
"type": "CSS value",
|
|
23012
|
+
"default": "inset 3px 0 0 #60a5fa",
|
|
23013
|
+
"part": "entry",
|
|
23014
|
+
"state": "highlighted",
|
|
23015
|
+
"property": "box-shadow",
|
|
23016
|
+
"description": "Matching entry accent without changing measured geometry"
|
|
23017
|
+
},
|
|
23018
|
+
{
|
|
23019
|
+
"name": "--c2-log-viewer__copy--size",
|
|
23020
|
+
"type": "CSS value",
|
|
23021
|
+
"default": "28px",
|
|
23022
|
+
"part": "copy",
|
|
23023
|
+
"property": "size",
|
|
23024
|
+
"description": "Copy button size"
|
|
23025
|
+
},
|
|
23026
|
+
{
|
|
23027
|
+
"name": "--c2-log-viewer__copy--icon-size",
|
|
23028
|
+
"type": "CSS value",
|
|
23029
|
+
"default": "55%",
|
|
23030
|
+
"part": "copy",
|
|
23031
|
+
"property": "icon-size",
|
|
23032
|
+
"description": "Copy and success icon width and height"
|
|
23033
|
+
},
|
|
23034
|
+
{
|
|
23035
|
+
"name": "--c2-log-viewer__copy--stroke-width",
|
|
23036
|
+
"type": "number",
|
|
23037
|
+
"default": "1.8",
|
|
23038
|
+
"part": "copy",
|
|
23039
|
+
"property": "stroke-width",
|
|
23040
|
+
"description": "Copy and success SVG stroke width"
|
|
23041
|
+
},
|
|
23042
|
+
{
|
|
23043
|
+
"name": "--c2-log-viewer__copy--inset",
|
|
23044
|
+
"type": "CSS value",
|
|
23045
|
+
"default": "8px",
|
|
23046
|
+
"part": "copy",
|
|
23047
|
+
"property": "inset",
|
|
23048
|
+
"description": "Copy button offset from viewport edges"
|
|
23049
|
+
},
|
|
23050
|
+
{
|
|
23051
|
+
"name": "--c2-log-viewer__copy--padding-top",
|
|
23052
|
+
"type": "CSS value",
|
|
23053
|
+
"default": "4px",
|
|
23054
|
+
"part": "copy",
|
|
23055
|
+
"property": "padding-top",
|
|
23056
|
+
"description": "Space above the copy button within an entry"
|
|
23057
|
+
},
|
|
23058
|
+
{
|
|
23059
|
+
"name": "--c2-log-viewer__copy--background",
|
|
23060
|
+
"type": "color",
|
|
23061
|
+
"default": "transparent",
|
|
23062
|
+
"part": "copy",
|
|
23063
|
+
"property": "background",
|
|
23064
|
+
"description": "Copy button surface"
|
|
23065
|
+
},
|
|
23066
|
+
{
|
|
23067
|
+
"name": "--c2-log-viewer__copy--color",
|
|
23068
|
+
"type": "color",
|
|
23069
|
+
"default": "#dbeafe",
|
|
23070
|
+
"part": "copy",
|
|
23071
|
+
"property": "color",
|
|
23072
|
+
"description": "Copy icon color"
|
|
23073
|
+
},
|
|
23074
|
+
{
|
|
23075
|
+
"name": "--c2-log-viewer__copy--border",
|
|
23076
|
+
"type": "CSS value",
|
|
23077
|
+
"default": "none",
|
|
23078
|
+
"part": "copy",
|
|
23079
|
+
"property": "border",
|
|
23080
|
+
"description": "Copy button edge"
|
|
23081
|
+
},
|
|
23082
|
+
{
|
|
23083
|
+
"name": "--c2-log-viewer__copy--border-radius",
|
|
23084
|
+
"type": "CSS value",
|
|
23085
|
+
"default": "6px",
|
|
23086
|
+
"part": "copy",
|
|
23087
|
+
"property": "border-radius",
|
|
23088
|
+
"description": "Copy button corners"
|
|
23089
|
+
},
|
|
23090
|
+
{
|
|
23091
|
+
"name": "--c2-log-viewer__copy__hover--background",
|
|
23092
|
+
"type": "color",
|
|
23093
|
+
"default": "#2a4263",
|
|
23094
|
+
"part": "copy",
|
|
23095
|
+
"state": "hover",
|
|
23096
|
+
"property": "background",
|
|
23097
|
+
"description": "Hovered copy button surface"
|
|
23098
|
+
},
|
|
23099
|
+
{
|
|
23100
|
+
"name": "--c2-log-viewer__copy__focus--outline",
|
|
23101
|
+
"type": "CSS value",
|
|
23102
|
+
"default": "2px solid #60a5fa",
|
|
23103
|
+
"part": "copy",
|
|
23104
|
+
"state": "focus",
|
|
23105
|
+
"property": "outline",
|
|
23106
|
+
"description": "Copy button keyboard focus"
|
|
23107
|
+
},
|
|
23108
|
+
{
|
|
23109
|
+
"name": "--c2-log-viewer__token--color",
|
|
23110
|
+
"type": "color",
|
|
23111
|
+
"default": "#93c5fd",
|
|
23112
|
+
"part": "token",
|
|
23113
|
+
"property": "color",
|
|
23114
|
+
"description": "Quoted values, numbers, URLs and recognizable IDs in log text"
|
|
23115
|
+
}
|
|
23116
|
+
]
|
|
23117
|
+
}
|
|
23118
|
+
],
|
|
23119
|
+
"composition": {
|
|
23120
|
+
"internal": [],
|
|
23121
|
+
"slotted": [],
|
|
23122
|
+
"usedBy": []
|
|
23123
|
+
},
|
|
23124
|
+
"install": {
|
|
23125
|
+
"npm": "npm install @c2n/log-viewer @c2n/theme",
|
|
23126
|
+
"import": "import '@c2n/log-viewer'",
|
|
23127
|
+
"importClass": "import { LogViewer } from '@c2n/log-viewer'"
|
|
23128
|
+
},
|
|
23129
|
+
"examples": [
|
|
23130
|
+
{
|
|
23131
|
+
"kind": "gallery",
|
|
23132
|
+
"label": "Default",
|
|
23133
|
+
"section": "Real log streams",
|
|
23134
|
+
"description": "Default Real log streams example for c2-log-viewer.",
|
|
23135
|
+
"isDefault": true,
|
|
23136
|
+
"tags": [
|
|
23137
|
+
"c2-log-viewer"
|
|
23138
|
+
],
|
|
23139
|
+
"html": "<c2-log-viewer class=\"server-default\" data-log-viewer-demo=\"virtual\" wrap aria-label=\"Server access log with 10,000 requests\"></c2-log-viewer>",
|
|
23140
|
+
"css": ".server-default { width: 100%; height: 340px; }"
|
|
23141
|
+
},
|
|
23142
|
+
{
|
|
23143
|
+
"kind": "gallery",
|
|
23144
|
+
"label": "Commerce checkout · sticky context",
|
|
23145
|
+
"section": "Real log streams",
|
|
23146
|
+
"description": "Commerce checkout · sticky context Real log streams example for c2-log-viewer.",
|
|
23147
|
+
"isDefault": false,
|
|
23148
|
+
"tags": [
|
|
23149
|
+
"c2-log-viewer"
|
|
23150
|
+
],
|
|
23151
|
+
"html": "<c2-log-viewer class=\"commerce-trace\" data-log-viewer-demo=\"sticky\" wrap aria-label=\"Checkout incident with sticky attributes\"></c2-log-viewer>",
|
|
23152
|
+
"css": ".commerce-trace { width: 100%; height: 340px; }"
|
|
23153
|
+
},
|
|
23154
|
+
{
|
|
23155
|
+
"kind": "gallery",
|
|
23156
|
+
"label": "Server output · continuous text",
|
|
23157
|
+
"section": "Real log streams",
|
|
23158
|
+
"description": "Server output · continuous text Real log streams example for c2-log-viewer.",
|
|
23159
|
+
"isDefault": false,
|
|
23160
|
+
"tags": [
|
|
23161
|
+
"c2-log-viewer"
|
|
23162
|
+
],
|
|
23163
|
+
"html": "<c2-log-viewer class=\"server-plain\" data-log-viewer-demo=\"server\" tabular=\"false\" wrap aria-label=\"Continuous server output\"></c2-log-viewer>",
|
|
23164
|
+
"css": ".server-plain { width: 100%; height: 300px; }"
|
|
23165
|
+
},
|
|
23166
|
+
{
|
|
23167
|
+
"kind": "gallery",
|
|
23168
|
+
"label": "Commerce operations · highlighted matches",
|
|
23169
|
+
"section": "Real log streams",
|
|
23170
|
+
"description": "Commerce operations · highlighted matches Real log streams example for c2-log-viewer.",
|
|
23171
|
+
"isDefault": false,
|
|
23172
|
+
"tags": [
|
|
23173
|
+
"c2-log-viewer"
|
|
23174
|
+
],
|
|
23175
|
+
"html": "<c2-log-viewer class=\"commerce-matches\" data-log-viewer-demo=\"matches\" wrap aria-label=\"Commerce logs with warnings and errors highlighted\"></c2-log-viewer>",
|
|
23176
|
+
"css": ".commerce-matches { width: 100%; height: 340px; }"
|
|
23177
|
+
},
|
|
23178
|
+
{
|
|
23179
|
+
"kind": "gallery",
|
|
23180
|
+
"label": "Commerce operations · light theme",
|
|
23181
|
+
"section": "Real log streams",
|
|
23182
|
+
"description": "Commerce operations · light theme Real log streams example for c2-log-viewer.",
|
|
23183
|
+
"isDefault": false,
|
|
23184
|
+
"tags": [
|
|
23185
|
+
"c2-log-viewer"
|
|
23186
|
+
],
|
|
23187
|
+
"html": "<c2-log-viewer class=\"commerce-light\" data-log-viewer-demo=\"commerce\" wrap aria-label=\"Online store checkout and order logs\"></c2-log-viewer>",
|
|
23188
|
+
"css": ".commerce-light {\n width: 100%; height: 320px;\n --c2-log-viewer--background: #f8fafc;\n --c2-log-viewer--color: #1e293b;\n --c2-log-viewer--border: 1px solid #cbd5e1;\n --c2-log-viewer__token--color: #1d4ed8;\n --c2-log-viewer__timestamp--color: #64748b;\n --c2-log-viewer__attribute--color: #475569;\n --c2-log-viewer__level--color: #6d28d9;\n --c2-log-viewer__level__info--color: #047857;\n --c2-log-viewer__level__warning--color: #92400e;\n --c2-log-viewer__level__error--color: #be123c;\n --c2-log-viewer__entry--box-shadow: inset 0 -1px 0 #e2e8f0;\n --c2-log-viewer__entry__hover--background: #eef2ff;\n --c2-log-viewer__entry__highlighted--background: #dbeafe;\n --c2-log-viewer__entry__highlighted--box-shadow: inset 3px 0 0 #2563eb;\n}"
|
|
23189
|
+
},
|
|
23190
|
+
{
|
|
23191
|
+
"kind": "preview",
|
|
23192
|
+
"label": "Preview",
|
|
23193
|
+
"html": "<c2-log-viewer data-log-viewer-demo=\"preview\" wrap aria-label=\"Store server log\" style=\"height:180px;width:300px\"></c2-log-viewer>"
|
|
23194
|
+
}
|
|
23195
|
+
],
|
|
23196
|
+
"hasGallery": true
|
|
23197
|
+
},
|
|
23198
|
+
"masonry": {
|
|
23199
|
+
"id": "masonry",
|
|
23200
|
+
"package": "@c2n/masonry",
|
|
23201
|
+
"title": "Masonry",
|
|
23202
|
+
"description": "Automatically pack differently sized dashboard tiles, then move or resize them in edit mode.",
|
|
23203
|
+
"intro": "`c2-masonry` packs direct `c2-masonry-item` children into the earliest available cells. It is useful when cards or charts have explicit row and column spans but the application should not manage coordinates. For fixed, author-positioned tracks, use [`c2-dashboard`](/web-components/components/dashboard) instead. Content stays in the application's markup, so forms and links work normally. If it is taller than a tile's declared height, it scrolls inside the tile.",
|
|
23204
|
+
"category": "Layout",
|
|
23205
|
+
"status": "stable",
|
|
23206
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/masonry",
|
|
23207
|
+
"elements": [
|
|
23208
|
+
{
|
|
23209
|
+
"tag": "c2-masonry",
|
|
23210
|
+
"className": "Masonry",
|
|
23211
|
+
"modulePath": "@c2n/masonry",
|
|
23212
|
+
"description": "Automatically packs direct `c2-masonry-item` children into the first available grid cells.\nUse `c2-dashboard` when the application must choose fixed coordinates instead.",
|
|
23213
|
+
"attributes": [
|
|
23214
|
+
{
|
|
23215
|
+
"name": "editable",
|
|
23216
|
+
"type": "boolean",
|
|
23217
|
+
"default": "false",
|
|
23218
|
+
"description": "Shows separate move and resize controls when every tile has a unique identity."
|
|
23219
|
+
},
|
|
23220
|
+
{
|
|
23221
|
+
"name": "save-layout",
|
|
23222
|
+
"type": "boolean",
|
|
23223
|
+
"default": "true",
|
|
23224
|
+
"description": "Saves committed user layouts to localStorage and restores them on load. Use `save-layout=\"false\"` to opt out."
|
|
23225
|
+
},
|
|
23226
|
+
{
|
|
23227
|
+
"name": "storage-key",
|
|
23228
|
+
"type": "string | undefined",
|
|
23229
|
+
"description": "Optional stable localStorage key; otherwise the page URL and element ID or position identify this container."
|
|
23230
|
+
}
|
|
23231
|
+
],
|
|
23232
|
+
"slots": [
|
|
23233
|
+
{
|
|
23234
|
+
"name": "default",
|
|
23235
|
+
"description": "Direct `c2-masonry-item` children to pack."
|
|
23236
|
+
}
|
|
23237
|
+
],
|
|
23238
|
+
"events": [
|
|
23239
|
+
{
|
|
23240
|
+
"name": "layout-error",
|
|
23241
|
+
"type": "CustomEvent<MasonryLayoutErrorDetail>",
|
|
23242
|
+
"description": "Invalid tile identities, spans, or supplied snapshot; does not bubble."
|
|
23243
|
+
},
|
|
23244
|
+
{
|
|
23245
|
+
"name": "layout-change",
|
|
23246
|
+
"type": "CustomEvent<MasonryLayoutChangeDetail>",
|
|
23247
|
+
"description": "Fired exactly once after a real user move or resize commit; does not bubble. Detail includes a complete restorable snapshot."
|
|
23248
|
+
}
|
|
23249
|
+
],
|
|
23250
|
+
"cssParts": [
|
|
23251
|
+
{
|
|
23252
|
+
"name": "grid",
|
|
23253
|
+
"description": "Packed grid region."
|
|
23254
|
+
},
|
|
23255
|
+
{
|
|
23256
|
+
"name": "placeholder",
|
|
23257
|
+
"description": "Candidate occupied area during an edit session."
|
|
23258
|
+
}
|
|
23259
|
+
],
|
|
23260
|
+
"cssProperties": [
|
|
23261
|
+
{
|
|
23262
|
+
"name": "--c2-masonry--gap",
|
|
23263
|
+
"type": "pixel",
|
|
23264
|
+
"default": "8px",
|
|
23265
|
+
"part": "",
|
|
23266
|
+
"property": "gap",
|
|
23267
|
+
"description": "Gap between cells and tiles."
|
|
23268
|
+
},
|
|
23269
|
+
{
|
|
23270
|
+
"name": "--c2-masonry--row-height",
|
|
23271
|
+
"type": "pixel",
|
|
23272
|
+
"default": "8px",
|
|
23273
|
+
"part": "",
|
|
23274
|
+
"property": "row-height",
|
|
23275
|
+
"description": "Height of one grid row."
|
|
23276
|
+
},
|
|
23277
|
+
{
|
|
23278
|
+
"name": "--c2-masonry--padding",
|
|
23279
|
+
"type": "padding",
|
|
23280
|
+
"default": "0px",
|
|
23281
|
+
"part": "",
|
|
23282
|
+
"property": "padding",
|
|
23283
|
+
"description": "Inset around the grid."
|
|
23284
|
+
},
|
|
23285
|
+
{
|
|
23286
|
+
"name": "--c2-masonry--background",
|
|
23287
|
+
"type": "color",
|
|
23288
|
+
"default": "transparent",
|
|
23289
|
+
"part": "",
|
|
23290
|
+
"property": "background",
|
|
23291
|
+
"description": "Grid background."
|
|
23292
|
+
},
|
|
23293
|
+
{
|
|
23294
|
+
"name": "--c2-masonry--border",
|
|
23295
|
+
"type": "border",
|
|
23296
|
+
"default": "none",
|
|
23297
|
+
"part": "",
|
|
23298
|
+
"property": "border",
|
|
23299
|
+
"description": "Outer border."
|
|
23300
|
+
},
|
|
23301
|
+
{
|
|
23302
|
+
"name": "--c2-masonry--border-radius",
|
|
23303
|
+
"type": "border-radius",
|
|
23304
|
+
"default": "0px",
|
|
23305
|
+
"part": "",
|
|
23306
|
+
"property": "border-radius",
|
|
23307
|
+
"description": "Outer corner radius."
|
|
23308
|
+
},
|
|
23309
|
+
{
|
|
23310
|
+
"name": "--c2-masonry__placeholder--background",
|
|
23311
|
+
"type": "color",
|
|
23312
|
+
"default": "rgb(37 99 235 / 8%)",
|
|
23313
|
+
"part": "placeholder",
|
|
23314
|
+
"property": "background",
|
|
23315
|
+
"token": "--c2-theme--color-primary",
|
|
23316
|
+
"description": "Candidate tile fill."
|
|
23317
|
+
},
|
|
23318
|
+
{
|
|
23319
|
+
"name": "--c2-masonry__placeholder--border",
|
|
23320
|
+
"type": "border",
|
|
23321
|
+
"default": "2px dashed #2563eb",
|
|
23322
|
+
"part": "placeholder",
|
|
23323
|
+
"property": "border",
|
|
23324
|
+
"token": "--c2-theme--color-primary",
|
|
23325
|
+
"description": "Candidate tile edge."
|
|
23326
|
+
},
|
|
23327
|
+
{
|
|
23328
|
+
"name": "--c2-masonry__placeholder--border-radius",
|
|
23329
|
+
"type": "border-radius",
|
|
23330
|
+
"default": "6px",
|
|
23331
|
+
"part": "placeholder",
|
|
23332
|
+
"property": "border-radius",
|
|
23333
|
+
"token": "--c2-theme--radius-md",
|
|
23334
|
+
"description": "Candidate corners."
|
|
23335
|
+
},
|
|
23336
|
+
{
|
|
23337
|
+
"name": "--c2-masonry__motion--duration",
|
|
23338
|
+
"type": "time",
|
|
23339
|
+
"default": "160ms",
|
|
23340
|
+
"part": "motion",
|
|
23341
|
+
"property": "duration",
|
|
23342
|
+
"description": "Decorative movement duration."
|
|
23343
|
+
},
|
|
23344
|
+
{
|
|
23345
|
+
"name": "--c2-masonry__motion--timing-function",
|
|
23346
|
+
"type": "timing-function",
|
|
23347
|
+
"default": "ease",
|
|
23348
|
+
"part": "motion",
|
|
23349
|
+
"property": "timing-function",
|
|
23350
|
+
"description": "Decorative movement easing."
|
|
23351
|
+
}
|
|
23352
|
+
]
|
|
23353
|
+
},
|
|
23354
|
+
{
|
|
23355
|
+
"tag": "c2-masonry-item",
|
|
23356
|
+
"className": "MasonryItem",
|
|
23357
|
+
"modulePath": "@c2n/masonry/masonry-item.js",
|
|
23358
|
+
"description": "A fixed-span content tile placed by its parent `c2-masonry`. Tall content scrolls within the tile.",
|
|
23359
|
+
"attributes": [
|
|
23360
|
+
{
|
|
23361
|
+
"name": "item-id",
|
|
23362
|
+
"type": "string | undefined",
|
|
23363
|
+
"description": "Stable identity used for editing and application snapshots."
|
|
23364
|
+
},
|
|
23365
|
+
{
|
|
23366
|
+
"name": "label",
|
|
23367
|
+
"type": "string | undefined",
|
|
23368
|
+
"description": "Human-readable name used for the scroll region and edit controls."
|
|
23369
|
+
},
|
|
23370
|
+
{
|
|
23371
|
+
"name": "rows",
|
|
23372
|
+
"type": "number",
|
|
23373
|
+
"default": "10",
|
|
23374
|
+
"description": "Positive integer row span shared across size ranges."
|
|
23375
|
+
},
|
|
23376
|
+
{
|
|
23377
|
+
"name": "cols",
|
|
23378
|
+
"type": "number",
|
|
23379
|
+
"default": "3",
|
|
23380
|
+
"description": "Positive integer base column span."
|
|
23381
|
+
},
|
|
23382
|
+
{
|
|
23383
|
+
"name": "cols-xs",
|
|
23384
|
+
"type": "number | undefined",
|
|
23385
|
+
"description": "Optional positive column span for containers narrower than 600 px."
|
|
23386
|
+
},
|
|
23387
|
+
{
|
|
23388
|
+
"name": "cols-sm",
|
|
23389
|
+
"type": "number | undefined",
|
|
23390
|
+
"description": "Optional positive column span for 600–959.99 px containers."
|
|
23391
|
+
},
|
|
23392
|
+
{
|
|
23393
|
+
"name": "cols-md",
|
|
23394
|
+
"type": "number | undefined",
|
|
23395
|
+
"description": "Optional positive column span for 960–1279.99 px containers."
|
|
23396
|
+
},
|
|
23397
|
+
{
|
|
23398
|
+
"name": "cols-lg",
|
|
23399
|
+
"type": "number | undefined",
|
|
23400
|
+
"description": "Optional positive column span for containers at least 1280 px wide."
|
|
23401
|
+
}
|
|
23402
|
+
],
|
|
23403
|
+
"slots": [
|
|
23404
|
+
{
|
|
23405
|
+
"name": "default",
|
|
23406
|
+
"description": "Application-owned tile content."
|
|
23407
|
+
},
|
|
23408
|
+
{
|
|
23409
|
+
"name": "move-icon",
|
|
23410
|
+
"description": "Optional move-handle icon; an inline grip is provided by default."
|
|
23411
|
+
}
|
|
23412
|
+
],
|
|
23413
|
+
"events": [],
|
|
23414
|
+
"cssParts": [
|
|
23415
|
+
{
|
|
23416
|
+
"name": "content",
|
|
23417
|
+
"description": "Keyboard-reachable scrolling region containing the application content."
|
|
23418
|
+
},
|
|
23419
|
+
{
|
|
23420
|
+
"name": "controls",
|
|
23421
|
+
"description": "Group of edit-only move and resize controls."
|
|
23422
|
+
},
|
|
23423
|
+
{
|
|
23424
|
+
"name": "move-handle",
|
|
23425
|
+
"description": "Button that starts a move operation."
|
|
23426
|
+
},
|
|
23427
|
+
{
|
|
23428
|
+
"name": "resize-handle",
|
|
23429
|
+
"description": "Keyboard-reachable bottom edge that starts a resize operation."
|
|
23430
|
+
},
|
|
23431
|
+
{
|
|
23432
|
+
"name": "resize-edge",
|
|
23433
|
+
"description": "Pointer resize target on the right edge."
|
|
23434
|
+
}
|
|
23435
|
+
],
|
|
23436
|
+
"cssProperties": [
|
|
23437
|
+
{
|
|
23438
|
+
"name": "--c2-masonry-item--background",
|
|
23439
|
+
"type": "color",
|
|
23440
|
+
"default": "transparent",
|
|
23441
|
+
"part": "",
|
|
23442
|
+
"property": "background",
|
|
23443
|
+
"description": "Tile surface."
|
|
23444
|
+
},
|
|
23445
|
+
{
|
|
23446
|
+
"name": "--c2-masonry-item--border",
|
|
23447
|
+
"type": "border",
|
|
23448
|
+
"default": "none",
|
|
23449
|
+
"part": "",
|
|
23450
|
+
"property": "border",
|
|
23451
|
+
"description": "Tile border."
|
|
23452
|
+
},
|
|
23453
|
+
{
|
|
23454
|
+
"name": "--c2-masonry-item--border-radius",
|
|
23455
|
+
"type": "border-radius",
|
|
23456
|
+
"default": "0px",
|
|
23457
|
+
"part": "",
|
|
23458
|
+
"property": "border-radius",
|
|
23459
|
+
"description": "Tile corner radius."
|
|
23460
|
+
},
|
|
23461
|
+
{
|
|
23462
|
+
"name": "--c2-masonry-item--box-shadow",
|
|
23463
|
+
"type": "box-shadow",
|
|
23464
|
+
"default": "none",
|
|
23465
|
+
"part": "",
|
|
23466
|
+
"property": "box-shadow",
|
|
23467
|
+
"description": "Tile elevation."
|
|
23468
|
+
},
|
|
23469
|
+
{
|
|
23470
|
+
"name": "--c2-masonry-item__content--padding",
|
|
23471
|
+
"type": "padding",
|
|
23472
|
+
"default": "0px",
|
|
23473
|
+
"part": "content",
|
|
23474
|
+
"property": "padding",
|
|
23475
|
+
"description": "Content inset."
|
|
23476
|
+
},
|
|
23477
|
+
{
|
|
23478
|
+
"name": "--c2-masonry-item__controls--gap",
|
|
23479
|
+
"type": "pixel",
|
|
23480
|
+
"default": "4px",
|
|
23481
|
+
"part": "controls",
|
|
23482
|
+
"property": "gap",
|
|
23483
|
+
"description": "Move-handle inset from the top and right borders."
|
|
23484
|
+
},
|
|
23485
|
+
{
|
|
23486
|
+
"name": "--c2-masonry-item__controls--background",
|
|
23487
|
+
"type": "color",
|
|
23488
|
+
"default": "transparent",
|
|
23489
|
+
"part": "controls",
|
|
23490
|
+
"property": "background",
|
|
23491
|
+
"description": "Surface behind the move-handle corner."
|
|
23492
|
+
},
|
|
23493
|
+
{
|
|
23494
|
+
"name": "--c2-masonry-item__handle--size",
|
|
23495
|
+
"type": "pixel",
|
|
23496
|
+
"default": "32px",
|
|
23497
|
+
"part": "handle",
|
|
23498
|
+
"property": "size",
|
|
23499
|
+
"description": "Move-handle hit target size."
|
|
23500
|
+
},
|
|
23501
|
+
{
|
|
23502
|
+
"name": "--c2-masonry-item__resize-handle--size",
|
|
23503
|
+
"type": "pixel",
|
|
23504
|
+
"default": "8px",
|
|
23505
|
+
"part": "resize-handle",
|
|
23506
|
+
"property": "size",
|
|
23507
|
+
"description": "Invisible resize-edge hit-zone depth."
|
|
23508
|
+
},
|
|
23509
|
+
{
|
|
23510
|
+
"name": "--c2-masonry-item__resize-edge__hover--color",
|
|
23511
|
+
"type": "color",
|
|
23512
|
+
"default": "rgb(37 99 235 / 35%)",
|
|
23513
|
+
"part": "resize-edge",
|
|
23514
|
+
"state": "hover",
|
|
23515
|
+
"property": "color",
|
|
23516
|
+
"description": "Right and bottom border color while the tile is hovered or focused."
|
|
23517
|
+
},
|
|
23518
|
+
{
|
|
23519
|
+
"name": "--c2-masonry-item__handle--icon-size",
|
|
23520
|
+
"type": "pixel",
|
|
23521
|
+
"default": "16px",
|
|
23522
|
+
"part": "handle",
|
|
23523
|
+
"property": "icon-size",
|
|
23524
|
+
"description": "Built-in move icon size."
|
|
23525
|
+
},
|
|
23526
|
+
{
|
|
23527
|
+
"name": "--c2-masonry-item__handle--color",
|
|
23528
|
+
"type": "color",
|
|
23529
|
+
"default": "#18181b",
|
|
23530
|
+
"part": "handle",
|
|
23531
|
+
"property": "color",
|
|
23532
|
+
"token": "--c2-theme--color-on-surface",
|
|
23533
|
+
"description": "Move-handle foreground."
|
|
23534
|
+
},
|
|
23535
|
+
{
|
|
23536
|
+
"name": "--c2-masonry-item__handle--background",
|
|
23537
|
+
"type": "color",
|
|
23538
|
+
"default": "transparent",
|
|
23539
|
+
"part": "handle",
|
|
23540
|
+
"property": "background",
|
|
23541
|
+
"description": "Move-handle surface."
|
|
23542
|
+
},
|
|
23543
|
+
{
|
|
23544
|
+
"name": "--c2-masonry-item__handle--border-radius",
|
|
23545
|
+
"type": "border-radius",
|
|
23546
|
+
"default": "6px",
|
|
23547
|
+
"part": "handle",
|
|
23548
|
+
"property": "border-radius",
|
|
23549
|
+
"token": "--c2-theme--radius-md",
|
|
23550
|
+
"description": "Edit-control corners."
|
|
23551
|
+
},
|
|
23552
|
+
{
|
|
23553
|
+
"name": "--c2-masonry-item__handle__hover--background",
|
|
23554
|
+
"type": "color",
|
|
23555
|
+
"default": "transparent",
|
|
23556
|
+
"part": "handle",
|
|
23557
|
+
"state": "hover",
|
|
23558
|
+
"property": "background",
|
|
23559
|
+
"description": "Hovered move-handle surface."
|
|
23560
|
+
},
|
|
23561
|
+
{
|
|
23562
|
+
"name": "--c2-masonry-item__handle__focus--outline",
|
|
23563
|
+
"type": "outline",
|
|
23564
|
+
"default": "2px solid #2563eb",
|
|
23565
|
+
"part": "handle",
|
|
23566
|
+
"state": "focus",
|
|
23567
|
+
"property": "outline",
|
|
23568
|
+
"token": "--c2-theme--focus-ring",
|
|
23569
|
+
"description": "Keyboard focus indicator."
|
|
23570
|
+
},
|
|
23571
|
+
{
|
|
23572
|
+
"name": "--c2-masonry-item__dragging--opacity",
|
|
23573
|
+
"type": "opacity",
|
|
23574
|
+
"default": "0.92",
|
|
23575
|
+
"part": "dragging",
|
|
23576
|
+
"property": "opacity",
|
|
23577
|
+
"description": "Active tile opacity."
|
|
23578
|
+
},
|
|
23579
|
+
{
|
|
23580
|
+
"name": "--c2-masonry-item__dragging--box-shadow",
|
|
23581
|
+
"type": "box-shadow",
|
|
23582
|
+
"default": "0 12px 28px rgb(15 23 42 / 24%)",
|
|
23583
|
+
"part": "dragging",
|
|
23584
|
+
"property": "box-shadow",
|
|
23585
|
+
"token": "--c2-theme--shadow-md",
|
|
23586
|
+
"description": "Active tile elevation."
|
|
23587
|
+
}
|
|
23588
|
+
]
|
|
23589
|
+
}
|
|
23590
|
+
],
|
|
23591
|
+
"composition": {
|
|
23592
|
+
"internal": [],
|
|
23593
|
+
"slotted": [
|
|
23594
|
+
"c2-masonry-item"
|
|
23595
|
+
],
|
|
23596
|
+
"usedBy": [
|
|
23597
|
+
"c2-masonry"
|
|
23598
|
+
]
|
|
23599
|
+
},
|
|
23600
|
+
"install": {
|
|
23601
|
+
"npm": "npm install @c2n/masonry @c2n/theme",
|
|
23602
|
+
"import": "import '@c2n/masonry'",
|
|
23603
|
+
"importClass": "import { Masonry } from '@c2n/masonry'"
|
|
23604
|
+
},
|
|
23605
|
+
"examples": [
|
|
23606
|
+
{
|
|
23607
|
+
"kind": "gallery",
|
|
23608
|
+
"label": "Default",
|
|
23609
|
+
"section": "Gallery",
|
|
23610
|
+
"description": "Default Gallery example for c2-masonry.",
|
|
23611
|
+
"isDefault": true,
|
|
23612
|
+
"tags": [
|
|
23613
|
+
"c2-masonry",
|
|
23614
|
+
"c2-masonry-item"
|
|
23615
|
+
],
|
|
23616
|
+
"html": "<c2-masonry client:only=\"lit\" class=\"masonry-default\">\n <c2-masonry-item item-id=\"throughput\" label=\"Throughput\" rows=\"12\" cols=\"3\" cols-sm=\"4\" cols-md=\"5\" cols-lg=\"6\">\n <div class=\"masonry-default-tile\"><h3>Orders processed</h3><strong>18,642</strong><p><span class=\"positive\">↑ 8.2%</span> from last week</p><svg class=\"sparkline\" viewBox=\"0 0 240 50\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><path d=\"M2 42 27 35 53 39 79 27 104 31 130 18 156 23 183 12 208 16 238 5\" /></svg></div>\n </c2-masonry-item>\n <c2-masonry-item item-id=\"queue\" label=\"Queue\" rows=\"12\" cols=\"2\" cols-sm=\"2\" cols-md=\"2\" cols-lg=\"3\">\n <div class=\"masonry-default-tile\"><h3>Open queue</h3><strong>142</strong><p>Across 7 regions</p><ul class=\"mini-list\"><li><span>Priority</span><b>18</b></li><li><span>On track</span><b>124</b></li></ul></div>\n </c2-masonry-item>\n <c2-masonry-item item-id=\"health\" label=\"Health\" rows=\"10\" cols=\"2\" cols-sm=\"3\" cols-md=\"3\" cols-lg=\"3\">\n <div class=\"masonry-default-tile\"><h3>Service availability</h3><strong>99.9%</strong><p>30-day rolling window</p><div class=\"progress-track\" aria-label=\"Availability is 99.9 percent\"><span></span></div></div>\n </c2-masonry-item>\n <c2-masonry-item item-id=\"deploys\" label=\"Deploys\" rows=\"10\" cols=\"2\" cols-sm=\"3\" cols-md=\"3\" cols-lg=\"3\">\n <div class=\"masonry-default-tile\"><h3>Deployments today</h3><strong>3</strong><p>All checks passing</p><ul class=\"mini-list\"><li><span>North region</span><span>09:42</span></li><li><span>West region</span><span>08:18</span></li></ul></div>\n </c2-masonry-item>\n</c2-masonry>",
|
|
23617
|
+
"css": ".masonry-default {\n display: block;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.masonry-default-tile {\n box-sizing: border-box;\n height: 100%;\n padding: 16px;\n border: 1px solid #e4e4e7;\n border-radius: 10px;\n background: #ffffff;\n color: #18181b;\n font-size: 12px;\n}\n\n.masonry-default-tile h3 {\n margin: 0;\n color: #71717a;\n font-size: 12px;\n font-weight: 600;\n}\n\n.masonry-default-tile strong {\n display: block;\n margin-top: 8px;\n font-size: 25px;\n line-height: 1.1;\n letter-spacing: -0.04em;\n}\n\n.masonry-default-tile p {\n margin: 6px 0 0;\n color: #71717a;\n}\n\n.masonry-default-tile .positive {\n color: #15803d;\n font-weight: 600;\n}\n\n.masonry-default-tile .sparkline {\n display: block;\n width: 100%;\n height: 48px;\n margin-top: 14px;\n}\n\n.masonry-default-tile .sparkline path {\n fill: none;\n stroke: #2563eb;\n stroke-width: 3;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.masonry-default-tile .progress-track {\n height: 7px;\n margin-top: 15px;\n border-radius: 999px;\n background: #e4e4e7;\n}\n\n.masonry-default-tile .progress-track span {\n display: block;\n width: 99.9%;\n height: 100%;\n border-radius: inherit;\n background: #22c55e;\n}\n\n.masonry-default-tile .mini-list {\n display: grid;\n gap: 7px;\n margin: 12px 0 0;\n padding: 0;\n list-style: none;\n color: #52525b;\n}\n\n.masonry-default-tile .mini-list li {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n}\n\n.masonry-default-tile .mini-list li span {\n color: #52525b;\n}"
|
|
23618
|
+
},
|
|
23619
|
+
{
|
|
23620
|
+
"kind": "gallery",
|
|
23621
|
+
"label": "Night watch",
|
|
23622
|
+
"section": "Gallery",
|
|
23623
|
+
"description": "Night watch Gallery example for c2-masonry.",
|
|
23624
|
+
"isDefault": false,
|
|
23625
|
+
"tags": [
|
|
23626
|
+
"c2-masonry",
|
|
23627
|
+
"c2-masonry-item"
|
|
23628
|
+
],
|
|
23629
|
+
"html": "<c2-masonry client:only=\"lit\" class=\"night-watch\" editable>\n <c2-masonry-item item-id=\"requests\" label=\"Requests\" rows=\"13\" cols=\"3\" cols-sm=\"4\" cols-md=\"5\" cols-lg=\"6\"><h3>Requests / min</h3><strong>12,804</strong><p><span class=\"night-positive\">↑ 6.8%</span> from yesterday</p><svg class=\"night-trend\" viewBox=\"0 0 240 58\" preserveAspectRatio=\"none\" aria-hidden=\"true\"><path d=\"M2 47 29 42 54 45 80 31 107 35 133 22 159 27 184 15 211 20 238 7\" /></svg></c2-masonry-item>\n <c2-masonry-item item-id=\"errors\" label=\"Errors\" rows=\"10\" cols=\"2\" cols-sm=\"2\" cols-md=\"2\" cols-lg=\"3\"><h3>Error rate</h3><strong>0.03%</strong><p>Below 0.1% threshold</p></c2-masonry-item>\n <c2-masonry-item item-id=\"latency\" label=\"Latency\" rows=\"10\" cols=\"2\" cols-sm=\"3\" cols-md=\"3\" cols-lg=\"3\"><h3>P95 latency</h3><strong>218 ms</strong><p>Target under 250 ms</p></c2-masonry-item>\n <c2-masonry-item item-id=\"regions\" label=\"Regions\" rows=\"10\" cols=\"2\" cols-sm=\"3\" cols-md=\"3\" cols-lg=\"3\"><h3>Regional health</h3><ul class=\"night-list\"><li><span>North</span><b>Healthy</b></li><li><span>West</span><b>Healthy</b></li><li><span>East</span><b>Degraded</b></li></ul></c2-masonry-item>\n</c2-masonry>",
|
|
23630
|
+
"css": ".night-watch {\n display: block;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n --c2-masonry--gap: 8px;\n --c2-masonry--row-height: 9px;\n --c2-masonry--padding: 12px;\n --c2-masonry--background: #101827;\n --c2-masonry--border-radius: 14px;\n --c2-masonry__placeholder--background: rgb(56 189 248 / 20%);\n --c2-masonry__placeholder--border: 2px dashed #38bdf8;\n --c2-masonry-item--background: #1e293b;\n --c2-masonry-item--border: 1px solid #334155;\n --c2-masonry-item--border-radius: 10px;\n --c2-masonry-item__content--padding: 14px;\n --c2-masonry-item__handle--background: #334155;\n --c2-masonry-item__handle--color: #f8fafc;\n --c2-masonry-item__handle__hover--background: #475569;\n}\n\n.night-watch h3 {\n margin: 0 80px 6px 0;\n color: #94a3b8;\n font-size: 12px;\n font-weight: 600;\n}\n\n.night-watch strong {\n display: block;\n color: #f8fafc;\n font-size: 27px;\n line-height: 1.1;\n letter-spacing: -0.04em;\n}\n\n.night-watch p {\n margin: 7px 0 0;\n color: #94a3b8;\n font-size: 12px;\n}\n\n.night-watch .night-positive {\n color: #5eead4;\n font-weight: 600;\n}\n\n.night-watch .night-trend {\n display: block;\n width: 100%;\n height: 58px;\n margin-top: 15px;\n}\n\n.night-watch .night-trend path {\n fill: none;\n stroke: #38bdf8;\n stroke-width: 3;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.night-watch .night-list {\n display: grid;\n gap: 9px;\n margin: 14px 0 0;\n padding: 0;\n list-style: none;\n color: #cbd5e1;\n font-size: 12px;\n}\n\n.night-watch .night-list li {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n}\n\n.night-watch .night-list li span {\n color: #cbd5e1;\n}\n\n.night-watch .night-list b {\n color: #f8fafc;\n}"
|
|
23631
|
+
},
|
|
23632
|
+
{
|
|
23633
|
+
"kind": "preview",
|
|
23634
|
+
"label": "Preview",
|
|
23635
|
+
"html": "<c2-masonry style=\"width:260px;--c2-masonry--gap:6px;--c2-masonry--row-height:9px;--c2-masonry--padding:6px;--c2-masonry--background:#f4f4f5;--c2-masonry--border-radius:8px;--c2-masonry-item--background:#fff;--c2-masonry-item--border:1px solid #e4e4e7;--c2-masonry-item--border-radius:6px;--c2-masonry-item__content--padding:8px\">\n <c2-masonry-item item-id=\"traffic\" label=\"Traffic\" rows=\"5\" cols=\"3\">Traffic · 18.4k</c2-masonry-item>\n <c2-masonry-item item-id=\"orders\" label=\"Orders\" rows=\"5\" cols=\"2\">Orders · 142</c2-masonry-item>\n</c2-masonry>"
|
|
23636
|
+
}
|
|
23637
|
+
],
|
|
23638
|
+
"hasGallery": true
|
|
23639
|
+
},
|
|
22747
23640
|
"mat-icon": {
|
|
22748
23641
|
"id": "mat-icon",
|
|
22749
23642
|
"package": "@c2n/mat-icon",
|
|
@@ -42131,9 +43024,10 @@
|
|
|
42131
43024
|
{
|
|
42132
43025
|
"name": "--c2-switch__thumb--size",
|
|
42133
43026
|
"type": "pixel",
|
|
42134
|
-
"default": "
|
|
43027
|
+
"default": "calc(var(--c2-switch__track--height,20px)-2*var(--c2-switch__thumb--offset,2px))",
|
|
42135
43028
|
"part": "thumb",
|
|
42136
|
-
"property": "size"
|
|
43029
|
+
"property": "size",
|
|
43030
|
+
"description": "Defaults to the track height minus the offset on both edges."
|
|
42137
43031
|
},
|
|
42138
43032
|
{
|
|
42139
43033
|
"name": "--c2-switch__thumb--offset",
|
|
@@ -44019,6 +44913,12 @@
|
|
|
44019
44913
|
"modulePath": "@c2n/tabs",
|
|
44020
44914
|
"description": "Tab strip that shows one content panel at a time.\n\nLight-DOM children are split in two groups: every `<c2-tab for=\"…\">` becomes a tab in the header\n(they slot themselves into `tab`), every other child is a panel whose `id` matches a tab's `for`.\nOnly the panel of the selected tab is rendered. The header is a `tablist`: Arrow keys, Home and\nEnd move between tabs, Enter and Space activate the focused one.",
|
|
44021
44915
|
"attributes": [
|
|
44916
|
+
{
|
|
44917
|
+
"name": "aria-label",
|
|
44918
|
+
"type": "string | null",
|
|
44919
|
+
"default": "null",
|
|
44920
|
+
"description": "Accessible name for the tab list."
|
|
44921
|
+
},
|
|
44022
44922
|
{
|
|
44023
44923
|
"name": "selected-tab",
|
|
44024
44924
|
"type": "string",
|
|
@@ -50981,6 +51881,9 @@
|
|
|
50981
51881
|
"c2-link-button": "link-button",
|
|
50982
51882
|
"c2-list": "list",
|
|
50983
51883
|
"c2-list-item": "list-item",
|
|
51884
|
+
"c2-log-viewer": "log-viewer",
|
|
51885
|
+
"c2-masonry": "masonry",
|
|
51886
|
+
"c2-masonry-item": "masonry",
|
|
50984
51887
|
"c2-mat-icon": "mat-icon",
|
|
50985
51888
|
"c2-menu": "menu",
|
|
50986
51889
|
"c2-menu-item": "menu",
|
|
@@ -51065,6 +51968,8 @@
|
|
|
51065
51968
|
"@c2n/link-button": "link-button",
|
|
51066
51969
|
"@c2n/list": "list",
|
|
51067
51970
|
"@c2n/list-item": "list-item",
|
|
51971
|
+
"@c2n/log-viewer": "log-viewer",
|
|
51972
|
+
"@c2n/masonry": "masonry",
|
|
51068
51973
|
"@c2n/mat-icon": "mat-icon",
|
|
51069
51974
|
"@c2n/menu": "menu",
|
|
51070
51975
|
"@c2n/modal": "modal",
|
|
@@ -51118,7 +52023,7 @@
|
|
|
51118
52023
|
"light": "#0265dc",
|
|
51119
52024
|
"dark": "#5aa3ff",
|
|
51120
52025
|
"description": "Accent colour: filled buttons, selected states, focused borders, links.",
|
|
51121
|
-
"usedBy":
|
|
52026
|
+
"usedBy": 59
|
|
51122
52027
|
},
|
|
51123
52028
|
{
|
|
51124
52029
|
"name": "--c2-theme--color-primary-hover",
|
|
@@ -51190,7 +52095,7 @@
|
|
|
51190
52095
|
"light": "#18181b",
|
|
51191
52096
|
"dark": "#f4f4f5",
|
|
51192
52097
|
"description": "Primary text colour.",
|
|
51193
|
-
"usedBy":
|
|
52098
|
+
"usedBy": 64
|
|
51194
52099
|
},
|
|
51195
52100
|
{
|
|
51196
52101
|
"name": "--c2-theme--color-on-surface-variant",
|
|
@@ -51303,7 +52208,7 @@
|
|
|
51303
52208
|
"category": "radius",
|
|
51304
52209
|
"light": "6px",
|
|
51305
52210
|
"description": "Default radius: buttons, inputs, list items, tooltips.",
|
|
51306
|
-
"usedBy":
|
|
52211
|
+
"usedBy": 53
|
|
51307
52212
|
},
|
|
51308
52213
|
{
|
|
51309
52214
|
"name": "--c2-theme--radius-lg",
|
|
@@ -51346,7 +52251,7 @@
|
|
|
51346
52251
|
"light": "2px solid rgba(2, 101, 220, 0.4)",
|
|
51347
52252
|
"dark": "2px solid rgba(90, 163, 255, 0.5)",
|
|
51348
52253
|
"description": "Focus-visible outline of every component.",
|
|
51349
|
-
"usedBy":
|
|
52254
|
+
"usedBy": 40
|
|
51350
52255
|
},
|
|
51351
52256
|
{
|
|
51352
52257
|
"name": "--c2-theme--disabled-opacity",
|
|
@@ -51368,7 +52273,7 @@
|
|
|
51368
52273
|
"light": "0 8px 24px rgba(24, 24, 27, 0.08)",
|
|
51369
52274
|
"dark": "0 8px 24px rgba(0, 0, 0, 0.45)",
|
|
51370
52275
|
"description": "Shadow of popovers, menus and tooltips.",
|
|
51371
|
-
"usedBy":
|
|
52276
|
+
"usedBy": 11
|
|
51372
52277
|
},
|
|
51373
52278
|
{
|
|
51374
52279
|
"name": "--c2-theme--shadow-lg",
|
|
@@ -51867,6 +52772,13 @@
|
|
|
51867
52772
|
"--c2-list-item__selected__hover--background": "--c2-theme--color-primary-container",
|
|
51868
52773
|
"--c2-list-item__focus--outline": "--c2-theme--focus-ring",
|
|
51869
52774
|
"--c2-list-item__disabled--opacity": "--c2-theme--disabled-opacity",
|
|
52775
|
+
"--c2-masonry__placeholder--background": "--c2-theme--color-primary",
|
|
52776
|
+
"--c2-masonry__placeholder--border": "--c2-theme--color-primary",
|
|
52777
|
+
"--c2-masonry__placeholder--border-radius": "--c2-theme--radius-md",
|
|
52778
|
+
"--c2-masonry-item__handle--color": "--c2-theme--color-on-surface",
|
|
52779
|
+
"--c2-masonry-item__handle--border-radius": "--c2-theme--radius-md",
|
|
52780
|
+
"--c2-masonry-item__handle__focus--outline": "--c2-theme--focus-ring",
|
|
52781
|
+
"--c2-masonry-item__dragging--box-shadow": "--c2-theme--shadow-md",
|
|
51870
52782
|
"--c2-menu--background": "--c2-theme--color-surface",
|
|
51871
52783
|
"--c2-menu--border-top": "--c2-theme--color-outline-variant",
|
|
51872
52784
|
"--c2-menu--border-right": "--c2-theme--color-outline-variant",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "MCP server exposing the c2n web components (API, examples, presets, theme tokens, variant generation) to AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"@c2n/config": "*",
|
|
102
102
|
"custom-elements-manifest": "2.1.0"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "0f012d5c8f91bb1bf7c1a39437147f76802c6a6f"
|
|
105
105
|
}
|