create-start-serenojs 0.1.1 → 0.1.4
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 +7 -6
- package/package.json +1 -1
- package/templates/starter/.agents/skills/serenojs-schema/SKILL.md +10 -10
- package/templates/starter/.agents/skills/serenojs-schema/references/fields.md +30 -3
- package/templates/starter/README.md +14 -11
- package/templates/starter/package.json +1 -1
- package/templates/starter/public/images/showcase.svg +28 -0
- package/templates/starter/src/pages/index.tsx +300 -199
- package/templates/starter/src/schemas/index.ts +2 -2
- package/templates/starter/src/schemas/showcase.ts +101 -0
- package/templates/starter/src/styles.css +161 -120
- package/templates/starter/src/schemas/todos.ts +0 -38
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { CollectionDef } from "@eutobias/serenojs/config";
|
|
2
|
+
|
|
3
|
+
export const showcase: CollectionDef = {
|
|
4
|
+
slug: "showcase",
|
|
5
|
+
label: "Showcase",
|
|
6
|
+
icon: "layout",
|
|
7
|
+
description: "One example of every SerenoJS field type.",
|
|
8
|
+
access: { read: "public", create: "public", update: "public", delete: "public" },
|
|
9
|
+
list: ["id", "title", "category", "published", "rating", "releaseDate", "updatedAt"],
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
name: "title",
|
|
13
|
+
label: "Title",
|
|
14
|
+
type: "text",
|
|
15
|
+
required: true,
|
|
16
|
+
localized: false,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "contactEmail",
|
|
20
|
+
label: "Contact email",
|
|
21
|
+
type: "email",
|
|
22
|
+
localized: false,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "summary",
|
|
26
|
+
label: "Summary",
|
|
27
|
+
type: "textarea",
|
|
28
|
+
localized: false,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "body",
|
|
32
|
+
label: "Body",
|
|
33
|
+
type: "richtext",
|
|
34
|
+
localized: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "rating",
|
|
38
|
+
label: "Rating",
|
|
39
|
+
type: "number",
|
|
40
|
+
min: 0,
|
|
41
|
+
max: 5,
|
|
42
|
+
defaultValue: 3,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "published",
|
|
46
|
+
label: "Published",
|
|
47
|
+
type: "boolean",
|
|
48
|
+
defaultValue: true,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "category",
|
|
52
|
+
label: "Category",
|
|
53
|
+
type: "select",
|
|
54
|
+
defaultValue: "design",
|
|
55
|
+
options: [
|
|
56
|
+
{ label: "Design", value: "design" },
|
|
57
|
+
{ label: "Engineering", value: "engineering" },
|
|
58
|
+
{ label: "Marketing", value: "marketing" },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "releaseDate",
|
|
63
|
+
label: "Release date",
|
|
64
|
+
type: "date",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "related",
|
|
68
|
+
label: "Related items",
|
|
69
|
+
type: "relation",
|
|
70
|
+
relation: { to: "showcase", type: "many-to-many" },
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "cover",
|
|
74
|
+
label: "Cover",
|
|
75
|
+
type: "media",
|
|
76
|
+
accept: ["image/*"],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "gallery",
|
|
80
|
+
label: "Gallery",
|
|
81
|
+
type: "media-list",
|
|
82
|
+
accept: ["image/*"],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "features",
|
|
86
|
+
label: "Features",
|
|
87
|
+
type: "list",
|
|
88
|
+
localized: false,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "links",
|
|
92
|
+
label: "Links",
|
|
93
|
+
type: "object-list",
|
|
94
|
+
localized: false,
|
|
95
|
+
fields: [
|
|
96
|
+
{ name: "label", label: "Label", type: "text", required: true },
|
|
97
|
+
{ name: "url", label: "URL", type: "text" },
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
};
|
|
@@ -253,7 +253,8 @@ body::before {
|
|
|
253
253
|
border-bottom: 1px solid var(--glass-border);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.composer label
|
|
256
|
+
.composer label,
|
|
257
|
+
.composer-label {
|
|
257
258
|
display: block;
|
|
258
259
|
margin-bottom: 8px;
|
|
259
260
|
color: var(--muted);
|
|
@@ -314,7 +315,11 @@ body::before {
|
|
|
314
315
|
/* Buttons */
|
|
315
316
|
|
|
316
317
|
.btn {
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
317
321
|
padding: 11px 16px;
|
|
322
|
+
text-decoration: none;
|
|
318
323
|
border-radius: 12px;
|
|
319
324
|
border: 1px solid transparent;
|
|
320
325
|
font: inherit;
|
|
@@ -404,121 +409,91 @@ body::before {
|
|
|
404
409
|
font-size: 11.5px;
|
|
405
410
|
}
|
|
406
411
|
|
|
407
|
-
/*
|
|
412
|
+
/* Showcase */
|
|
408
413
|
|
|
409
|
-
.
|
|
414
|
+
.showcase-list {
|
|
410
415
|
display: grid;
|
|
411
|
-
gap:
|
|
412
|
-
margin: 0;
|
|
413
|
-
padding: 0;
|
|
414
|
-
list-style: none;
|
|
416
|
+
gap: 14px;
|
|
415
417
|
}
|
|
416
418
|
|
|
417
|
-
.
|
|
418
|
-
|
|
419
|
-
align-items: center;
|
|
420
|
-
gap: 14px;
|
|
421
|
-
padding: 14px 16px;
|
|
419
|
+
.showcase-card {
|
|
420
|
+
padding: 18px;
|
|
422
421
|
border-radius: var(--radius-md);
|
|
423
422
|
border: 1px solid var(--glass-border);
|
|
424
423
|
background: var(--glass-strong);
|
|
425
424
|
box-shadow: inset 0 1px 0 var(--glass-highlight);
|
|
426
|
-
transition:
|
|
427
|
-
border-color 0.2s ease,
|
|
428
|
-
opacity 0.2s ease,
|
|
429
|
-
transform 0.2s ease;
|
|
430
425
|
}
|
|
431
426
|
|
|
432
|
-
.
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
427
|
+
.showcase-head {
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: flex-start;
|
|
430
|
+
justify-content: space-between;
|
|
431
|
+
gap: 16px;
|
|
432
|
+
padding-bottom: 14px;
|
|
433
|
+
border-bottom: 1px solid var(--glass-border);
|
|
438
434
|
}
|
|
439
435
|
|
|
440
|
-
.
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
436
|
+
.showcase-head h2 {
|
|
437
|
+
margin: 0;
|
|
438
|
+
font-size: 18px;
|
|
439
|
+
line-height: 1.25;
|
|
440
|
+
letter-spacing: -0.02em;
|
|
445
441
|
}
|
|
446
442
|
|
|
447
|
-
.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
443
|
+
.showcase-summary {
|
|
444
|
+
margin: 6px 0 0;
|
|
445
|
+
color: var(--muted);
|
|
446
|
+
font-size: 13.5px;
|
|
447
|
+
line-height: 1.5;
|
|
452
448
|
}
|
|
453
449
|
|
|
454
|
-
.
|
|
455
|
-
width: 22px;
|
|
456
|
-
height: 22px;
|
|
450
|
+
.field-grid {
|
|
457
451
|
display: grid;
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
background: var(--input-bg);
|
|
462
|
-
transition:
|
|
463
|
-
background 0.2s ease,
|
|
464
|
-
border-color 0.2s ease;
|
|
452
|
+
grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
|
|
453
|
+
gap: 14px 18px;
|
|
454
|
+
margin: 16px 0 0;
|
|
465
455
|
}
|
|
466
456
|
|
|
467
|
-
.
|
|
468
|
-
|
|
469
|
-
color: var(--accent-contrast);
|
|
470
|
-
font-size: 12px;
|
|
471
|
-
font-weight: 700;
|
|
472
|
-
opacity: 0;
|
|
473
|
-
transform: scale(0.5);
|
|
474
|
-
transition:
|
|
475
|
-
opacity 0.15s ease,
|
|
476
|
-
transform 0.15s ease;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.check input:checked + .box {
|
|
480
|
-
background: var(--accent);
|
|
481
|
-
border-color: var(--accent);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.check input:checked + .box::after {
|
|
485
|
-
opacity: 1;
|
|
486
|
-
transform: scale(1);
|
|
457
|
+
.field {
|
|
458
|
+
min-width: 0;
|
|
487
459
|
}
|
|
488
460
|
|
|
489
|
-
.
|
|
490
|
-
|
|
491
|
-
|
|
461
|
+
.field dt {
|
|
462
|
+
margin-bottom: 5px;
|
|
463
|
+
color: var(--faint);
|
|
464
|
+
font-family: var(--font-mono);
|
|
465
|
+
font-size: 10.5px;
|
|
466
|
+
font-weight: 600;
|
|
467
|
+
letter-spacing: 0.08em;
|
|
468
|
+
text-transform: uppercase;
|
|
492
469
|
}
|
|
493
470
|
|
|
494
|
-
.
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
471
|
+
.field-type {
|
|
472
|
+
margin-left: 4px;
|
|
473
|
+
padding: 1px 5px;
|
|
474
|
+
border-radius: 999px;
|
|
475
|
+
background: rgba(127, 127, 127, 0.12);
|
|
476
|
+
color: var(--muted);
|
|
477
|
+
font-size: 9.5px;
|
|
478
|
+
letter-spacing: 0.04em;
|
|
479
|
+
text-transform: lowercase;
|
|
500
480
|
}
|
|
501
481
|
|
|
502
|
-
.
|
|
503
|
-
|
|
504
|
-
|
|
482
|
+
.field dd {
|
|
483
|
+
margin: 0;
|
|
484
|
+
color: var(--text);
|
|
485
|
+
font-size: 13.5px;
|
|
486
|
+
line-height: 1.45;
|
|
505
487
|
overflow-wrap: anywhere;
|
|
506
488
|
}
|
|
507
489
|
|
|
508
|
-
.
|
|
509
|
-
color: var(--
|
|
510
|
-
text-decoration: line-through;
|
|
511
|
-
text-decoration-thickness: 1.5px;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.todo-meta {
|
|
515
|
-
display: flex;
|
|
516
|
-
align-items: center;
|
|
517
|
-
gap: 8px;
|
|
518
|
-
flex-wrap: wrap;
|
|
490
|
+
.field dd a {
|
|
491
|
+
color: var(--accent);
|
|
519
492
|
}
|
|
520
493
|
|
|
521
494
|
.chip {
|
|
495
|
+
display: inline-flex;
|
|
496
|
+
align-items: center;
|
|
522
497
|
padding: 3px 7px;
|
|
523
498
|
border-radius: 999px;
|
|
524
499
|
border: 1px solid var(--glass-border);
|
|
@@ -530,36 +505,39 @@ body::before {
|
|
|
530
505
|
text-transform: uppercase;
|
|
531
506
|
}
|
|
532
507
|
|
|
533
|
-
.chip-
|
|
508
|
+
.chip-on {
|
|
534
509
|
border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
|
|
535
510
|
background: var(--accent-soft);
|
|
536
511
|
color: var(--accent);
|
|
537
512
|
}
|
|
538
513
|
|
|
539
|
-
.
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
514
|
+
.related-list,
|
|
515
|
+
.gallery {
|
|
516
|
+
display: flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
gap: 6px;
|
|
519
|
+
flex-wrap: wrap;
|
|
543
520
|
}
|
|
544
521
|
|
|
545
|
-
.
|
|
522
|
+
.media-thumb {
|
|
546
523
|
width: 100%;
|
|
547
|
-
|
|
524
|
+
max-width: 180px;
|
|
548
525
|
border-radius: var(--radius-sm);
|
|
549
|
-
border: 1px solid var(--
|
|
526
|
+
border: 1px solid var(--glass-border);
|
|
550
527
|
background: var(--input-bg);
|
|
551
|
-
|
|
552
|
-
font: inherit;
|
|
553
|
-
font-size: 14.5px;
|
|
554
|
-
outline: none;
|
|
555
|
-
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
528
|
+
object-fit: cover;
|
|
556
529
|
}
|
|
557
530
|
|
|
558
|
-
.
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
531
|
+
.gallery .media-thumb {
|
|
532
|
+
width: 58px;
|
|
533
|
+
height: 58px;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.object-links {
|
|
537
|
+
display: grid;
|
|
538
|
+
gap: 3px;
|
|
539
|
+
margin: 0;
|
|
540
|
+
padding-left: 16px;
|
|
563
541
|
}
|
|
564
542
|
|
|
565
543
|
/* States */
|
|
@@ -605,14 +583,6 @@ body::before {
|
|
|
605
583
|
background: var(--glass-strong);
|
|
606
584
|
}
|
|
607
585
|
|
|
608
|
-
.skeleton-dot {
|
|
609
|
-
width: 22px;
|
|
610
|
-
height: 22px;
|
|
611
|
-
flex: none;
|
|
612
|
-
border-radius: 7px;
|
|
613
|
-
background: var(--input-bg);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
586
|
.skeleton-line {
|
|
617
587
|
position: relative;
|
|
618
588
|
width: min(60%, 320px);
|
|
@@ -724,18 +694,89 @@ body::before {
|
|
|
724
694
|
width: 100%;
|
|
725
695
|
}
|
|
726
696
|
|
|
727
|
-
.
|
|
728
|
-
|
|
729
|
-
flex-wrap: wrap;
|
|
697
|
+
.showcase-head {
|
|
698
|
+
flex-direction: column;
|
|
730
699
|
}
|
|
731
700
|
|
|
732
|
-
.
|
|
701
|
+
.showcase-head .btn {
|
|
733
702
|
width: 100%;
|
|
734
|
-
justify-content: flex-end;
|
|
735
|
-
padding-left: 36px;
|
|
736
703
|
}
|
|
704
|
+
}
|
|
737
705
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
706
|
+
/* Markdown preview */
|
|
707
|
+
|
|
708
|
+
.serenojs-markdown {
|
|
709
|
+
line-height: 1.6;
|
|
710
|
+
overflow-wrap: anywhere;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.serenojs-markdown > :first-child {
|
|
714
|
+
margin-top: 0;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.serenojs-markdown > :last-child {
|
|
718
|
+
margin-bottom: 0;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.serenojs-markdown h1,
|
|
722
|
+
.serenojs-markdown h2,
|
|
723
|
+
.serenojs-markdown h3 {
|
|
724
|
+
margin: 0.9em 0 0.35em;
|
|
725
|
+
font-weight: 650;
|
|
726
|
+
line-height: 1.25;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.serenojs-markdown h1 {
|
|
730
|
+
font-size: 1.35em;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.serenojs-markdown h2 {
|
|
734
|
+
font-size: 1.2em;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.serenojs-markdown h3 {
|
|
738
|
+
font-size: 1.05em;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.serenojs-markdown p,
|
|
742
|
+
.serenojs-markdown ul,
|
|
743
|
+
.serenojs-markdown ol,
|
|
744
|
+
.serenojs-markdown blockquote,
|
|
745
|
+
.serenojs-markdown pre {
|
|
746
|
+
margin: 0.55em 0;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.serenojs-markdown ul,
|
|
750
|
+
.serenojs-markdown ol {
|
|
751
|
+
padding-left: 1.35em;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.serenojs-markdown blockquote {
|
|
755
|
+
padding-left: 0.9em;
|
|
756
|
+
border-left: 3px solid var(--glass-border);
|
|
757
|
+
color: var(--muted);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.serenojs-markdown code {
|
|
761
|
+
padding: 0.1em 0.3em;
|
|
762
|
+
border-radius: 4px;
|
|
763
|
+
background: rgba(127, 127, 127, 0.12);
|
|
764
|
+
font-family: var(--font-mono);
|
|
765
|
+
font-size: 0.9em;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.serenojs-markdown pre {
|
|
769
|
+
overflow-x: auto;
|
|
770
|
+
padding: 0.8em;
|
|
771
|
+
border-radius: 6px;
|
|
772
|
+
background: var(--glass-strong);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.serenojs-markdown pre code {
|
|
776
|
+
padding: 0;
|
|
777
|
+
background: transparent;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
.serenojs-markdown a {
|
|
781
|
+
color: var(--accent);
|
|
741
782
|
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { CollectionDef } from "@eutobias/serenojs/config";
|
|
2
|
-
|
|
3
|
-
export const todos: CollectionDef = {
|
|
4
|
-
slug: "todos",
|
|
5
|
-
label: "To Dos",
|
|
6
|
-
icon: "box",
|
|
7
|
-
description: "Example task list.",
|
|
8
|
-
access: { read: "public", create: "public", update: "public", delete: "public" },
|
|
9
|
-
list: ["id", "title", "priority", "done", "dueDate", "createdAt"],
|
|
10
|
-
fields: [
|
|
11
|
-
{
|
|
12
|
-
name: "title",
|
|
13
|
-
label: "Title",
|
|
14
|
-
type: "text",
|
|
15
|
-
required: true,
|
|
16
|
-
localized: false,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: "description",
|
|
20
|
-
label: "Description",
|
|
21
|
-
type: "textarea",
|
|
22
|
-
localized: false,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: "priority",
|
|
26
|
-
label: "Priority",
|
|
27
|
-
type: "select",
|
|
28
|
-
defaultValue: "medium",
|
|
29
|
-
options: [
|
|
30
|
-
{ label: "Low", value: "low" },
|
|
31
|
-
{ label: "Medium", value: "medium" },
|
|
32
|
-
{ label: "High", value: "high" },
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
{ name: "done", label: "Done", type: "boolean", defaultValue: false },
|
|
36
|
-
{ name: "dueDate", label: "Due Date", type: "date" },
|
|
37
|
-
],
|
|
38
|
-
};
|