json-edit-react 1.30.2 → 2.0.0-beta.1
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/README.md +53 -49
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +285 -210
- package/build/index.esm.js +1 -1
- package/build/style.css +500 -0
- package/package.json +5 -53
package/build/style.css
ADDED
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
:host {
|
|
3
|
+
--jer-select-border: #b6b6b6;
|
|
4
|
+
--jer-select-focus: #777;
|
|
5
|
+
--jer-select-arrow: #777;
|
|
6
|
+
--jer-form-border: 1px solid #ededf0;
|
|
7
|
+
--jer-form-border-focus: 1px solid #e2e2e2;
|
|
8
|
+
/* The selection-highlight and copy-pulse colours mirror the default theme, so
|
|
9
|
+
these static rules degrade to sensible colours when a theme doesn't supply
|
|
10
|
+
the matching variable inline on the container — e.g. a dynamic `iconCopy`
|
|
11
|
+
style function, which can't collapse to one container-level value. */
|
|
12
|
+
--jer-highlight-color: #b3d8ff;
|
|
13
|
+
--jer-icon-copy-color: #268bd2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.jer-visible {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.jer-hidden {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Select styled as per:
|
|
25
|
+
https://moderncss.dev/custom-select-styles-with-pure-css/
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
.jer-select select {
|
|
29
|
+
-webkit-appearance: none;
|
|
30
|
+
-moz-appearance: none;
|
|
31
|
+
appearance: none;
|
|
32
|
+
background-color: transparent;
|
|
33
|
+
border: none;
|
|
34
|
+
padding: 0 1em 0 0;
|
|
35
|
+
margin: 0;
|
|
36
|
+
/* width: 100%; */
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
font-size: 0.8em;
|
|
39
|
+
color: black;
|
|
40
|
+
cursor: inherit;
|
|
41
|
+
line-height: inherit;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
select::-ms-expand {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.jer-select {
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-areas: 'select';
|
|
52
|
+
align-items: center;
|
|
53
|
+
position: relative;
|
|
54
|
+
min-width: 12ch;
|
|
55
|
+
max-width: 15ch;
|
|
56
|
+
border: 1px solid var(--jer-select-border);
|
|
57
|
+
border-radius: 0.25em;
|
|
58
|
+
padding: 0.25em 0.5em;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
line-height: 1.1;
|
|
61
|
+
background-color: #fff;
|
|
62
|
+
background-image: linear-gradient(to top, #f9f9f9, #fff 33%);
|
|
63
|
+
}
|
|
64
|
+
.jer-select select,
|
|
65
|
+
.jer-select::after {
|
|
66
|
+
grid-area: select;
|
|
67
|
+
}
|
|
68
|
+
.jer-select:not(.jer-select--multiple)::after {
|
|
69
|
+
content: '';
|
|
70
|
+
justify-self: end;
|
|
71
|
+
width: 0.8em;
|
|
72
|
+
height: 0.5em;
|
|
73
|
+
background-color: var(--jer-select-arrow);
|
|
74
|
+
clip-path: polygon(100% 0%, 0 0%, 50% 100%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
select:focus + .focus {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: -1px;
|
|
80
|
+
left: -1px;
|
|
81
|
+
right: -1px;
|
|
82
|
+
bottom: -1px;
|
|
83
|
+
border: 1px solid var(--jer-select-focus);
|
|
84
|
+
border-radius: inherit;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.jer-select-inner {
|
|
88
|
+
width: 100%;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.jer-editor-container {
|
|
93
|
+
position: relative;
|
|
94
|
+
font-size: 16px;
|
|
95
|
+
line-height: 1;
|
|
96
|
+
padding: 1em;
|
|
97
|
+
padding-left: 2em;
|
|
98
|
+
/* margin-top: 1em; */
|
|
99
|
+
/* margin-bottom: 1em; */
|
|
100
|
+
border-radius: 0.5em;
|
|
101
|
+
text-align: left;
|
|
102
|
+
/* border: 1px solid green; */
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.jer-editor-container textarea {
|
|
106
|
+
color: var(--jer-input-color);
|
|
107
|
+
border: var(--jer-form-border);
|
|
108
|
+
border-radius: 0.3em;
|
|
109
|
+
outline: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.jer-editor-container textarea:focus {
|
|
113
|
+
border: var(--jer-form-border-focus);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.jer-editor-container input {
|
|
117
|
+
border: var(--jer-form-border);
|
|
118
|
+
border-radius: 0.3em;
|
|
119
|
+
outline: none;
|
|
120
|
+
font-family: inherit;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.jer-editor-container input:focus {
|
|
124
|
+
border: var(--jer-form-border-focus);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Input highlighted text */
|
|
128
|
+
.jer-editor-container ::selection {
|
|
129
|
+
background-color: var(--jer-highlight-color);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* .jer-editor-container select {
|
|
133
|
+
color: red;
|
|
134
|
+
} */
|
|
135
|
+
|
|
136
|
+
/* .jer-component {
|
|
137
|
+
} */
|
|
138
|
+
|
|
139
|
+
/* .jer-collection-element {
|
|
140
|
+
min-height: 1.7em;
|
|
141
|
+
} */
|
|
142
|
+
|
|
143
|
+
.jer-collection-header-row,
|
|
144
|
+
.jer-value-main-row {
|
|
145
|
+
display: flex;
|
|
146
|
+
min-height: 1.7em;
|
|
147
|
+
gap: 0.3em;
|
|
148
|
+
align-items: center;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.jer-collection-header-row {
|
|
152
|
+
flex-wrap: wrap;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.jer-value-main-row {
|
|
156
|
+
gap: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* .jer-brackets {
|
|
160
|
+
} */
|
|
161
|
+
|
|
162
|
+
/* The closing bracket sits at the same column as the opening line (the key),
|
|
163
|
+
matching how JSON pretty-printers align a close bracket under the start of
|
|
164
|
+
the line that opened it. Its container shares the header row's left edge, so
|
|
165
|
+
no offset is needed — and the alignment is deliberately independent of
|
|
166
|
+
`indent`. */
|
|
167
|
+
.jer-bracket-outside {
|
|
168
|
+
padding-left: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Hidden by `display: none` (not `opacity: 0` alone) so a hidden count
|
|
172
|
+
collapses its flex gap and leaves no space between the brackets. The
|
|
173
|
+
`allow-discrete` transition-behavior is set inline alongside the transition
|
|
174
|
+
(so the `all` transition includes `display`), and `@starting-style` below
|
|
175
|
+
gives the fade-in a frame to animate from — together they fade the count
|
|
176
|
+
in/out on collapse instead of popping. `jer-visible`/`jer-hidden` (shared,
|
|
177
|
+
opacity-only) drive the fade; this class only toggles `display`. */
|
|
178
|
+
.jer-collection-item-count {
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.jer-collection-item-count.jer-visible {
|
|
183
|
+
display: block;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@starting-style {
|
|
187
|
+
.jer-collection-item-count.jer-visible {
|
|
188
|
+
opacity: 0;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.jer-collapse-icon {
|
|
193
|
+
position: absolute;
|
|
194
|
+
left: -1.2em;
|
|
195
|
+
/* Centre vertically on the row (its positioning context) independent of row
|
|
196
|
+
height: top:50% is mid-row, translateY(-50%) pulls back by half the icon's
|
|
197
|
+
own height. Survives row min-height and per-theme icon-scale changes. */
|
|
198
|
+
top: 50%;
|
|
199
|
+
transform: translateY(-50%);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* The collapse animation rotates the icon via `.jer-rotate-90`, which sets the
|
|
203
|
+
same `transform` property, so the centring translate is re-stated here or
|
|
204
|
+
it'd be lost when collapsed. The icon box is square → translate + rotate
|
|
205
|
+
compose cleanly. */
|
|
206
|
+
.jer-collapse-icon.jer-rotate-90 {
|
|
207
|
+
transform: translateY(-50%) rotate(-90deg);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.jer-collection-inner {
|
|
211
|
+
position: relative;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.jer-collection-text-edit,
|
|
215
|
+
.jer-collection-text-edit-custom {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
gap: 0.3em;
|
|
219
|
+
align-items: flex-start;
|
|
220
|
+
line-height: 1.1em;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Default <textarea> only: Keep OK/Cancel buttons bound by the text area width
|
|
224
|
+
*/
|
|
225
|
+
.jer-collection-text-edit {
|
|
226
|
+
width: fit-content;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.jer-collection-text-area {
|
|
230
|
+
/* `box-sizing` and `line-height` are pinned (not just inherited) so the
|
|
231
|
+
AutogrowTextArea's real <textarea> and its hidden measuring <span> can't
|
|
232
|
+
drift apart when a host rule targets `textarea`/`input` or applies a global
|
|
233
|
+
`* { box-sizing: border-box }` reset. content-box is the model the sizing
|
|
234
|
+
was designed against, so consumers without a reset see no change. */
|
|
235
|
+
box-sizing: content-box;
|
|
236
|
+
resize: both;
|
|
237
|
+
padding-top: 0.2em;
|
|
238
|
+
padding-left: 0.5em;
|
|
239
|
+
padding-right: 0.5em;
|
|
240
|
+
padding-bottom: 0;
|
|
241
|
+
overflow: hidden;
|
|
242
|
+
max-height: 40em;
|
|
243
|
+
line-height: 1.25em;
|
|
244
|
+
font-family: inherit;
|
|
245
|
+
font-size: 0.85em;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.jer-collection-input-button-row {
|
|
249
|
+
display: flex;
|
|
250
|
+
justify-content: flex-end;
|
|
251
|
+
width: 100%;
|
|
252
|
+
font-size: 150%;
|
|
253
|
+
margin-top: 0.4em;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* .jer-collection-error-row {
|
|
257
|
+
} */
|
|
258
|
+
|
|
259
|
+
.jer-collection-error-row-edit {
|
|
260
|
+
position: absolute;
|
|
261
|
+
bottom: 0.5em;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.jer-error-slug {
|
|
265
|
+
margin-left: 1em;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.jer-value-component {
|
|
269
|
+
position: relative;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.jer-value-and-buttons {
|
|
273
|
+
display: flex;
|
|
274
|
+
justify-content: flex-start;
|
|
275
|
+
align-items: center;
|
|
276
|
+
padding-left: 0.5em;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.jer-value-error-row {
|
|
280
|
+
position: absolute;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.jer-value-string {
|
|
284
|
+
line-height: 1.3em;
|
|
285
|
+
white-space: pre-wrap;
|
|
286
|
+
overflow-wrap: anywhere;
|
|
287
|
+
word-break: break-word;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.jer-string-expansion {
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
opacity: 0.6;
|
|
293
|
+
filter: saturate(50%);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.jer-show-less {
|
|
297
|
+
font-size: 80%;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.jer-hyperlink {
|
|
301
|
+
text-decoration: underline;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.jer-input-text {
|
|
305
|
+
/* See `.jer-collection-text-area` — pinned so the autogrow <textarea> and its
|
|
306
|
+
measuring <span> stay in sync under a host CSS reset. */
|
|
307
|
+
box-sizing: content-box;
|
|
308
|
+
resize: none;
|
|
309
|
+
margin: 0;
|
|
310
|
+
height: 1.4em;
|
|
311
|
+
padding-left: 0.5em;
|
|
312
|
+
padding-right: 0.5em;
|
|
313
|
+
padding-top: 0.25em;
|
|
314
|
+
padding-bottom: 0.2em;
|
|
315
|
+
min-width: 6em;
|
|
316
|
+
overflow: hidden;
|
|
317
|
+
line-height: 1.2em;
|
|
318
|
+
font-family: inherit;
|
|
319
|
+
font-size: 0.9em;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* .jer-value-number {
|
|
323
|
+
} */
|
|
324
|
+
|
|
325
|
+
/* .jer-value-boolean {
|
|
326
|
+
} */
|
|
327
|
+
|
|
328
|
+
.jer-input-boolean {
|
|
329
|
+
transform: scale(1.5);
|
|
330
|
+
margin-left: 0.3em;
|
|
331
|
+
margin-right: 0.3em;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* .jer-value-null {
|
|
335
|
+
} */
|
|
336
|
+
|
|
337
|
+
/* .jer-value-object {
|
|
338
|
+
} */
|
|
339
|
+
|
|
340
|
+
.jer-key-text {
|
|
341
|
+
word-break: break-word;
|
|
342
|
+
line-height: 1.1em;
|
|
343
|
+
white-space: pre-wrap;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.jer-key-edit {
|
|
347
|
+
padding: 0 0.3em;
|
|
348
|
+
font-size: inherit;
|
|
349
|
+
font-size: 0.9em;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* .jer-value-array {
|
|
353
|
+
} */
|
|
354
|
+
|
|
355
|
+
.jer-value-invalid {
|
|
356
|
+
opacity: 0.5;
|
|
357
|
+
font-style: italic;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.jer-input-number {
|
|
361
|
+
min-width: 3em;
|
|
362
|
+
font-size: 90%;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* .jer-input-component {
|
|
366
|
+
} */
|
|
367
|
+
|
|
368
|
+
.jer-edit-buttons,
|
|
369
|
+
.jer-confirm-buttons {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
height: 1em;
|
|
374
|
+
margin-right: 0.2em;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* The icon controls are real <button>s for accessibility. This neutralises the
|
|
378
|
+
user-agent button chrome so they render identically to surrounding elements.
|
|
379
|
+
Only properties a <button> won't otherwise take from context are listed:
|
|
380
|
+
background/border/margin/padding/appearance don't inherit, and form controls
|
|
381
|
+
are UA-special-cased so `font`/`color` must be re-asserted (`font: inherit`
|
|
382
|
+
is load-bearing — the icons are sized in `em`). `cursor` inherits from the
|
|
383
|
+
wrapper rule above, whose flexbox also centres the button, so neither is
|
|
384
|
+
needed here. Scoped with `>` so it never leaks into custom-button content. */
|
|
385
|
+
.jer-edit-buttons > button,
|
|
386
|
+
.jer-confirm-buttons > button {
|
|
387
|
+
appearance: none;
|
|
388
|
+
background: none;
|
|
389
|
+
border: none;
|
|
390
|
+
margin: 0;
|
|
391
|
+
padding: 0;
|
|
392
|
+
font: inherit;
|
|
393
|
+
color: inherit;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.jer-input-buttons {
|
|
397
|
+
gap: 0.4em;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.jer-edit-buttons {
|
|
401
|
+
gap: 0.4em;
|
|
402
|
+
margin-left: 0.5em;
|
|
403
|
+
opacity: 0;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.jer-confirm-buttons {
|
|
407
|
+
gap: 0.2em;
|
|
408
|
+
margin-left: 0.4em;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.jer-edit-buttons:hover {
|
|
412
|
+
opacity: 1;
|
|
413
|
+
position: relative;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.jer-collection-header-row:hover > .jer-edit-buttons {
|
|
417
|
+
opacity: 1;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.jer-value-main-row:hover > .jer-edit-buttons {
|
|
421
|
+
opacity: 1;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.jer-value-and-buttons:hover > .jer-edit-buttons {
|
|
425
|
+
opacity: 1;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* .jer-input-buttons {
|
|
429
|
+
} */
|
|
430
|
+
|
|
431
|
+
.jer-copy-pulse {
|
|
432
|
+
position: relative;
|
|
433
|
+
transition: 0.3s;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.jer-copy-pulse:hover {
|
|
437
|
+
opacity: 0.85;
|
|
438
|
+
transition: 0.3s;
|
|
439
|
+
transform: scale(1.2);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.jer-copy-pulse:after {
|
|
443
|
+
content: '';
|
|
444
|
+
display: block;
|
|
445
|
+
position: absolute;
|
|
446
|
+
border-radius: 50%;
|
|
447
|
+
left: 0;
|
|
448
|
+
top: 0;
|
|
449
|
+
width: 100%;
|
|
450
|
+
height: 100%;
|
|
451
|
+
opacity: 0;
|
|
452
|
+
transition: all 0.5s;
|
|
453
|
+
box-shadow: 0 0 15px 5px var(--jer-icon-copy-color);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.jer-copy-pulse:active:after {
|
|
457
|
+
box-shadow: 0 0 0 0 var(--jer-icon-copy-color);
|
|
458
|
+
position: absolute;
|
|
459
|
+
border-radius: 4em;
|
|
460
|
+
left: 0;
|
|
461
|
+
top: 0;
|
|
462
|
+
opacity: 1;
|
|
463
|
+
transition: 0s;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.jer-copy-pulse:active {
|
|
467
|
+
top: 0.07em;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.jer-accordion-icon {
|
|
471
|
+
/* font-size: '2em'; */
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.jer-icon:hover {
|
|
475
|
+
opacity: 0.85;
|
|
476
|
+
transition: 0.3s;
|
|
477
|
+
transform: scale(1.2);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* For displaying keys that are purely <empty string> "" */
|
|
481
|
+
.jer-empty-string {
|
|
482
|
+
font-style: italic;
|
|
483
|
+
font-size: 90%;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.jer-drag-n-drop-padding {
|
|
487
|
+
height: 0.5em;
|
|
488
|
+
border: 1px dashed #b4b4b4;
|
|
489
|
+
border-radius: 0.3em;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/* Region to left of Collection node contents that is clickable to
|
|
493
|
+
collapse/expand node*/
|
|
494
|
+
.jer-clickzone {
|
|
495
|
+
position: absolute;
|
|
496
|
+
left: -1em;
|
|
497
|
+
top: 1.2em;
|
|
498
|
+
/* border: 1px solid red; */
|
|
499
|
+
height: calc(100% - 0.8em);
|
|
500
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json-edit-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "React component for editing or viewing JSON/object data",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"module": "build/index.esm.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"import": "./build/index.esm.js",
|
|
13
13
|
"require": "./build/index.cjs.js",
|
|
14
14
|
"default": "./build/index.esm.js"
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"./style.css": "./build/style.css"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"build/**/*"
|
|
@@ -21,57 +22,8 @@
|
|
|
21
22
|
"author": "Carl Smith <5456533+CarlosNZ@users.noreply.github.com>",
|
|
22
23
|
"license": "MIT",
|
|
23
24
|
"homepage": "https://carlosnz.github.io/json-edit-react",
|
|
24
|
-
"scripts": {
|
|
25
|
-
"setup": "yarn install && cd demo && yarn install",
|
|
26
|
-
"test": "jest",
|
|
27
|
-
"dev": "cd demo && yarn && yarn dev",
|
|
28
|
-
"demo": "cd demo && yarn && yarn start",
|
|
29
|
-
"demo:package": "yarn build-package && cd demo && yarn && yarn start:package",
|
|
30
|
-
"prebuild": "yarn lint",
|
|
31
|
-
"build": "rollup -c && rm -R build/dts",
|
|
32
|
-
"postbuild": "node ./scripts/cleanBuildTypes.cjs",
|
|
33
|
-
"build-package": "yarn build && yarn pack --filename package.tgz && tar -xzf package.tgz && mv package build_package && rm package.tgz",
|
|
34
|
-
"lint": "eslint",
|
|
35
|
-
"prepareReadme": "python3 scripts/build_npm_readme.py",
|
|
36
|
-
"prepublishOnly": "yarn build && yarn prepareReadme && python3 scripts/use_npm_readme.py prepare",
|
|
37
|
-
"postpublish": "python3 scripts/use_npm_readme.py restore && node scripts/installLatestPackage.mjs pause &",
|
|
38
|
-
"compile": "tsc --noEmit && ts-prune",
|
|
39
|
-
"release": "yarn publish",
|
|
40
|
-
"release-demo": "cd demo && yarn deploy"
|
|
41
|
-
},
|
|
42
25
|
"peerDependencies": {
|
|
43
|
-
"react": ">=
|
|
44
|
-
},
|
|
45
|
-
"dependencies": {},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@eslint/js": "^9.24.0",
|
|
48
|
-
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
49
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
50
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
51
|
-
"@types/jest": "^29.5.14",
|
|
52
|
-
"@types/node": "^20.11.17",
|
|
53
|
-
"@types/react": ">=16.0.0",
|
|
54
|
-
"eslint": "^9.24.0",
|
|
55
|
-
"eslint-plugin-react": "^7.37.5",
|
|
56
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
57
|
-
"fs-extra": "^11.2.0",
|
|
58
|
-
"globals": "^16.0.0",
|
|
59
|
-
"jest": "^29.7.0",
|
|
60
|
-
"react": "^19.1.0",
|
|
61
|
-
"react-dom": "^19.1.0",
|
|
62
|
-
"rollup": "^4.10.0",
|
|
63
|
-
"rollup-plugin-bundle-size": "^1.0.3",
|
|
64
|
-
"rollup-plugin-delete": "^3.0.1",
|
|
65
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
66
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
67
|
-
"rollup-plugin-sizes": "^1.0.6",
|
|
68
|
-
"rollup-plugin-styles": "^4.0.0",
|
|
69
|
-
"ts-jest": "^29.2.5",
|
|
70
|
-
"ts-node": "^10.9.2",
|
|
71
|
-
"ts-prune": "^0.10.3",
|
|
72
|
-
"tslib": "^2.6.2",
|
|
73
|
-
"typescript": "^5.3.3",
|
|
74
|
-
"typescript-eslint": "^8.29.1"
|
|
26
|
+
"react": ">=18.0.0"
|
|
75
27
|
},
|
|
76
28
|
"keywords": [
|
|
77
29
|
"react",
|
|
@@ -100,4 +52,4 @@
|
|
|
100
52
|
"treeview",
|
|
101
53
|
"react-json-view"
|
|
102
54
|
]
|
|
103
|
-
}
|
|
55
|
+
}
|