@kyro-cms/admin 0.3.2 → 0.3.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.
Files changed (242) hide show
  1. package/dist/EditorClient-XEUOVAAC.js +466 -0
  2. package/dist/EditorClient-XEUOVAAC.js.map +1 -0
  3. package/dist/EditorClient-YLCGVDXY.cjs +468 -0
  4. package/dist/EditorClient-YLCGVDXY.cjs.map +1 -0
  5. package/dist/chunk-7KPIUCGT.js +384 -0
  6. package/dist/chunk-7KPIUCGT.js.map +1 -0
  7. package/dist/chunk-GOACG6R7.cjs +473 -0
  8. package/dist/chunk-GOACG6R7.cjs.map +1 -0
  9. package/dist/index.cjs +14861 -0
  10. package/dist/index.cjs.map +1 -0
  11. package/dist/index.css +1661 -0
  12. package/dist/index.css.map +1 -0
  13. package/dist/index.d.ts +563 -0
  14. package/dist/index.js +14784 -0
  15. package/dist/index.js.map +1 -0
  16. package/package.json +19 -19
  17. package/src/components/ActionBar.tsx +7 -43
  18. package/src/components/Admin.tsx +138 -277
  19. package/src/components/ApiKeysManager.tsx +428 -419
  20. package/src/components/AuditLogsPage.tsx +35 -39
  21. package/src/components/AuthBridge.tsx +51 -0
  22. package/src/components/AutoForm.tsx +495 -1230
  23. package/src/components/BrandingHub.tsx +18 -19
  24. package/src/components/BulkActionsBar.tsx +1 -1
  25. package/src/components/CreateView.tsx +22 -36
  26. package/src/components/Dashboard.tsx +60 -84
  27. package/src/components/DetailView.tsx +113 -91
  28. package/src/components/DeveloperCenter.tsx +200 -198
  29. package/src/components/FieldRenderer.tsx +206 -0
  30. package/src/components/GraphQLPlayground.tsx +340 -480
  31. package/src/components/ListView.tsx +828 -254
  32. package/src/components/LoginPage.tsx +3 -4
  33. package/src/components/MarketplaceManager.tsx +254 -0
  34. package/src/components/MediaGallery.tsx +856 -1192
  35. package/src/components/PluginsManager.tsx +277 -0
  36. package/src/components/RestPlayground.tsx +398 -560
  37. package/src/components/SessionsManager.tsx +211 -0
  38. package/src/components/Sidebar.astro +179 -151
  39. package/src/components/ThemeProvider.tsx +7 -161
  40. package/src/components/UserManagement.tsx +162 -146
  41. package/src/components/UserMenu.tsx +110 -0
  42. package/src/components/WebhookManager.tsx +305 -367
  43. package/src/components/blocks/AccordionBlock.tsx +4 -4
  44. package/src/components/blocks/ArrayBlock.tsx +3 -3
  45. package/src/components/blocks/BlockEditModal.tsx +8 -8
  46. package/src/components/blocks/BlockWrapper.tsx +61 -0
  47. package/src/components/blocks/ButtonBlock.tsx +4 -4
  48. package/src/components/blocks/ChildBlocksTree.tsx +23 -25
  49. package/src/components/blocks/CodeBlock.tsx +15 -15
  50. package/src/components/blocks/ColumnsBlock.tsx +6 -44
  51. package/src/components/blocks/DividerBlock.tsx +3 -3
  52. package/src/components/blocks/FileBlock.tsx +4 -4
  53. package/src/components/blocks/HeadingBlock.tsx +6 -38
  54. package/src/components/blocks/HeroBlock.tsx +4 -4
  55. package/src/components/blocks/ImageBlock.tsx +4 -4
  56. package/src/components/blocks/LinkBlock.tsx +4 -4
  57. package/src/components/blocks/ListBlock.tsx +3 -3
  58. package/src/components/blocks/ParagraphBlock.tsx +12 -42
  59. package/src/components/blocks/RelationshipBlock.tsx +4 -4
  60. package/src/components/blocks/RichTextBlock.tsx +4 -4
  61. package/src/components/blocks/VStackBlock.tsx +5 -37
  62. package/src/components/blocks/VideoBlock.tsx +4 -4
  63. package/src/components/blocks/types.ts +11 -0
  64. package/src/components/fields/AccordionField.tsx +1 -1
  65. package/src/components/fields/ArrayField.tsx +2 -2
  66. package/src/components/fields/ArrayLayout.tsx +93 -0
  67. package/src/components/fields/BlocksField.tsx +122 -111
  68. package/src/components/fields/ButtonField.tsx +1 -1
  69. package/src/components/fields/CheckboxField.tsx +14 -15
  70. package/src/components/fields/ChildrenField.tsx +2 -2
  71. package/src/components/fields/CodeField.tsx +3 -3
  72. package/src/components/fields/ColumnsField.tsx +2 -2
  73. package/src/components/fields/DateField.tsx +13 -26
  74. package/src/components/fields/EditorClient.tsx +26 -28
  75. package/src/components/fields/FieldLayout.tsx +52 -0
  76. package/src/components/fields/GroupLayout.tsx +35 -0
  77. package/src/components/fields/JSONField.tsx +7 -7
  78. package/src/components/fields/LinkField.tsx +1 -1
  79. package/src/components/fields/MarkdownField.tsx +1 -1
  80. package/src/components/fields/NumberField.tsx +13 -26
  81. package/src/components/fields/PortableTextField.tsx +4 -4
  82. package/src/components/fields/PortableTextRenderer.tsx +1 -1
  83. package/src/components/fields/RelationshipBlockField.tsx +31 -23
  84. package/src/components/fields/RelationshipField.tsx +14 -14
  85. package/src/components/fields/SelectField.tsx +17 -26
  86. package/src/components/fields/TabsLayout.tsx +69 -0
  87. package/src/components/fields/TextField.tsx +85 -38
  88. package/src/components/fields/UploadField.tsx +71 -41
  89. package/src/components/fields/VideoField.tsx +1 -1
  90. package/src/components/fields/extensions/blockComponents.tsx +2 -2
  91. package/src/components/fields/extensions/blocksStore.ts +207 -193
  92. package/src/components/fields/types.ts +22 -0
  93. package/src/components/layout/Layout.tsx +1 -1
  94. package/src/components/ui/ActionMenu.tsx +63 -0
  95. package/src/components/ui/Badge.tsx +59 -5
  96. package/src/components/ui/BlockDrawer.tsx +4 -5
  97. package/src/components/ui/CommandPalette.tsx +58 -36
  98. package/src/components/ui/CommandPaletteWrapper.tsx +18 -17
  99. package/src/components/ui/Dropdown.tsx +18 -16
  100. package/src/components/ui/EmptyState.tsx +25 -0
  101. package/src/components/ui/GlobalModal.tsx +49 -0
  102. package/src/components/ui/IconButton.tsx +44 -0
  103. package/src/components/ui/Modal.tsx +19 -20
  104. package/src/components/ui/PageHeader.tsx +158 -0
  105. package/src/components/ui/Pagination.tsx +61 -0
  106. package/src/components/ui/PromptModal.tsx +1 -1
  107. package/src/components/ui/SearchInput.tsx +57 -0
  108. package/src/components/ui/SeoPreview.tsx +31 -0
  109. package/src/components/ui/SessionModal.tsx +0 -0
  110. package/src/components/ui/SlidePanel.tsx +2 -0
  111. package/src/components/ui/Toast.tsx +65 -122
  112. package/src/components/ui/Toaster.tsx +18 -0
  113. package/src/components/ui/icons.tsx +112 -0
  114. package/src/components/users/UserDetail.tsx +290 -0
  115. package/src/components/users/UserForm.tsx +242 -0
  116. package/src/components/users/UsersList.tsx +338 -0
  117. package/src/env.d.ts +13 -13
  118. package/src/fields/index.ts +2 -1
  119. package/src/global.d.ts +7 -0
  120. package/src/hooks/data.ts +2 -9
  121. package/src/hooks/useAsyncData.ts +36 -0
  122. package/src/hooks/useAutoFormState.ts +527 -0
  123. package/src/hooks/useSelection.ts +49 -0
  124. package/src/hooks/useSession.ts +0 -0
  125. package/src/index.ts +11 -1
  126. package/src/integration.ts +86 -11
  127. package/src/kyro-cms.d.ts +209 -0
  128. package/src/layouts/AdminLayout.astro +128 -11
  129. package/src/layouts/AuthLayout.astro +21 -5
  130. package/src/lib/api.ts +175 -55
  131. package/src/lib/autoform-store.ts +435 -0
  132. package/src/lib/config.ts +82 -34
  133. package/src/lib/createRegistry.ts +29 -0
  134. package/src/lib/default-kyro-config.ts +4 -0
  135. package/src/lib/globals.ts +50 -0
  136. package/src/lib/media-utils.ts +18 -0
  137. package/src/lib/object-utils.ts +77 -0
  138. package/src/lib/paths.ts +61 -0
  139. package/src/lib/stores/index.ts +370 -0
  140. package/src/lib/types.ts +43 -0
  141. package/src/lib/useResourceManager.ts +105 -0
  142. package/src/pages/403.astro +67 -0
  143. package/src/pages/[collection]/[id].astro +14 -180
  144. package/src/pages/[collection]/index.astro +11 -6
  145. package/src/pages/api-explorer.astro +173 -0
  146. package/src/pages/audit/index.astro +2 -0
  147. package/src/pages/auth/login.astro +122 -0
  148. package/src/pages/auth/register.astro +167 -0
  149. package/src/pages/graphql-explorer.astro +59 -0
  150. package/src/pages/{admin/graphql.astro → graphql.astro} +51 -17
  151. package/src/pages/index.astro +577 -0
  152. package/src/pages/index_ALT.astro +3 -0
  153. package/src/pages/keys.astro +11 -0
  154. package/src/pages/marketplace.astro +11 -0
  155. package/src/pages/media.astro +3 -0
  156. package/src/pages/plugins.astro +8 -0
  157. package/src/pages/preview/[collection]/[id].astro +188 -123
  158. package/src/pages/rest-playground.astro +62 -0
  159. package/src/pages/roles/index.astro +183 -76
  160. package/src/pages/sessions.astro +8 -0
  161. package/src/pages/settings/[slug].astro +92 -114
  162. package/src/pages/settings/index.astro +5 -3
  163. package/src/pages/users/[id].astro +25 -154
  164. package/src/pages/users/index.astro +19 -130
  165. package/src/pages/users/new.astro +9 -86
  166. package/src/pages/webhooks.astro +11 -0
  167. package/src/routes.ts +80 -0
  168. package/src/styles/main.css +119 -79
  169. package/src/theme/tokens.ts +1 -0
  170. package/src/vite-env.d.ts +14 -0
  171. package/src/collections/auth/index.ts +0 -155
  172. package/src/collections/portfolio/index.ts +0 -343
  173. package/src/components/ApiExplorer.tsx +0 -325
  174. package/src/components/EnhancedListView.tsx +0 -889
  175. package/src/components/GraphQLExplorer.tsx +0 -675
  176. package/src/components/Icons.tsx +0 -23
  177. package/src/components/StatusBadge.tsx +0 -76
  178. package/src/lib/MediaService.ts +0 -541
  179. package/src/lib/auth/sqlite-adapter.ts +0 -319
  180. package/src/lib/dataStore.ts +0 -226
  181. package/src/lib/db/adapter.ts +0 -54
  182. package/src/lib/db/drizzle-mysql-adapter.ts +0 -194
  183. package/src/lib/db/drizzle-mysql-auth-adapter.ts +0 -327
  184. package/src/lib/db/drizzle-postgres-adapter.ts +0 -202
  185. package/src/lib/db/drizzle-postgres-auth-adapter.ts +0 -304
  186. package/src/lib/db/drizzle-sqlite-adapter.ts +0 -227
  187. package/src/lib/db/drizzle-sqlite-auth-adapter.ts +0 -548
  188. package/src/lib/db/index.ts +0 -449
  189. package/src/lib/db/mongodb-adapter.ts +0 -207
  190. package/src/lib/db/mongodb-auth-adapter.ts +0 -305
  191. package/src/lib/db/schema/mysql-auth.ts +0 -113
  192. package/src/lib/db/schema/mysql-content.ts +0 -20
  193. package/src/lib/db/schema/postgres-auth.ts +0 -116
  194. package/src/lib/db/schema/postgres-content.ts +0 -35
  195. package/src/lib/db/schema/postgres-media.ts +0 -52
  196. package/src/lib/db/schema/postgres-settings.ts +0 -11
  197. package/src/lib/db/schema/sqlite-auth.ts +0 -112
  198. package/src/lib/db/schema/sqlite-content.ts +0 -20
  199. package/src/lib/db/version-adapter.ts +0 -248
  200. package/src/lib/graphql/index.ts +0 -1
  201. package/src/lib/graphql/schema.ts +0 -443
  202. package/src/lib/rate-limit.ts +0 -267
  203. package/src/lib/storage.ts +0 -374
  204. package/src/lib/store.ts +0 -85
  205. package/src/middleware.ts +0 -177
  206. package/src/pages/admin/api-explorer.astro +0 -98
  207. package/src/pages/admin/graphql-explorer.astro +0 -40
  208. package/src/pages/admin/index.astro +0 -286
  209. package/src/pages/admin/keys.astro +0 -8
  210. package/src/pages/admin/rest-playground.astro +0 -44
  211. package/src/pages/admin/webhooks.astro +0 -8
  212. package/src/pages/api/[collection]/[id]/publish.ts +0 -52
  213. package/src/pages/api/[collection]/[id]/unpublish.ts +0 -42
  214. package/src/pages/api/[collection]/[id]/versions.ts +0 -66
  215. package/src/pages/api/[collection]/[id].ts +0 -213
  216. package/src/pages/api/[collection]/index.ts +0 -209
  217. package/src/pages/api/auth/[id].ts +0 -121
  218. package/src/pages/api/auth/audit-logs.ts +0 -57
  219. package/src/pages/api/auth/login.ts +0 -211
  220. package/src/pages/api/auth/logout.ts +0 -66
  221. package/src/pages/api/auth/me.ts +0 -36
  222. package/src/pages/api/auth/refresh.ts +0 -119
  223. package/src/pages/api/auth/register.ts +0 -188
  224. package/src/pages/api/auth/users.ts +0 -97
  225. package/src/pages/api/collections.ts +0 -59
  226. package/src/pages/api/globals/[slug].ts +0 -42
  227. package/src/pages/api/graphql.ts +0 -90
  228. package/src/pages/api/health.ts +0 -426
  229. package/src/pages/api/keys/[id].ts +0 -26
  230. package/src/pages/api/keys/index.ts +0 -75
  231. package/src/pages/api/media/[id].ts +0 -309
  232. package/src/pages/api/media/folders.ts +0 -609
  233. package/src/pages/api/media/index.ts +0 -146
  234. package/src/pages/api/media/resize.ts +0 -267
  235. package/src/pages/api/search.ts +0 -82
  236. package/src/pages/api/slug-availability.ts +0 -70
  237. package/src/pages/api/storage-config.ts +0 -20
  238. package/src/pages/api/storage-status.ts +0 -206
  239. package/src/pages/api/upload.ts +0 -334
  240. package/src/pages/api/webhooks/index.ts +0 -71
  241. package/src/pages/login.astro +0 -82
  242. package/src/pages/register.astro +0 -102
@@ -1,5 +1,4 @@
1
1
  @import "tailwindcss";
2
- @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap");
3
2
  @custom-variant dark (&:where(.dark, .dark *));
4
3
 
5
4
  @source "../../src/**/*.{astro,html,js,jsx,ts,tsx}";
@@ -151,6 +150,7 @@
151
150
  from {
152
151
  transform: translateX(100%);
153
152
  }
153
+
154
154
  to {
155
155
  transform: translateX(0);
156
156
  }
@@ -169,6 +169,17 @@
169
169
  color 300ms ease;
170
170
  }
171
171
 
172
+ /* Hide scrollbars on all elements (scroll still works) */
173
+ * {
174
+ scrollbar-width: none;
175
+ -ms-overflow-style: none;
176
+ }
177
+
178
+ *::-webkit-scrollbar {
179
+ display: none;
180
+ }
181
+
182
+
172
183
  a,
173
184
  button,
174
185
  [role="button"],
@@ -177,8 +188,28 @@
177
188
  input[type="reset"] {
178
189
  cursor: pointer;
179
190
  }
191
+
192
+ /* Premium Utilities */
193
+ .kyro-glass {
194
+ background: rgba(255, 255, 255, 0.7);
195
+ backdrop-filter: blur(20px) saturate(180%);
196
+ -webkit-backdrop-filter: blur(20px) saturate(180%);
197
+ border: 1px solid rgba(255, 255, 255, 0.3);
198
+ }
199
+
200
+ .dark .kyro-glass {
201
+ background: rgba(11, 18, 34, 0.7);
202
+ border: 1px solid rgba(255, 255, 255, 0.05);
203
+ }
204
+
205
+ .font-bold {
206
+ font-weight: 900;
207
+ letter-spacing: -0.05em;
208
+ line-height: 1.1;
209
+ }
180
210
  }
181
211
 
212
+
182
213
  @layer components {
183
214
  .kyro-admin {
184
215
  display: flex;
@@ -227,7 +258,7 @@
227
258
  padding: 8px 20px;
228
259
  font-size: 11px;
229
260
  font-weight: 600;
230
- text-transform: uppercase;
261
+ text-transform: none;
231
262
  letter-spacing: 0.05em;
232
263
  color: var(--kyro-gray-500);
233
264
  }
@@ -494,7 +525,7 @@
494
525
  padding: 12px 16px;
495
526
  font-size: 12px;
496
527
  font-weight: 600;
497
- text-transform: uppercase;
528
+ text-transform: none;
498
529
  letter-spacing: 0.03em;
499
530
  color: var(--kyro-gray-500);
500
531
  background: var(--kyro-gray-50);
@@ -650,7 +681,7 @@
650
681
  .kyro-meta-label {
651
682
  font-size: 11px;
652
683
  font-weight: 600;
653
- text-transform: uppercase;
684
+ text-transform: none;
654
685
  letter-spacing: 0.03em;
655
686
  color: var(--kyro-gray-500);
656
687
  }
@@ -920,7 +951,7 @@
920
951
  font-size: 11px;
921
952
  font-weight: 600;
922
953
  color: var(--kyro-gray-500);
923
- text-transform: uppercase;
954
+ text-transform: none;
924
955
  letter-spacing: 0.03em;
925
956
  }
926
957
 
@@ -1304,7 +1335,7 @@
1304
1335
  font-size: 11px;
1305
1336
  font-weight: 600;
1306
1337
  border-radius: 4px;
1307
- text-transform: uppercase;
1338
+ text-transform: none;
1308
1339
  letter-spacing: 0.02em;
1309
1340
  }
1310
1341
 
@@ -1333,66 +1364,97 @@
1333
1364
  color: var(--kyro-text-secondary);
1334
1365
  }
1335
1366
 
1336
- /* Toast — Monochrome */
1337
- .kyro-toast {
1367
+ /* Toast — Glassmorphic Monochrome */
1368
+ .kyro-toasts-container {
1338
1369
  position: fixed;
1339
- bottom: 20px;
1340
- right: 20px;
1370
+ bottom: 24px;
1371
+ right: 24px;
1341
1372
  display: flex;
1342
- align-items: center;
1373
+ flex-direction: column;
1343
1374
  gap: 12px;
1344
- padding: 14px 18px;
1345
- background: var(--kyro-black);
1346
- color: var(--kyro-sidebar-text-active);
1347
- border-radius: 8px;
1348
- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
1349
- animation: toast-in 0.2s ease;
1350
1375
  z-index: 9999;
1351
- pointer-events: auto;
1376
+ pointer-events: none;
1352
1377
  }
1353
1378
 
1354
- @keyframes toast-in {
1355
- from {
1356
- transform: translateY(20px);
1357
- opacity: 0;
1358
- }
1379
+ .kyro-toast {
1380
+ display: flex;
1381
+ align-items: center;
1382
+ gap: 12px;
1383
+ min-width: 320px;
1384
+ max-width: 420px;
1385
+ padding: 12px;
1386
+ background: rgba(11, 18, 34, 0.85);
1387
+ backdrop-filter: blur(12px);
1388
+ -webkit-backdrop-filter: blur(12px);
1389
+ color: white;
1390
+ border-radius: 16px;
1391
+ border: 1px solid rgba(255, 255, 255, 0.1);
1392
+ box-shadow:
1393
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1),
1394
+ 0 20px 25px -5px rgba(0, 0, 0, 0.2);
1395
+ pointer-events: auto;
1396
+ overflow: hidden;
1397
+ position: relative;
1398
+ }
1359
1399
 
1360
- to {
1361
- transform: translateY(0);
1362
- opacity: 1;
1363
- }
1400
+ .dark .kyro-toast {
1401
+ background: rgba(5, 9, 18, 0.9);
1402
+ border: 1px solid rgba(255, 255, 255, 0.05);
1364
1403
  }
1365
1404
 
1366
- .kyro-toast-success {
1367
- border-left: 4px solid var(--kyro-success);
1405
+ .kyro-toast-accent {
1406
+ position: absolute;
1407
+ left: 0;
1408
+ top: 0;
1409
+ bottom: 0;
1410
+ width: 4px;
1411
+ background: var(--kyro-primary);
1368
1412
  }
1369
1413
 
1370
- .kyro-toast-error {
1371
- border-left: 4px solid #ef4444;
1414
+ .kyro-toast-success .kyro-toast-accent { background: #10b981; }
1415
+ .kyro-toast-error .kyro-toast-accent { background: #ef4444; }
1416
+ .kyro-toast-warning .kyro-toast-accent { background: #f59e0b; }
1417
+ .kyro-toast-info .kyro-toast-accent { background: #3b82f6; }
1418
+
1419
+ .kyro-toast-icon-container {
1420
+ flex-shrink: 0;
1421
+ width: 32px;
1422
+ height: 32px;
1423
+ border-radius: 10px;
1424
+ background: rgba(255, 255, 255, 0.05);
1425
+ display: flex;
1426
+ align-items: center;
1427
+ justify-content: center;
1428
+ color: rgba(255, 255, 255, 0.9);
1372
1429
  }
1373
1430
 
1374
- .kyro-toast-warning {
1375
- border-left: 4px solid var(--kyro-gray-400);
1431
+ .kyro-toast-success .kyro-toast-icon-container { color: #10b981; background: rgba(16, 185, 129, 0.1); }
1432
+ .kyro-toast-error .kyro-toast-icon-container { color: #f87171; background: rgba(239, 68, 68, 0.1); }
1433
+ .kyro-toast-warning .kyro-toast-icon-container { color: #fbbf24; background: rgba(245, 158, 11, 0.1); }
1434
+ .kyro-toast-info .kyro-toast-icon-container { color: #60a5fa; background: rgba(59, 130, 246, 0.1); }
1435
+
1436
+ .kyro-toast-content {
1437
+ flex: 1;
1438
+ min-width: 0;
1376
1439
  }
1377
1440
 
1378
- .kyro-toast-info {
1379
- border-left: 4px solid var(--kyro-gray-500);
1441
+ .kyro-toast-message {
1442
+ font-size: 13px;
1443
+ font-weight: 600;
1444
+ letter-spacing: -0.01em;
1445
+ color: rgba(255, 255, 255, 0.9);
1446
+ line-height: 1.4;
1380
1447
  }
1381
1448
 
1382
1449
  .kyro-toast-close {
1383
- display: flex;
1384
- align-items: center;
1385
- justify-content: center;
1386
- width: 20px;
1387
- height: 20px;
1388
- border: none;
1389
- background: transparent;
1390
- color: var(--kyro-text-muted);
1391
- cursor: pointer;
1392
- margin-left: 8px;
1450
+ padding: 6px;
1451
+ border-radius: 8px;
1452
+ color: rgba(255, 255, 255, 0.4);
1453
+ transition: all 0.2s ease;
1393
1454
  }
1394
1455
 
1395
1456
  .kyro-toast-close:hover {
1457
+ background: rgba(255, 255, 255, 0.1);
1396
1458
  color: white;
1397
1459
  }
1398
1460
 
@@ -1762,7 +1824,7 @@
1762
1824
  .kyro-sidebar-user-role {
1763
1825
  font-size: 10px;
1764
1826
  font-weight: 600;
1765
- text-transform: uppercase;
1827
+ text-transform: none;
1766
1828
  letter-spacing: 0.05em;
1767
1829
  color: var(--kyro-gray-500);
1768
1830
  margin-bottom: 4px;
@@ -1789,7 +1851,7 @@
1789
1851
  outline: none;
1790
1852
  }
1791
1853
 
1792
- .tiptap-editor-wrapper .ProseMirror > * + * {
1854
+ .tiptap-editor-wrapper .ProseMirror>*+* {
1793
1855
  margin-top: 0.75em;
1794
1856
  }
1795
1857
 
@@ -1836,7 +1898,7 @@
1836
1898
  font-size: 0;
1837
1899
  }
1838
1900
 
1839
- .tiptap-editor-wrapper .tiptap-columns-grid[data-node-view-content] > * {
1901
+ .tiptap-editor-wrapper .tiptap-columns-grid[data-node-view-content]>* {
1840
1902
  font-size: 0.875rem;
1841
1903
  min-width: 0;
1842
1904
  }
@@ -1879,15 +1941,11 @@
1879
1941
  min-height: 84px;
1880
1942
  }
1881
1943
 
1882
- .tiptap-editor-wrapper
1883
- .tiptap-column-content[data-node-view-content]
1884
- > *:first-child {
1944
+ .tiptap-editor-wrapper .tiptap-column-content[data-node-view-content]>*:first-child {
1885
1945
  margin-top: 0;
1886
1946
  }
1887
1947
 
1888
- .tiptap-editor-wrapper
1889
- .tiptap-column-content[data-node-view-content]
1890
- > *:last-child {
1948
+ .tiptap-editor-wrapper .tiptap-column-content[data-node-view-content]>*:last-child {
1891
1949
  margin-bottom: 0;
1892
1950
  }
1893
1951
 
@@ -1902,10 +1960,7 @@
1902
1960
  flex-basis: 100%;
1903
1961
  }
1904
1962
 
1905
- .tiptap-editor-wrapper
1906
- .tiptap-columns-block--1
1907
- .tiptap-columns-grid[data-node-view-content]
1908
- > * {
1963
+ .tiptap-editor-wrapper .tiptap-columns-block--1 .tiptap-columns-grid[data-node-view-content]>* {
1909
1964
  width: 100%;
1910
1965
  flex: 0 0 100%;
1911
1966
  }
@@ -1915,10 +1970,7 @@
1915
1970
  flex-basis: calc(50% - 0.375rem);
1916
1971
  }
1917
1972
 
1918
- .tiptap-editor-wrapper
1919
- .tiptap-columns-block--2
1920
- .tiptap-columns-grid[data-node-view-content]
1921
- > * {
1973
+ .tiptap-editor-wrapper .tiptap-columns-block--2 .tiptap-columns-grid[data-node-view-content]>* {
1922
1974
  width: calc(50% - 0.375rem);
1923
1975
  flex: 0 0 calc(50% - 0.375rem);
1924
1976
  }
@@ -1928,10 +1980,7 @@
1928
1980
  flex-basis: calc(33.333% - 0.5rem);
1929
1981
  }
1930
1982
 
1931
- .tiptap-editor-wrapper
1932
- .tiptap-columns-block--3
1933
- .tiptap-columns-grid[data-node-view-content]
1934
- > * {
1983
+ .tiptap-editor-wrapper .tiptap-columns-block--3 .tiptap-columns-grid[data-node-view-content]>* {
1935
1984
  width: calc(33.333% - 0.5rem);
1936
1985
  flex: 0 0 calc(33.333% - 0.5rem);
1937
1986
  }
@@ -1941,10 +1990,7 @@
1941
1990
  flex-basis: calc(25% - 0.5625rem);
1942
1991
  }
1943
1992
 
1944
- .tiptap-editor-wrapper
1945
- .tiptap-columns-block--4
1946
- .tiptap-columns-grid[data-node-view-content]
1947
- > * {
1993
+ .tiptap-editor-wrapper .tiptap-columns-block--4 .tiptap-columns-grid[data-node-view-content]>* {
1948
1994
  width: calc(25% - 0.5625rem);
1949
1995
  flex: 0 0 calc(25% - 0.5625rem);
1950
1996
  }
@@ -1954,10 +2000,7 @@
1954
2000
  flex-basis: calc(20% - 0.6rem);
1955
2001
  }
1956
2002
 
1957
- .tiptap-editor-wrapper
1958
- .tiptap-columns-block--5
1959
- .tiptap-columns-grid[data-node-view-content]
1960
- > * {
2003
+ .tiptap-editor-wrapper .tiptap-columns-block--5 .tiptap-columns-grid[data-node-view-content]>* {
1961
2004
  width: calc(20% - 0.6rem);
1962
2005
  flex: 0 0 calc(20% - 0.6rem);
1963
2006
  }
@@ -1967,10 +2010,7 @@
1967
2010
  flex-basis: calc(16.666% - 0.625rem);
1968
2011
  }
1969
2012
 
1970
- .tiptap-editor-wrapper
1971
- .tiptap-columns-block--6
1972
- .tiptap-columns-grid[data-node-view-content]
1973
- > * {
2013
+ .tiptap-editor-wrapper .tiptap-columns-block--6 .tiptap-columns-grid[data-node-view-content]>* {
1974
2014
  width: calc(16.666% - 0.625rem);
1975
2015
  flex: 0 0 calc(16.666% - 0.625rem);
1976
2016
  }
@@ -1990,4 +2030,4 @@
1990
2030
  /* Ensure NodeViews render correctly within ProseMirror */
1991
2031
  .tiptap-editor-wrapper .ProseMirror .node--component {
1992
2032
  display: block;
1993
- }
2033
+ }
@@ -1,6 +1,7 @@
1
1
  export interface ThemeColors {
2
2
  primary?: string;
3
3
  secondary?: string;
4
+ accent?: string;
4
5
  background?: string;
5
6
  surface?: string;
6
7
  text?: string;
@@ -0,0 +1,14 @@
1
+ declare module "*.css" {
2
+ const content: string;
3
+ export default content;
4
+ }
5
+
6
+ declare module "graphiql/graphiql.css" {
7
+ const content: string;
8
+ export default content;
9
+ }
10
+
11
+ declare module "react-image-crop/dist/ReactCrop.css" {
12
+ const content: string;
13
+ export default content;
14
+ }
@@ -1,155 +0,0 @@
1
- import type { CollectionConfig } from "@kyro-cms/core";
2
-
3
- export const usersCollection: CollectionConfig = {
4
- slug: "users",
5
- label: "Users",
6
- singular: "User",
7
- type: "singleton",
8
- fields: [
9
- { name: "id", type: "text", required: true, readonly: true },
10
- { name: "email", type: "email", required: true },
11
- {
12
- name: "role",
13
- type: "select",
14
- options: [
15
- "super_admin",
16
- "admin",
17
- "editor",
18
- "author",
19
- "customer",
20
- "guest",
21
- ],
22
- required: true,
23
- },
24
- { name: "tenantId", type: "text", label: "Tenant" },
25
- { name: "emailVerified", type: "boolean", label: "Email Verified" },
26
- { name: "locked", type: "boolean" },
27
- {
28
- name: "lastLogin",
29
- type: "datetime",
30
- label: "Last Login",
31
- readonly: true,
32
- },
33
- {
34
- name: "failedLoginAttempts",
35
- type: "number",
36
- label: "Failed Login Attempts",
37
- readonly: true,
38
- },
39
- { name: "createdAt", type: "datetime", readonly: true },
40
- { name: "updatedAt", type: "datetime", readonly: true },
41
- ],
42
- access: {
43
- create: () => true,
44
- read: () => true,
45
- update: () => true,
46
- delete: () => true,
47
- },
48
- list: {
49
- columns: [
50
- "email",
51
- "role",
52
- "tenantId",
53
- "emailVerified",
54
- "locked",
55
- "lastLogin",
56
- ],
57
- defaultSort: "createdAt",
58
- defaultOrder: "desc",
59
- },
60
- };
61
-
62
- export const rolesCollection: CollectionConfig = {
63
- slug: "roles",
64
- label: "Roles",
65
- singular: "Role",
66
- type: "collection",
67
- fields: [
68
- { name: "name", type: "text", required: true },
69
- { name: "level", type: "number", required: true },
70
- {
71
- name: "inherits",
72
- type: "array",
73
- items: { type: "text" },
74
- label: "Inherits From",
75
- },
76
- { name: "description", type: "richtext" },
77
- {
78
- name: "permissions",
79
- type: "array",
80
- items: { type: "text" },
81
- label: "Permissions",
82
- },
83
- ],
84
- access: {
85
- create: () => true,
86
- read: () => true,
87
- update: () => true,
88
- delete: () => true,
89
- },
90
- list: {
91
- columns: ["name", "level", "inherits", "description"],
92
- defaultSort: "level",
93
- defaultOrder: "desc",
94
- },
95
- };
96
-
97
- export interface AuditLogEntry {
98
- id: string;
99
- action: string;
100
- userId?: string;
101
- userEmail?: string;
102
- role?: string;
103
- resource: string;
104
- ipAddress?: string;
105
- userAgent?: string;
106
- success: boolean;
107
- error?: string;
108
- metadata?: Record<string, unknown>;
109
- timestamp: string;
110
- }
111
-
112
- export const auditLogsCollection: CollectionConfig = {
113
- slug: "audit_logs",
114
- label: "Audit Logs",
115
- singular: "Audit Log",
116
- type: "collection",
117
- fields: [
118
- { name: "id", type: "text", required: true, readonly: true },
119
- { name: "action", type: "text", required: true },
120
- { name: "userId", type: "text", label: "User ID" },
121
- { name: "userEmail", type: "email", label: "User Email" },
122
- { name: "role", type: "text" },
123
- { name: "resource", type: "text", label: "Resource" },
124
- { name: "ipAddress", type: "text", label: "IP Address" },
125
- { name: "userAgent", type: "text", label: "User Agent" },
126
- { name: "success", type: "boolean" },
127
- { name: "error", type: "richtext" },
128
- { name: "metadata", type: "json", label: "Metadata" },
129
- { name: "timestamp", type: "datetime", required: true, readonly: true },
130
- ],
131
- access: {
132
- create: () => false,
133
- read: () => true,
134
- update: () => false,
135
- delete: () => false,
136
- },
137
- list: {
138
- columns: [
139
- "action",
140
- "userEmail",
141
- "role",
142
- "resource",
143
- "success",
144
- "timestamp",
145
- ],
146
- defaultSort: "timestamp",
147
- defaultOrder: "desc",
148
- },
149
- };
150
-
151
- export const authCollections = {
152
- users: usersCollection,
153
- roles: rolesCollection,
154
- audit_logs: auditLogsCollection,
155
- };