qarpeo 0.1.18 → 0.1.21

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 (237) hide show
  1. package/README.md +96 -96
  2. package/dist/chunks/auth-schema.mjs +3 -1
  3. package/dist/chunks/wrangler.mjs +22 -3
  4. package/dist/cli/index.mjs +448 -221
  5. package/dist/fate/index.d.ts +29 -22
  6. package/dist/fate/index.mjs +1 -3
  7. package/dist/module.d.ts +1 -1
  8. package/dist/module.mjs +103 -82
  9. package/dist/runtime/ai.d.ts +2 -2
  10. package/dist/runtime/app/components/BlobImage.vue +119 -107
  11. package/dist/runtime/app/components/CMSBlocks.vue +104 -93
  12. package/dist/runtime/app/components/CMSContent.vue +24 -23
  13. package/dist/runtime/app/components/CMSImage.vue +49 -49
  14. package/dist/runtime/app/components/CMSLocaleSwitcher.vue +110 -110
  15. package/dist/runtime/app/components/CMSPreviewBanner.vue +83 -79
  16. package/dist/runtime/app/components/CMSVersionBanner.vue +53 -49
  17. package/dist/runtime/app/components/CMSVersionSwitcher.vue +140 -140
  18. package/dist/runtime/app/components/ContentRenderer.vue +83 -80
  19. package/dist/runtime/app/components/FileUpload.vue +200 -196
  20. package/dist/runtime/app/components/ImpersonationBanner.vue +61 -57
  21. package/dist/runtime/app/components/QarpeoWelcome.vue +84 -84
  22. package/dist/runtime/app/components/SignedIn.vue +13 -13
  23. package/dist/runtime/app/components/SignedOut.vue +13 -13
  24. package/dist/runtime/app/components/shiki.css +34 -34
  25. package/dist/runtime/app/composables/ai.d.ts +22 -22
  26. package/dist/runtime/app/composables/ai.mjs +3 -7
  27. package/dist/runtime/app/composables/analytics.mjs +1 -1
  28. package/dist/runtime/app/composables/api-tokens.mjs +1 -1
  29. package/dist/runtime/app/composables/auth.d.ts +6 -7
  30. package/dist/runtime/app/composables/auth.mjs +6 -3
  31. package/dist/runtime/app/composables/chat.mjs +3 -7
  32. package/dist/runtime/app/composables/cms-preview.d.ts +3 -3
  33. package/dist/runtime/app/composables/cms-preview.mjs +1 -1
  34. package/dist/runtime/app/composables/cms.d.ts +3 -5
  35. package/dist/runtime/app/composables/cms.mjs +2 -2
  36. package/dist/runtime/app/composables/docs-version.d.ts +8 -7
  37. package/dist/runtime/app/composables/docs-version.mjs +3 -3
  38. package/dist/runtime/app/composables/impersonation.mjs +1 -1
  39. package/dist/runtime/app/composables/notifications.d.ts +5 -5
  40. package/dist/runtime/app/composables/notifications.mjs +4 -5
  41. package/dist/runtime/app/composables/organization.mjs +1 -1
  42. package/dist/runtime/app/composables/passkey.mjs +1 -1
  43. package/dist/runtime/app/composables/passwordless.mjs +1 -1
  44. package/dist/runtime/app/composables/payments.d.ts +2 -1
  45. package/dist/runtime/app/composables/payments.mjs +1 -1
  46. package/dist/runtime/app/composables/realtime.d.ts +13 -13
  47. package/dist/runtime/app/composables/realtime.mjs +2 -2
  48. package/dist/runtime/app/composables/resumable-upload.d.ts +11 -11
  49. package/dist/runtime/app/composables/resumable-upload.mjs +1 -1
  50. package/dist/runtime/app/composables/site.mjs +1 -1
  51. package/dist/runtime/app/composables/storage.d.ts +151 -11
  52. package/dist/runtime/app/composables/storage.mjs +291 -33
  53. package/dist/runtime/app/composables/turnstile.mjs +1 -1
  54. package/dist/runtime/app/composables/two-factor.mjs +1 -1
  55. package/dist/runtime/app/pages/devtools/agents.vue +716 -716
  56. package/dist/runtime/app/pages/devtools/analytics.vue +616 -616
  57. package/dist/runtime/app/pages/devtools/auth.vue +381 -350
  58. package/dist/runtime/app/pages/devtools/blob.vue +743 -744
  59. package/dist/runtime/app/pages/devtools/db.vue +545 -545
  60. package/dist/runtime/app/pages/devtools/domains.vue +771 -771
  61. package/dist/runtime/app/pages/devtools/kv.vue +827 -828
  62. package/dist/runtime/app/pages/devtools/logs.vue +649 -653
  63. package/dist/runtime/app/pages/devtools/mail.vue +388 -388
  64. package/dist/runtime/app/pages/devtools/overview.vue +391 -389
  65. package/dist/runtime/app/pages/devtools/realtime.vue +89 -27
  66. package/dist/runtime/app/pages/devtools/security.vue +20 -5
  67. package/dist/runtime/app/pages/devtools/settings.vue +559 -559
  68. package/dist/runtime/app/pages/devtools/tasks.vue +26 -10
  69. package/dist/runtime/app/pages/devtools.vue +176 -176
  70. package/dist/runtime/app/plugins/seo.mjs +1 -1
  71. package/dist/runtime/app/plugins/shortcuts.client.d.ts +1 -4
  72. package/dist/runtime/app/public/sw-notifications.mjs +47 -52
  73. package/dist/runtime/blob.mjs +11 -4
  74. package/dist/runtime/browser.d.ts +1 -1
  75. package/dist/runtime/browser.mjs +12 -2
  76. package/dist/runtime/cache.d.ts +2 -1
  77. package/dist/runtime/kv.mjs +4 -1
  78. package/dist/runtime/providers/qarpeo.d.ts +3 -3
  79. package/dist/runtime/server/durable-objects/agent.mjs +1 -1
  80. package/dist/runtime/server/durable-objects/room.d.ts +2 -2
  81. package/dist/runtime/server/durable-objects/room.mjs +5 -5
  82. package/dist/runtime/server/middleware/devtools.mjs +6 -2
  83. package/dist/runtime/server/plugins/cms.d.ts +4 -2
  84. package/dist/runtime/server/plugins/dev-proxy.mjs +1 -1
  85. package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +2 -2
  86. package/dist/runtime/server/routes/__qarpeo/agents/chat.post.mjs +4 -1
  87. package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +1 -4
  88. package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +2 -2
  89. package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.mjs +5 -1
  90. package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +2 -2
  91. package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +1 -1
  92. package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +4 -1
  93. package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +1 -1
  94. package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.mjs +2 -2
  95. package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +2 -2
  96. package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.d.ts +2 -2
  97. package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.mjs +1 -1
  98. package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.d.ts +1 -4
  99. package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.mjs +1 -1
  100. package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.d.ts +1 -4
  101. package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.mjs +1 -1
  102. package/dist/runtime/server/routes/__qarpeo/realtime/room.get.d.ts +2 -2
  103. package/dist/runtime/server/routes/__qarpeo/realtime/rooms.get.d.ts +2 -2
  104. package/dist/runtime/server/routes/__qarpeo/security/analytics.get.d.ts +2 -2
  105. package/dist/runtime/server/routes/__qarpeo/security/ban.post.d.ts +1 -4
  106. package/dist/runtime/server/routes/__qarpeo/security/clear.post.d.ts +1 -4
  107. package/dist/runtime/server/routes/__qarpeo/security/unban.post.d.ts +1 -4
  108. package/dist/runtime/server/routes/__qarpeo/settings.get.mjs +1 -1
  109. package/dist/runtime/server/routes/__qarpeo/tasks/run.post.mjs +3 -1
  110. package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +8 -2
  111. package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +8 -2
  112. package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +8 -2
  113. package/dist/runtime/server/routes/ai/embed.post.d.ts +1 -4
  114. package/dist/runtime/server/routes/ai/search.post.d.ts +2 -2
  115. package/dist/runtime/server/routes/auth/account.delete.mjs +1 -1
  116. package/dist/runtime/server/routes/auth/handler.mjs +6 -1
  117. package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +1 -1
  118. package/dist/runtime/server/routes/auth/organization/members/[id].delete.mjs +7 -1
  119. package/dist/runtime/server/routes/auth/otp/verify.post.mjs +1 -1
  120. package/dist/runtime/server/routes/auth/sso/login.get.mjs +7 -1
  121. package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +8 -2
  122. package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +7 -2
  123. package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +1 -1
  124. package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +7 -2
  125. package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +6 -1
  126. package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +6 -1
  127. package/dist/runtime/server/routes/browser/crawl.post.d.ts +1 -2
  128. package/dist/runtime/server/routes/browser/invoice.post.d.ts +1 -2
  129. package/dist/runtime/server/routes/browser/og-image.post.d.ts +2 -2
  130. package/dist/runtime/server/routes/browser/pdf.post.d.ts +1 -2
  131. package/dist/runtime/server/routes/browser/pdf.post.mjs +6 -1
  132. package/dist/runtime/server/routes/browser/screenshot.post.d.ts +2 -2
  133. package/dist/runtime/server/routes/browser/screenshot.post.mjs +5 -1
  134. package/dist/runtime/server/routes/cms/components/index.get.d.ts +2 -2
  135. package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +4 -3
  136. package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +8 -8
  137. package/dist/runtime/server/routes/cms/search.get.mjs +1 -1
  138. package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +7 -7
  139. package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +9 -2
  140. package/dist/runtime/server/routes/docs/search.get.d.ts +9 -9
  141. package/dist/runtime/server/routes/fate.mjs +5 -8
  142. package/dist/runtime/server/routes/mail/bounce.post.d.ts +2 -2
  143. package/dist/runtime/server/routes/mail/unsubscribe.d.ts +2 -2
  144. package/dist/runtime/server/routes/mail/webhooks.post.d.ts +2 -2
  145. package/dist/runtime/server/routes/mail/webhooks.post.mjs +7 -1
  146. package/dist/runtime/server/routes/payments/usage.get.d.ts +8 -8
  147. package/dist/runtime/server/routes/payments/usage.post.d.ts +2 -2
  148. package/dist/runtime/server/routes/realtime/history.delete.d.ts +4 -3
  149. package/dist/runtime/server/routes/realtime/history.get.d.ts +7 -6
  150. package/dist/runtime/server/routes/realtime/ws.get.mjs +6 -1
  151. package/dist/runtime/server/routes/robots.txt.get.mjs +1 -1
  152. package/dist/runtime/server/routes/sitemap.xml.get.mjs +2 -1
  153. package/dist/runtime/server/routes/storage/multipart/abort.post.d.ts +2 -2
  154. package/dist/runtime/server/routes/storage/multipart/complete.post.d.ts +2 -2
  155. package/dist/runtime/server/routes/storage/multipart/complete.post.mjs +2 -2
  156. package/dist/runtime/server/routes/storage/multipart/create.post.d.ts +2 -2
  157. package/dist/runtime/server/routes/storage/multipart/create.post.mjs +7 -3
  158. package/dist/runtime/server/routes/storage/multipart/part.put.d.ts +2 -2
  159. package/dist/runtime/server/routes/storage/multipart/part.put.mjs +1 -1
  160. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +2 -4
  161. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +2 -4
  162. package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +1 -1
  163. package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +2 -4
  164. package/dist/runtime/server/tasks/cms/publish.mjs +1 -1
  165. package/dist/runtime/server/utils/ai.d.ts +9 -9
  166. package/dist/runtime/server/utils/ai.mjs +3 -3
  167. package/dist/runtime/server/utils/auth.d.ts +12 -16
  168. package/dist/runtime/server/utils/auth.mjs +15 -9
  169. package/dist/runtime/server/utils/bots.mjs +21 -7
  170. package/dist/runtime/server/utils/browser-utils.d.ts +44 -41
  171. package/dist/runtime/server/utils/browser-utils.mjs +14 -4
  172. package/dist/runtime/server/utils/cache.d.ts +5 -5
  173. package/dist/runtime/server/utils/cms/common.d.ts +26 -0
  174. package/dist/runtime/server/utils/cms/common.mjs +68 -0
  175. package/dist/runtime/server/utils/cms/git.d.ts +24 -0
  176. package/dist/runtime/server/utils/cms/git.mjs +240 -0
  177. package/dist/runtime/server/utils/cms/markdown.d.ts +22 -0
  178. package/dist/runtime/server/utils/cms/markdown.mjs +92 -0
  179. package/dist/runtime/server/utils/cms/path.d.ts +51 -0
  180. package/dist/runtime/server/utils/cms/path.mjs +127 -0
  181. package/dist/runtime/server/utils/cms/search.d.ts +22 -0
  182. package/dist/runtime/server/utils/cms/search.mjs +221 -0
  183. package/dist/runtime/server/utils/cms-events.d.ts +1 -1
  184. package/dist/runtime/server/utils/cms-events.mjs +2 -2
  185. package/dist/runtime/server/utils/cms-filter.mjs +2 -2
  186. package/dist/runtime/server/utils/cms.d.ts +17 -149
  187. package/dist/runtime/server/utils/cms.mjs +52 -761
  188. package/dist/runtime/server/utils/config.d.ts +5 -4
  189. package/dist/runtime/server/utils/domains.mjs +7 -4
  190. package/dist/runtime/server/utils/email-templates.d.ts +10 -7
  191. package/dist/runtime/server/utils/email-templates.mjs +20 -5
  192. package/dist/runtime/server/utils/feed.d.ts +2 -2
  193. package/dist/runtime/server/utils/feed.mjs +3 -1
  194. package/dist/runtime/server/utils/mail-suppression.d.ts +8 -24
  195. package/dist/runtime/server/utils/mail-suppression.mjs +2 -2
  196. package/dist/runtime/server/utils/mail.d.ts +7 -8
  197. package/dist/runtime/server/utils/mail.mjs +17 -12
  198. package/dist/runtime/server/utils/multipart-store.d.ts +2 -2
  199. package/dist/runtime/server/utils/notifications.d.ts +9 -23
  200. package/dist/runtime/server/utils/organization.mjs +4 -12
  201. package/dist/runtime/server/utils/passwordless.mjs +1 -1
  202. package/dist/runtime/server/utils/payments.d.ts +2 -6
  203. package/dist/runtime/server/utils/payments.mjs +1 -1
  204. package/dist/runtime/server/utils/queue.d.ts +21 -31
  205. package/dist/runtime/server/utils/rag.d.ts +4 -4
  206. package/dist/runtime/server/utils/rag.mjs +8 -8
  207. package/dist/runtime/server/utils/realtime-store.d.ts +2 -2
  208. package/dist/runtime/server/utils/realtime.d.ts +26 -28
  209. package/dist/runtime/server/utils/scheduled-task.d.ts +1 -3
  210. package/dist/runtime/server/utils/security-store.d.ts +2 -2
  211. package/dist/runtime/server/utils/session.d.ts +9 -11
  212. package/dist/runtime/server/utils/sso.d.ts +9 -15
  213. package/dist/runtime/server/utils/sso.mjs +4 -8
  214. package/dist/runtime/server/utils/storage.d.ts +19 -2
  215. package/dist/runtime/server/utils/storage.mjs +36 -7
  216. package/dist/runtime/server/utils/tenant.mjs +3 -1
  217. package/dist/runtime/server/utils/turnstile.d.ts +3 -5
  218. package/dist/runtime/server/utils/vapid.d.ts +5 -8
  219. package/dist/runtime/server/utils/vapid.mjs +26 -13
  220. package/dist/runtime/service.d.ts +13 -13
  221. package/dist/runtime/service.mjs +4 -2
  222. package/dist/runtime/test-utils.d.ts +20 -30
  223. package/dist/runtime/test-utils.mjs +5 -4
  224. package/dist/runtime/types/auth-globals.d.ts +14 -14
  225. package/dist/runtime/types/imports.d.ts +82 -82
  226. package/dist/runtime/types/index.d.ts +2 -2
  227. package/dist/runtime/types/r2.d.ts +5 -0
  228. package/dist/runtime/types/service.d.ts +11 -18
  229. package/dist/types.d.ts +100 -107
  230. package/dist/utils/auth-schema.d.ts +2 -2
  231. package/dist/utils/cms-sources.d.ts +3 -3
  232. package/dist/utils/local-db.d.ts +3 -3
  233. package/dist/utils/notifications-schema.d.ts +1 -3
  234. package/dist/utils/pkg.d.ts +7 -0
  235. package/dist/utils/queue.d.ts +3 -3
  236. package/dist/utils/tasks.d.ts +3 -2
  237. package/package.json +11 -8
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { useRoute, useFetch, navigateTo } from "nuxt/app"
3
2
  import type { NavigationMenuItem } from "@nuxt/ui"
3
+ import { useRoute, useFetch, navigateTo } from "nuxt/app"
4
4
  import { computed, ref, onMounted, onUnmounted } from "vue"
5
5
 
6
6
  interface RoomSummary {
@@ -231,7 +231,7 @@ function formatJson(val: any): string {
231
231
  <span class="font-bold text-sm text-highlighted">Realtime & Rooms</span>
232
232
  <UBadge size="xs" color="neutral" variant="subtle">Cloudflare Durable Objects</UBadge>
233
233
  <UBadge size="xs" color="primary" variant="subtle">
234
- {{ rooms.length }} Active {{ rooms.length === 1 ? 'Room' : 'Rooms' }}
234
+ {{ rooms.length }} Active {{ rooms.length === 1 ? "Room" : "Rooms" }}
235
235
  </UBadge>
236
236
  </div>
237
237
  </template>
@@ -245,7 +245,12 @@ function formatJson(val: any): string {
245
245
  variant="ghost"
246
246
  title="Refresh rooms"
247
247
  :loading="roomsPending || activeRoomLoading"
248
- @click="() => { executeLoadRooms(); loadActiveRoom() }"
248
+ @click="
249
+ () => {
250
+ executeLoadRooms()
251
+ loadActiveRoom()
252
+ }
253
+ "
249
254
  />
250
255
  </div>
251
256
  </template>
@@ -255,7 +260,9 @@ function formatJson(val: any): string {
255
260
  <template #body>
256
261
  <div class="grid grid-cols-12 gap-4 h-[calc(100vh-140px)]">
257
262
  <!-- ── Left: Room Directory ──────────────────────────────────────── -->
258
- <div class="col-span-12 md:col-span-4 flex flex-col rounded-xl border border-default bg-elevated/20 overflow-hidden">
263
+ <div
264
+ class="col-span-12 md:col-span-4 flex flex-col rounded-xl border border-default bg-elevated/20 overflow-hidden"
265
+ >
259
266
  <div class="p-3 border-b border-default bg-muted/40">
260
267
  <UInput
261
268
  v-model="roomSearch"
@@ -271,13 +278,25 @@ function formatJson(val: any): string {
271
278
  v-for="r in filteredRooms"
272
279
  :key="r.id"
273
280
  class="p-2.5 rounded-lg cursor-pointer transition-colors border text-xs"
274
- :class="r.id === selectedRoomId ? 'bg-primary/10 border-primary/30 text-highlighted font-medium' : 'hover:bg-elevated/40 border-transparent text-default'"
275
- @click="() => { selectedRoomId = r.id; loadActiveRoom() }"
281
+ :class="
282
+ r.id === selectedRoomId
283
+ ? 'bg-primary/10 border-primary/30 text-highlighted font-medium'
284
+ : 'hover:bg-elevated/40 border-transparent text-default'
285
+ "
286
+ @click="
287
+ () => {
288
+ selectedRoomId = r.id
289
+ loadActiveRoom()
290
+ }
291
+ "
276
292
  >
277
293
  <div class="flex items-center justify-between mb-1">
278
294
  <span class="font-mono font-semibold truncate">{{ r.id }}</span>
279
295
  <span class="flex items-center gap-1.5 shrink-0">
280
- <span class="w-2 h-2 rounded-full" :class="r.presenceCount > 0 ? 'bg-success animate-pulse' : 'bg-muted'"></span>
296
+ <span
297
+ class="w-2 h-2 rounded-full"
298
+ :class="r.presenceCount > 0 ? 'bg-success animate-pulse' : 'bg-muted'"
299
+ ></span>
281
300
  <span class="text-[10px] text-muted">{{ r.presenceCount }} online</span>
282
301
  </span>
283
302
  </div>
@@ -294,16 +313,22 @@ function formatJson(val: any): string {
294
313
  </div>
295
314
 
296
315
  <!-- ── Right: Live Room Inspector ────────────────────────────────── -->
297
- <div class="col-span-12 md:col-span-8 flex flex-col rounded-xl border border-default bg-elevated/20 overflow-hidden">
316
+ <div
317
+ class="col-span-12 md:col-span-8 flex flex-col rounded-xl border border-default bg-elevated/20 overflow-hidden"
318
+ >
298
319
  <!-- Room Header Bar -->
299
320
  <div class="p-3.5 border-b border-default bg-muted/40 flex items-center justify-between">
300
321
  <div class="flex items-center gap-2">
301
- <div class="w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0">
322
+ <div
323
+ class="w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0"
324
+ >
302
325
  <UIcon name="i-lucide-radio" class="w-4 h-4" />
303
326
  </div>
304
327
  <div>
305
328
  <div class="flex items-center gap-2">
306
- <span class="font-mono font-bold text-sm text-highlighted">{{ selectedRoomId }}</span>
329
+ <span class="font-mono font-bold text-sm text-highlighted">{{
330
+ selectedRoomId
331
+ }}</span>
307
332
  <UBadge size="xs" color="neutral" variant="subtle">
308
333
  {{ activeRoom?.presence.length || 0 }} Connected
309
334
  </UBadge>
@@ -319,21 +344,33 @@ function formatJson(val: any): string {
319
344
  <div class="flex rounded-lg border border-default bg-elevated/40 p-0.5 text-xs">
320
345
  <button
321
346
  class="px-2.5 py-1 rounded-md transition-colors"
322
- :class="activeTab === 'presence' ? 'bg-primary text-primary-foreground font-medium' : 'text-muted hover:text-default'"
347
+ :class="
348
+ activeTab === 'presence'
349
+ ? 'bg-primary text-primary-foreground font-medium'
350
+ : 'text-muted hover:text-default'
351
+ "
323
352
  @click="activeTab = 'presence'"
324
353
  >
325
354
  Presence ({{ activeRoom?.presence.length || 0 }})
326
355
  </button>
327
356
  <button
328
357
  class="px-2.5 py-1 rounded-md transition-colors"
329
- :class="activeTab === 'messages' ? 'bg-primary text-primary-foreground font-medium' : 'text-muted hover:text-default'"
358
+ :class="
359
+ activeTab === 'messages'
360
+ ? 'bg-primary text-primary-foreground font-medium'
361
+ : 'text-muted hover:text-default'
362
+ "
330
363
  @click="activeTab = 'messages'"
331
364
  >
332
365
  Messages ({{ activeRoom?.messages.length || 0 }})
333
366
  </button>
334
367
  <button
335
368
  class="px-2.5 py-1 rounded-md transition-colors"
336
- :class="activeTab === 'state' ? 'bg-primary text-primary-foreground font-medium' : 'text-muted hover:text-default'"
369
+ :class="
370
+ activeTab === 'state'
371
+ ? 'bg-primary text-primary-foreground font-medium'
372
+ : 'text-muted hover:text-default'
373
+ "
337
374
  @click="activeTab = 'state'"
338
375
  >
339
376
  Room State
@@ -344,8 +381,10 @@ function formatJson(val: any): string {
344
381
 
345
382
  <!-- Tab 1: Presence Roster & Cursors -->
346
383
  <div v-if="activeTab === 'presence'" class="flex-1 overflow-y-auto p-4 space-y-3">
347
- <div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">Connected Peers & Cursors</div>
348
-
384
+ <div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">
385
+ Connected Peers & Cursors
386
+ </div>
387
+
349
388
  <div v-if="activeRoom?.presence && activeRoom.presence.length > 0" class="space-y-2">
350
389
  <div
351
390
  v-for="user in activeRoom.presence"
@@ -353,21 +392,31 @@ function formatJson(val: any): string {
353
392
  class="flex items-center justify-between p-3 rounded-lg border border-default bg-elevated/40 hover:bg-elevated/60 transition-colors"
354
393
  >
355
394
  <div class="flex items-center gap-3">
356
- <div class="w-8 h-8 rounded-full bg-primary/10 border border-primary/20 flex items-center justify-center font-bold text-xs text-primary">
357
- {{ user.name ? user.name.slice(0, 2).toUpperCase() : 'AN' }}
395
+ <div
396
+ class="w-8 h-8 rounded-full bg-primary/10 border border-primary/20 flex items-center justify-center font-bold text-xs text-primary"
397
+ >
398
+ {{ user.name ? user.name.slice(0, 2).toUpperCase() : "AN" }}
358
399
  </div>
359
400
  <div>
360
401
  <div class="flex items-center gap-2">
361
- <span class="font-medium text-xs text-highlighted">{{ user.name || 'Anonymous User' }}</span>
362
- <UBadge v-if="user.isAnonymous" size="xs" color="neutral" variant="outline">Anonymous</UBadge>
402
+ <span class="font-medium text-xs text-highlighted">{{
403
+ user.name || "Anonymous User"
404
+ }}</span>
405
+ <UBadge v-if="user.isAnonymous" size="xs" color="neutral" variant="outline"
406
+ >Anonymous</UBadge
407
+ >
363
408
  <span class="font-mono text-[10px] text-muted">{{ user.id }}</span>
364
409
  </div>
365
410
  <div class="flex items-center gap-2 text-[11px] text-muted mt-0.5">
366
411
  <span>Joined: {{ formatTime(user.joinedAt) }}</span>
367
412
  <span v-if="user.presence?.status" class="flex items-center gap-1">
368
- • Status: <span class="font-medium text-highlighted">{{ user.presence.status }}</span>
413
+ • Status:
414
+ <span class="font-medium text-highlighted">{{ user.presence.status }}</span>
369
415
  </span>
370
- <span v-if="user.presence?.cursor" class="flex items-center gap-1 font-mono text-[10px]">
416
+ <span
417
+ v-if="user.presence?.cursor"
418
+ class="flex items-center gap-1 font-mono text-[10px]"
419
+ >
371
420
  • Cursor: ({{ user.presence.cursor.x }}, {{ user.presence.cursor.y }})
372
421
  </span>
373
422
  </div>
@@ -398,7 +447,9 @@ function formatJson(val: any): string {
398
447
  <!-- Messages List -->
399
448
  <div class="flex-1 overflow-y-auto p-4 space-y-2">
400
449
  <div class="flex items-center justify-between mb-2">
401
- <span class="text-xs font-semibold text-muted uppercase tracking-wider">Live Broadcast History</span>
450
+ <span class="text-xs font-semibold text-muted uppercase tracking-wider"
451
+ >Live Broadcast History</span
452
+ >
402
453
  <UButton
403
454
  v-if="activeRoom?.messages && activeRoom.messages.length > 0"
404
455
  size="xs"
@@ -418,12 +469,19 @@ function formatJson(val: any): string {
418
469
  >
419
470
  <div class="flex items-center justify-between mb-1 text-[11px]">
420
471
  <div class="flex items-center gap-2">
421
- <UBadge size="xs" color="primary" variant="subtle">{{ msg.event || msg.type }}</UBadge>
422
- <span class="text-muted font-sans">from <strong class="text-highlighted">{{ msg.sender || 'unknown' }}</strong></span>
472
+ <UBadge size="xs" color="primary" variant="subtle">{{
473
+ msg.event || msg.type
474
+ }}</UBadge>
475
+ <span class="text-muted font-sans"
476
+ >from
477
+ <strong class="text-highlighted">{{ msg.sender || "unknown" }}</strong></span
478
+ >
423
479
  </div>
424
480
  <span class="text-muted text-[10px]">{{ formatTime(msg.timestamp) }}</span>
425
481
  </div>
426
- <pre class="bg-muted/40 p-2 rounded text-[11px] overflow-x-auto text-default">{{ formatJson(msg.payload) }}</pre>
482
+ <pre class="bg-muted/40 p-2 rounded text-[11px] overflow-x-auto text-default">{{
483
+ formatJson(msg.payload)
484
+ }}</pre>
427
485
  </div>
428
486
 
429
487
  <div v-if="!activeRoom?.messages?.length" class="p-8 text-center text-xs text-muted">
@@ -470,9 +528,13 @@ function formatJson(val: any): string {
470
528
 
471
529
  <!-- Tab 3: Synchronized Room State -->
472
530
  <div v-else-if="activeTab === 'state'" class="flex-1 overflow-y-auto p-4 space-y-3">
473
- <div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">Durable Object Synchronized State</div>
531
+ <div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">
532
+ Durable Object Synchronized State
533
+ </div>
474
534
  <div class="rounded-xl border border-default bg-elevated/40 p-4">
475
- <pre class="font-mono text-xs text-default overflow-x-auto whitespace-pre-wrap">{{ formatJson(activeRoom?.state || {}) }}</pre>
535
+ <pre class="font-mono text-xs text-default overflow-x-auto whitespace-pre-wrap">{{
536
+ formatJson(activeRoom?.state || {})
537
+ }}</pre>
476
538
  </div>
477
539
  </div>
478
540
  </div>
@@ -145,7 +145,9 @@ function formatTime(ts: number): string {
145
145
  return new Date(ts).toLocaleTimeString()
146
146
  }
147
147
 
148
- function getBadgeColor(type: string): "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" {
148
+ function getBadgeColor(
149
+ type: string,
150
+ ): "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" {
149
151
  switch (type) {
150
152
  case "ratelimit":
151
153
  return "warning"
@@ -361,7 +363,13 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
361
363
  <td class="px-4 py-3">
362
364
  <UBadge
363
365
  size="xs"
364
- :color="ev.action === 'blocked' ? 'error' : ev.action === 'challenged' ? 'warning' : 'success'"
366
+ :color="
367
+ ev.action === 'blocked'
368
+ ? 'error'
369
+ : ev.action === 'challenged'
370
+ ? 'warning'
371
+ : 'success'
372
+ "
365
373
  variant="subtle"
366
374
  >
367
375
  {{ ev.action }}
@@ -378,7 +386,12 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
378
386
  variant="ghost"
379
387
  label="Ban IP"
380
388
  icon="i-lucide-ban"
381
- @click="() => { newBanIp = ev.ip; triggerBanIp() }"
389
+ @click="
390
+ () => {
391
+ newBanIp = ev.ip
392
+ triggerBanIp()
393
+ }
394
+ "
382
395
  />
383
396
  <UButton
384
397
  v-else
@@ -432,7 +445,7 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
432
445
  </td>
433
446
  <td class="px-4 py-3">
434
447
  <UBadge size="xs" :color="b.isBlocked ? 'error' : 'success'" variant="subtle">
435
- {{ b.isBlocked ? 'Rate Limited' : 'Active' }}
448
+ {{ b.isBlocked ? "Rate Limited" : "Active" }}
436
449
  </UBadge>
437
450
  </td>
438
451
  <td class="px-4 py-3 text-right font-mono text-muted text-[11px]">
@@ -452,7 +465,9 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
452
465
  <!-- ── Tab 3: Banned IP Registry ──────────────────────────────────── -->
453
466
  <div v-else-if="activeTab === 'banned'" class="space-y-4">
454
467
  <!-- Add Ban Form -->
455
- <div class="flex items-center gap-2 p-3 rounded-xl border border-default bg-elevated/20 max-w-md">
468
+ <div
469
+ class="flex items-center gap-2 p-3 rounded-xl border border-default bg-elevated/20 max-w-md"
470
+ >
456
471
  <UInput
457
472
  v-model="newBanIp"
458
473
  placeholder="Enter IP address (e.g. 198.51.100.42)"