Skip to content

Commit f7be8a7

Browse files
committed
website: update example. 45a4933
1 parent 2c28664 commit f7be8a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+301
-220
lines changed

asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.7ea575dc.css",
4-
"main.js": "/static/js/main.e76e02c3.js",
4+
"main.js": "/static/js/main.facc0fee.js",
55
"refractor-prismjs-vendor.0abbb2f3.js": "/static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js",
66
"react-vendor.js": "/static/js/react-vendor.03814a95.js",
77
"refractor-prismjs-vendor.3665b250.js": "/static/js/refractor-prismjs-vendor.3665b250.eec550b5.js",
88
"refractor-prismjs-vendor.a81a7d65.js": "/static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js",
99
"index.html": "/index.html",
1010
"main.7ea575dc.css.map": "/static/css/main.7ea575dc.css.map",
11-
"main.e76e02c3.js.map": "/static/js/main.e76e02c3.js.map",
11+
"main.facc0fee.js.map": "/static/js/main.facc0fee.js.map",
1212
"refractor-prismjs-vendor.0abbb2f3.4ed442e7.js.map": "/static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js.map",
1313
"react-vendor.03814a95.js.map": "/static/js/react-vendor.03814a95.js.map",
1414
"refractor-prismjs-vendor.3665b250.eec550b5.js.map": "/static/js/refractor-prismjs-vendor.3665b250.eec550b5.js.map",
@@ -20,6 +20,6 @@
2020
"static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js",
2121
"static/js/react-vendor.03814a95.js",
2222
"static/css/main.7ea575dc.css",
23-
"static/js/main.e76e02c3.js"
23+
"static/js/main.facc0fee.js"
2424
]
2525
}

badges.svg

Lines changed: 9 additions & 9 deletions
Loading

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="keywords" content="react,react-component,array-viewer,base-16,component,interactive,interactive-json,json,json-component,json-display,json-tree,json-view,json-viewer,json-inspector,json-tree,react,react-component,react-json,theme,tree,tree-view,treeview,jaywcjlove"><meta name="description" content="A React component for displaying and editing javascript arrays and JSON objects."><link rel="shortcut icon" href="/favicon.ico"><title>react-json-view</title><script defer="defer" src="./static/js/refractor-prismjs-vendor.3665b250.eec550b5.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js"></script><script defer="defer" src="./static/js/react-vendor.03814a95.js"></script><script defer="defer" src="./static/js/main.e76e02c3.js"></script><link href="./static/css/main.7ea575dc.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="keywords" content="react,react-component,array-viewer,base-16,component,interactive,interactive-json,json,json-component,json-display,json-tree,json-view,json-viewer,json-inspector,json-tree,react,react-component,react-json,theme,tree,tree-view,treeview,jaywcjlove"><meta name="description" content="A React component for displaying and editing javascript arrays and JSON objects."><link rel="shortcut icon" href="/favicon.ico"><title>react-json-view</title><script defer="defer" src="./static/js/refractor-prismjs-vendor.3665b250.eec550b5.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js"></script><script defer="defer" src="./static/js/react-vendor.03814a95.js"></script><script defer="defer" src="./static/js/main.facc0fee.js"></script><link href="./static/css/main.7ea575dc.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

lcov-report/index.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ <h1>All files</h1>
2323
<div class='clearfix'>
2424

2525
<div class='fl pad1y space-right2'>
26-
<span class="strong">92.68% </span>
26+
<span class="strong">92.41% </span>
2727
<span class="quiet">Statements</span>
28-
<span class='fraction'>773/834</span>
28+
<span class='fraction'>780/844</span>
2929
</div>
3030

3131

3232
<div class='fl pad1y space-right2'>
33-
<span class="strong">76.07% </span>
33+
<span class="strong">75.16% </span>
3434
<span class="quiet">Branches</span>
35-
<span class='fraction'>458/602</span>
35+
<span class='fraction'>466/620</span>
3636
</div>
3737

3838

@@ -44,9 +44,9 @@ <h1>All files</h1>
4444

4545

4646
<div class='fl pad1y space-right2'>
47-
<span class="strong">92.7% </span>
47+
<span class="strong">92.42% </span>
4848
<span class="quiet">Lines</span>
49-
<span class='fraction'>737/795</span>
49+
<span class='fraction'>744/805</span>
5050
</div>
5151

5252

@@ -110,17 +110,17 @@ <h1>All files</h1>
110110

111111
<tr>
112112
<td class="file high" data-value="src/comps"><a href="src/comps/index.html">src/comps</a></td>
113-
<td data-value="90.41" class="pic high">
114-
<div class="chart"><div class="cover-fill" style="width: 90%"></div><div class="cover-empty" style="width: 10%"></div></div>
113+
<td data-value="89.26" class="pic high">
114+
<div class="chart"><div class="cover-fill" style="width: 89%"></div><div class="cover-empty" style="width: 11%"></div></div>
115115
</td>
116-
<td data-value="90.41" class="pct high">90.41%</td>
117-
<td data-value="167" class="abs high">151/167</td>
118-
<td data-value="86.48" class="pct high">86.48%</td>
119-
<td data-value="148" class="abs high">128/148</td>
116+
<td data-value="89.26" class="pct high">89.26%</td>
117+
<td data-value="177" class="abs high">158/177</td>
118+
<td data-value="84.33" class="pct high">84.33%</td>
119+
<td data-value="166" class="abs high">140/166</td>
120120
<td data-value="82.6" class="pct high">82.6%</td>
121121
<td data-value="23" class="abs high">19/23</td>
122-
<td data-value="90.18" class="pct high">90.18%</td>
123-
<td data-value="163" class="abs high">147/163</td>
122+
<td data-value="89.01" class="pct high">89.01%</td>
123+
<td data-value="173" class="abs high">154/173</td>
124124
</tr>
125125

126126
<tr>
@@ -175,8 +175,8 @@ <h1>All files</h1>
175175
</td>
176176
<td data-value="100" class="pct high">100%</td>
177177
<td data-value="128" class="abs high">128/128</td>
178-
<td data-value="69.3" class="pct medium">69.3%</td>
179-
<td data-value="101" class="abs medium">70/101</td>
178+
<td data-value="65.34" class="pct medium">65.34%</td>
179+
<td data-value="101" class="abs medium">66/101</td>
180180
<td data-value="100" class="pct high">100%</td>
181181
<td data-value="14" class="abs high">14/14</td>
182182
<td data-value="100" class="pct high">100%</td>
@@ -236,7 +236,7 @@ <h1>All files</h1>
236236
<div class='footer quiet pad2 space-top1 center small'>
237237
Code coverage generated by
238238
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
239-
at 2024-10-16T19:18:07.096Z
239+
at 2024-10-16T20:23:06.213Z
240240
</div>
241241
<script src="prettify.js"></script>
242242
<script>

lcov-report/src/Container.tsx.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> Contain
243243
parentValue={parentValue}
244244
keyName={keyName}
245245
/&gt;
246-
&lt;NestedClose expandKey={subkeyid} value={value} level={level} /&gt;
246+
&lt;NestedClose expandKey={subkeyid} value={value} level={level} keys={keys} /&gt;
247247
&lt;/div&gt;
248248
);
249249
});
@@ -256,7 +256,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> Contain
256256
<div class='footer quiet pad2 space-top1 center small'>
257257
Code coverage generated by
258258
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
259-
at 2024-10-16T19:18:07.096Z
259+
at 2024-10-16T20:23:06.213Z
260260
</div>
261261
<script src="../prettify.js"></script>
262262
<script>

lcov-report/src/arrow/TriangleArrow.tsx.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/arrow</a
133133
<div class='footer quiet pad2 space-top1 center small'>
134134
Code coverage generated by
135135
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
136-
at 2024-10-16T19:18:07.096Z
136+
at 2024-10-16T20:23:06.213Z
137137
</div>
138138
<script src="../../prettify.js"></script>
139139
<script>

lcov-report/src/arrow/TriangleSolidArrow.tsx.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/arrow</a
154154
<div class='footer quiet pad2 space-top1 center small'>
155155
Code coverage generated by
156156
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
157-
at 2024-10-16T19:18:07.096Z
157+
at 2024-10-16T20:23:06.213Z
158158
</div>
159159
<script src="../../prettify.js"></script>
160160
<script>

lcov-report/src/arrow/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ <h1><a href="../../index.html">All files</a> src/arrow</h1>
116116
<div class='footer quiet pad2 space-top1 center small'>
117117
Code coverage generated by
118118
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119-
at 2024-10-16T19:18:07.096Z
119+
at 2024-10-16T20:23:06.213Z
120120
</div>
121121
<script src="../../prettify.js"></script>
122122
<script>

lcov-report/src/comps/Copied.tsx.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
391391
<div class='footer quiet pad2 space-top1 center small'>
392392
Code coverage generated by
393393
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
394-
at 2024-10-16T19:18:07.096Z
394+
at 2024-10-16T20:23:06.213Z
395395
</div>
396396
<script src="../../prettify.js"></script>
397397
<script>

lcov-report/src/comps/KeyValues.tsx.html

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
2323
<div class='clearfix'>
2424

2525
<div class='fl pad1y space-right2'>
26-
<span class="strong">100% </span>
26+
<span class="strong">97.95% </span>
2727
<span class="quiet">Statements</span>
28-
<span class='fraction'>46/46</span>
28+
<span class='fraction'>48/49</span>
2929
</div>
3030

3131

3232
<div class='fl pad1y space-right2'>
33-
<span class="strong">83.72% </span>
33+
<span class="strong">81.25% </span>
3434
<span class="quiet">Branches</span>
35-
<span class='fraction'>36/43</span>
35+
<span class='fraction'>39/48</span>
3636
</div>
3737

3838

@@ -44,9 +44,9 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
4444

4545

4646
<div class='fl pad1y space-right2'>
47-
<span class="strong">100% </span>
47+
<span class="strong">97.95% </span>
4848
<span class="quiet">Lines</span>
49-
<span class='fraction'>46/46</span>
49+
<span class='fraction'>48/49</span>
5050
</div>
5151

5252

@@ -184,7 +184,14 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
184184
<a name='L119'></a><a href='#L119'>119</a>
185185
<a name='L120'></a><a href='#L120'>120</a>
186186
<a name='L121'></a><a href='#L121'>121</a>
187-
<a name='L122'></a><a href='#L122'>122</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
187+
<a name='L122'></a><a href='#L122'>122</a>
188+
<a name='L123'></a><a href='#L123'>123</a>
189+
<a name='L124'></a><a href='#L124'>124</a>
190+
<a name='L125'></a><a href='#L125'>125</a>
191+
<a name='L126'></a><a href='#L126'>126</a>
192+
<a name='L127'></a><a href='#L127'>127</a>
193+
<a name='L128'></a><a href='#L128'>128</a>
194+
<a name='L129'></a><a href='#L129'>129</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
188195
<span class="cline-any cline-neutral">&nbsp;</span>
189196
<span class="cline-any cline-neutral">&nbsp;</span>
190197
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -210,6 +217,13 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
210217
<span class="cline-any cline-yes">119x</span>
211218
<span class="cline-any cline-neutral">&nbsp;</span>
212219
<span class="cline-any cline-yes">119x</span>
220+
<span class="cline-any cline-yes">119x</span>
221+
<span class="cline-any cline-yes">119x</span>
222+
<span class="cline-any cline-neutral">&nbsp;</span>
223+
<span class="cline-any cline-neutral">&nbsp;</span>
224+
<span class="cline-any cline-neutral">&nbsp;</span>
225+
<span class="cline-any cline-neutral">&nbsp;</span>
226+
<span class="cline-any cline-no">&nbsp;</span>
213227
<span class="cline-any cline-neutral">&nbsp;</span>
214228
<span class="cline-any cline-yes">119x</span>
215229
<span class="cline-any cline-yes">2x</span>
@@ -327,11 +341,18 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
327341
export const KeyValues = &lt;T extends object&gt;(props: KeyValuesProps&lt;T&gt;) =&gt; {
328342
const { value, expandKey = <span class="branch-0 cbranch-no" title="branch not covered" >'',</span> level, keys = [] } = props;
329343
const expands = useExpandsStore();
330-
const { objectSortKeys, indentWidth, collapsed } = useStore();
344+
const { objectSortKeys, indentWidth, collapsed, shouldExpandNodeInitially } = useStore();
331345
const isMyArray = Array.isArray(value);
332-
const isExpanded =
333-
expands[expandKey] ??
334-
(typeof collapsed === 'boolean' ? <span class="branch-0 cbranch-no" title="branch not covered" >collapsed </span>: typeof collapsed === 'number' ? <span class="branch-0 cbranch-no" title="branch not covered" >level &gt; collapsed </span>: false);
346+
const defaultExpanded =
347+
typeof collapsed === 'boolean' ? <span class="branch-0 cbranch-no" title="branch not covered" >collapsed </span>: typeof collapsed === 'number' ? <span class="branch-0 cbranch-no" title="branch not covered" >level &gt; collapsed </span>: false;
348+
const isExpanded = expands[expandKey] ?? defaultExpanded;
349+
<span class="missing-if-branch" title="if path not taken" >I</span>if (
350+
expands[expandKey] === undefined &amp;&amp;
351+
shouldExpandNodeInitially &amp;&amp;
352+
<span class="branch-2 cbranch-no" title="branch not covered" > shouldExpandNodeInitially(isExpanded, { value, keys, level })</span>
353+
) {
354+
<span class="cstat-no" title="statement not covered" > return null;</span>
355+
}
335356
if (isExpanded) {
336357
return null;
337358
}
@@ -433,7 +454,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
433454
<div class='footer quiet pad2 space-top1 center small'>
434455
Code coverage generated by
435456
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
436-
at 2024-10-16T19:18:07.096Z
457+
at 2024-10-16T20:23:06.213Z
437458
</div>
438459
<script src="../../prettify.js"></script>
439460
<script>

0 commit comments

Comments
 (0)