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
|
@@ -49,11 +49,11 @@ export interface UsePaymentCheckoutReturn {
|
|
|
49
49
|
* Headless subscriptions and billing composable for Stripe, LemonSqueezy, and Polar.
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
52
|
+
* ```vue
|
|
53
|
+
* <script setup lang="ts">
|
|
54
|
+
* const { subscription, isSubscribed, checkout, openPortal } = useSubscription()
|
|
55
|
+
* </script>
|
|
56
|
+
* ```
|
|
57
57
|
*/
|
|
58
58
|
export declare function useSubscription(): UseSubscriptionReturn;
|
|
59
59
|
/** Convenient standalone composable for initiating one-off or subscription checkout flows. */
|
|
@@ -11,8 +11,8 @@ export interface RbacMeState {
|
|
|
11
11
|
ready: boolean;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Reactive RBAC permissions composable for the current authenticated user.
|
|
15
|
-
*
|
|
14
|
+
* Reactive RBAC permissions composable for the current authenticated user. Backed by `GET
|
|
15
|
+
* /__qarpeo/rbac/me` with deny-first evaluation matching the server.
|
|
16
16
|
*/
|
|
17
17
|
export declare function usePermissions(): {
|
|
18
18
|
state: import("vue").Ref<RbacMeState, RbacMeState>;
|
|
@@ -26,8 +26,8 @@ export declare function usePermissions(): {
|
|
|
26
26
|
* Reactive boolean helper for checking a single permission in templates.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* const canPublish = useCan("cms:publish")
|
|
31
|
+
* ```
|
|
32
32
|
*/
|
|
33
33
|
export declare function useCan(permission: MaybeRef<string>): ComputedRef<boolean>;
|
|
@@ -46,8 +46,8 @@ export interface DefineSeoOptions {
|
|
|
46
46
|
tags?: string[];
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* One-call per-page SEO helper that sets title, description, OpenGraph, Twitter Card,
|
|
50
|
-
*
|
|
49
|
+
* One-call per-page SEO helper that sets title, description, OpenGraph, Twitter Card, optional
|
|
50
|
+
* canonical override, robots noindex, and Article JSON-LD when `type === "article"`.
|
|
51
51
|
*/
|
|
52
52
|
export declare function defineSeo(opts: DefineSeoOptions): void;
|
|
53
53
|
export interface ArticleSchemaInput {
|
|
@@ -2,75 +2,62 @@ import { type Ref } from "vue";
|
|
|
2
2
|
export interface UseEventStreamOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Connect immediately when composable is invoked.
|
|
5
|
+
*
|
|
5
6
|
* @default true
|
|
6
7
|
*/
|
|
7
8
|
immediate?: boolean;
|
|
8
9
|
/**
|
|
9
10
|
* Auto reconnect when connection drops.
|
|
11
|
+
*
|
|
10
12
|
* @default true
|
|
11
13
|
*/
|
|
12
14
|
autoReconnect?: boolean | {
|
|
13
15
|
retries?: number;
|
|
14
16
|
delay?: number;
|
|
15
17
|
};
|
|
16
|
-
/**
|
|
17
|
-
* Optional custom event names to listen for in addition to standard "message".
|
|
18
|
-
*/
|
|
18
|
+
/** Optional custom event names to listen for in addition to standard "message". */
|
|
19
19
|
events?: string[];
|
|
20
20
|
/**
|
|
21
21
|
* Pass credentials (cookies) with the EventSource request.
|
|
22
|
+
*
|
|
22
23
|
* @default false
|
|
23
24
|
*/
|
|
24
25
|
withCredentials?: boolean;
|
|
25
26
|
}
|
|
26
27
|
export interface UseEventStreamReturn<T = any> {
|
|
27
28
|
/**
|
|
28
|
-
* The latest message payload received from the stream.
|
|
29
|
-
*
|
|
29
|
+
* The latest message payload received from the stream. Automatically parsed as JSON if valid,
|
|
30
|
+
* otherwise raw string.
|
|
30
31
|
*/
|
|
31
32
|
data: Ref<T | null>;
|
|
32
|
-
/**
|
|
33
|
-
* Current connection status.
|
|
34
|
-
*/
|
|
33
|
+
/** Current connection status. */
|
|
35
34
|
status: Ref<"CONNECTING" | "OPEN" | "CLOSED">;
|
|
36
|
-
/**
|
|
37
|
-
* Error object if connection failed.
|
|
38
|
-
*/
|
|
35
|
+
/** Error object if connection failed. */
|
|
39
36
|
error: Ref<Error | null>;
|
|
40
|
-
/**
|
|
41
|
-
* Last event type received (e.g. "message", "update", "ping").
|
|
42
|
-
*/
|
|
37
|
+
/** Last event type received (e.g. "message", "update", "ping"). */
|
|
43
38
|
lastEvent: Ref<string | null>;
|
|
44
|
-
/**
|
|
45
|
-
* Last message ID received.
|
|
46
|
-
*/
|
|
39
|
+
/** Last message ID received. */
|
|
47
40
|
lastId: Ref<string | null>;
|
|
48
|
-
/**
|
|
49
|
-
* Manually open or reconnect the event stream.
|
|
50
|
-
*/
|
|
41
|
+
/** Manually open or reconnect the event stream. */
|
|
51
42
|
open: () => void;
|
|
52
|
-
/**
|
|
53
|
-
* Close the event stream connection.
|
|
54
|
-
*/
|
|
43
|
+
/** Close the event stream connection. */
|
|
55
44
|
close: () => void;
|
|
56
|
-
/**
|
|
57
|
-
* Register a listener for a specific named SSE event.
|
|
58
|
-
*/
|
|
45
|
+
/** Register a listener for a specific named SSE event. */
|
|
59
46
|
on: (eventName: string, handler: (payload: any) => void) => () => void;
|
|
60
47
|
}
|
|
61
48
|
/**
|
|
62
49
|
* Universal Vue composable for subscribing to Server-Sent Events (SSE) live streams.
|
|
63
50
|
*
|
|
64
51
|
* @example
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
52
|
+
* ```vue
|
|
53
|
+
* <script setup lang="ts">
|
|
54
|
+
* const { data, status, close } = useEventStream("/api/live/metrics")
|
|
55
|
+
* </script>
|
|
69
56
|
*
|
|
70
|
-
*
|
|
57
|
+
* <template>
|
|
71
58
|
* <div>Status: {{ status }}</div>
|
|
72
59
|
* <div v-if="data">Live Metric: {{ data.cpu }}%</div>
|
|
73
|
-
*
|
|
74
|
-
*
|
|
60
|
+
* </template>
|
|
61
|
+
* ```
|
|
75
62
|
*/
|
|
76
63
|
export declare function useEventStream<T = any>(url: string | Ref<string> | (() => string), options?: UseEventStreamOptions): UseEventStreamReturn<T>;
|
|
@@ -131,9 +131,12 @@ export function useEventStream(url, options = {}) {
|
|
|
131
131
|
open();
|
|
132
132
|
}
|
|
133
133
|
if (typeof url !== "string") {
|
|
134
|
-
watch(
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
watch(
|
|
135
|
+
() => getUrl(),
|
|
136
|
+
() => {
|
|
137
|
+
open();
|
|
138
|
+
}
|
|
139
|
+
);
|
|
137
140
|
}
|
|
138
141
|
onBeforeUnmount(() => {
|
|
139
142
|
close();
|
|
@@ -117,17 +117,15 @@ export type UseUploadReturn = UseBlobReturn;
|
|
|
117
117
|
* Headless file upload and R2 blob management composable.
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
120
|
+
* ```vue
|
|
121
|
+
* <script setup lang="ts">
|
|
122
|
+
* const { open, upload, isUploading, progress, preview } = useBlob('/api/upload')
|
|
123
|
+
* </script>
|
|
124
|
+
* ```
|
|
125
125
|
*/
|
|
126
126
|
export declare function useBlob(endpointOrOptions?: string | Ref<string> | (() => string) | UseUploadOptions, initialOptions?: UseUploadOptions): UseBlobReturn;
|
|
127
127
|
export declare const useUpload: typeof useBlob;
|
|
128
|
-
/**
|
|
129
|
-
* Request a direct R2 presigned upload URL from the server endpoint.
|
|
130
|
-
*/
|
|
128
|
+
/** Request a direct R2 presigned upload URL from the server endpoint. */
|
|
131
129
|
export declare function createUploadUrl(pathname: string, options?: {
|
|
132
130
|
contentType?: string;
|
|
133
131
|
expiresIn?: number | string;
|
|
@@ -51,15 +51,15 @@ export interface UseCartReturn {
|
|
|
51
51
|
* Headless e-commerce shopping cart composable with persistent session state.
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
54
|
+
* ```vue
|
|
55
|
+
* <script setup lang="ts">
|
|
56
|
+
* const { cart, totals, itemCount, loading, addToCart, removeItem } = useCart()
|
|
57
|
+
* </script>
|
|
58
58
|
*
|
|
59
|
-
*
|
|
59
|
+
* <template>
|
|
60
60
|
* <div>Items in cart: {{ itemCount }} — Total: ${{ totals.total }}</div>
|
|
61
|
-
*
|
|
62
|
-
*
|
|
61
|
+
* </template>
|
|
62
|
+
* ```
|
|
63
63
|
*/
|
|
64
64
|
export declare function useCart(): UseCartReturn;
|
|
65
65
|
export interface UseProductsOptions {
|
|
@@ -88,16 +88,16 @@ export interface UseProductsReturn {
|
|
|
88
88
|
loadMore: () => Promise<void>;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
* Headless reactive product catalog composable with automated filter watching,
|
|
92
|
-
*
|
|
91
|
+
* Headless reactive product catalog composable with automated filter watching, debounced query
|
|
92
|
+
* parameters, and infinite pagination support.
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
95
|
+
* ```vue
|
|
96
|
+
* <script setup lang="ts">
|
|
97
|
+
* const search = ref('')
|
|
98
|
+
* const { products, total, loading, loadMore, hasMore } = useProducts({ search })
|
|
99
|
+
* </script>
|
|
100
|
+
* ```
|
|
101
101
|
*/
|
|
102
102
|
export declare function useProducts(options?: UseProductsOptions): UseProductsReturn;
|
|
103
103
|
export interface UseProductReturn {
|
|
@@ -122,12 +122,12 @@ export interface UseProductReturn {
|
|
|
122
122
|
* Headless single product details composable with variant selection and real-time inventory checks.
|
|
123
123
|
*
|
|
124
124
|
* @example
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
125
|
+
* ```vue
|
|
126
|
+
* <script setup lang="ts">
|
|
127
|
+
* const route = useRoute()
|
|
128
|
+
* const { product, selectedVariant, currentPrice, inStock, selectVariant } = useProduct(() => route.params.slug as string)
|
|
129
|
+
* </script>
|
|
130
|
+
* ```
|
|
131
131
|
*/
|
|
132
132
|
export declare function useProduct(slugOrId: MaybeRefOrGetter<string>): UseProductReturn;
|
|
133
133
|
export interface CheckoutInput {
|
|
@@ -144,7 +144,8 @@ export interface UseCheckoutReturn {
|
|
|
144
144
|
/** Error encountered during checkout creation. */
|
|
145
145
|
error: Ref<Error | null>;
|
|
146
146
|
/**
|
|
147
|
-
* Submits the current active cart to the checkout endpoint and redirects if a checkout URL is
|
|
147
|
+
* Submits the current active cart to the checkout endpoint and redirects if a checkout URL is
|
|
148
|
+
* returned.
|
|
148
149
|
*/
|
|
149
150
|
submitCheckout: (input: CheckoutInput) => Promise<{
|
|
150
151
|
sessionId: string;
|
|
@@ -156,14 +157,14 @@ export interface UseCheckoutReturn {
|
|
|
156
157
|
* Headless e-commerce checkout composable for processing active shopping carts.
|
|
157
158
|
*
|
|
158
159
|
* @example
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
160
|
+
* ```vue
|
|
161
|
+
* <script setup lang="ts">
|
|
162
|
+
* const { submitCheckout, loading, error } = useCheckout()
|
|
163
|
+
* async function onPay() {
|
|
163
164
|
* await submitCheckout({ customerEmail: 'buyer@example.com' })
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
165
|
+
* }
|
|
166
|
+
* </script>
|
|
167
|
+
* ```
|
|
167
168
|
*/
|
|
168
169
|
export declare function useCheckout(): UseCheckoutReturn;
|
|
169
170
|
/** Alias for useCheckout */
|
|
@@ -172,14 +173,14 @@ export declare const useStoreCheckout: () => UseCheckoutReturn;
|
|
|
172
173
|
* Client-side currency composable for multi-currency display and conversion.
|
|
173
174
|
*
|
|
174
175
|
* @example
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
176
|
+
* ```vue
|
|
177
|
+
* <script setup>
|
|
178
|
+
* const { currency, setCurrency, format, convert } = useCurrency()
|
|
179
|
+
* </script>
|
|
180
|
+
* <template>
|
|
180
181
|
* <span>{{ format(product.basePrice) }}</span>
|
|
181
|
-
*
|
|
182
|
-
*
|
|
182
|
+
* </template>
|
|
183
|
+
* ```
|
|
183
184
|
*/
|
|
184
185
|
export interface UseCurrencyReturn {
|
|
185
186
|
/** Currently active currency code (e.g. "USD", "EUR") */
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
ref,
|
|
4
|
+
toValue,
|
|
5
|
+
watch
|
|
6
|
+
} from "vue";
|
|
2
7
|
import { useRuntimeConfig, useState, useCookie } from "#imports";
|
|
3
8
|
function getStorePrefix() {
|
|
4
9
|
try {
|
|
@@ -227,11 +232,7 @@ export function useProducts(options = {}) {
|
|
|
227
232
|
await fetchProducts(true);
|
|
228
233
|
}
|
|
229
234
|
watch(
|
|
230
|
-
[
|
|
231
|
-
() => toValue(options.category),
|
|
232
|
-
() => toValue(options.search),
|
|
233
|
-
() => toValue(options.sortBy)
|
|
234
|
-
],
|
|
235
|
+
[() => toValue(options.category), () => toValue(options.search), () => toValue(options.sortBy)],
|
|
235
236
|
() => {
|
|
236
237
|
refresh().catch(() => {
|
|
237
238
|
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type UploadedFile, type UploadOptions } from "./storage";
|
|
2
|
+
/** Reads a File object and converts it to a Base64 Data URL string. */
|
|
3
|
+
export declare function fileToDataUrl(file: File): Promise<string>;
|
|
4
|
+
/**
|
|
5
|
+
* Loads a remote URL and converts it to a Base64 Data URL using a Canvas. Assumes the server allows
|
|
6
|
+
* Cross-Origin requests.
|
|
7
|
+
*/
|
|
8
|
+
export declare function urlToDataUrl(url: string): Promise<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a Base64 Data URL to a native JavaScript File object. Optionally re-encodes the image to
|
|
11
|
+
* a target MIME format/quality using Canvas.
|
|
12
|
+
*/
|
|
13
|
+
export declare function dataUrlToFile(dataUrl: string, filename?: string, targetFormat?: string, targetQuality?: number): Promise<File | null>;
|
|
14
|
+
/** Triggers a native browser download prompt for a File or Blob object. */
|
|
15
|
+
export declare function downloadStudioFile(file: File | Blob, filename?: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Parses aspect ratio strings ("aspect-square", "16:9", "3/2", "1") or numbers into a numeric
|
|
18
|
+
* ratio.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseAspectRatio(val: string | number | null | undefined): number | null;
|
|
21
|
+
export interface StudioUploadOptions extends UploadOptions {
|
|
22
|
+
/** Upload endpoint (defaults to Qarpeo Blob storage endpoint) */
|
|
23
|
+
endpoint?: string;
|
|
24
|
+
/** Target MIME format when converting a dataUrl before upload */
|
|
25
|
+
format?: string;
|
|
26
|
+
/** Output quality (0-1) when converting a dataUrl */
|
|
27
|
+
quality?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Composable for uploading studio outputs (File or Base64 Data URL) directly to Qarpeo Blob
|
|
31
|
+
* storage.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useStudioUpload(defaultOptions?: StudioUploadOptions): {
|
|
34
|
+
uploadFile: (file: File, options?: UploadOptions) => Promise<UploadedFile>;
|
|
35
|
+
uploadDataUrl: (dataUrl: string, filename?: string, options?: StudioUploadOptions) => Promise<UploadedFile>;
|
|
36
|
+
isUploading: import("vue").Ref<boolean, boolean>;
|
|
37
|
+
uploading: import("vue").Ref<boolean, boolean>;
|
|
38
|
+
progress: import("vue").Ref<number, number>;
|
|
39
|
+
error: import("vue").Ref<Error | null, Error | null>;
|
|
40
|
+
lastUploaded: import("vue").Ref<{
|
|
41
|
+
key: string;
|
|
42
|
+
pathname: string;
|
|
43
|
+
url: string;
|
|
44
|
+
size: number;
|
|
45
|
+
type: string;
|
|
46
|
+
etag: string;
|
|
47
|
+
access?: import("../../storage-server").BlobAccessTier | undefined;
|
|
48
|
+
customMetadata?: Record<string, string> | undefined;
|
|
49
|
+
} | null, UploadedFile | {
|
|
50
|
+
key: string;
|
|
51
|
+
pathname: string;
|
|
52
|
+
url: string;
|
|
53
|
+
size: number;
|
|
54
|
+
type: string;
|
|
55
|
+
etag: string;
|
|
56
|
+
access?: import("../../storage-server").BlobAccessTier | undefined;
|
|
57
|
+
customMetadata?: Record<string, string> | undefined;
|
|
58
|
+
} | null>;
|
|
59
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import { useUpload } from "./storage.mjs";
|
|
3
|
+
export function fileToDataUrl(file) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
if (!file.type.startsWith("image/")) {
|
|
6
|
+
reject(new Error("Not an image file"));
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const reader = new FileReader();
|
|
10
|
+
reader.onload = (e) => resolve(e.target?.result);
|
|
11
|
+
reader.onerror = () => reject(new Error("Failed to read file"));
|
|
12
|
+
reader.readAsDataURL(file);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function urlToDataUrl(url) {
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
const img = new Image();
|
|
18
|
+
img.crossOrigin = "anonymous";
|
|
19
|
+
img.onload = () => {
|
|
20
|
+
const canvas = document.createElement("canvas");
|
|
21
|
+
canvas.width = img.naturalWidth;
|
|
22
|
+
canvas.height = img.naturalHeight;
|
|
23
|
+
const ctx = canvas.getContext("2d");
|
|
24
|
+
if (!ctx) {
|
|
25
|
+
reject(new Error("Canvas context failed"));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
ctx.drawImage(img, 0, 0);
|
|
29
|
+
resolve(canvas.toDataURL());
|
|
30
|
+
};
|
|
31
|
+
img.onerror = () => reject(new Error("Failed to load image from URL"));
|
|
32
|
+
img.src = url;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function dataUrlToFile(dataUrl, filename = "image", targetFormat, targetQuality = 0.9) {
|
|
36
|
+
const decodeDataUrl = (url) => {
|
|
37
|
+
const parts = url.split(",");
|
|
38
|
+
const header = parts[0] || "";
|
|
39
|
+
const data = parts[1] || "";
|
|
40
|
+
if (!data) return null;
|
|
41
|
+
const mime = header.match(/:(.*?);/)?.[1] ?? "image/png";
|
|
42
|
+
const bytes = atob(data);
|
|
43
|
+
const buf = new Uint8Array(bytes.length);
|
|
44
|
+
for (let i = 0; i < bytes.length; i++) buf[i] = bytes.charCodeAt(i);
|
|
45
|
+
const ext = mime.split("/")[1] || "png";
|
|
46
|
+
const cleanName = filename.replace(/\.[^.]+$/, "");
|
|
47
|
+
return new File([buf], `${cleanName}.${ext}`, { type: mime });
|
|
48
|
+
};
|
|
49
|
+
if (!targetFormat || dataUrl.startsWith(`data:${targetFormat};`)) {
|
|
50
|
+
return Promise.resolve(decodeDataUrl(dataUrl));
|
|
51
|
+
}
|
|
52
|
+
return new Promise((resolve) => {
|
|
53
|
+
const img = new Image();
|
|
54
|
+
img.crossOrigin = "anonymous";
|
|
55
|
+
img.onload = () => {
|
|
56
|
+
const c = document.createElement("canvas");
|
|
57
|
+
c.width = img.naturalWidth;
|
|
58
|
+
c.height = img.naturalHeight;
|
|
59
|
+
const ctx = c.getContext("2d");
|
|
60
|
+
if (!ctx) return resolve(null);
|
|
61
|
+
ctx.drawImage(img, 0, 0);
|
|
62
|
+
const newDataUrl = c.toDataURL(targetFormat, targetQuality);
|
|
63
|
+
resolve(decodeDataUrl(newDataUrl));
|
|
64
|
+
};
|
|
65
|
+
img.onerror = () => resolve(null);
|
|
66
|
+
img.src = dataUrl;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export function downloadStudioFile(file, filename) {
|
|
70
|
+
if (typeof document === "undefined") return;
|
|
71
|
+
const url = URL.createObjectURL(file);
|
|
72
|
+
const a = document.createElement("a");
|
|
73
|
+
a.href = url;
|
|
74
|
+
a.download = filename || (file instanceof File ? file.name : "download");
|
|
75
|
+
document.body.append(a);
|
|
76
|
+
a.click();
|
|
77
|
+
document.body.removeChild(a);
|
|
78
|
+
URL.revokeObjectURL(url);
|
|
79
|
+
}
|
|
80
|
+
export function parseAspectRatio(val) {
|
|
81
|
+
if (val === null || val === void 0 || val === "aspect-auto" || val === "auto") return null;
|
|
82
|
+
if (typeof val === "number") return Number.isFinite(val) && val > 0 ? val : null;
|
|
83
|
+
const v = val.trim().toLowerCase();
|
|
84
|
+
if (["aspect-square", "square", "1", "1/1", "1:1"].includes(v)) return 1;
|
|
85
|
+
if (v === "aspect-video" || v === "video") return 16 / 9;
|
|
86
|
+
if (v.includes("/") || v.includes(":")) {
|
|
87
|
+
const delimiter = v.includes("/") ? "/" : ":";
|
|
88
|
+
const parts = v.split(delimiter);
|
|
89
|
+
if (parts.length === 2) {
|
|
90
|
+
const w = Number(parts[0]);
|
|
91
|
+
const h = Number(parts[1]);
|
|
92
|
+
if (!Number.isNaN(w) && !Number.isNaN(h) && h > 0 && w > 0) return w / h;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const num = Number(v);
|
|
96
|
+
return !Number.isNaN(num) && num > 0 ? num : null;
|
|
97
|
+
}
|
|
98
|
+
export function useStudioUpload(defaultOptions = {}) {
|
|
99
|
+
const { endpoint = "/api/storage/upload", ...baseUploadOptions } = defaultOptions;
|
|
100
|
+
const { upload, isUploading, progress, error } = useUpload(endpoint, baseUploadOptions);
|
|
101
|
+
const lastUploaded = ref(null);
|
|
102
|
+
async function uploadFile(file, options = {}) {
|
|
103
|
+
const res = await upload(file, { ...baseUploadOptions, ...options });
|
|
104
|
+
const uploaded = Array.isArray(res) ? res[0] : res;
|
|
105
|
+
lastUploaded.value = uploaded;
|
|
106
|
+
return uploaded;
|
|
107
|
+
}
|
|
108
|
+
async function uploadDataUrl(dataUrl, filename = "image", options = {}) {
|
|
109
|
+
const file = await dataUrlToFile(
|
|
110
|
+
dataUrl,
|
|
111
|
+
filename,
|
|
112
|
+
options.format ?? defaultOptions.format,
|
|
113
|
+
options.quality ?? defaultOptions.quality
|
|
114
|
+
);
|
|
115
|
+
if (!file) {
|
|
116
|
+
throw new Error("Failed to convert image data URL to File");
|
|
117
|
+
}
|
|
118
|
+
return uploadFile(file, options);
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
uploadFile,
|
|
122
|
+
uploadDataUrl,
|
|
123
|
+
isUploading,
|
|
124
|
+
uploading: isUploading,
|
|
125
|
+
progress,
|
|
126
|
+
error,
|
|
127
|
+
lastUploaded
|
|
128
|
+
};
|
|
129
|
+
}
|
|
@@ -29,13 +29,13 @@ export interface UseTenantReturn {
|
|
|
29
29
|
/**
|
|
30
30
|
* Headless multi-tenancy and Cloudflare for SaaS custom domains composable.
|
|
31
31
|
*
|
|
32
|
-
* @param basePath - API prefix for tenant endpoints (default: '/api/tenants')
|
|
33
|
-
*
|
|
34
32
|
* @example
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
33
|
+
* ```vue
|
|
34
|
+
* <script setup lang="ts">
|
|
35
|
+
* const { tenant, domains, addDomain, isCustomDomain } = useTenant()
|
|
36
|
+
* </script>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param basePath - API prefix for tenant endpoints (default: '/api/tenants')
|
|
40
40
|
*/
|
|
41
41
|
export declare function useTenant(basePath?: string): UseTenantReturn;
|
|
@@ -7,10 +7,10 @@ export interface UseTurnstileReturn {
|
|
|
7
7
|
* Headless Cloudflare Turnstile bot protection composable.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* ```vue
|
|
11
|
+
* <script setup lang="ts">
|
|
12
|
+
* const { siteKey } = useTurnstile()
|
|
13
|
+
* </script>
|
|
14
|
+
* ```
|
|
15
15
|
*/
|
|
16
16
|
export declare function useTurnstile(): UseTurnstileReturn;
|
|
@@ -20,10 +20,10 @@ export interface UseTwoFactorReturn {
|
|
|
20
20
|
* Headless Two-Factor Authentication (TOTP / Authenticator App) composable.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* ```vue
|
|
24
|
+
* <script setup lang="ts">
|
|
25
|
+
* const { setup2FA, verify2FA, loading } = useTwoFactor()
|
|
26
|
+
* </script>
|
|
27
|
+
* ```
|
|
28
28
|
*/
|
|
29
29
|
export declare function useTwoFactor(): UseTwoFactorReturn;
|
|
@@ -104,12 +104,7 @@ function formatDate(ts?: number) {
|
|
|
104
104
|
size="xs"
|
|
105
105
|
@click="reloadNotifications"
|
|
106
106
|
/>
|
|
107
|
-
<UButton
|
|
108
|
-
label="+ Send Test"
|
|
109
|
-
color="primary"
|
|
110
|
-
size="xs"
|
|
111
|
-
@click="showSendDialog = true"
|
|
112
|
-
/>
|
|
107
|
+
<UButton label="+ Send Test" color="primary" size="xs" @click="showSendDialog = true" />
|
|
113
108
|
</div>
|
|
114
109
|
</div>
|
|
115
110
|
|
|
@@ -5,9 +5,7 @@ export default defineNuxtPlugin(() => {
|
|
|
5
5
|
const pwa = qarpeo.pwa || {};
|
|
6
6
|
const site = qarpeo.site || {};
|
|
7
7
|
if (pwa.enabled === false) return;
|
|
8
|
-
const links = [
|
|
9
|
-
{ rel: "manifest", href: "/manifest.webmanifest" }
|
|
10
|
-
];
|
|
8
|
+
const links = [{ rel: "manifest", href: "/manifest.webmanifest" }];
|
|
11
9
|
const appleTouchIcon = pwa.appleTouchIcon || pwa.icons?.find((i) => i.sizes.includes("180") || i.sizes.includes("192"))?.src || pwa.icons?.[0]?.src;
|
|
12
10
|
if (appleTouchIcon) {
|
|
13
11
|
links.push({ rel: "apple-touch-icon", href: appleTouchIcon });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
import type { Editor } from "@tiptap/vue-3";
|
|
3
|
+
import type { Component } from "vue";
|
|
4
|
+
declare module "@tiptap/core" {
|
|
5
|
+
interface Commands<ReturnType> {
|
|
6
|
+
imageUpload: {
|
|
7
|
+
insertImageUpload: () => ReturnType;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare function createCMSImageUploadExtension(nodeComponent: Component): Node<any, any>;
|
|
12
|
+
export declare const cmsEditorHandlers: {
|
|
13
|
+
imageUpload: {
|
|
14
|
+
canExecute: (editor: Editor) => boolean;
|
|
15
|
+
execute: (editor: Editor) => import("@tiptap/core").ChainedCommands;
|
|
16
|
+
isActive: (editor: Editor) => boolean;
|
|
17
|
+
isDisabled: undefined;
|
|
18
|
+
};
|
|
19
|
+
table: {
|
|
20
|
+
canExecute: (editor: Editor) => any;
|
|
21
|
+
execute: (editor: Editor) => any;
|
|
22
|
+
isActive: (editor: Editor) => boolean;
|
|
23
|
+
isDisabled: undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|