qarpeo 0.0.0-alpha.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/LICENSE +21 -0
- package/README.md +102 -0
- package/dist/chunks/auth-schema.mjs +219 -0
- package/dist/chunks/wrangler.mjs +783 -0
- package/dist/cli/index.mjs +1085 -0
- package/dist/dev/env.d.ts +12 -0
- package/dist/dev/wrangler.d.ts +18 -0
- package/dist/module.d.ts +16 -0
- package/dist/module.mjs +4436 -0
- package/dist/runtime/ai.d.ts +25 -0
- package/dist/runtime/ai.mjs +106 -0
- package/dist/runtime/analytics.d.ts +24 -0
- package/dist/runtime/analytics.mjs +38 -0
- package/dist/runtime/app/components/BlobImage.vue +100 -0
- package/dist/runtime/app/components/CMSBlocks.vue +93 -0
- package/dist/runtime/app/components/CMSContent.vue +23 -0
- package/dist/runtime/app/components/CMSImage.vue +49 -0
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +110 -0
- package/dist/runtime/app/components/CMSPreviewBanner.vue +79 -0
- package/dist/runtime/app/components/CMSVersionBanner.vue +49 -0
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +126 -0
- package/dist/runtime/app/components/ContentRenderer.vue +80 -0
- package/dist/runtime/app/components/FileUpload.vue +196 -0
- package/dist/runtime/app/components/ImpersonationBanner.vue +57 -0
- package/dist/runtime/app/components/SignedIn.vue +13 -0
- package/dist/runtime/app/components/SignedOut.vue +13 -0
- package/dist/runtime/app/components/shiki.css +34 -0
- package/dist/runtime/app/composables/analytics.d.ts +125 -0
- package/dist/runtime/app/composables/analytics.mjs +81 -0
- package/dist/runtime/app/composables/api-tokens.d.ts +49 -0
- package/dist/runtime/app/composables/api-tokens.mjs +61 -0
- package/dist/runtime/app/composables/auth.d.ts +50 -0
- package/dist/runtime/app/composables/auth.mjs +101 -0
- package/dist/runtime/app/composables/chat.d.ts +69 -0
- package/dist/runtime/app/composables/chat.mjs +159 -0
- package/dist/runtime/app/composables/cms-preview.d.ts +33 -0
- package/dist/runtime/app/composables/cms-preview.mjs +83 -0
- package/dist/runtime/app/composables/cms.d.ts +307 -0
- package/dist/runtime/app/composables/cms.mjs +355 -0
- package/dist/runtime/app/composables/docs-version.d.ts +35 -0
- package/dist/runtime/app/composables/docs-version.mjs +70 -0
- package/dist/runtime/app/composables/impersonation.d.ts +14 -0
- package/dist/runtime/app/composables/impersonation.mjs +44 -0
- package/dist/runtime/app/composables/notifications.d.ts +35 -0
- package/dist/runtime/app/composables/notifications.mjs +139 -0
- package/dist/runtime/app/composables/organization.d.ts +127 -0
- package/dist/runtime/app/composables/organization.mjs +138 -0
- package/dist/runtime/app/composables/passkey.d.ts +6 -0
- package/dist/runtime/app/composables/passkey.mjs +105 -0
- package/dist/runtime/app/composables/passwordless.d.ts +7 -0
- package/dist/runtime/app/composables/passwordless.mjs +67 -0
- package/dist/runtime/app/composables/payments.d.ts +43 -0
- package/dist/runtime/app/composables/payments.mjs +74 -0
- package/dist/runtime/app/composables/realtime.d.ts +96 -0
- package/dist/runtime/app/composables/realtime.mjs +432 -0
- package/dist/runtime/app/composables/site.d.ts +35 -0
- package/dist/runtime/app/composables/site.mjs +36 -0
- package/dist/runtime/app/composables/storage.d.ts +60 -0
- package/dist/runtime/app/composables/storage.mjs +294 -0
- package/dist/runtime/app/composables/tenant.d.ts +82 -0
- package/dist/runtime/app/composables/tenant.mjs +120 -0
- package/dist/runtime/app/composables/turnstile.d.ts +3 -0
- package/dist/runtime/app/composables/turnstile.mjs +10 -0
- package/dist/runtime/app/composables/two-factor.d.ts +12 -0
- package/dist/runtime/app/composables/two-factor.mjs +65 -0
- package/dist/runtime/app/middleware/auth.global.d.ts +2 -0
- package/dist/runtime/app/middleware/auth.global.mjs +44 -0
- package/dist/runtime/app/pages/cms.vue +2249 -0
- package/dist/runtime/app/pages/devtools/agents.vue +717 -0
- package/dist/runtime/app/pages/devtools/analytics.vue +618 -0
- package/dist/runtime/app/pages/devtools/auth.vue +351 -0
- package/dist/runtime/app/pages/devtools/blob.vue +745 -0
- package/dist/runtime/app/pages/devtools/db.vue +546 -0
- package/dist/runtime/app/pages/devtools/domains.vue +772 -0
- package/dist/runtime/app/pages/devtools/kv.vue +829 -0
- package/dist/runtime/app/pages/devtools/logs.vue +655 -0
- package/dist/runtime/app/pages/devtools/mail.vue +389 -0
- package/dist/runtime/app/pages/devtools/overview.vue +390 -0
- package/dist/runtime/app/pages/devtools/settings.vue +560 -0
- package/dist/runtime/app/pages/devtools.vue +165 -0
- package/dist/runtime/app/plugins/seo.d.ts +2 -0
- package/dist/runtime/app/plugins/seo.mjs +105 -0
- package/dist/runtime/app/plugins/shortcuts.client.d.ts +6 -0
- package/dist/runtime/app/plugins/shortcuts.client.mjs +19 -0
- package/dist/runtime/app/public/sw-notifications.mjs +52 -0
- package/dist/runtime/auth.d.ts +25 -0
- package/dist/runtime/auth.mjs +11 -0
- package/dist/runtime/bindings.d.ts +27 -0
- package/dist/runtime/bindings.mjs +38 -0
- package/dist/runtime/blob.d.ts +26 -0
- package/dist/runtime/blob.mjs +334 -0
- package/dist/runtime/bots.d.ts +1 -0
- package/dist/runtime/bots.mjs +1 -0
- package/dist/runtime/browser.d.ts +21 -0
- package/dist/runtime/browser.mjs +64 -0
- package/dist/runtime/cache.d.ts +19 -0
- package/dist/runtime/cache.mjs +12 -0
- package/dist/runtime/cms.d.ts +2 -0
- package/dist/runtime/cms.mjs +0 -0
- package/dist/runtime/db.d.ts +21 -0
- package/dist/runtime/db.mjs +36 -0
- package/dist/runtime/drizzle.d.ts +11 -0
- package/dist/runtime/drizzle.mjs +18 -0
- package/dist/runtime/email.d.ts +51 -0
- package/dist/runtime/email.mjs +245 -0
- package/dist/runtime/hyperdrive.d.ts +21 -0
- package/dist/runtime/hyperdrive.mjs +49 -0
- package/dist/runtime/index.d.ts +23 -0
- package/dist/runtime/index.mjs +23 -0
- package/dist/runtime/kv.d.ts +16 -0
- package/dist/runtime/kv.mjs +126 -0
- package/dist/runtime/payments.d.ts +2 -0
- package/dist/runtime/payments.mjs +0 -0
- package/dist/runtime/queue.d.ts +21 -0
- package/dist/runtime/queue.mjs +41 -0
- package/dist/runtime/rag.d.ts +1 -0
- package/dist/runtime/rag.mjs +1 -0
- package/dist/runtime/ratelimit.d.ts +21 -0
- package/dist/runtime/ratelimit.mjs +38 -0
- package/dist/runtime/realtime.d.ts +6 -0
- package/dist/runtime/realtime.mjs +13 -0
- package/dist/runtime/server/db/cms-schema.d.ts +651 -0
- package/dist/runtime/server/db/cms-schema.mjs +74 -0
- package/dist/runtime/server/durable-objects/agent.d.ts +14 -0
- package/dist/runtime/server/durable-objects/agent.mjs +571 -0
- package/dist/runtime/server/durable-objects/room.d.ts +34 -0
- package/dist/runtime/server/durable-objects/room.mjs +514 -0
- package/dist/runtime/server/middleware/auth.d.ts +2 -0
- package/dist/runtime/server/middleware/auth.mjs +108 -0
- package/dist/runtime/server/middleware/devtools.d.ts +2 -0
- package/dist/runtime/server/middleware/devtools.mjs +61 -0
- package/dist/runtime/server/middleware/ratelimit.d.ts +2 -0
- package/dist/runtime/server/middleware/ratelimit.mjs +49 -0
- package/dist/runtime/server/middleware/tenancy.d.ts +6 -0
- package/dist/runtime/server/middleware/tenancy.mjs +15 -0
- package/dist/runtime/server/middleware/tracker.d.ts +7 -0
- package/dist/runtime/server/middleware/tracker.mjs +9 -0
- package/dist/runtime/server/plugins/agents.d.ts +7 -0
- package/dist/runtime/server/plugins/agents.mjs +3 -0
- package/dist/runtime/server/plugins/cms.d.ts +7 -0
- package/dist/runtime/server/plugins/cms.mjs +16 -0
- package/dist/runtime/server/plugins/dev-logs.d.ts +1 -0
- package/dist/runtime/server/plugins/dev-logs.mjs +58 -0
- package/dist/runtime/server/plugins/dev-proxy.d.ts +3 -0
- package/dist/runtime/server/plugins/dev-proxy.mjs +21 -0
- package/dist/runtime/server/plugins/env.d.ts +6 -0
- package/dist/runtime/server/plugins/env.mjs +17 -0
- package/dist/runtime/server/plugins/queue.d.ts +6 -0
- package/dist/runtime/server/plugins/queue.mjs +8 -0
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +20 -0
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.mjs +110 -0
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.mjs +15 -0
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.d.ts +17 -0
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.mjs +47 -0
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.d.ts +15 -0
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.mjs +63 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +64 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.mjs +55 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +30 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.mjs +73 -0
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.mjs +46 -0
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.mjs +65 -0
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.d.ts +22 -0
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.mjs +36 -0
- package/dist/runtime/server/routes/__qarpeo/db/query.post.d.ts +23 -0
- package/dist/runtime/server/routes/__qarpeo/db/query.post.mjs +34 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +31 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +81 -0
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.mjs +18 -0
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.mjs +20 -0
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.d.ts +8 -0
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.mjs +27 -0
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.d.ts +14 -0
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/logs.delete.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/logs.delete.mjs +6 -0
- package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/logs.get.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/logs.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/logs.post.mjs +17 -0
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.mjs +37 -0
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.d.ts +4 -0
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.mjs +6 -0
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.mjs +7 -0
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.d.ts +4 -0
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.mjs +29 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +23 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.mjs +31 -0
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.d.ts +8 -0
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.mjs +46 -0
- package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +32 -0
- package/dist/runtime/server/routes/__qarpeo/overview.get.mjs +38 -0
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.mjs +84 -0
- package/dist/runtime/server/routes/__qarpeo/settings.get.d.ts +124 -0
- package/dist/runtime/server/routes/__qarpeo/settings.get.mjs +145 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.mjs +29 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.d.ts +15 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.mjs +22 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.d.ts +2 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +35 -0
- package/dist/runtime/server/routes/agents/[agent]/clear.post.d.ts +4 -0
- package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +27 -0
- package/dist/runtime/server/routes/agents/[agent]/history.get.d.ts +4 -0
- package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +27 -0
- package/dist/runtime/server/routes/analytics/events.get.d.ts +3 -0
- package/dist/runtime/server/routes/analytics/events.get.mjs +17 -0
- package/dist/runtime/server/routes/analytics/pageviews.get.d.ts +3 -0
- package/dist/runtime/server/routes/analytics/pageviews.get.mjs +15 -0
- package/dist/runtime/server/routes/analytics/summary.get.d.ts +6 -0
- package/dist/runtime/server/routes/analytics/summary.get.mjs +15 -0
- package/dist/runtime/server/routes/atom.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/atom.xml.get.mjs +76 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +44 -0
- package/dist/runtime/server/routes/auth/2fa/setup.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/2fa/setup.post.mjs +32 -0
- package/dist/runtime/server/routes/auth/2fa/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +92 -0
- package/dist/runtime/server/routes/auth/[provider]/callback.d.ts +1 -0
- package/dist/runtime/server/routes/auth/[provider]/callback.mjs +1 -0
- package/dist/runtime/server/routes/auth/[provider].d.ts +3 -0
- package/dist/runtime/server/routes/auth/[provider].mjs +95 -0
- package/dist/runtime/server/routes/auth/account.delete.d.ts +5 -0
- package/dist/runtime/server/routes/auth/account.delete.mjs +52 -0
- package/dist/runtime/server/routes/auth/impersonate/start.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/impersonate/start.post.mjs +14 -0
- package/dist/runtime/server/routes/auth/impersonate/stop.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/impersonate/stop.post.mjs +5 -0
- package/dist/runtime/server/routes/auth/logout-all.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout-all.post.mjs +16 -0
- package/dist/runtime/server/routes/auth/logout-others.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout-others.post.mjs +11 -0
- package/dist/runtime/server/routes/auth/logout.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +10 -0
- package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +29 -0
- package/dist/runtime/server/routes/auth/magic-link/verify.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +81 -0
- package/dist/runtime/server/routes/auth/organization/create.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/create.post.mjs +10 -0
- package/dist/runtime/server/routes/auth/organization/invite.post.d.ts +9 -0
- package/dist/runtime/server/routes/auth/organization/invite.post.mjs +27 -0
- package/dist/runtime/server/routes/auth/organization/join.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/join.post.mjs +15 -0
- package/dist/runtime/server/routes/auth/organization/list.get.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/list.get.mjs +7 -0
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.mjs +33 -0
- package/dist/runtime/server/routes/auth/organization/members/index.get.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/members/index.get.mjs +18 -0
- package/dist/runtime/server/routes/auth/organization/mfa.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/mfa.post.mjs +33 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.mjs +28 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.get.mjs +23 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.post.mjs +84 -0
- package/dist/runtime/server/routes/auth/organization/switch.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/switch.post.mjs +14 -0
- package/dist/runtime/server/routes/auth/otp/send.post.d.ts +10 -0
- package/dist/runtime/server/routes/auth/otp/send.post.mjs +29 -0
- package/dist/runtime/server/routes/auth/otp/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/otp/verify.post.mjs +95 -0
- package/dist/runtime/server/routes/auth/sessions/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/auth/sessions/[id].delete.mjs +24 -0
- package/dist/runtime/server/routes/auth/sessions.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sessions.get.mjs +11 -0
- package/dist/runtime/server/routes/auth/sso/login.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +94 -0
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +113 -0
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +95 -0
- package/dist/runtime/server/routes/auth/tokens/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/tokens/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/auth/tokens/create.post.d.ts +9 -0
- package/dist/runtime/server/routes/auth/tokens/create.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/tokens/index.get.d.ts +9 -0
- package/dist/runtime/server/routes/auth/tokens/index.get.mjs +5 -0
- package/dist/runtime/server/routes/auth/turnstile/verify.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/turnstile/verify.post.mjs +15 -0
- package/dist/runtime/server/routes/auth/user.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/user.get.mjs +6 -0
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +127 -0
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +47 -0
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +88 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.d.ts +8 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.mjs +27 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.d.ts +6 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.d.ts +6 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.mjs +33 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.mjs +17 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].put.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].put.mjs +18 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.mjs +69 -0
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.d.ts +8 -0
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.mjs +23 -0
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.mjs +65 -0
- package/dist/runtime/server/routes/cms/[collection]/index.get.d.ts +7 -0
- package/dist/runtime/server/routes/cms/[collection]/index.get.mjs +15 -0
- package/dist/runtime/server/routes/cms/[collection]/index.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/index.post.mjs +23 -0
- package/dist/runtime/server/routes/cms/[collection]/references.get.d.ts +19 -0
- package/dist/runtime/server/routes/cms/[collection]/references.get.mjs +47 -0
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.d.ts +10 -0
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.mjs +12 -0
- package/dist/runtime/server/routes/cms/collections/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/[id].delete.mjs +10 -0
- package/dist/runtime/server/routes/cms/collections/[id].put.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/[id].put.mjs +11 -0
- package/dist/runtime/server/routes/cms/collections/index.get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/index.get.mjs +6 -0
- package/dist/runtime/server/routes/cms/collections/index.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/index.post.mjs +19 -0
- package/dist/runtime/server/routes/cms/components/index.get.d.ts +17 -0
- package/dist/runtime/server/routes/cms/components/index.get.mjs +16 -0
- package/dist/runtime/server/routes/cms/deploy.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/deploy.post.mjs +46 -0
- package/dist/runtime/server/routes/cms/export.post.d.ts +10 -0
- package/dist/runtime/server/routes/cms/export.post.mjs +55 -0
- package/dist/runtime/server/routes/cms/navigation.get.d.ts +8 -0
- package/dist/runtime/server/routes/cms/navigation.get.mjs +36 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +9 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.mjs +9 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +14 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.mjs +42 -0
- package/dist/runtime/server/routes/cms/publish-scheduled.post.d.ts +11 -0
- package/dist/runtime/server/routes/cms/publish-scheduled.post.mjs +35 -0
- package/dist/runtime/server/routes/cms/search.get.d.ts +13 -0
- package/dist/runtime/server/routes/cms/search.get.mjs +137 -0
- package/dist/runtime/server/routes/cms/sync.post.d.ts +7 -0
- package/dist/runtime/server/routes/cms/sync.post.mjs +18 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +150 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +213 -0
- package/dist/runtime/server/routes/docs/search.get.d.ts +15 -0
- package/dist/runtime/server/routes/docs/search.get.mjs +20 -0
- package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/feed.xml.get.mjs +73 -0
- package/dist/runtime/server/routes/mail/bounce.post.d.ts +14 -0
- package/dist/runtime/server/routes/mail/bounce.post.mjs +56 -0
- package/dist/runtime/server/routes/mail/inbox/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/mail/inbox/[id].get.mjs +9 -0
- package/dist/runtime/server/routes/mail/inbox.get.d.ts +4 -0
- package/dist/runtime/server/routes/mail/inbox.get.mjs +7 -0
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.d.ts +11 -0
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.mjs +18 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.d.ts +12 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.mjs +23 -0
- package/dist/runtime/server/routes/mail/suppressions/index.post.d.ts +10 -0
- package/dist/runtime/server/routes/mail/suppressions/index.post.mjs +23 -0
- package/dist/runtime/server/routes/mail/unsubscribe.d.ts +13 -0
- package/dist/runtime/server/routes/mail/unsubscribe.mjs +91 -0
- package/dist/runtime/server/routes/mail/webhooks.post.d.ts +12 -0
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +71 -0
- package/dist/runtime/server/routes/notifications/[id]/read.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/[id]/read.post.mjs +13 -0
- package/dist/runtime/server/routes/notifications/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/notifications/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/notifications/[id].get.mjs +15 -0
- package/dist/runtime/server/routes/notifications/index.get.d.ts +6 -0
- package/dist/runtime/server/routes/notifications/index.get.mjs +18 -0
- package/dist/runtime/server/routes/notifications/push/subscribe.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/push/subscribe.post.mjs +20 -0
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.mjs +15 -0
- package/dist/runtime/server/routes/notifications/read-all.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/read-all.post.mjs +11 -0
- package/dist/runtime/server/routes/payments/cancel.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/cancel.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/change-plan.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/change-plan.post.mjs +12 -0
- package/dist/runtime/server/routes/payments/checkout.post.d.ts +9 -0
- package/dist/runtime/server/routes/payments/checkout.post.mjs +16 -0
- package/dist/runtime/server/routes/payments/pause.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/pause.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/portal.post.d.ts +5 -0
- package/dist/runtime/server/routes/payments/portal.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/subscription.get.d.ts +6 -0
- package/dist/runtime/server/routes/payments/subscription.get.mjs +9 -0
- package/dist/runtime/server/routes/payments/usage.get.d.ts +12 -0
- package/dist/runtime/server/routes/payments/usage.get.mjs +18 -0
- package/dist/runtime/server/routes/payments/usage.post.d.ts +6 -0
- package/dist/runtime/server/routes/payments/usage.post.mjs +24 -0
- package/dist/runtime/server/routes/payments/webhook.post.d.ts +14 -0
- package/dist/runtime/server/routes/payments/webhook.post.mjs +21 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.d.ts +4 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.mjs +26 -0
- package/dist/runtime/server/routes/realtime/history.delete.d.ts +13 -0
- package/dist/runtime/server/routes/realtime/history.delete.mjs +12 -0
- package/dist/runtime/server/routes/realtime/history.get.d.ts +16 -0
- package/dist/runtime/server/routes/realtime/history.get.mjs +15 -0
- package/dist/runtime/server/routes/realtime/presence.get.d.ts +6 -0
- package/dist/runtime/server/routes/realtime/presence.get.mjs +27 -0
- package/dist/runtime/server/routes/realtime/state.get.d.ts +5 -0
- package/dist/runtime/server/routes/realtime/state.get.mjs +26 -0
- package/dist/runtime/server/routes/realtime/state.post.d.ts +6 -0
- package/dist/runtime/server/routes/realtime/state.post.mjs +37 -0
- package/dist/runtime/server/routes/realtime/ws.get.d.ts +2 -0
- package/dist/runtime/server/routes/realtime/ws.get.mjs +73 -0
- package/dist/runtime/server/routes/robots.txt.get.d.ts +2 -0
- package/dist/runtime/server/routes/robots.txt.get.mjs +41 -0
- package/dist/runtime/server/routes/rss.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/rss.xml.get.mjs +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +84 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.d.ts +4 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.mjs +23 -0
- package/dist/runtime/server/routes/storage/file/[...key].get.d.ts +2 -0
- package/dist/runtime/server/routes/storage/file/[...key].get.mjs +23 -0
- package/dist/runtime/server/routes/storage/files.get.d.ts +14 -0
- package/dist/runtime/server/routes/storage/files.get.mjs +11 -0
- package/dist/runtime/server/routes/storage/presigned.post.d.ts +8 -0
- package/dist/runtime/server/routes/storage/presigned.post.mjs +39 -0
- package/dist/runtime/server/routes/storage/sign.post.d.ts +6 -0
- package/dist/runtime/server/routes/storage/sign.post.mjs +24 -0
- package/dist/runtime/server/routes/storage/upload.post.d.ts +22 -0
- package/dist/runtime/server/routes/storage/upload.post.mjs +96 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +39 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +39 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +20 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +44 -0
- package/dist/runtime/server/routes/tenants/current.get.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/current.get.mjs +6 -0
- package/dist/runtime/server/tasks/cms/publish.d.ts +4 -0
- package/dist/runtime/server/tasks/cms/publish.mjs +18 -0
- package/dist/runtime/server/utils/agent-store.d.ts +24 -0
- package/dist/runtime/server/utils/agent-store.mjs +53 -0
- package/dist/runtime/server/utils/agents-registry-fallback.d.ts +1 -0
- package/dist/runtime/server/utils/agents-registry-fallback.mjs +1 -0
- package/dist/runtime/server/utils/ai.d.ts +119 -0
- package/dist/runtime/server/utils/ai.mjs +607 -0
- package/dist/runtime/server/utils/analytics-query.d.ts +109 -0
- package/dist/runtime/server/utils/analytics-query.mjs +234 -0
- package/dist/runtime/server/utils/auth.d.ts +60 -0
- package/dist/runtime/server/utils/auth.mjs +361 -0
- package/dist/runtime/server/utils/blob-store.d.ts +13 -0
- package/dist/runtime/server/utils/blob-store.mjs +60 -0
- package/dist/runtime/server/utils/bots.d.ts +21 -0
- package/dist/runtime/server/utils/bots.mjs +491 -0
- package/dist/runtime/server/utils/cache.d.ts +33 -0
- package/dist/runtime/server/utils/cache.mjs +128 -0
- package/dist/runtime/server/utils/cms-events.d.ts +17 -0
- package/dist/runtime/server/utils/cms-events.mjs +80 -0
- package/dist/runtime/server/utils/cms-filter.d.ts +3 -0
- package/dist/runtime/server/utils/cms-filter.mjs +34 -0
- package/dist/runtime/server/utils/cms.d.ts +278 -0
- package/dist/runtime/server/utils/cms.mjs +3268 -0
- package/dist/runtime/server/utils/config.d.ts +27 -0
- package/dist/runtime/server/utils/config.mjs +38 -0
- package/dist/runtime/server/utils/context.d.ts +13 -0
- package/dist/runtime/server/utils/context.mjs +98 -0
- package/dist/runtime/server/utils/crypto.d.ts +16 -0
- package/dist/runtime/server/utils/crypto.mjs +56 -0
- package/dist/runtime/server/utils/dev-logs.d.ts +21 -0
- package/dist/runtime/server/utils/dev-logs.mjs +41 -0
- package/dist/runtime/server/utils/dev-proxy.d.ts +1 -0
- package/dist/runtime/server/utils/dev-proxy.mjs +69 -0
- package/dist/runtime/server/utils/domains.d.ts +46 -0
- package/dist/runtime/server/utils/domains.mjs +318 -0
- package/dist/runtime/server/utils/drizzle.d.ts +10 -0
- package/dist/runtime/server/utils/drizzle.mjs +36 -0
- package/dist/runtime/server/utils/email-templates.d.ts +44 -0
- package/dist/runtime/server/utils/email-templates.mjs +373 -0
- package/dist/runtime/server/utils/feed.d.ts +42 -0
- package/dist/runtime/server/utils/feed.mjs +161 -0
- package/dist/runtime/server/utils/impersonation.d.ts +67 -0
- package/dist/runtime/server/utils/impersonation.mjs +298 -0
- package/dist/runtime/server/utils/jobs.d.ts +70 -0
- package/dist/runtime/server/utils/jobs.mjs +125 -0
- package/dist/runtime/server/utils/kv-store.d.ts +9 -0
- package/dist/runtime/server/utils/kv-store.mjs +32 -0
- package/dist/runtime/server/utils/mail-suppression.d.ts +62 -0
- package/dist/runtime/server/utils/mail-suppression.mjs +328 -0
- package/dist/runtime/server/utils/mail.d.ts +90 -0
- package/dist/runtime/server/utils/mail.mjs +366 -0
- package/dist/runtime/server/utils/notifications.d.ts +51 -0
- package/dist/runtime/server/utils/notifications.mjs +215 -0
- package/dist/runtime/server/utils/organization.d.ts +54 -0
- package/dist/runtime/server/utils/organization.mjs +354 -0
- package/dist/runtime/server/utils/passwordless.d.ts +48 -0
- package/dist/runtime/server/utils/passwordless.mjs +179 -0
- package/dist/runtime/server/utils/payments.d.ts +121 -0
- package/dist/runtime/server/utils/payments.mjs +1067 -0
- package/dist/runtime/server/utils/queue-fallback.d.ts +2 -0
- package/dist/runtime/server/utils/queue-fallback.mjs +2 -0
- package/dist/runtime/server/utils/queue.d.ts +4 -0
- package/dist/runtime/server/utils/queue.mjs +3 -0
- package/dist/runtime/server/utils/rag.d.ts +25 -0
- package/dist/runtime/server/utils/rag.mjs +333 -0
- package/dist/runtime/server/utils/ratelimit.d.ts +45 -0
- package/dist/runtime/server/utils/ratelimit.mjs +182 -0
- package/dist/runtime/server/utils/realtime.d.ts +110 -0
- package/dist/runtime/server/utils/realtime.mjs +197 -0
- package/dist/runtime/server/utils/schema-fallback.d.ts +3 -0
- package/dist/runtime/server/utils/schema-fallback.mjs +2 -0
- package/dist/runtime/server/utils/session.d.ts +72 -0
- package/dist/runtime/server/utils/session.mjs +287 -0
- package/dist/runtime/server/utils/sso.d.ts +49 -0
- package/dist/runtime/server/utils/sso.mjs +131 -0
- package/dist/runtime/server/utils/storage.d.ts +111 -0
- package/dist/runtime/server/utils/storage.mjs +654 -0
- package/dist/runtime/server/utils/tenant.d.ts +44 -0
- package/dist/runtime/server/utils/tenant.mjs +285 -0
- package/dist/runtime/server/utils/totp.d.ts +33 -0
- package/dist/runtime/server/utils/totp.mjs +112 -0
- package/dist/runtime/server/utils/tracker.d.ts +72 -0
- package/dist/runtime/server/utils/tracker.mjs +139 -0
- package/dist/runtime/server/utils/turnstile.d.ts +17 -0
- package/dist/runtime/server/utils/turnstile.mjs +68 -0
- package/dist/runtime/server/utils/vapid.d.ts +35 -0
- package/dist/runtime/server/utils/vapid.mjs +211 -0
- package/dist/runtime/storage.d.ts +1 -0
- package/dist/runtime/storage.mjs +0 -0
- package/dist/runtime/types/ai.d.ts +68 -0
- package/dist/runtime/types/ai.mjs +0 -0
- package/dist/runtime/types/analytics.d.ts +30 -0
- package/dist/runtime/types/analytics.mjs +0 -0
- package/dist/runtime/types/auth-globals.d.ts +14 -0
- package/dist/runtime/types/auth.d.ts +153 -0
- package/dist/runtime/types/auth.mjs +0 -0
- package/dist/runtime/types/browser.d.ts +29 -0
- package/dist/runtime/types/browser.mjs +0 -0
- package/dist/runtime/types/d1.d.ts +44 -0
- package/dist/runtime/types/d1.mjs +0 -0
- package/dist/runtime/types/drizzle.d.ts +13 -0
- package/dist/runtime/types/drizzle.mjs +0 -0
- package/dist/runtime/types/durable-object.d.ts +51 -0
- package/dist/runtime/types/durable-object.mjs +0 -0
- package/dist/runtime/types/email.d.ts +66 -0
- package/dist/runtime/types/email.mjs +0 -0
- package/dist/runtime/types/hyperdrive.d.ts +18 -0
- package/dist/runtime/types/hyperdrive.mjs +0 -0
- package/dist/runtime/types/imports.d.ts +58 -0
- package/dist/runtime/types/index.d.ts +156 -0
- package/dist/runtime/types/index.mjs +13 -0
- package/dist/runtime/types/queue.d.ts +67 -0
- package/dist/runtime/types/queue.mjs +0 -0
- package/dist/runtime/types/r2.d.ts +108 -0
- package/dist/runtime/types/r2.mjs +0 -0
- package/dist/runtime/types/ratelimit.d.ts +21 -0
- package/dist/runtime/types/ratelimit.mjs +0 -0
- package/dist/runtime/types/vectorize.d.ts +74 -0
- package/dist/runtime/types/vectorize.mjs +0 -0
- package/dist/runtime/vectorize.d.ts +21 -0
- package/dist/runtime/vectorize.mjs +53 -0
- package/dist/types.d.ts +2750 -0
- package/dist/types.mjs +1 -0
- package/dist/utils/agents.d.ts +8 -0
- package/dist/utils/auth-schema.d.ts +11 -0
- package/dist/utils/bindings.d.ts +16 -0
- package/dist/utils/cms-schema.d.ts +1 -0
- package/dist/utils/cms-sources.d.ts +62 -0
- package/dist/utils/drizzle.d.ts +42 -0
- package/dist/utils/jobs.d.ts +8 -0
- package/dist/utils/local-db.d.ts +28 -0
- package/dist/utils/notifications-schema.d.ts +15 -0
- package/dist/utils/payments-schema.d.ts +11 -0
- package/dist/utils/pkg.d.ts +15 -0
- package/dist/utils/queue.d.ts +8 -0
- package/dist/utils/tenants-schema.d.ts +11 -0
- package/package.json +104 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
import { useDocsVersion } from "../composables/docs-version"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `<CMSVersionBanner>` / `<DocsVersionBanner>` — Warning banner displayed when a reader
|
|
7
|
+
* is viewing an archived or legacy documentation version. Provides a one-click link to
|
|
8
|
+
* the equivalent page in the latest version.
|
|
9
|
+
*/
|
|
10
|
+
withDefaults(defineProps<{
|
|
11
|
+
class?: string
|
|
12
|
+
}>(), {
|
|
13
|
+
class: "",
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const { isLatest, activeVersionItem, getVersionPath } = useDocsVersion()
|
|
17
|
+
const latestUrl = computed(() => getVersionPath("latest"))
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div
|
|
22
|
+
v-if="!isLatest"
|
|
23
|
+
:class="[
|
|
24
|
+
'rounded-lg border border-amber-300/80 dark:border-amber-700/60 bg-amber-50/90 dark:bg-amber-950/30 p-3.5 text-xs text-amber-900 dark:text-amber-200 mb-6 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 shadow-xs',
|
|
25
|
+
$props.class,
|
|
26
|
+
]"
|
|
27
|
+
role="alert"
|
|
28
|
+
aria-live="polite"
|
|
29
|
+
>
|
|
30
|
+
<div class="flex items-center gap-2">
|
|
31
|
+
<span class="text-base leading-none">⚠️</span>
|
|
32
|
+
<span>
|
|
33
|
+
You are viewing archived documentation for
|
|
34
|
+
<strong class="font-semibold">{{ activeVersionItem.label }}</strong>.
|
|
35
|
+
This version may be outdated.
|
|
36
|
+
</span>
|
|
37
|
+
</div>
|
|
38
|
+
<UButton
|
|
39
|
+
:to="latestUrl"
|
|
40
|
+
size="xs"
|
|
41
|
+
color="warning"
|
|
42
|
+
variant="subtle"
|
|
43
|
+
class="shrink-0"
|
|
44
|
+
trailing-icon="i-lucide-arrow-right"
|
|
45
|
+
>
|
|
46
|
+
Switch to latest version
|
|
47
|
+
</UButton>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
import { useDocsVersion } from "../composables/docs-version"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `<CMSVersionSwitcher>` / `<DocsVersionSwitcher>` — Polished Nuxt UI component for switching
|
|
7
|
+
* between documentation versions. Preserves the active subpath when switching.
|
|
8
|
+
*/
|
|
9
|
+
const props = withDefaults(
|
|
10
|
+
defineProps<{
|
|
11
|
+
variant?: "dropdown" | "select" | "buttons" | "badge"
|
|
12
|
+
size?: "xs" | "sm" | "md"
|
|
13
|
+
color?: "primary" | "neutral" | "secondary"
|
|
14
|
+
class?: string
|
|
15
|
+
}>(),
|
|
16
|
+
{
|
|
17
|
+
variant: "dropdown",
|
|
18
|
+
size: "xs",
|
|
19
|
+
color: "primary",
|
|
20
|
+
class: "",
|
|
21
|
+
},
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const { currentVersion, versions, switchVersion } = useDocsVersion()
|
|
25
|
+
|
|
26
|
+
const currentLabel = computed(() => {
|
|
27
|
+
const item = versions.value?.find((v) => v.id === currentVersion.value)
|
|
28
|
+
if (item?.label) return item.label
|
|
29
|
+
return currentVersion.value === "latest" ? "latest" : currentVersion.value
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const dropdownItems = computed(() => [
|
|
33
|
+
(versions.value || []).map((v) => ({
|
|
34
|
+
label: v.label,
|
|
35
|
+
icon: v.id === currentVersion.value ? "i-lucide-check" : undefined,
|
|
36
|
+
badge: v.isLatest ? "latest" : v.isArchived ? "legacy" : undefined,
|
|
37
|
+
onSelect: () => switchVersion(v.id),
|
|
38
|
+
})),
|
|
39
|
+
])
|
|
40
|
+
|
|
41
|
+
const selectItems = computed(() =>
|
|
42
|
+
(versions.value || []).map((v) => ({
|
|
43
|
+
label: v.label + (v.isArchived ? " (legacy)" : ""),
|
|
44
|
+
value: v.id,
|
|
45
|
+
})),
|
|
46
|
+
)
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<template v-if="versions && versions.length > 1">
|
|
51
|
+
<!-- Buttons variant -->
|
|
52
|
+
<div
|
|
53
|
+
v-if="variant === 'buttons'"
|
|
54
|
+
:class="['inline-flex items-center gap-1 rounded-lg border border-gray-200 dark:border-gray-800 p-1 bg-gray-50/50 dark:bg-gray-900/50 text-xs font-medium', props.class]"
|
|
55
|
+
role="group"
|
|
56
|
+
aria-label="Documentation version switcher"
|
|
57
|
+
>
|
|
58
|
+
<UButton
|
|
59
|
+
v-for="v in versions"
|
|
60
|
+
:key="v.id"
|
|
61
|
+
:size="size"
|
|
62
|
+
variant="ghost"
|
|
63
|
+
:color="color"
|
|
64
|
+
:label="v.label"
|
|
65
|
+
:class="[
|
|
66
|
+
'flex items-center gap-1.5 transition-colors',
|
|
67
|
+
v.id === currentVersion
|
|
68
|
+
? 'bg-white dark:bg-gray-800 text-gray-900 dark:text-white shadow-xs font-semibold'
|
|
69
|
+
: 'text-gray-600 dark:text-gray-400',
|
|
70
|
+
]"
|
|
71
|
+
@click="switchVersion(v.id)"
|
|
72
|
+
>
|
|
73
|
+
<template v-if="v.isLatest" #trailing>
|
|
74
|
+
<UBadge
|
|
75
|
+
size="xs"
|
|
76
|
+
:color="color"
|
|
77
|
+
variant="subtle"
|
|
78
|
+
class="text-[10px] font-semibold"
|
|
79
|
+
label="latest"
|
|
80
|
+
/>
|
|
81
|
+
</template>
|
|
82
|
+
</UButton>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- Select variant: Nuxt UI USelect -->
|
|
86
|
+
<USelect
|
|
87
|
+
v-else-if="variant === 'select'"
|
|
88
|
+
:model-value="currentVersion"
|
|
89
|
+
:items="selectItems"
|
|
90
|
+
:size="size"
|
|
91
|
+
:color="color"
|
|
92
|
+
variant="subtle"
|
|
93
|
+
class="font-mono"
|
|
94
|
+
:class="props.class"
|
|
95
|
+
@update:model-value="switchVersion($event)"
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
<!-- Dropdown variant (DEFAULT): Nuxt UI UDropdownMenu with subtle button trigger -->
|
|
99
|
+
<UDropdownMenu
|
|
100
|
+
v-else
|
|
101
|
+
:items="dropdownItems"
|
|
102
|
+
:content="{ align: 'start' }"
|
|
103
|
+
>
|
|
104
|
+
<UButton
|
|
105
|
+
:size="size"
|
|
106
|
+
:color="color"
|
|
107
|
+
variant="subtle"
|
|
108
|
+
class="font-mono cursor-pointer"
|
|
109
|
+
trailing-icon="i-lucide-chevron-down"
|
|
110
|
+
:class="props.class"
|
|
111
|
+
:label="currentLabel"
|
|
112
|
+
/>
|
|
113
|
+
</UDropdownMenu>
|
|
114
|
+
</template>
|
|
115
|
+
|
|
116
|
+
<!-- Single version or loading fallback: static Nuxt UI UBadge -->
|
|
117
|
+
<UBadge
|
|
118
|
+
v-else
|
|
119
|
+
:color="color"
|
|
120
|
+
variant="subtle"
|
|
121
|
+
:size="size"
|
|
122
|
+
class="font-mono"
|
|
123
|
+
:class="props.class"
|
|
124
|
+
:label="currentLabel"
|
|
125
|
+
/>
|
|
126
|
+
</template>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, shallowRef, watchEffect } from "vue"
|
|
3
|
+
import { MarkdownDocument } from "@comark/vue"
|
|
4
|
+
import { isMarkdownDocument } from "comark/utils"
|
|
5
|
+
import { createSerializedMarkdownParser } from "comark"
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* `<ContentRenderer>` — Renders a CMS content value (Comark AST, raw markdown string, or page object).
|
|
9
|
+
* Pre-parsed server ASTs are rendered instantly with zero client-side Shiki overhead.
|
|
10
|
+
*/
|
|
11
|
+
const props = withDefaults(defineProps<{
|
|
12
|
+
value?: object | string | null
|
|
13
|
+
excerpt?: boolean
|
|
14
|
+
tag?: string | boolean
|
|
15
|
+
as?: string | boolean
|
|
16
|
+
class?: string | any[] | Record<string, boolean>
|
|
17
|
+
unwrap?: boolean | string | any[]
|
|
18
|
+
components?: Record<string, any>
|
|
19
|
+
plugins?: any[]
|
|
20
|
+
}>(), {
|
|
21
|
+
value: null,
|
|
22
|
+
excerpt: false,
|
|
23
|
+
tag: "div",
|
|
24
|
+
class: "",
|
|
25
|
+
unwrap: false,
|
|
26
|
+
components: () => ({}),
|
|
27
|
+
plugins: () => [],
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const resolvedValue = computed(() => {
|
|
31
|
+
const val = props.value as any
|
|
32
|
+
if (!val) return ""
|
|
33
|
+
if (isMarkdownDocument(val)) return val
|
|
34
|
+
if (isMarkdownDocument(val.body)) return val.body
|
|
35
|
+
if (typeof val.contentMd === "string" && val.contentMd) return val.contentMd
|
|
36
|
+
if (typeof val.body === "string" && val.body) return val.body
|
|
37
|
+
if (typeof val.body?.value === "string") return val.body.value
|
|
38
|
+
if (typeof val.body?.content === "string") return val.body.content
|
|
39
|
+
return ""
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// Lazily-created parser (avoids importing Shiki on the client)
|
|
43
|
+
let _parser: ReturnType<typeof createSerializedMarkdownParser> | null = null
|
|
44
|
+
function getParser() {
|
|
45
|
+
if (!_parser) {
|
|
46
|
+
_parser = createSerializedMarkdownParser({ plugins: (props.plugins as any[]) || [] })
|
|
47
|
+
}
|
|
48
|
+
return _parser
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const parsedDoc = shallowRef<any>(null)
|
|
52
|
+
|
|
53
|
+
watchEffect(() => {
|
|
54
|
+
const content = resolvedValue.value
|
|
55
|
+
if (typeof content === "string" && content) {
|
|
56
|
+
const raw = props.excerpt ? content.split("<!-- more -->")[0] : content
|
|
57
|
+
getParser()(raw.trim(), { streaming: false }).then((doc) => {
|
|
58
|
+
parsedDoc.value = doc
|
|
59
|
+
})
|
|
60
|
+
} else {
|
|
61
|
+
parsedDoc.value = null
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<slot v-if="!resolvedValue" name="empty" />
|
|
68
|
+
<MarkdownDocument
|
|
69
|
+
v-else-if="isMarkdownDocument(resolvedValue)"
|
|
70
|
+
:value="(resolvedValue as any)"
|
|
71
|
+
:components="components"
|
|
72
|
+
:class="class"
|
|
73
|
+
/>
|
|
74
|
+
<MarkdownDocument
|
|
75
|
+
v-else
|
|
76
|
+
:value="parsedDoc ?? { nodes: [], frontmatter: {}, meta: {} }"
|
|
77
|
+
:components="components"
|
|
78
|
+
:class="class"
|
|
79
|
+
/>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, computed } from "vue"
|
|
3
|
+
import { useUpload, type UploadedFile } from "../composables/storage"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `<FileUpload>` — Drag-and-drop file upload dropzone with progress and v-model support.
|
|
7
|
+
* Supports custom slot for full UI control or uses a built-in dropzone UI.
|
|
8
|
+
*/
|
|
9
|
+
const props = withDefaults(defineProps<{
|
|
10
|
+
/** File types accepted (e.g. "image/*", ".pdf,.docx"). */
|
|
11
|
+
accept?: string
|
|
12
|
+
/** Allow multiple file selection. */
|
|
13
|
+
multiple?: boolean
|
|
14
|
+
/** Maximum file size allowed in bytes. */
|
|
15
|
+
maxSize?: number
|
|
16
|
+
/** Whether the dropzone is disabled. */
|
|
17
|
+
disabled?: boolean
|
|
18
|
+
/** Automatically trigger upload immediately on file selection. */
|
|
19
|
+
autoUpload?: boolean
|
|
20
|
+
/** Uploaded file(s) v-model. */
|
|
21
|
+
modelValue?: UploadedFile | UploadedFile[] | null
|
|
22
|
+
/** Use presigned direct-to-R2 upload ticket. */
|
|
23
|
+
presigned?: boolean
|
|
24
|
+
/** Additional CSS class for the wrapper container. */
|
|
25
|
+
dropzoneClass?: string
|
|
26
|
+
}>(), {
|
|
27
|
+
multiple: false,
|
|
28
|
+
disabled: false,
|
|
29
|
+
autoUpload: true,
|
|
30
|
+
modelValue: null,
|
|
31
|
+
presigned: false,
|
|
32
|
+
dropzoneClass: "",
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const emit = defineEmits<{
|
|
36
|
+
"update:modelValue": [value: UploadedFile | UploadedFile[] | null]
|
|
37
|
+
change: [files: File | File[]]
|
|
38
|
+
upload: [files: File[]]
|
|
39
|
+
success: [result: UploadedFile | UploadedFile[]]
|
|
40
|
+
error: [err: Error]
|
|
41
|
+
progress: [percent: number]
|
|
42
|
+
}>()
|
|
43
|
+
|
|
44
|
+
const inputRef = ref<HTMLInputElement | null>(null)
|
|
45
|
+
const isDragging = ref(false)
|
|
46
|
+
const clientError = ref<string | null>(null)
|
|
47
|
+
|
|
48
|
+
const { isUploading, progress, error, upload, uploadMultiple, reset } = useUpload()
|
|
49
|
+
|
|
50
|
+
function open() {
|
|
51
|
+
if (props.disabled || isUploading.value) return
|
|
52
|
+
inputRef.value?.click()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function clear() {
|
|
56
|
+
reset()
|
|
57
|
+
clientError.value = null
|
|
58
|
+
if (inputRef.value) inputRef.value.value = ""
|
|
59
|
+
emit("update:modelValue", props.multiple ? [] : null)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function processFiles(files: FileList | File[]) {
|
|
63
|
+
clientError.value = null
|
|
64
|
+
const fileList = Array.from(files)
|
|
65
|
+
if (fileList.length === 0) return
|
|
66
|
+
|
|
67
|
+
if (props.maxSize) {
|
|
68
|
+
const oversized = fileList.find((f) => f.size > props.maxSize!)
|
|
69
|
+
if (oversized) {
|
|
70
|
+
const maxMb = (props.maxSize / (1024 * 1024)).toFixed(1)
|
|
71
|
+
const msg = `File "${oversized.name}" exceeds maximum size of ${maxMb}MB`
|
|
72
|
+
clientError.value = msg
|
|
73
|
+
emit("error", new Error(msg))
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
emit("change", props.multiple ? fileList : fileList[0]!)
|
|
79
|
+
if (!props.autoUpload) return
|
|
80
|
+
emit("upload", fileList)
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
if (props.multiple) {
|
|
84
|
+
const results = await uploadMultiple(fileList)
|
|
85
|
+
emit("update:modelValue", results)
|
|
86
|
+
emit("success", results)
|
|
87
|
+
} else {
|
|
88
|
+
const result = await upload(fileList[0]!, { presigned: props.presigned })
|
|
89
|
+
emit("update:modelValue", result)
|
|
90
|
+
emit("success", result)
|
|
91
|
+
}
|
|
92
|
+
} catch (err: any) {
|
|
93
|
+
clientError.value = err?.message || "Upload failed"
|
|
94
|
+
emit("error", err)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function onDrop(event: DragEvent) {
|
|
99
|
+
event.preventDefault()
|
|
100
|
+
isDragging.value = false
|
|
101
|
+
if (props.disabled || isUploading.value) return
|
|
102
|
+
if (event.dataTransfer?.files) processFiles(event.dataTransfer.files)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function onDragOver(event: DragEvent) {
|
|
106
|
+
event.preventDefault()
|
|
107
|
+
if (!props.disabled && !isUploading.value) isDragging.value = true
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function onDragLeave(event: DragEvent) {
|
|
111
|
+
event.preventDefault()
|
|
112
|
+
isDragging.value = false
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function onInputChange(event: Event) {
|
|
116
|
+
const target = event.target as HTMLInputElement
|
|
117
|
+
if (target.files) processFiles(target.files)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const displayError = computed(() => clientError.value || error.value?.message || null)
|
|
121
|
+
</script>
|
|
122
|
+
|
|
123
|
+
<template>
|
|
124
|
+
<!-- Custom slot: users take full UI control -->
|
|
125
|
+
<div
|
|
126
|
+
v-if="$slots.default"
|
|
127
|
+
:class="['qarpeo-file-upload', dropzoneClass]"
|
|
128
|
+
@drop="onDrop"
|
|
129
|
+
@dragover="onDragOver"
|
|
130
|
+
@dragleave="onDragLeave"
|
|
131
|
+
>
|
|
132
|
+
<input
|
|
133
|
+
ref="inputRef"
|
|
134
|
+
type="file"
|
|
135
|
+
:accept="accept"
|
|
136
|
+
:multiple="multiple"
|
|
137
|
+
class="hidden"
|
|
138
|
+
@change="onInputChange"
|
|
139
|
+
/>
|
|
140
|
+
<slot
|
|
141
|
+
:is-dragging="isDragging"
|
|
142
|
+
:is-uploading="isUploading"
|
|
143
|
+
:progress="progress"
|
|
144
|
+
:error="displayError"
|
|
145
|
+
:open="open"
|
|
146
|
+
:clear="clear"
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- Built-in dropzone UI -->
|
|
151
|
+
<div
|
|
152
|
+
v-else
|
|
153
|
+
class="qarpeo-file-upload-wrapper"
|
|
154
|
+
@drop="onDrop"
|
|
155
|
+
@dragover="onDragOver"
|
|
156
|
+
@dragleave="onDragLeave"
|
|
157
|
+
>
|
|
158
|
+
<input
|
|
159
|
+
ref="inputRef"
|
|
160
|
+
type="file"
|
|
161
|
+
:accept="accept"
|
|
162
|
+
:multiple="multiple"
|
|
163
|
+
class="hidden"
|
|
164
|
+
@change="onInputChange"
|
|
165
|
+
/>
|
|
166
|
+
<div
|
|
167
|
+
:class="[
|
|
168
|
+
'rounded-lg border-2 border-dashed p-6 text-center transition-colors duration-200',
|
|
169
|
+
isDragging
|
|
170
|
+
? 'border-primary-500 bg-primary-50/50 dark:bg-primary-950/20'
|
|
171
|
+
: 'border-gray-300 dark:border-gray-700',
|
|
172
|
+
disabled ? 'cursor-not-allowed opacity-60' : 'cursor-pointer',
|
|
173
|
+
dropzoneClass,
|
|
174
|
+
]"
|
|
175
|
+
@click="open"
|
|
176
|
+
>
|
|
177
|
+
<!-- Uploading state -->
|
|
178
|
+
<div v-if="isUploading" class="space-y-2">
|
|
179
|
+
<p class="text-sm text-gray-500">Uploading... {{ progress }}%</p>
|
|
180
|
+
<UProgress :value="progress" size="xs" />
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<!-- Idle / drag state -->
|
|
184
|
+
<div v-else class="space-y-1">
|
|
185
|
+
<UIcon name="i-lucide-upload-cloud" class="size-8 mx-auto text-gray-400" />
|
|
186
|
+
<p class="text-sm font-medium text-gray-700 dark:text-gray-300">
|
|
187
|
+
{{ isDragging ? "Drop files to upload" : "Click or drag files here to upload" }}
|
|
188
|
+
</p>
|
|
189
|
+
<p v-if="accept" class="text-xs text-gray-400">Accepted: {{ accept }}</p>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<!-- Error -->
|
|
193
|
+
<p v-if="displayError" class="mt-2 text-xs text-red-500">{{ displayError }}</p>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</template>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
import { useUserSession } from "#imports"
|
|
4
|
+
import type { QarpeoUser, QarpeoSession } from "../../types/auth"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `<ImpersonationBanner>` Renders a dismissible banner when an admin is actively impersonating a
|
|
8
|
+
* user. Shows who is being impersonated and provides a "Stop Impersonating" button.
|
|
9
|
+
* Auto-hides when not in an impersonation session.
|
|
10
|
+
* @emits stopped — when impersonation is stopped successfully
|
|
11
|
+
*/
|
|
12
|
+
const emit = defineEmits<{ stopped: [] }>()
|
|
13
|
+
|
|
14
|
+
const { session, fetch: refreshSession } = useUserSession()
|
|
15
|
+
|
|
16
|
+
const isImpersonating = computed(() => Boolean((session.value as QarpeoSession | null)?.impersonator))
|
|
17
|
+
const impersonator = computed<QarpeoUser | null>(
|
|
18
|
+
() => ((session.value as QarpeoSession | null)?.impersonator as QarpeoUser) || null,
|
|
19
|
+
)
|
|
20
|
+
const impersonated = computed<QarpeoUser | null>(() => {
|
|
21
|
+
if (!isImpersonating.value) return null
|
|
22
|
+
return ((session.value as QarpeoSession | null)?.user as QarpeoUser) || null
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
async function stopImpersonating() {
|
|
26
|
+
try {
|
|
27
|
+
await $fetch("/api/auth/impersonate/stop", { method: "POST", credentials: "include" })
|
|
28
|
+
await refreshSession()
|
|
29
|
+
emit("stopped")
|
|
30
|
+
} catch {}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<Teleport to="body">
|
|
36
|
+
<div
|
|
37
|
+
v-if="isImpersonating"
|
|
38
|
+
class="fixed top-0 left-0 right-0 z-[9999] flex items-center justify-between gap-4 bg-amber-700 text-white px-4 py-2 text-sm font-sans"
|
|
39
|
+
>
|
|
40
|
+
<span>
|
|
41
|
+
⚠ Admin
|
|
42
|
+
<strong>{{ impersonator?.email || impersonator?.name || "Unknown" }}</strong>
|
|
43
|
+
is impersonating
|
|
44
|
+
<strong>{{ impersonated?.email || impersonated?.name || "Unknown" }}</strong>
|
|
45
|
+
</span>
|
|
46
|
+
<UButton
|
|
47
|
+
color="neutral"
|
|
48
|
+
variant="outline"
|
|
49
|
+
size="xs"
|
|
50
|
+
class="border-white/50 text-white hover:bg-white/20"
|
|
51
|
+
@click="stopImpersonating"
|
|
52
|
+
>
|
|
53
|
+
Stop Impersonating
|
|
54
|
+
</UButton>
|
|
55
|
+
</div>
|
|
56
|
+
</Teleport>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useAuth } from "../composables/auth"
|
|
3
|
+
const { loggedIn, ready } = useAuth()
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<template v-if="ready && loggedIn">
|
|
8
|
+
<slot />
|
|
9
|
+
</template>
|
|
10
|
+
<template v-else-if="!ready">
|
|
11
|
+
<slot name="fallback" />
|
|
12
|
+
</template>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useAuth } from "../composables/auth"
|
|
3
|
+
const { loggedIn, ready } = useAuth()
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<template v-if="ready && !loggedIn">
|
|
8
|
+
<slot />
|
|
9
|
+
</template>
|
|
10
|
+
<template v-else-if="!ready">
|
|
11
|
+
<slot name="fallback" />
|
|
12
|
+
</template>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* Shiki dark mode styles. A colour swatch keeps the background and contrast
|
|
2
|
+
foreground the transformer wrote, inline with Comark or as a generated
|
|
3
|
+
class with the content pipeline. */
|
|
4
|
+
html.dark .shiki span[style*="--shiki-dark"]:not(.shiki-color-highlight) {
|
|
5
|
+
color: var(--shiki-dark) !important;
|
|
6
|
+
font-style: var(--shiki-dark-font-style) !important;
|
|
7
|
+
font-weight: var(--shiki-dark-font-weight) !important;
|
|
8
|
+
text-decoration: var(--shiki-dark-text-decoration) !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Shiki icon highlight transformer styles */
|
|
12
|
+
.shiki-icon-highlight {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
width: 1.25em;
|
|
15
|
+
height: 1.25em;
|
|
16
|
+
vertical-align: -0.25em;
|
|
17
|
+
margin-right: 0.125em;
|
|
18
|
+
background-color: var(--ui-text-highlighted);
|
|
19
|
+
-webkit-mask-repeat: no-repeat;
|
|
20
|
+
mask-repeat: no-repeat;
|
|
21
|
+
-webkit-mask-size: 100% 100%;
|
|
22
|
+
mask-size: 100% 100%;
|
|
23
|
+
-webkit-mask-image: var(--shiki-icon-url);
|
|
24
|
+
mask-image: var(--shiki-icon-url);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Container background styling for dark & light mode */
|
|
28
|
+
html.dark pre.shiki {
|
|
29
|
+
background-color: #0f172a !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
html:not(.dark) pre.shiki {
|
|
33
|
+
background-color: #f8fafc !important;
|
|
34
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Composables/analytics.ts Client-side analytics dashboard composable. Fetches data from the
|
|
3
|
+
* Qarpeo analytics API routes registered by `analytics: true`.
|
|
4
|
+
* @example
|
|
5
|
+
* ;```vue
|
|
6
|
+
* <script setup>
|
|
7
|
+
* const { summary, pageviews, loading } = useAnalyticsDashboard()
|
|
8
|
+
* await fetchSummary('7d')
|
|
9
|
+
* </script>
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
import type { AnalyticsRange } from "../../../types";
|
|
13
|
+
/**
|
|
14
|
+
* Reactive analytics dashboard composable. Uses the built-in Qarpeo analytics API routes.
|
|
15
|
+
*
|
|
16
|
+
* @param basePath API prefix (default: '/api/analytics')
|
|
17
|
+
*/
|
|
18
|
+
export declare function useAnalyticsDashboard(basePath?: string): {
|
|
19
|
+
/** Whether a fetch is in flight. */
|
|
20
|
+
loading: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
21
|
+
/** Last error, if any. */
|
|
22
|
+
error: Readonly<import("vue").Ref<Error | null, Error | null>>;
|
|
23
|
+
/** KPI summary data. */
|
|
24
|
+
summary: Readonly<import("vue").Ref<{
|
|
25
|
+
readonly pageviews: number;
|
|
26
|
+
readonly visitors: number;
|
|
27
|
+
readonly topPages: readonly {
|
|
28
|
+
readonly path: string;
|
|
29
|
+
readonly views: number;
|
|
30
|
+
}[];
|
|
31
|
+
readonly topReferrers: readonly {
|
|
32
|
+
readonly referrer: string;
|
|
33
|
+
readonly count: number;
|
|
34
|
+
}[];
|
|
35
|
+
readonly countries: readonly {
|
|
36
|
+
readonly country: string;
|
|
37
|
+
readonly count: number;
|
|
38
|
+
}[];
|
|
39
|
+
readonly devices: {
|
|
40
|
+
readonly mobile: number;
|
|
41
|
+
readonly desktop: number;
|
|
42
|
+
readonly bot: number;
|
|
43
|
+
};
|
|
44
|
+
} | null, {
|
|
45
|
+
readonly pageviews: number;
|
|
46
|
+
readonly visitors: number;
|
|
47
|
+
readonly topPages: readonly {
|
|
48
|
+
readonly path: string;
|
|
49
|
+
readonly views: number;
|
|
50
|
+
}[];
|
|
51
|
+
readonly topReferrers: readonly {
|
|
52
|
+
readonly referrer: string;
|
|
53
|
+
readonly count: number;
|
|
54
|
+
}[];
|
|
55
|
+
readonly countries: readonly {
|
|
56
|
+
readonly country: string;
|
|
57
|
+
readonly count: number;
|
|
58
|
+
}[];
|
|
59
|
+
readonly devices: {
|
|
60
|
+
readonly mobile: number;
|
|
61
|
+
readonly desktop: number;
|
|
62
|
+
readonly bot: number;
|
|
63
|
+
};
|
|
64
|
+
} | null>>;
|
|
65
|
+
/** Pageview time-series data. */
|
|
66
|
+
pageviews: Readonly<import("vue").Ref<{
|
|
67
|
+
readonly total: number;
|
|
68
|
+
readonly series: readonly {
|
|
69
|
+
readonly date: string;
|
|
70
|
+
readonly count: number;
|
|
71
|
+
}[];
|
|
72
|
+
} | null, {
|
|
73
|
+
readonly total: number;
|
|
74
|
+
readonly series: readonly {
|
|
75
|
+
readonly date: string;
|
|
76
|
+
readonly count: number;
|
|
77
|
+
}[];
|
|
78
|
+
} | null>>;
|
|
79
|
+
/** Custom event records. */
|
|
80
|
+
events: Readonly<import("vue").Ref<readonly {
|
|
81
|
+
readonly name: string;
|
|
82
|
+
readonly count: number;
|
|
83
|
+
readonly lastSeen: string;
|
|
84
|
+
}[], readonly {
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly count: number;
|
|
87
|
+
readonly lastSeen: string;
|
|
88
|
+
}[]>>;
|
|
89
|
+
/** Fetch the KPI summary. */
|
|
90
|
+
fetchSummary: (range?: AnalyticsRange) => Promise<{
|
|
91
|
+
pageviews: number;
|
|
92
|
+
visitors: number;
|
|
93
|
+
topPages: {
|
|
94
|
+
path: string;
|
|
95
|
+
views: number;
|
|
96
|
+
}[];
|
|
97
|
+
topReferrers: {
|
|
98
|
+
referrer: string;
|
|
99
|
+
count: number;
|
|
100
|
+
}[];
|
|
101
|
+
countries: {
|
|
102
|
+
country: string;
|
|
103
|
+
count: number;
|
|
104
|
+
}[];
|
|
105
|
+
devices: {
|
|
106
|
+
mobile: number;
|
|
107
|
+
desktop: number;
|
|
108
|
+
bot: number;
|
|
109
|
+
};
|
|
110
|
+
} | null>;
|
|
111
|
+
/** Fetch pageview time-series. */
|
|
112
|
+
fetchPageviews: (range?: AnalyticsRange) => Promise<{
|
|
113
|
+
total: number;
|
|
114
|
+
series: {
|
|
115
|
+
date: string;
|
|
116
|
+
count: number;
|
|
117
|
+
}[];
|
|
118
|
+
} | null>;
|
|
119
|
+
/** Fetch custom events. */
|
|
120
|
+
fetchEvents: (range?: AnalyticsRange, name?: string, limit?: number) => Promise<{
|
|
121
|
+
name: string;
|
|
122
|
+
count: number;
|
|
123
|
+
lastSeen: string;
|
|
124
|
+
}[]>;
|
|
125
|
+
};
|