tsondb 0.5.7 → 0.5.10
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/dist/src/bin/tsondb.d.ts +1 -9
- package/dist/src/bin/tsondb.js +7 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/node/index.d.ts +2 -2
- package/dist/src/node/index.js +8 -2
- package/dist/src/node/renderers/jsonschema/index.d.ts +1 -1
- package/dist/src/node/renderers/ts/index.d.ts +1 -1
- package/dist/src/node/{Schema.d.ts → schema/Schema.d.ts} +2 -2
- package/dist/src/node/{Schema.js → schema/Schema.js} +10 -7
- package/dist/src/node/schema/declarations/EntityDecl.d.ts +31 -30
- package/dist/src/node/schema/declarations/EntityDecl.js +1 -0
- package/dist/src/node/server/api/declarations.js +3 -4
- package/dist/src/node/server/api/git.js +1 -2
- package/dist/src/node/server/api/instances.js +2 -3
- package/dist/src/node/server/index.d.ts +7 -2
- package/dist/src/node/server/index.js +13 -13
- package/dist/src/node/server/init.d.ts +1 -1
- package/dist/src/node/server/init.js +10 -0
- package/dist/src/node/utils/displayName.d.ts +3 -0
- package/dist/src/node/utils/displayName.js +19 -0
- package/dist/src/shared/config.d.ts +11 -0
- package/dist/src/{node/renderers/Output.d.ts → shared/output.d.ts} +1 -1
- package/dist/src/shared/output.js +1 -0
- package/dist/src/shared/utils/compare.js +6 -1
- package/dist/src/shared/utils/displayName.d.ts +1 -1
- package/dist/src/shared/utils/displayName.js +1 -1
- package/dist/src/shared/utils/instances.d.ts +3 -2
- package/dist/src/shared/utils/instances.js +3 -3
- package/dist/src/shared/utils/markdown.js +1 -1
- package/dist/src/web/components/Git.js +1 -1
- package/dist/src/web/components/typeInputs/ArrayTypeInput.js +4 -4
- package/dist/src/web/components/typeInputs/NestedEntityMapTypeInput.js +16 -11
- package/dist/src/web/components/typeInputs/ObjectTypeInput.js +3 -3
- package/dist/src/web/components/typeInputs/ReferenceIdentifierTypeInput.js +1 -1
- package/dist/src/web/components/typeInputs/StringTypeInput.js +7 -3
- package/dist/src/web/components/typeInputs/TypeInput.d.ts +2 -2
- package/dist/src/web/components/typeInputs/TypeInput.js +5 -1
- package/dist/src/web/hooks/useInstanceNamesByEntity.d.ts +1 -1
- package/dist/src/web/hooks/useInstanceNamesByEntity.js +1 -1
- package/dist/src/web/hooks/useSecondaryDeclarations.d.ts +1 -1
- package/dist/src/web/hooks/useSecondaryDeclarations.js +3 -3
- package/dist/src/web/routes/CreateInstance.js +26 -12
- package/dist/src/web/routes/Entity.js +27 -13
- package/dist/src/web/routes/Home.js +15 -1
- package/dist/src/web/routes/Instance.js +26 -12
- package/dist/src/web/routes/NotFound.js +4 -0
- package/package.json +6 -6
- package/public/css/styles.css +128 -34
- /package/dist/src/{node/renderers/Output.js → shared/config.js} +0 -0
package/public/css/styles.css
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
2
4
|
box-sizing: border-box;
|
|
3
5
|
}
|
|
4
6
|
|
|
5
7
|
:root {
|
|
6
|
-
--font-sans:
|
|
7
|
-
"Segoe UI
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
--font-sans:
|
|
9
|
+
ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
|
10
|
+
"Noto Color Emoji";
|
|
11
|
+
--font-mono:
|
|
12
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
|
|
13
|
+
monospace;
|
|
10
14
|
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
11
15
|
--background: white;
|
|
12
16
|
--markdown-background: #e1e3e7;
|
|
@@ -227,7 +231,8 @@ button.destructive:disabled {
|
|
|
227
231
|
|
|
228
232
|
input,
|
|
229
233
|
textarea,
|
|
230
|
-
select
|
|
234
|
+
select,
|
|
235
|
+
.textarea-grow-wrap::after {
|
|
231
236
|
background: var(--background);
|
|
232
237
|
color: var(--color);
|
|
233
238
|
font-family: var(--font-sans);
|
|
@@ -247,6 +252,28 @@ select[aria-invalid="true"] {
|
|
|
247
252
|
color: var(--error-color);
|
|
248
253
|
}
|
|
249
254
|
|
|
255
|
+
/* https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas/ */
|
|
256
|
+
|
|
257
|
+
.textarea-grow-wrap {
|
|
258
|
+
display: grid;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.textarea-grow-wrap::after {
|
|
262
|
+
content: attr(data-value) " ";
|
|
263
|
+
white-space: pre-wrap;
|
|
264
|
+
visibility: hidden;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.textarea-grow-wrap > textarea {
|
|
268
|
+
resize: none;
|
|
269
|
+
overflow: hidden;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.textarea-grow-wrap > textarea,
|
|
273
|
+
.textarea-grow-wrap::after {
|
|
274
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
275
|
+
}
|
|
276
|
+
|
|
250
277
|
input[type="checkbox"] {
|
|
251
278
|
height: 1rem;
|
|
252
279
|
width: 1rem;
|
|
@@ -274,11 +301,6 @@ input[type="checkbox"]:checked::before {
|
|
|
274
301
|
margin: calc(-0.2rem - 1px) 0 0 calc(-0.275rem - 1px);
|
|
275
302
|
}
|
|
276
303
|
|
|
277
|
-
textarea {
|
|
278
|
-
min-height: 5rem;
|
|
279
|
-
resize: vertical;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
304
|
.select-wrapper {
|
|
283
305
|
position: relative;
|
|
284
306
|
}
|
|
@@ -327,59 +349,109 @@ select {
|
|
|
327
349
|
margin-top: 2.3rem;
|
|
328
350
|
}
|
|
329
351
|
|
|
330
|
-
.
|
|
331
|
-
|
|
352
|
+
.list-header {
|
|
353
|
+
display: flex;
|
|
354
|
+
justify-content: space-between;
|
|
355
|
+
align-items: center;
|
|
356
|
+
gap: 1rem;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.list-header form {
|
|
360
|
+
display: flex;
|
|
361
|
+
gap: 0.5rem;
|
|
362
|
+
align-items: center;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.entries {
|
|
332
366
|
list-style-type: " ";
|
|
333
367
|
padding: 0;
|
|
334
368
|
margin: 1.5rem 0 0;
|
|
369
|
+
container-type: inline-size;
|
|
335
370
|
}
|
|
336
371
|
|
|
337
|
-
.
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
gap: 1.5rem;
|
|
372
|
+
.entries-item {
|
|
373
|
+
display: grid;
|
|
374
|
+
gap: 0.125rem 1.5rem;
|
|
341
375
|
padding: 0.5rem 0;
|
|
342
376
|
border-top: 1px solid var(--separator-color);
|
|
377
|
+
grid-template-columns: 1fr auto;
|
|
378
|
+
grid-template-rows: auto 1fr;
|
|
379
|
+
grid-template-areas: "title side" "subtitle side" ". side";
|
|
380
|
+
align-items: center;
|
|
381
|
+
--text-padding: 0.5rem;
|
|
343
382
|
}
|
|
344
383
|
|
|
345
|
-
|
|
346
|
-
.
|
|
384
|
+
@container (min-width: 40rem) {
|
|
385
|
+
.entries-item {
|
|
386
|
+
grid-template-columns: 1fr auto auto;
|
|
387
|
+
grid-template-rows: auto;
|
|
388
|
+
grid-template-areas: "title subtitle side";
|
|
389
|
+
align-items: center;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.entries-item:first-child {
|
|
347
394
|
border-top: none;
|
|
348
395
|
}
|
|
349
396
|
|
|
350
|
-
.
|
|
351
|
-
|
|
397
|
+
.entries-item--created {
|
|
398
|
+
color: var(--highlight-color);
|
|
399
|
+
background: var(--highlight-background);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.entries-item h2 {
|
|
352
403
|
font-size: 1rem;
|
|
353
404
|
margin: 0;
|
|
354
405
|
flex: 1 1 auto;
|
|
355
|
-
|
|
406
|
+
line-height: 1.3;
|
|
356
407
|
}
|
|
357
408
|
|
|
358
|
-
.
|
|
359
|
-
|
|
409
|
+
.entries-item__title {
|
|
410
|
+
grid-area: title;
|
|
411
|
+
padding-top: var(--text-padding);
|
|
360
412
|
}
|
|
361
413
|
|
|
362
|
-
|
|
414
|
+
@container (min-width: 40rem) {
|
|
415
|
+
.entries-item__title {
|
|
416
|
+
padding-block: var(--text-padding);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.entries-item__title p {
|
|
363
421
|
color: var(--secondary-color);
|
|
422
|
+
margin: 0.125rem 0 0;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.entries-item__title .description {
|
|
364
426
|
margin: 0;
|
|
365
|
-
padding-bottom: 0.5rem;
|
|
366
427
|
}
|
|
367
428
|
|
|
368
|
-
.
|
|
369
|
-
.instance-item .id {
|
|
429
|
+
.entries-item__subtitle {
|
|
370
430
|
color: var(--secondary-color);
|
|
371
431
|
margin: 0;
|
|
372
|
-
padding: 0
|
|
432
|
+
padding: 0;
|
|
373
433
|
white-space: nowrap;
|
|
434
|
+
grid-area: subtitle;
|
|
435
|
+
text-overflow: ellipsis;
|
|
436
|
+
overflow: hidden;
|
|
437
|
+
padding-bottom: var(--text-padding);
|
|
374
438
|
}
|
|
375
439
|
|
|
376
|
-
|
|
440
|
+
@container (min-width: 40rem) {
|
|
441
|
+
.entries-item__subtitle {
|
|
442
|
+
padding-block: var(--text-padding);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.entries-item__subtitle--id {
|
|
377
447
|
font-family: var(--font-mono);
|
|
378
448
|
}
|
|
379
449
|
|
|
380
|
-
.
|
|
381
|
-
|
|
382
|
-
|
|
450
|
+
.entries-item__side {
|
|
451
|
+
grid-area: side;
|
|
452
|
+
display: flex;
|
|
453
|
+
align-items: center;
|
|
454
|
+
gap: 1rem;
|
|
383
455
|
}
|
|
384
456
|
|
|
385
457
|
.field.field--id {
|
|
@@ -464,8 +536,15 @@ form > .field--container {
|
|
|
464
536
|
|
|
465
537
|
.field--string {
|
|
466
538
|
display: flex;
|
|
539
|
+
flex-direction: column;
|
|
467
540
|
gap: 1rem;
|
|
468
|
-
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
@container (min-width: 40rem) {
|
|
544
|
+
.field--string {
|
|
545
|
+
flex-direction: row;
|
|
546
|
+
align-items: start;
|
|
547
|
+
}
|
|
469
548
|
}
|
|
470
549
|
|
|
471
550
|
.field--string .editor {
|
|
@@ -490,6 +569,10 @@ form > .field--container {
|
|
|
490
569
|
margin-bottom: 0;
|
|
491
570
|
}
|
|
492
571
|
|
|
572
|
+
.container-item {
|
|
573
|
+
container-type: inline-size;
|
|
574
|
+
}
|
|
575
|
+
|
|
493
576
|
.container-item-header {
|
|
494
577
|
display: flex;
|
|
495
578
|
align-items: center;
|
|
@@ -555,6 +638,17 @@ button[type="submit"] {
|
|
|
555
638
|
margin: 0.35rem 0 0;
|
|
556
639
|
}
|
|
557
640
|
|
|
641
|
+
main:has(.form-footer) {
|
|
642
|
+
margin-bottom: -1.5rem;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.form-footer {
|
|
646
|
+
position: sticky;
|
|
647
|
+
bottom: 0;
|
|
648
|
+
padding-bottom: 1.5rem;
|
|
649
|
+
background: var(--background);
|
|
650
|
+
}
|
|
651
|
+
|
|
558
652
|
.git-status {
|
|
559
653
|
width: 1.75rem;
|
|
560
654
|
height: 1.75rem;
|
|
File without changes
|