qarpeo 0.4.13 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/dist/apps/cms.d.ts +1 -1
- package/dist/apps/comments.d.ts +1 -1
- package/dist/apps/payments.d.ts +1 -1
- package/dist/apps/store.d.ts +1 -1
- package/dist/chunks/{manifest.get.mjs → tools.mjs} +445 -430
- package/dist/cli/index.mjs +756 -746
- package/dist/core/aliases.d.ts +1 -1
- package/dist/core/context.d.ts +1 -1
- package/dist/core/d1-migrate.d.ts +1 -1
- package/dist/core/devtools.d.ts +1 -1
- package/dist/core/nitro.d.ts +1 -1
- package/dist/core/schema.d.ts +1 -1
- package/dist/core/server-utils.d.ts +1 -1
- package/dist/core/wrangler.d.ts +1 -1
- package/dist/fate/index.d.ts +8 -8
- package/dist/fate/index.mjs +3 -1
- package/dist/features/agents.d.ts +1 -1
- package/dist/features/auth.d.ts +1 -1
- package/dist/features/bots.d.ts +1 -1
- package/dist/features/console.d.ts +1 -1
- package/dist/features/fate.d.ts +1 -1
- package/dist/features/mail.d.ts +1 -1
- package/dist/features/mcp.d.ts +1 -1
- package/dist/features/multitenant.d.ts +1 -1
- package/dist/features/notifications.d.ts +1 -1
- package/dist/features/realtime.d.ts +1 -1
- package/dist/features/studio.d.ts +4 -0
- package/dist/module.d.ts +1 -1
- package/dist/module.mjs +5139 -5067
- package/dist/primitives/ai.d.ts +1 -1
- package/dist/primitives/analytics.d.ts +1 -1
- package/dist/primitives/blob.d.ts +1 -1
- package/dist/primitives/browser.d.ts +1 -1
- package/dist/primitives/cache.d.ts +1 -1
- package/dist/primitives/d1.d.ts +1 -1
- package/dist/primitives/do.d.ts +1 -1
- package/dist/primitives/email.d.ts +1 -1
- package/dist/primitives/hyperdrive.d.ts +1 -1
- package/dist/primitives/kv.d.ts +1 -1
- package/dist/primitives/queue.d.ts +1 -1
- package/dist/primitives/ratelimit.d.ts +1 -1
- package/dist/primitives/vectorize.d.ts +1 -1
- package/dist/primitives/workflows.d.ts +1 -1
- package/dist/runtime/ai.mjs +4 -1
- package/dist/runtime/app/components/CMSEditor.vue +439 -0
- package/dist/runtime/app/components/CMSEditorImageNode.vue +90 -0
- package/dist/runtime/app/components/CMSEditorLinkPopover.vue +120 -0
- package/dist/runtime/app/components/QDropZone.vue +327 -0
- package/dist/runtime/app/components/QImageCropper.vue +658 -0
- package/dist/runtime/app/components/QImageStudio.vue +300 -0
- package/dist/runtime/app/components/QImg.vue +7 -4
- package/dist/runtime/app/composables/analytics.d.ts +8 -8
- package/dist/runtime/app/composables/api-tokens.d.ts +5 -5
- package/dist/runtime/app/composables/auth.d.ts +23 -19
- package/dist/runtime/app/composables/chat.d.ts +7 -6
- package/dist/runtime/app/composables/cms-preview.d.ts +7 -8
- package/dist/runtime/app/composables/cms.d.ts +6 -6
- package/dist/runtime/app/composables/comments.d.ts +5 -5
- package/dist/runtime/app/composables/comments.mjs +7 -4
- package/dist/runtime/app/composables/console.d.ts +6 -14
- package/dist/runtime/app/composables/docs-version.d.ts +8 -8
- package/dist/runtime/app/composables/impersonation.d.ts +5 -5
- package/dist/runtime/app/composables/organization.d.ts +5 -5
- package/dist/runtime/app/composables/passkey.d.ts +5 -5
- package/dist/runtime/app/composables/passwordless.d.ts +5 -5
- package/dist/runtime/app/composables/payments.d.ts +5 -5
- package/dist/runtime/app/composables/rbac.d.ts +5 -5
- package/dist/runtime/app/composables/site.d.ts +2 -2
- package/dist/runtime/app/composables/sse.d.ts +20 -33
- package/dist/runtime/app/composables/sse.mjs +6 -3
- package/dist/runtime/app/composables/storage.d.ts +6 -8
- package/dist/runtime/app/composables/store.d.ts +37 -36
- package/dist/runtime/app/composables/store.mjs +7 -6
- package/dist/runtime/app/composables/studio.d.ts +59 -0
- package/dist/runtime/app/composables/studio.mjs +129 -0
- package/dist/runtime/app/composables/tenant.d.ts +7 -7
- package/dist/runtime/app/composables/turnstile.d.ts +5 -5
- package/dist/runtime/app/composables/two-factor.d.ts +5 -5
- package/dist/runtime/app/pages/devtools/notifications.vue +1 -6
- package/dist/runtime/app/plugins/pwa.mjs +1 -3
- package/dist/runtime/app/utils/cms-editor.d.ts +25 -0
- package/dist/runtime/app/utils/cms-editor.mjs +43 -0
- package/dist/runtime/auth.d.ts +9 -9
- package/dist/runtime/blob.d.ts +1 -3
- package/dist/runtime/blob.mjs +3 -1
- package/dist/runtime/cache.d.ts +8 -6
- package/dist/runtime/cache.mjs +8 -11
- package/dist/runtime/db.d.ts +4 -3
- package/dist/runtime/drizzle.d.ts +2 -1
- package/dist/runtime/drizzle.mjs +2 -2
- package/dist/runtime/queue.d.ts +1 -0
- package/dist/runtime/replica.d.ts +6 -10
- package/dist/runtime/replica.mjs +3 -1
- package/dist/runtime/schema-mysql.d.ts +16 -32
- package/dist/runtime/schema-pg.d.ts +15 -31
- package/dist/runtime/schema-shared.d.ts +20 -17
- package/dist/runtime/schema.d.ts +21 -33
- package/dist/runtime/server/durable-objects/agent.mjs +4 -1
- package/dist/runtime/server/durable-objects/room.d.ts +4 -6
- package/dist/runtime/server/durable-objects/room.mjs +18 -8
- package/dist/runtime/server/plugins/comments.d.ts +2 -3
- package/dist/runtime/server/plugins/email-inbound.d.ts +1 -3
- package/dist/runtime/server/plugins/store.d.ts +2 -3
- package/dist/runtime/server/routes/__qarpeo/cloud/agents/run.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.get.mjs +10 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.post.mjs +10 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/cms.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/cms.get.mjs +7 -1
- package/dist/runtime/server/routes/__qarpeo/cloud/comments/moderate.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/comments/moderate.post.mjs +5 -1
- package/dist/runtime/server/routes/__qarpeo/cloud/comments.get.d.ts +1 -3
- package/dist/runtime/server/routes/__qarpeo/cloud/extras.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/extras.get.mjs +15 -4
- package/dist/runtime/server/routes/__qarpeo/cloud/mail/unsuppress.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/migrate/cms.post.mjs +13 -4
- package/dist/runtime/server/routes/__qarpeo/cloud/migrate/products.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/cloud/migrate.post.d.ts +3 -3
- package/dist/runtime/server/routes/__qarpeo/cloud/migrate.post.mjs +22 -6
- package/dist/runtime/server/routes/__qarpeo/cloud/notifications/test.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/operations.get.d.ts +6 -5
- package/dist/runtime/server/routes/__qarpeo/cloud/store/order-status.post.d.ts +1 -3
- package/dist/runtime/server/routes/__qarpeo/cloud/store/order-status.post.mjs +14 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/store/orders.get.d.ts +1 -3
- package/dist/runtime/server/routes/__qarpeo/cloud/store/orders.get.mjs +7 -1
- package/dist/runtime/server/routes/__qarpeo/cloud/store/products.get.d.ts +1 -3
- package/dist/runtime/server/routes/__qarpeo/cloud/tasks/run.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/users/action.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/cloud/users/action.post.mjs +5 -1
- package/dist/runtime/server/routes/__qarpeo/cloud/users.get.d.ts +6 -5
- package/dist/runtime/server/routes/__qarpeo/cloud/users.get.mjs +1 -3
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +2 -2
- package/dist/runtime/server/routes/__qarpeo/manifest.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/og.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/rbac/me.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/rbac/roles.delete.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/rbac/roles.delete.mjs +5 -1
- package/dist/runtime/server/routes/__qarpeo/rbac/roles.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/rbac/roles.get.mjs +1 -5
- package/dist/runtime/server/routes/__qarpeo/rbac/roles.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/rbac/roles.post.mjs +5 -1
- package/dist/runtime/server/routes/__qarpeo/rbac/users.post.d.ts +2 -2
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +1 -6
- package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +1 -6
- package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +1 -6
- package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +5 -1
- package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +7 -1
- package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/otp/send.post.mjs +1 -1
- package/dist/runtime/server/routes/cms/search.get.mjs +2 -6
- package/dist/runtime/server/routes/comments/[id]/report.post.mjs +1 -4
- package/dist/runtime/server/routes/comments/[id].patch.mjs +1 -4
- package/dist/runtime/server/routes/comments/batch.post.mjs +1 -3
- package/dist/runtime/server/routes/comments/index.post.mjs +1 -5
- package/dist/runtime/server/routes/fate.mjs +1 -1
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +1 -1
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +2 -1
- package/dist/runtime/server/routes/storage/presigned-r2.post.d.ts +5 -6
- package/dist/runtime/server/routes/storage/presigned-r2.post.mjs +1 -1
- package/dist/runtime/server/routes/store/cart/items/[id].delete.mjs +1 -1
- package/dist/runtime/server/routes/store/cart/items/[id].patch.mjs +1 -1
- package/dist/runtime/server/routes/store/currencies.get.mjs +1 -4
- package/dist/runtime/server/routes/store/orders/[id].get.mjs +1 -1
- package/dist/runtime/server/routes/store/orders/download/[token].get.mjs +13 -4
- package/dist/runtime/server/routes/store/orders/index.get.mjs +1 -1
- package/dist/runtime/server/routes/store/tax/calculate.post.d.ts +2 -1
- package/dist/runtime/server/routes/store/tax/calculate.post.mjs +12 -3
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +4 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +4 -1
- package/dist/runtime/server/utils/ai.d.ts +38 -35
- package/dist/runtime/server/utils/ai.mjs +7 -11
- package/dist/runtime/server/utils/analytics-query.d.ts +4 -4
- package/dist/runtime/server/utils/auth.d.ts +25 -25
- package/dist/runtime/server/utils/auth.mjs +22 -8
- package/dist/runtime/server/utils/bots.d.ts +7 -7
- package/dist/runtime/server/utils/browser-utils.d.ts +26 -27
- package/dist/runtime/server/utils/cache.d.ts +20 -20
- package/dist/runtime/server/utils/cms/collections.mjs +1 -6
- package/dist/runtime/server/utils/cms/common.mjs +1 -0
- package/dist/runtime/server/utils/cms/markdown.d.ts +2 -2
- package/dist/runtime/server/utils/cms/markdown.mjs +5 -5
- package/dist/runtime/server/utils/cms/mutations.mjs +8 -23
- package/dist/runtime/server/utils/cms/navigation.mjs +4 -4
- package/dist/runtime/server/utils/cms/path.d.ts +1 -0
- package/dist/runtime/server/utils/cms/path.mjs +8 -2
- package/dist/runtime/server/utils/cms/references.mjs +1 -7
- package/dist/runtime/server/utils/cms/search.d.ts +2 -2
- package/dist/runtime/server/utils/cms/sync.mjs +4 -2
- package/dist/runtime/server/utils/cms/taxonomy.d.ts +2 -2
- package/dist/runtime/server/utils/cms.d.ts +1 -1
- package/dist/runtime/server/utils/cms.mjs +1 -5
- package/dist/runtime/server/utils/comments-filter.d.ts +9 -7
- package/dist/runtime/server/utils/comments.d.ts +68 -55
- package/dist/runtime/server/utils/comments.mjs +21 -9
- package/dist/runtime/server/utils/config.d.ts +2 -2
- package/dist/runtime/server/utils/console.d.ts +3 -5
- package/dist/runtime/server/utils/context.d.ts +10 -10
- package/dist/runtime/server/utils/crypto.d.ts +20 -20
- package/dist/runtime/server/utils/domains.mjs +3 -1
- package/dist/runtime/server/utils/drizzle.d.ts +24 -25
- package/dist/runtime/server/utils/drizzle.mjs +17 -17
- package/dist/runtime/server/utils/durable-object.d.ts +27 -25
- package/dist/runtime/server/utils/durable-object.mjs +3 -10
- package/dist/runtime/server/utils/email-inbound.d.ts +10 -10
- package/dist/runtime/server/utils/impersonation.d.ts +18 -18
- package/dist/runtime/server/utils/legacy-hash.d.ts +23 -27
- package/dist/runtime/server/utils/lock.d.ts +20 -23
- package/dist/runtime/server/utils/mail.d.ts +19 -19
- package/dist/runtime/server/utils/mail.mjs +4 -2
- package/dist/runtime/server/utils/mcp.d.ts +20 -20
- package/dist/runtime/server/utils/mcp.mjs +22 -38
- package/dist/runtime/server/utils/notifications.d.ts +49 -38
- package/dist/runtime/server/utils/oauth.d.ts +3 -9
- package/dist/runtime/server/utils/organization.d.ts +28 -28
- package/dist/runtime/server/utils/organization.mjs +15 -5
- package/dist/runtime/server/utils/passwordless.d.ts +24 -24
- package/dist/runtime/server/utils/payments/checkout.d.ts +12 -12
- package/dist/runtime/server/utils/payments/checkout.mjs +1 -3
- package/dist/runtime/server/utils/payments/common.d.ts +3 -3
- package/dist/runtime/server/utils/payments/paddle.d.ts +4 -1
- package/dist/runtime/server/utils/payments/polar.d.ts +4 -1
- package/dist/runtime/server/utils/payments/stripe.mjs +5 -7
- package/dist/runtime/server/utils/payments/subscriptions.d.ts +14 -14
- package/dist/runtime/server/utils/payments/subscriptions.mjs +2 -6
- package/dist/runtime/server/utils/payments/usage.mjs +1 -3
- package/dist/runtime/server/utils/payments/webhooks.mjs +2 -2
- package/dist/runtime/server/utils/queue.d.ts +54 -58
- package/dist/runtime/server/utils/queue.mjs +2 -6
- package/dist/runtime/server/utils/rag.d.ts +23 -23
- package/dist/runtime/server/utils/rag.mjs +10 -5
- package/dist/runtime/server/utils/ratelimit.d.ts +21 -18
- package/dist/runtime/server/utils/rbac.d.ts +13 -15
- package/dist/runtime/server/utils/rbac.mjs +44 -10
- package/dist/runtime/server/utils/realtime.d.ts +53 -52
- package/dist/runtime/server/utils/role-env.d.ts +5 -4
- package/dist/runtime/server/utils/scheduled-task.d.ts +14 -15
- package/dist/runtime/server/utils/session.d.ts +40 -40
- package/dist/runtime/server/utils/sse.d.ts +23 -33
- package/dist/runtime/server/utils/sse.mjs +5 -14
- package/dist/runtime/server/utils/sso.mjs +3 -1
- package/dist/runtime/server/utils/storage.d.ts +20 -22
- package/dist/runtime/server/utils/storage.mjs +2 -2
- package/dist/runtime/server/utils/store/cart.d.ts +5 -3
- package/dist/runtime/server/utils/store/cart.mjs +14 -10
- package/dist/runtime/server/utils/store/checkout.mjs +4 -1
- package/dist/runtime/server/utils/store/common.d.ts +1 -1
- package/dist/runtime/server/utils/store/common.mjs +36 -12
- package/dist/runtime/server/utils/store/inventory.mjs +3 -1
- package/dist/runtime/server/utils/store/orders.mjs +32 -24
- package/dist/runtime/server/utils/store-localization.d.ts +9 -27
- package/dist/runtime/server/utils/store-localization.mjs +3 -3
- package/dist/runtime/server/utils/table-names.d.ts +15 -15
- package/dist/runtime/server/utils/table-names.mjs +1 -1
- package/dist/runtime/server/utils/tenant.d.ts +12 -12
- package/dist/runtime/server/utils/tenant.mjs +7 -4
- package/dist/runtime/server/utils/totp.d.ts +18 -18
- package/dist/runtime/server/utils/tracker.d.ts +5 -5
- package/dist/runtime/server/utils/turnstile.d.ts +9 -9
- package/dist/runtime/server/utils/urn.d.ts +5 -8
- package/dist/runtime/server/utils/workflows.d.ts +30 -31
- package/dist/runtime/server/utils/workflows.mjs +2 -4
- package/dist/runtime/server.d.ts +2 -2
- package/dist/runtime/service.d.ts +10 -10
- package/dist/runtime/test-utils.d.ts +10 -10
- package/dist/runtime/test-utils.mjs +9 -2
- package/dist/runtime/types/ai.d.ts +14 -14
- package/dist/runtime/types/d1.d.ts +6 -11
- package/dist/runtime/types/durable-object.d.ts +4 -8
- package/dist/runtime/types/email.d.ts +3 -9
- package/dist/runtime/types/index.d.ts +15 -21
- package/dist/runtime/types/r2.d.ts +5 -5
- package/dist/runtime/types/workflows.d.ts +5 -6
- package/dist/runtime/workflows.d.ts +1 -3
- package/dist/types/ai.d.ts +10 -17
- package/dist/types/auth.d.ts +5 -3
- package/dist/types/cache.d.ts +7 -7
- package/dist/types/cms.d.ts +30 -5
- package/dist/types/comments.d.ts +23 -21
- package/dist/types/console.d.ts +1 -3
- package/dist/types/db.d.ts +7 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/options.d.ts +36 -24
- package/dist/types/site.d.ts +8 -2
- package/dist/types/storage.d.ts +2 -1
- package/dist/types/store-options.d.ts +10 -26
- package/dist/types/studio.d.ts +79 -0
- package/dist/utils/bots.d.ts +7 -3
- package/dist/utils/cms-table-names.d.ts +1 -1
- package/dist/utils/drizzle.d.ts +13 -14
- package/dist/utils/email-inbound.d.ts +4 -4
- package/dist/utils/features.d.ts +19 -5
- package/dist/utils/mcp.d.ts +1 -0
- package/dist/utils/migration-lock.d.ts +15 -29
- package/dist/utils/pkg.d.ts +6 -7
- package/dist/utils/schema-diff.d.ts +7 -11
- package/dist/utils/store-schema.d.ts +4 -6
- package/dist/utils/tools.d.ts +3 -3
- package/package.json +55 -5
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, onMounted, ref, watch } from "vue"
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
StudioCropConfig,
|
|
6
|
+
StudioCropResult,
|
|
7
|
+
StudioExportConfig,
|
|
8
|
+
StudioTool,
|
|
9
|
+
StudioToolbarConfig,
|
|
10
|
+
StudioZoomConfig,
|
|
11
|
+
} from "../../../types/studio"
|
|
12
|
+
import type { UploadedFile } from "../composables/storage"
|
|
13
|
+
import { dataUrlToFile, downloadStudioFile, useStudioUpload } from "../composables/studio"
|
|
14
|
+
import QDropZone from "./QDropZone.vue"
|
|
15
|
+
import QImageCropper from "./QImageCropper.vue"
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<{
|
|
19
|
+
src?: string
|
|
20
|
+
accept?: string
|
|
21
|
+
crop?: boolean | StudioCropConfig
|
|
22
|
+
zoom?: boolean | StudioZoomConfig
|
|
23
|
+
toolbar?: boolean | StudioToolbarConfig
|
|
24
|
+
export?: StudioExportConfig
|
|
25
|
+
disabled?: boolean
|
|
26
|
+
hideActions?: boolean
|
|
27
|
+
/** Upload endpoint for built-in Qarpeo Blob upload */
|
|
28
|
+
uploadEndpoint?: string
|
|
29
|
+
/** Filename prefix when uploading or downloading */
|
|
30
|
+
filename?: string
|
|
31
|
+
/** Auto-upload to Qarpeo Blob immediately after crop apply */
|
|
32
|
+
autoUpload?: boolean
|
|
33
|
+
}>(),
|
|
34
|
+
{
|
|
35
|
+
src: "",
|
|
36
|
+
accept: "image/*",
|
|
37
|
+
crop: true,
|
|
38
|
+
zoom: false,
|
|
39
|
+
toolbar: true,
|
|
40
|
+
disabled: false,
|
|
41
|
+
hideActions: undefined,
|
|
42
|
+
uploadEndpoint: "/api/storage/upload",
|
|
43
|
+
filename: "image",
|
|
44
|
+
autoUpload: false,
|
|
45
|
+
},
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
const emit = defineEmits<{
|
|
49
|
+
"update:src": [dataUrl: string]
|
|
50
|
+
"crop:apply": [result: StudioCropResult]
|
|
51
|
+
"crop:cancel": []
|
|
52
|
+
uploaded: [file: UploadedFile]
|
|
53
|
+
error: [message: string]
|
|
54
|
+
reset: []
|
|
55
|
+
}>()
|
|
56
|
+
|
|
57
|
+
const isMounted = ref(false)
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
isMounted.value = true
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const internalSrc = ref(props.src)
|
|
63
|
+
const activeTool = defineModel<StudioTool>("activeTool", { default: "none" })
|
|
64
|
+
const cropperRef = ref<InstanceType<typeof QImageCropper>>()
|
|
65
|
+
|
|
66
|
+
watch(
|
|
67
|
+
() => props.src,
|
|
68
|
+
(val) => {
|
|
69
|
+
if (val !== undefined) internalSrc.value = val
|
|
70
|
+
},
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
const normalizedCrop = computed<StudioCropConfig>(() =>
|
|
74
|
+
typeof props.crop === "object" && props.crop !== null ? props.crop : {},
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
const normalizedZoom = computed<StudioZoomConfig | false>(() => {
|
|
78
|
+
if (props.zoom === false) return false
|
|
79
|
+
if (props.zoom === true) return {}
|
|
80
|
+
return props.zoom || {}
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
const isCropEnabled = computed(() => !!props.crop)
|
|
84
|
+
const isCropping = computed(() => activeTool.value === "crop" && isCropEnabled.value)
|
|
85
|
+
|
|
86
|
+
const toolbarConfig = computed<StudioToolbarConfig>(() => {
|
|
87
|
+
const defaults: StudioTool[] = isCropEnabled.value ? ["crop", "download"] : ["download"]
|
|
88
|
+
if (typeof props.toolbar === "object" && props.toolbar !== null) {
|
|
89
|
+
return {
|
|
90
|
+
show: props.toolbar.show ?? true,
|
|
91
|
+
items: props.toolbar.items ?? defaults,
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
show: props.toolbar !== false,
|
|
96
|
+
items: defaults,
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
const { uploadDataUrl, uploading, progress } = useStudioUpload({
|
|
101
|
+
endpoint: props.uploadEndpoint,
|
|
102
|
+
format: props.export?.defaultFormat || normalizedCrop.value.format || "image/webp",
|
|
103
|
+
quality: props.export?.quality ?? normalizedCrop.value.quality ?? 0.9,
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
function onDropLoad(dataUrl: string) {
|
|
107
|
+
internalSrc.value = dataUrl
|
|
108
|
+
emit("update:src", dataUrl)
|
|
109
|
+
if (isCropEnabled.value) {
|
|
110
|
+
activeTool.value = "crop"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
async function onCropApply(result: StudioCropResult) {
|
|
115
|
+
internalSrc.value = result.dataUrl
|
|
116
|
+
activeTool.value = "none"
|
|
117
|
+
emit("update:src", result.dataUrl)
|
|
118
|
+
emit("crop:apply", result)
|
|
119
|
+
|
|
120
|
+
if (props.autoUpload) {
|
|
121
|
+
await triggerUpload(result.dataUrl)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function onCropCancel() {
|
|
126
|
+
activeTool.value = "none"
|
|
127
|
+
emit("crop:cancel")
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function triggerDownload() {
|
|
131
|
+
if (!internalSrc.value) return
|
|
132
|
+
const format = props.export?.defaultFormat || normalizedCrop.value.format || "image/webp"
|
|
133
|
+
const quality = props.export?.quality ?? normalizedCrop.value.quality ?? 0.9
|
|
134
|
+
const file = await dataUrlToFile(internalSrc.value, props.filename, format, quality)
|
|
135
|
+
if (file) downloadStudioFile(file)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async function triggerUpload(srcOverride?: string) {
|
|
139
|
+
const target = srcOverride || internalSrc.value
|
|
140
|
+
if (!target) return
|
|
141
|
+
try {
|
|
142
|
+
const uploaded = await uploadDataUrl(target, props.filename)
|
|
143
|
+
emit("uploaded", uploaded)
|
|
144
|
+
} catch (err) {
|
|
145
|
+
emit("error", err instanceof Error ? err.message : "Upload failed")
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function applyCrop() {
|
|
150
|
+
cropperRef.value?.apply()
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
async function getFile(name?: string, format?: string, quality?: number): Promise<File | null> {
|
|
154
|
+
if (!internalSrc.value) return null
|
|
155
|
+
const fmt = format || props.export?.defaultFormat || normalizedCrop.value.format || "image/webp"
|
|
156
|
+
const q = quality ?? props.export?.quality ?? normalizedCrop.value.quality ?? 0.9
|
|
157
|
+
return dataUrlToFile(internalSrc.value, name || props.filename, fmt, q)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function resetStudio() {
|
|
161
|
+
internalSrc.value = ""
|
|
162
|
+
activeTool.value = "none"
|
|
163
|
+
emit("update:src", "")
|
|
164
|
+
emit("reset")
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
defineExpose({
|
|
168
|
+
applyCrop,
|
|
169
|
+
getFile,
|
|
170
|
+
upload: triggerUpload,
|
|
171
|
+
download: triggerDownload,
|
|
172
|
+
reset: resetStudio,
|
|
173
|
+
})
|
|
174
|
+
</script>
|
|
175
|
+
|
|
176
|
+
<template>
|
|
177
|
+
<div class="q-image-studio">
|
|
178
|
+
<template v-if="!isMounted">
|
|
179
|
+
<div class="q-studio-skeleton" />
|
|
180
|
+
</template>
|
|
181
|
+
|
|
182
|
+
<template v-else-if="!internalSrc">
|
|
183
|
+
<QDropZone
|
|
184
|
+
:accept="accept"
|
|
185
|
+
:disabled="disabled"
|
|
186
|
+
@load="onDropLoad"
|
|
187
|
+
@error="(msg) => emit('error', msg)"
|
|
188
|
+
/>
|
|
189
|
+
</template>
|
|
190
|
+
|
|
191
|
+
<template v-else-if="isCropping">
|
|
192
|
+
<QImageCropper
|
|
193
|
+
ref="cropperRef"
|
|
194
|
+
:src="internalSrc"
|
|
195
|
+
:crop="normalizedCrop"
|
|
196
|
+
:zoom="normalizedZoom"
|
|
197
|
+
:hide-actions="hideActions"
|
|
198
|
+
@apply="onCropApply"
|
|
199
|
+
@cancel="onCropCancel"
|
|
200
|
+
/>
|
|
201
|
+
</template>
|
|
202
|
+
|
|
203
|
+
<template v-else>
|
|
204
|
+
<div class="q-studio-preview-wrap">
|
|
205
|
+
<img :src="internalSrc" alt="Studio preview" class="q-studio-preview" />
|
|
206
|
+
|
|
207
|
+
<div v-if="toolbarConfig.show" class="q-studio-toolbar">
|
|
208
|
+
<UButton
|
|
209
|
+
v-if="isCropEnabled"
|
|
210
|
+
icon="i-lucide-crop"
|
|
211
|
+
label="Crop"
|
|
212
|
+
size="xs"
|
|
213
|
+
color="neutral"
|
|
214
|
+
variant="outline"
|
|
215
|
+
:disabled="disabled || uploading"
|
|
216
|
+
@click="activeTool = 'crop'"
|
|
217
|
+
/>
|
|
218
|
+
<UButton
|
|
219
|
+
icon="i-lucide-download"
|
|
220
|
+
label="Download"
|
|
221
|
+
size="xs"
|
|
222
|
+
color="neutral"
|
|
223
|
+
variant="outline"
|
|
224
|
+
:disabled="disabled || uploading"
|
|
225
|
+
@click="triggerDownload"
|
|
226
|
+
/>
|
|
227
|
+
<UButton
|
|
228
|
+
v-if="toolbarConfig.items?.includes('upload')"
|
|
229
|
+
icon="i-lucide-upload"
|
|
230
|
+
:label="uploading ? `Uploading ${progress}%` : 'Upload'"
|
|
231
|
+
:loading="uploading"
|
|
232
|
+
size="xs"
|
|
233
|
+
color="primary"
|
|
234
|
+
variant="solid"
|
|
235
|
+
:disabled="disabled || uploading"
|
|
236
|
+
@click="() => triggerUpload()"
|
|
237
|
+
/>
|
|
238
|
+
<UButton
|
|
239
|
+
icon="i-lucide-refresh-cw"
|
|
240
|
+
label="Change"
|
|
241
|
+
size="xs"
|
|
242
|
+
color="neutral"
|
|
243
|
+
variant="ghost"
|
|
244
|
+
:disabled="disabled || uploading"
|
|
245
|
+
@click="resetStudio"
|
|
246
|
+
/>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
</template>
|
|
250
|
+
</div>
|
|
251
|
+
</template>
|
|
252
|
+
|
|
253
|
+
<style scoped>
|
|
254
|
+
.q-image-studio {
|
|
255
|
+
width: 100%;
|
|
256
|
+
}
|
|
257
|
+
.q-studio-skeleton {
|
|
258
|
+
width: 100%;
|
|
259
|
+
min-height: 220px;
|
|
260
|
+
border-radius: 0.75rem;
|
|
261
|
+
background: var(--ui-bg-elevated, rgba(148, 163, 184, 0.12));
|
|
262
|
+
}
|
|
263
|
+
.q-studio-preview-wrap {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
gap: 0.75rem;
|
|
267
|
+
}
|
|
268
|
+
.q-studio-preview {
|
|
269
|
+
display: block;
|
|
270
|
+
width: 100%;
|
|
271
|
+
max-height: 420px;
|
|
272
|
+
object-fit: contain;
|
|
273
|
+
border-radius: 0.75rem;
|
|
274
|
+
background: #0f172a;
|
|
275
|
+
}
|
|
276
|
+
.q-studio-toolbar {
|
|
277
|
+
display: flex;
|
|
278
|
+
flex-wrap: wrap;
|
|
279
|
+
gap: 0.5rem;
|
|
280
|
+
}
|
|
281
|
+
.q-studio-btn {
|
|
282
|
+
padding: 0.4375rem 0.875rem;
|
|
283
|
+
border-radius: 0.5rem;
|
|
284
|
+
border: 1px solid var(--ui-border, #cbd5e1);
|
|
285
|
+
background: var(--ui-bg, transparent);
|
|
286
|
+
color: inherit;
|
|
287
|
+
font-size: 0.8125rem;
|
|
288
|
+
font-weight: 500;
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
}
|
|
291
|
+
.q-studio-btn:disabled {
|
|
292
|
+
opacity: 0.5;
|
|
293
|
+
cursor: not-allowed;
|
|
294
|
+
}
|
|
295
|
+
.q-studio-btn-primary {
|
|
296
|
+
border-color: var(--ui-primary, #3b82f6);
|
|
297
|
+
background: var(--ui-primary, #3b82f6);
|
|
298
|
+
color: #ffffff;
|
|
299
|
+
}
|
|
300
|
+
</style>
|
|
@@ -4,13 +4,16 @@ import { computed } from "vue"
|
|
|
4
4
|
import { getOptimizedImageUrl } from "../composables/storage"
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* `<QImg>` — Renders static `public/` assets, external URLs, or optimized images stored in
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* `<QImg>` — Renders static `public/` assets, external URLs, or optimized images stored in Qarpeo
|
|
8
|
+
* R2 blob storage. Supports named presets, on-the-fly resizing, format conversion, and responsive
|
|
9
|
+
* srcset generation.
|
|
10
10
|
*/
|
|
11
11
|
const props = withDefaults(
|
|
12
12
|
defineProps<{
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Storage key or pathname (e.g. "avatars/user-1.jpg"), public path ("/logo.svg"), or absolute
|
|
15
|
+
* URL.
|
|
16
|
+
*/
|
|
14
17
|
src: string
|
|
15
18
|
/** Named transformation preset configured in `qarpeo.blob.images.presets`. */
|
|
16
19
|
preset?: string
|
|
@@ -32,14 +32,14 @@ export interface UseAnalyticsDashboardReturn {
|
|
|
32
32
|
/**
|
|
33
33
|
* Headless analytics dashboard composable. Uses the built-in Qarpeo analytics API routes.
|
|
34
34
|
*
|
|
35
|
-
* @param basePath - API prefix (default: '/api/analytics')
|
|
36
|
-
*
|
|
37
35
|
* @example
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
36
|
+
* ```vue
|
|
37
|
+
* <script setup lang="ts">
|
|
38
|
+
* const { summary, pageviews, loading, fetchSummary } = useAnalyticsDashboard()
|
|
39
|
+
* await fetchSummary('7d')
|
|
40
|
+
* </script>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @param basePath - API prefix (default: '/api/analytics')
|
|
44
44
|
*/
|
|
45
45
|
export declare function useAnalyticsDashboard(basePath?: string): UseAnalyticsDashboardReturn;
|
|
@@ -37,10 +37,10 @@ export interface UseApiTokensReturn {
|
|
|
37
37
|
* Headless API token management composable for developer settings and programmatic API access.
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
40
|
+
* ```vue
|
|
41
|
+
* <script setup lang="ts">
|
|
42
|
+
* const { tokens, loading, fetchTokens, createToken, revokeToken } = useApiTokens()
|
|
43
|
+
* </script>
|
|
44
|
+
* ```
|
|
45
45
|
*/
|
|
46
46
|
export declare function useApiTokens(): UseApiTokensReturn;
|
|
@@ -82,18 +82,19 @@ export interface UseUserSessionReturn {
|
|
|
82
82
|
clear: () => Promise<void>;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Headless user session composable providing reactive authentication state, user profiles, and
|
|
85
|
+
* Headless user session composable providing reactive authentication state, user profiles, and
|
|
86
|
+
* session checks.
|
|
86
87
|
*
|
|
87
88
|
* @example
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
89
|
+
* ```vue
|
|
90
|
+
* <script setup lang="ts">
|
|
91
|
+
* const { loggedIn, user, clear } = useUserSession()
|
|
92
|
+
* </script>
|
|
92
93
|
*
|
|
93
|
-
*
|
|
94
|
+
* <template>
|
|
94
95
|
* <div v-if="loggedIn">Welcome, {{ user?.name }}! <button @click="clear">Sign Out</button></div>
|
|
95
|
-
*
|
|
96
|
-
*
|
|
96
|
+
* </template>
|
|
97
|
+
* ```
|
|
97
98
|
*/
|
|
98
99
|
export declare function useUserSession(): UseUserSessionReturn;
|
|
99
100
|
export interface QarpeoDeviceSession {
|
|
@@ -124,18 +125,21 @@ export interface UseAuthReturn {
|
|
|
124
125
|
fetch: () => Promise<void>;
|
|
125
126
|
/** Clears local authentication state. */
|
|
126
127
|
clear: () => Promise<void>;
|
|
127
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Signs out from the session and navigates to target path (defaults to redirect.logout or
|
|
130
|
+
* /login).
|
|
131
|
+
*/
|
|
128
132
|
logout: (redirect?: string) => Promise<void>;
|
|
129
133
|
/** Logs out all device sessions for the current user and redirects. */
|
|
130
134
|
logoutAll: (redirect?: string) => Promise<void>;
|
|
131
135
|
/** Raw Better Auth Vue client instance. */
|
|
132
136
|
client: ReturnType<typeof createAuthClient>;
|
|
133
137
|
/** Better Auth signIn helper. */
|
|
134
|
-
signIn:
|
|
138
|
+
signIn: ReturnType<typeof createAuthClient>["signIn"];
|
|
135
139
|
/** Better Auth signUp helper. */
|
|
136
|
-
signUp:
|
|
140
|
+
signUp: ReturnType<typeof createAuthClient>["signUp"];
|
|
137
141
|
/** Raw Better Auth signOut without automatic route navigation. */
|
|
138
|
-
signOut:
|
|
142
|
+
signOut: ReturnType<typeof createAuthClient>["signOut"];
|
|
139
143
|
/** Whether Multi-Factor Authentication is currently required to continue. */
|
|
140
144
|
mfaRequired: ComputedRef<boolean>;
|
|
141
145
|
/** Whether Multi-Factor Authentication has been successfully verified. */
|
|
@@ -156,14 +160,14 @@ export interface UseAuthReturn {
|
|
|
156
160
|
revokeAllOthers: () => Promise<void>;
|
|
157
161
|
}
|
|
158
162
|
/**
|
|
159
|
-
* Headless primary authentication composable providing full user lifecycle management,
|
|
160
|
-
*
|
|
163
|
+
* Headless primary authentication composable providing full user lifecycle management, multi-device
|
|
164
|
+
* session management, enterprise MFA/SSO, and Better Auth client methods.
|
|
161
165
|
*
|
|
162
166
|
* @example
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
167
|
+
* ```vue
|
|
168
|
+
* <script setup lang="ts">
|
|
169
|
+
* const { loggedIn, user, logout, sessions, fetchSessions } = useAuth()
|
|
170
|
+
* </script>
|
|
171
|
+
* ```
|
|
168
172
|
*/
|
|
169
173
|
export declare function useAuth(): UseAuthReturn;
|
|
@@ -72,14 +72,15 @@ export interface UseChatReturn {
|
|
|
72
72
|
loadHistory: () => Promise<void>;
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Headless AI agent conversation composable with SSE streaming, tool calls, and session
|
|
75
|
+
* Headless AI agent conversation composable with SSE streaming, tool calls, and session
|
|
76
|
+
* persistence.
|
|
76
77
|
*
|
|
77
78
|
* @example
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
79
|
+
* ```vue
|
|
80
|
+
* <script setup lang="ts">
|
|
81
|
+
* const { messages, input, isStreaming, handleSubmit } = useChat({ agent: 'support' })
|
|
82
|
+
* </script>
|
|
83
|
+
* ```
|
|
83
84
|
*/
|
|
84
85
|
export declare function useChat(options?: UseChatOptions): UseChatReturn;
|
|
85
86
|
/**
|
|
@@ -24,15 +24,14 @@ export interface UseCMSPreviewReturn {
|
|
|
24
24
|
disable: () => any;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Headless CMS Draft / Preview mode composable. Automatically inspects route
|
|
28
|
-
*
|
|
29
|
-
* preview status, tokens, and exit helpers.
|
|
27
|
+
* Headless CMS Draft / Preview mode composable. Automatically inspects route query (?preview=true,
|
|
28
|
+
* ?preview_token=...) and cookies to expose reactive preview status, tokens, and exit helpers.
|
|
30
29
|
*
|
|
31
30
|
* @example
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
31
|
+
* ```vue
|
|
32
|
+
* <script setup lang="ts">
|
|
33
|
+
* const { isPreview, disable } = useCMSPreview()
|
|
34
|
+
* </script>
|
|
35
|
+
* ```
|
|
37
36
|
*/
|
|
38
37
|
export declare function useCMSPreview(): UseCMSPreviewReturn;
|
|
@@ -43,12 +43,12 @@ export interface UseCMSReturn {
|
|
|
43
43
|
* Headless content management composable for querying collections, articles, and pages.
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
46
|
+
* ```vue
|
|
47
|
+
* <script setup lang="ts">
|
|
48
|
+
* const { entries, total, fetchEntries, status } = useCMS('blog')
|
|
49
|
+
* await fetchEntries({ limit: 10 })
|
|
50
|
+
* </script>
|
|
51
|
+
* ```
|
|
52
52
|
*/
|
|
53
53
|
export declare function useCMS(collectionId?: string): UseCMSReturn;
|
|
54
54
|
/**
|
|
@@ -63,10 +63,10 @@ export interface UseCommentsReturn {
|
|
|
63
63
|
* Headless nested comments and moderation composable for blogs, docs, and community discussions.
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
66
|
+
* ```vue
|
|
67
|
+
* <script setup lang="ts">
|
|
68
|
+
* const { comments, postComment, loading } = useComments("post:123")
|
|
69
|
+
* </script>
|
|
70
|
+
* ```
|
|
71
71
|
*/
|
|
72
72
|
export declare function useComments(targetUrn: MaybeRefOrGetter<string>, options?: UseCommentsOptions): UseCommentsReturn;
|
|
@@ -137,10 +137,13 @@ export function useComments(targetUrn, options = {}) {
|
|
|
137
137
|
}
|
|
138
138
|
async function batchModerate(ids, action) {
|
|
139
139
|
try {
|
|
140
|
-
const res = await $fetch(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
const res = await $fetch(
|
|
141
|
+
`${getCommentsPrefix()}/batch`,
|
|
142
|
+
{
|
|
143
|
+
method: "POST",
|
|
144
|
+
body: { ids, action }
|
|
145
|
+
}
|
|
146
|
+
);
|
|
144
147
|
await fetchComments();
|
|
145
148
|
return res.count || 0;
|
|
146
149
|
} catch (err) {
|
|
@@ -16,21 +16,13 @@ export interface ConsolePublicConfig {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
export declare function normalizeConsolePrefix(prefix?: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* Builds the default module-scoped navigation items for enabled Qarpeo features.
|
|
21
|
-
*/
|
|
19
|
+
/** Builds the default module-scoped navigation items for enabled Qarpeo features. */
|
|
22
20
|
export declare function buildDefaultConsoleNav(prefix?: string, features?: NonNullable<ConsolePublicConfig["features"]>): ConsoleNavItem[];
|
|
23
|
-
/**
|
|
24
|
-
* Merges default and custom nav items (by `id`), filters by `can()`, and sorts by `order`.
|
|
25
|
-
*/
|
|
21
|
+
/** Merges default and custom nav items (by `id`), filters by `can()`, and sorts by `order`. */
|
|
26
22
|
export declare function resolveConsoleNav(defaults: ConsoleNavItem[], custom: ConsoleNavItem[] | undefined, can: (permission: string) => boolean): ConsoleNavItem[];
|
|
27
|
-
/**
|
|
28
|
-
* Reactive permission-filtered console navigation items.
|
|
29
|
-
*/
|
|
23
|
+
/** Reactive permission-filtered console navigation items. */
|
|
30
24
|
export declare function useConsoleNav(): ComputedRef<ConsoleNavItem[]>;
|
|
31
|
-
/**
|
|
32
|
-
* Composable for `/console/*` pages and layouts: exposes config, RBAC state, and filtered nav.
|
|
33
|
-
*/
|
|
25
|
+
/** Composable for `/console/*` pages and layouts: exposes config, RBAC state, and filtered nav. */
|
|
34
26
|
export declare function useConsole(): {
|
|
35
27
|
enabled: boolean;
|
|
36
28
|
prefix: string;
|
|
@@ -54,7 +46,7 @@ export declare function useConsole(): {
|
|
|
54
46
|
};
|
|
55
47
|
};
|
|
56
48
|
/**
|
|
57
|
-
* Declares console metadata & required permissions on a `/console/*` page.
|
|
58
|
-
*
|
|
49
|
+
* Declares console metadata & required permissions on a `/console/*` page. Wraps `definePageMeta`
|
|
50
|
+
* when available in a Nuxt page setup context.
|
|
59
51
|
*/
|
|
60
52
|
export declare function defineConsolePage(meta?: ConsolePageMeta): ConsolePageMeta;
|
|
@@ -17,16 +17,16 @@ export interface UseDocsVersionReturn {
|
|
|
17
17
|
switchVersion: (targetVersionId: string) => Promise<void>;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Headless documentation multi-versioning composable. Automatically parses active version from
|
|
21
|
-
* path (/docs/v1/... vs /docs/...), provides list of versions, and seamlessly switches
|
|
22
|
-
* while preserving subpaths.
|
|
20
|
+
* Headless documentation multi-versioning composable. Automatically parses active version from
|
|
21
|
+
* router path (/docs/v1/... vs /docs/...), provides list of versions, and seamlessly switches
|
|
22
|
+
* versions while preserving subpaths.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* ```vue
|
|
26
|
+
* <script setup lang="ts">
|
|
27
|
+
* const { currentVersion, versions, switchVersion, isLatest } = useDocsVersion()
|
|
28
|
+
* </script>
|
|
29
|
+
* ```
|
|
30
30
|
*/
|
|
31
31
|
export declare function useDocsVersion(options?: {
|
|
32
32
|
versions?: DocsVersionItem[];
|
|
@@ -22,10 +22,10 @@ export interface UseImpersonationReturn {
|
|
|
22
22
|
* Headless admin impersonation composable for testing and user support.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* ```vue
|
|
26
|
+
* <script setup lang="ts">
|
|
27
|
+
* const { isImpersonating, impersonatedUser, stopImpersonating } = useImpersonation()
|
|
28
|
+
* </script>
|
|
29
|
+
* ```
|
|
30
30
|
*/
|
|
31
31
|
export declare function useImpersonation(): UseImpersonationReturn;
|
|
@@ -65,10 +65,10 @@ export interface UseOrganizationReturn {
|
|
|
65
65
|
* Headless multi-tenant organization / team management composable.
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
68
|
+
* ```vue
|
|
69
|
+
* <script setup lang="ts">
|
|
70
|
+
* const { organization, organizations, switchOrganization, createOrganization } = useOrganization()
|
|
71
|
+
* </script>
|
|
72
|
+
* ```
|
|
73
73
|
*/
|
|
74
74
|
export declare function useOrganization(): UseOrganizationReturn;
|
|
@@ -13,10 +13,10 @@ export interface UsePasskeyReturn {
|
|
|
13
13
|
* Headless WebAuthn / Passkey authentication composable supporting FIDO2 biometric authentication.
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
16
|
+
* ```vue
|
|
17
|
+
* <script setup lang="ts">
|
|
18
|
+
* const { loginWithPasskey, registerPasskey, loading, error } = usePasskey()
|
|
19
|
+
* </script>
|
|
20
|
+
* ```
|
|
21
21
|
*/
|
|
22
22
|
export declare function usePasskey(): UsePasskeyReturn;
|
|
@@ -15,10 +15,10 @@ export interface UsePasswordlessReturn {
|
|
|
15
15
|
* Headless passwordless authentication composable supporting Email OTP codes and Magic Links.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* ```vue
|
|
19
|
+
* <script setup lang="ts">
|
|
20
|
+
* const { sendOtp, verifyOtp, loading, error } = usePasswordless()
|
|
21
|
+
* </script>
|
|
22
|
+
* ```
|
|
23
23
|
*/
|
|
24
24
|
export declare function usePasswordless(): UsePasswordlessReturn;
|