forked from bennypowers/json-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom-elements.json
109 lines (109 loc) · 3.73 KB
/
custom-elements.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"version": "experimental",
"tags": [
{
"name": "json-viewer",
"path": "./json-viewer.js",
"description": "Custom Element that shows a JavaScript object's properties as syntax-highlighted JSON.\n\nThe element will respect `prefers-color-scheme` by default, but if you use the\nCSS Custom Properties listed below, you should customize both light and dark themes.\n\n❤️ Proudly uses [open-wc](https://open-wc.org) tools and recommendations.",
"attributes": [
{
"name": "object",
"description": "JavaScript Object to display\nSetting this property will override `<script type=\"application/json\">` children",
"type": "string|object"
},
{
"name": "allowlist",
"description": "User-defined allowlist of top-level keys for the object.\nOptional for plain objects,\nRequired when setting `object` to a non-serializable object (e.g. an HTMLElement)\nProperty is an Array of strings\nAttribute is a comma-separated string",
"type": "string[]"
}
],
"properties": [
{
"name": "object",
"attribute": "object",
"description": "JavaScript Object to display\nSetting this property will override `<script type=\"application/json\">` children",
"type": "string|object"
},
{
"name": "allowlist",
"attribute": "allowlist",
"description": "User-defined allowlist of top-level keys for the object.\nOptional for plain objects,\nRequired when setting `object` to a non-serializable object (e.g. an HTMLElement)\nProperty is an Array of strings\nAttribute is a comma-separated string",
"type": "string[]"
},
{
"name": "error",
"description": "JSON.parse error",
"type": "Error"
}
],
"events": [
{
"name": "json-parse-error",
"description": "when JSON parse fails"
}
],
"slots": [
{
"name": "",
"description": "JSON scripts or JSON strings appended as text nodes will be parsed and displayed"
}
],
"cssProperties": [
{
"name": "--json-viewer-color",
"description": "Color for generic text. Light white, Dark #212121"
},
{
"name": "--json-viewer-background",
"description": "Color for generic text. Light #212121, Dark white"
},
{
"name": "--json-viewer-key-color",
"description": "Color for keys. Light #f76707, Dark #ff922b"
},
{
"name": "--json-viewer-boolean-color",
"description": "Color for booleans. Light #f76707, Dark #22b8cf"
},
{
"name": "--json-viewer-number-color",
"description": "Color for numbers. Light #0ca678, Dark #51cf66"
},
{
"name": "--json-viewer-null-color",
"description": "Color for nulls. Light #e03131, Dark #ff6b6b"
},
{
"name": "--json-viewer-string-color",
"description": "Color for strings. Light #0c8599, Dark #22b8cf"
}
],
"cssParts": [
{
"name": "code",
"description": "the wrapping `<code>` element"
},
{
"name": "key",
"description": "property keys"
},
{
"name": "boolean",
"description": "boolean property values"
},
{
"name": "number",
"description": "number property values"
},
{
"name": "null",
"description": "null property values"
},
{
"name": "string",
"description": "string property values"
}
]
}
]
}