@kyro-cms/admin 0.9.5 → 0.9.7

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.
Files changed (35) hide show
  1. package/dist/index.cjs +659 -684
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +54 -51
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.js +660 -685
  6. package/dist/index.js.map +1 -1
  7. package/package.json +2 -2
  8. package/src/components/ActionBar.tsx +172 -292
  9. package/src/components/Admin.tsx +7 -1
  10. package/src/components/AutoForm.tsx +573 -367
  11. package/src/components/DetailView.tsx +22 -47
  12. package/src/components/GraphQLPlayground.tsx +473 -223
  13. package/src/components/ListView.tsx +1 -1
  14. package/src/components/MediaGallery.tsx +2 -2
  15. package/src/components/RestPlayground.tsx +482 -519
  16. package/src/components/blocks/AccordionBlock.tsx +1 -1
  17. package/src/components/blocks/ArrayBlock.tsx +1 -1
  18. package/src/components/blocks/ChildBlocksTree.tsx +6 -6
  19. package/src/components/blocks/CodeBlock.tsx +1 -1
  20. package/src/components/blocks/FileBlock.tsx +1 -1
  21. package/src/components/blocks/HeroBlock.tsx +1 -1
  22. package/src/components/blocks/ListBlock.tsx +1 -1
  23. package/src/components/blocks/RelationshipBlock.tsx +1 -1
  24. package/src/components/blocks/RichTextBlock.tsx +1 -1
  25. package/src/components/blocks/VideoBlock.tsx +1 -1
  26. package/src/components/fields/BlocksField.tsx +5 -5
  27. package/src/components/fields/RichTextField.tsx +3 -1
  28. package/src/components/ui/SplitButton.tsx +1 -1
  29. package/src/components/ui/Toast.tsx +2 -1
  30. package/src/layouts/AdminLayout.astro +16 -1
  31. package/src/pages/graphql-explorer.astro +7 -51
  32. package/src/pages/graphql.astro +7 -119
  33. package/src/pages/index.astro +4 -63
  34. package/src/pages/rest-playground.astro +3 -29
  35. package/src/styles/main.css +53 -43
@@ -94,6 +94,8 @@
94
94
  --kyro-input-border: #1e293b;
95
95
 
96
96
  --kyro-black: #ffffff;
97
+ --kyro-black-light: #f3f4f6;
98
+ --kyro-black-hover: #e5e7eb;
97
99
  --kyro-gray-50: #1a2332;
98
100
  --kyro-gray-100: #1e293b;
99
101
  --kyro-gray-200: #334155;
@@ -417,7 +419,7 @@
417
419
 
418
420
  .kyro-btn-danger:hover:not(:disabled) {
419
421
  background: var(--kyro-gray-900);
420
- color: white;
422
+ color: var(--kyro-sidebar-text-active);
421
423
  }
422
424
 
423
425
  .kyro-btn-ghost {
@@ -431,14 +433,13 @@
431
433
  }
432
434
 
433
435
  .kyro-btn-success {
434
- background: #10b981;
436
+ background: var(--kyro-success);
435
437
  color: white;
436
- border-color: #10b981;
438
+ border-color: var(--kyro-success);
437
439
  }
438
440
 
439
441
  .kyro-btn-success:hover:not(:disabled) {
440
- background: #059669;
441
- border-color: #059669;
442
+ filter: brightness(0.85);
442
443
  }
443
444
 
444
445
  .kyro-btn-success:disabled {
@@ -448,14 +449,13 @@
448
449
  }
449
450
 
450
451
  .kyro-btn-warning {
451
- background: #f59e0b;
452
+ background: var(--kyro-warning);
452
453
  color: white;
453
- border-color: #f59e0b;
454
+ border-color: var(--kyro-warning);
454
455
  }
455
456
 
456
457
  .kyro-btn-warning:hover:not(:disabled) {
457
- background: #d97706;
458
- border-color: #d97706;
458
+ filter: brightness(0.85);
459
459
  }
460
460
 
461
461
  /* Cards & Tiles */
@@ -1393,14 +1393,14 @@
1393
1393
  color: var(--kyro-text-secondary);
1394
1394
  }
1395
1395
 
1396
- /* Toast — Subtle Modern */
1396
+ /* Toast — Colored Flat */
1397
1397
  .kyro-toasts-container {
1398
1398
  position: fixed;
1399
1399
  bottom: 16px;
1400
1400
  right: 16px;
1401
1401
  display: flex;
1402
1402
  flex-direction: column;
1403
- gap: 8px;
1403
+ gap: 6px;
1404
1404
  z-index: 9999;
1405
1405
  pointer-events: none;
1406
1406
  }
@@ -1408,34 +1408,25 @@
1408
1408
  .kyro-toast {
1409
1409
  display: flex;
1410
1410
  align-items: center;
1411
- gap: 10px;
1411
+ gap: 8px;
1412
1412
  min-width: 240px;
1413
1413
  max-width: 340px;
1414
- padding: 12px 14px;
1415
- border-radius: 12px;
1414
+ padding: 8px 10px;
1415
+ color: white;
1416
+ border-radius: 8px;
1416
1417
  box-shadow:
1417
- 0 4px 12px rgba(0, 0, 0, 0.06),
1418
- 0 8px 24px rgba(0, 0, 0, 0.04);
1418
+ 0 2px 4px -1px rgba(0, 0, 0, 0.08),
1419
+ 0 8px 16px -4px rgba(0, 0, 0, 0.15),
1420
+ 0 16px 24px -8px rgba(0, 0, 0, 0.2);
1419
1421
  pointer-events: auto;
1420
1422
  position: relative;
1421
- overflow: hidden;
1422
- border: 1px solid var(--kyro-border);
1423
- background: var(--kyro-surface);
1423
+ transition: box-shadow 0.2s ease;
1424
1424
  }
1425
1425
 
1426
- .kyro-toast::before {
1427
- content: '';
1428
- position: absolute;
1429
- left: 0;
1430
- top: 0;
1431
- bottom: 0;
1432
- width: 3px;
1433
- }
1434
-
1435
- .kyro-toast-success::before { background: var(--kyro-success); }
1436
- .kyro-toast-error::before { background: var(--kyro-danger); }
1437
- .kyro-toast-warning::before { background: var(--kyro-warning); }
1438
- .kyro-toast-info::before { background: #6366f1; }
1426
+ .kyro-toast-success { background: #16a34a; }
1427
+ .kyro-toast-error { background: #dc2626; }
1428
+ .kyro-toast-warning { background: #d97706; }
1429
+ .kyro-toast-info { background: #4f46e5; }
1439
1430
 
1440
1431
  .kyro-toast-icon-container {
1441
1432
  flex-shrink: 0;
@@ -1444,13 +1435,9 @@
1444
1435
  display: flex;
1445
1436
  align-items: center;
1446
1437
  justify-content: center;
1438
+ color: rgba(255, 255, 255, 0.85);
1447
1439
  }
1448
1440
 
1449
- .kyro-toast-success .kyro-toast-icon-container { color: var(--kyro-success); }
1450
- .kyro-toast-error .kyro-toast-icon-container { color: var(--kyro-danger); }
1451
- .kyro-toast-warning .kyro-toast-icon-container { color: var(--kyro-warning); }
1452
- .kyro-toast-info .kyro-toast-icon-container { color: #6366f1; }
1453
-
1454
1441
  .kyro-toast-content {
1455
1442
  flex: 1;
1456
1443
  min-width: 0;
@@ -1460,25 +1447,25 @@
1460
1447
  font-size: 12px;
1461
1448
  font-weight: 500;
1462
1449
  letter-spacing: -0.01em;
1463
- color: var(--kyro-text-primary);
1450
+ color: rgba(255, 255, 255, 0.92);
1464
1451
  line-height: 1.3;
1465
1452
  }
1466
1453
 
1467
1454
  .kyro-toast-close {
1468
1455
  padding: 3px;
1469
1456
  border-radius: 4px;
1470
- color: var(--kyro-text-muted);
1457
+ color: rgba(255, 255, 255, 0.35);
1471
1458
  transition: all 0.15s ease;
1472
1459
  flex-shrink: 0;
1473
- opacity: 0.4;
1474
1460
  }
1475
1461
 
1476
1462
  .kyro-toast-close:hover {
1477
- background: var(--kyro-surface-accent);
1478
- opacity: 1;
1479
- color: var(--kyro-text-primary);
1463
+ background: rgba(255, 255, 255, 0.15);
1464
+ color: white;
1480
1465
  }
1481
1466
 
1467
+ .kyro-toast-accent { display: none; }
1468
+
1482
1469
  /* Spinner — Monochrome */
1483
1470
  .kyro-spinner {
1484
1471
  animation: spin 0.8s linear infinite;
@@ -2068,4 +2055,27 @@
2068
2055
  /* Ensure NodeViews render correctly within ProseMirror */
2069
2056
  .tiptap-editor-wrapper .ProseMirror .node--component {
2070
2057
  display: block;
2058
+ }
2059
+
2060
+ /* Floating action button */
2061
+ #kyro-fab {
2062
+ animation: fab-enter 0.3s ease-out;
2063
+ }
2064
+
2065
+ #kyro-fab.fab-hidden {
2066
+ opacity: 0;
2067
+ transform: scale(0.8);
2068
+ pointer-events: none;
2069
+ transition: opacity 200ms ease, transform 200ms ease;
2070
+ }
2071
+
2072
+ @keyframes fab-enter {
2073
+ from {
2074
+ opacity: 0;
2075
+ transform: scale(0.5) translateY(16px);
2076
+ }
2077
+ to {
2078
+ opacity: 1;
2079
+ transform: scale(1) translateY(0);
2080
+ }
2071
2081
  }