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.
Files changed (299) hide show
  1. package/README.md +12 -6
  2. package/dist/apps/cms.d.ts +1 -1
  3. package/dist/apps/comments.d.ts +1 -1
  4. package/dist/apps/payments.d.ts +1 -1
  5. package/dist/apps/store.d.ts +1 -1
  6. package/dist/chunks/{manifest.get.mjs → tools.mjs} +445 -430
  7. package/dist/cli/index.mjs +756 -746
  8. package/dist/core/aliases.d.ts +1 -1
  9. package/dist/core/context.d.ts +1 -1
  10. package/dist/core/d1-migrate.d.ts +1 -1
  11. package/dist/core/devtools.d.ts +1 -1
  12. package/dist/core/nitro.d.ts +1 -1
  13. package/dist/core/schema.d.ts +1 -1
  14. package/dist/core/server-utils.d.ts +1 -1
  15. package/dist/core/wrangler.d.ts +1 -1
  16. package/dist/fate/index.d.ts +8 -8
  17. package/dist/fate/index.mjs +3 -1
  18. package/dist/features/agents.d.ts +1 -1
  19. package/dist/features/auth.d.ts +1 -1
  20. package/dist/features/bots.d.ts +1 -1
  21. package/dist/features/console.d.ts +1 -1
  22. package/dist/features/fate.d.ts +1 -1
  23. package/dist/features/mail.d.ts +1 -1
  24. package/dist/features/mcp.d.ts +1 -1
  25. package/dist/features/multitenant.d.ts +1 -1
  26. package/dist/features/notifications.d.ts +1 -1
  27. package/dist/features/realtime.d.ts +1 -1
  28. package/dist/features/studio.d.ts +4 -0
  29. package/dist/module.d.ts +1 -1
  30. package/dist/module.mjs +5139 -5067
  31. package/dist/primitives/ai.d.ts +1 -1
  32. package/dist/primitives/analytics.d.ts +1 -1
  33. package/dist/primitives/blob.d.ts +1 -1
  34. package/dist/primitives/browser.d.ts +1 -1
  35. package/dist/primitives/cache.d.ts +1 -1
  36. package/dist/primitives/d1.d.ts +1 -1
  37. package/dist/primitives/do.d.ts +1 -1
  38. package/dist/primitives/email.d.ts +1 -1
  39. package/dist/primitives/hyperdrive.d.ts +1 -1
  40. package/dist/primitives/kv.d.ts +1 -1
  41. package/dist/primitives/queue.d.ts +1 -1
  42. package/dist/primitives/ratelimit.d.ts +1 -1
  43. package/dist/primitives/vectorize.d.ts +1 -1
  44. package/dist/primitives/workflows.d.ts +1 -1
  45. package/dist/runtime/ai.mjs +4 -1
  46. package/dist/runtime/app/components/CMSEditor.vue +439 -0
  47. package/dist/runtime/app/components/CMSEditorImageNode.vue +90 -0
  48. package/dist/runtime/app/components/CMSEditorLinkPopover.vue +120 -0
  49. package/dist/runtime/app/components/QDropZone.vue +327 -0
  50. package/dist/runtime/app/components/QImageCropper.vue +658 -0
  51. package/dist/runtime/app/components/QImageStudio.vue +300 -0
  52. package/dist/runtime/app/components/QImg.vue +7 -4
  53. package/dist/runtime/app/composables/analytics.d.ts +8 -8
  54. package/dist/runtime/app/composables/api-tokens.d.ts +5 -5
  55. package/dist/runtime/app/composables/auth.d.ts +23 -19
  56. package/dist/runtime/app/composables/chat.d.ts +7 -6
  57. package/dist/runtime/app/composables/cms-preview.d.ts +7 -8
  58. package/dist/runtime/app/composables/cms.d.ts +6 -6
  59. package/dist/runtime/app/composables/comments.d.ts +5 -5
  60. package/dist/runtime/app/composables/comments.mjs +7 -4
  61. package/dist/runtime/app/composables/console.d.ts +6 -14
  62. package/dist/runtime/app/composables/docs-version.d.ts +8 -8
  63. package/dist/runtime/app/composables/impersonation.d.ts +5 -5
  64. package/dist/runtime/app/composables/organization.d.ts +5 -5
  65. package/dist/runtime/app/composables/passkey.d.ts +5 -5
  66. package/dist/runtime/app/composables/passwordless.d.ts +5 -5
  67. package/dist/runtime/app/composables/payments.d.ts +5 -5
  68. package/dist/runtime/app/composables/rbac.d.ts +5 -5
  69. package/dist/runtime/app/composables/site.d.ts +2 -2
  70. package/dist/runtime/app/composables/sse.d.ts +20 -33
  71. package/dist/runtime/app/composables/sse.mjs +6 -3
  72. package/dist/runtime/app/composables/storage.d.ts +6 -8
  73. package/dist/runtime/app/composables/store.d.ts +37 -36
  74. package/dist/runtime/app/composables/store.mjs +7 -6
  75. package/dist/runtime/app/composables/studio.d.ts +59 -0
  76. package/dist/runtime/app/composables/studio.mjs +129 -0
  77. package/dist/runtime/app/composables/tenant.d.ts +7 -7
  78. package/dist/runtime/app/composables/turnstile.d.ts +5 -5
  79. package/dist/runtime/app/composables/two-factor.d.ts +5 -5
  80. package/dist/runtime/app/pages/devtools/notifications.vue +1 -6
  81. package/dist/runtime/app/plugins/pwa.mjs +1 -3
  82. package/dist/runtime/app/utils/cms-editor.d.ts +25 -0
  83. package/dist/runtime/app/utils/cms-editor.mjs +43 -0
  84. package/dist/runtime/auth.d.ts +9 -9
  85. package/dist/runtime/blob.d.ts +1 -3
  86. package/dist/runtime/blob.mjs +3 -1
  87. package/dist/runtime/cache.d.ts +8 -6
  88. package/dist/runtime/cache.mjs +8 -11
  89. package/dist/runtime/db.d.ts +4 -3
  90. package/dist/runtime/drizzle.d.ts +2 -1
  91. package/dist/runtime/drizzle.mjs +2 -2
  92. package/dist/runtime/queue.d.ts +1 -0
  93. package/dist/runtime/replica.d.ts +6 -10
  94. package/dist/runtime/replica.mjs +3 -1
  95. package/dist/runtime/schema-mysql.d.ts +16 -32
  96. package/dist/runtime/schema-pg.d.ts +15 -31
  97. package/dist/runtime/schema-shared.d.ts +20 -17
  98. package/dist/runtime/schema.d.ts +21 -33
  99. package/dist/runtime/server/durable-objects/agent.mjs +4 -1
  100. package/dist/runtime/server/durable-objects/room.d.ts +4 -6
  101. package/dist/runtime/server/durable-objects/room.mjs +18 -8
  102. package/dist/runtime/server/plugins/comments.d.ts +2 -3
  103. package/dist/runtime/server/plugins/email-inbound.d.ts +1 -3
  104. package/dist/runtime/server/plugins/store.d.ts +2 -3
  105. package/dist/runtime/server/routes/__qarpeo/cloud/agents/run.post.d.ts +2 -2
  106. package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.get.mjs +10 -2
  107. package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.post.d.ts +2 -2
  108. package/dist/runtime/server/routes/__qarpeo/cloud/cms/entry.post.mjs +10 -2
  109. package/dist/runtime/server/routes/__qarpeo/cloud/cms.get.d.ts +2 -2
  110. package/dist/runtime/server/routes/__qarpeo/cloud/cms.get.mjs +7 -1
  111. package/dist/runtime/server/routes/__qarpeo/cloud/comments/moderate.post.d.ts +2 -2
  112. package/dist/runtime/server/routes/__qarpeo/cloud/comments/moderate.post.mjs +5 -1
  113. package/dist/runtime/server/routes/__qarpeo/cloud/comments.get.d.ts +1 -3
  114. package/dist/runtime/server/routes/__qarpeo/cloud/extras.get.d.ts +2 -2
  115. package/dist/runtime/server/routes/__qarpeo/cloud/extras.get.mjs +15 -4
  116. package/dist/runtime/server/routes/__qarpeo/cloud/mail/unsuppress.post.d.ts +2 -2
  117. package/dist/runtime/server/routes/__qarpeo/cloud/migrate/cms.post.mjs +13 -4
  118. package/dist/runtime/server/routes/__qarpeo/cloud/migrate/products.post.mjs +1 -1
  119. package/dist/runtime/server/routes/__qarpeo/cloud/migrate.post.d.ts +3 -3
  120. package/dist/runtime/server/routes/__qarpeo/cloud/migrate.post.mjs +22 -6
  121. package/dist/runtime/server/routes/__qarpeo/cloud/notifications/test.post.d.ts +2 -2
  122. package/dist/runtime/server/routes/__qarpeo/cloud/operations.get.d.ts +6 -5
  123. package/dist/runtime/server/routes/__qarpeo/cloud/store/order-status.post.d.ts +1 -3
  124. package/dist/runtime/server/routes/__qarpeo/cloud/store/order-status.post.mjs +14 -2
  125. package/dist/runtime/server/routes/__qarpeo/cloud/store/orders.get.d.ts +1 -3
  126. package/dist/runtime/server/routes/__qarpeo/cloud/store/orders.get.mjs +7 -1
  127. package/dist/runtime/server/routes/__qarpeo/cloud/store/products.get.d.ts +1 -3
  128. package/dist/runtime/server/routes/__qarpeo/cloud/tasks/run.post.d.ts +2 -2
  129. package/dist/runtime/server/routes/__qarpeo/cloud/users/action.post.d.ts +2 -2
  130. package/dist/runtime/server/routes/__qarpeo/cloud/users/action.post.mjs +5 -1
  131. package/dist/runtime/server/routes/__qarpeo/cloud/users.get.d.ts +6 -5
  132. package/dist/runtime/server/routes/__qarpeo/cloud/users.get.mjs +1 -3
  133. package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +2 -2
  134. package/dist/runtime/server/routes/__qarpeo/manifest.get.d.ts +2 -2
  135. package/dist/runtime/server/routes/__qarpeo/og.get.d.ts +2 -2
  136. package/dist/runtime/server/routes/__qarpeo/rbac/me.get.d.ts +2 -2
  137. package/dist/runtime/server/routes/__qarpeo/rbac/roles.delete.d.ts +2 -2
  138. package/dist/runtime/server/routes/__qarpeo/rbac/roles.delete.mjs +5 -1
  139. package/dist/runtime/server/routes/__qarpeo/rbac/roles.get.d.ts +2 -2
  140. package/dist/runtime/server/routes/__qarpeo/rbac/roles.get.mjs +1 -5
  141. package/dist/runtime/server/routes/__qarpeo/rbac/roles.post.d.ts +2 -2
  142. package/dist/runtime/server/routes/__qarpeo/rbac/roles.post.mjs +5 -1
  143. package/dist/runtime/server/routes/__qarpeo/rbac/users.post.d.ts +2 -2
  144. package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +1 -6
  145. package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +1 -6
  146. package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +1 -6
  147. package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +5 -1
  148. package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +7 -1
  149. package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +1 -1
  150. package/dist/runtime/server/routes/auth/otp/send.post.mjs +1 -1
  151. package/dist/runtime/server/routes/cms/search.get.mjs +2 -6
  152. package/dist/runtime/server/routes/comments/[id]/report.post.mjs +1 -4
  153. package/dist/runtime/server/routes/comments/[id].patch.mjs +1 -4
  154. package/dist/runtime/server/routes/comments/batch.post.mjs +1 -3
  155. package/dist/runtime/server/routes/comments/index.post.mjs +1 -5
  156. package/dist/runtime/server/routes/fate.mjs +1 -1
  157. package/dist/runtime/server/routes/mail/webhooks.post.mjs +1 -1
  158. package/dist/runtime/server/routes/sitemap.xml.get.mjs +2 -1
  159. package/dist/runtime/server/routes/storage/presigned-r2.post.d.ts +5 -6
  160. package/dist/runtime/server/routes/storage/presigned-r2.post.mjs +1 -1
  161. package/dist/runtime/server/routes/store/cart/items/[id].delete.mjs +1 -1
  162. package/dist/runtime/server/routes/store/cart/items/[id].patch.mjs +1 -1
  163. package/dist/runtime/server/routes/store/currencies.get.mjs +1 -4
  164. package/dist/runtime/server/routes/store/orders/[id].get.mjs +1 -1
  165. package/dist/runtime/server/routes/store/orders/download/[token].get.mjs +13 -4
  166. package/dist/runtime/server/routes/store/orders/index.get.mjs +1 -1
  167. package/dist/runtime/server/routes/store/tax/calculate.post.d.ts +2 -1
  168. package/dist/runtime/server/routes/store/tax/calculate.post.mjs +12 -3
  169. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +4 -1
  170. package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +4 -1
  171. package/dist/runtime/server/utils/ai.d.ts +38 -35
  172. package/dist/runtime/server/utils/ai.mjs +7 -11
  173. package/dist/runtime/server/utils/analytics-query.d.ts +4 -4
  174. package/dist/runtime/server/utils/auth.d.ts +25 -25
  175. package/dist/runtime/server/utils/auth.mjs +22 -8
  176. package/dist/runtime/server/utils/bots.d.ts +7 -7
  177. package/dist/runtime/server/utils/browser-utils.d.ts +26 -27
  178. package/dist/runtime/server/utils/cache.d.ts +20 -20
  179. package/dist/runtime/server/utils/cms/collections.mjs +1 -6
  180. package/dist/runtime/server/utils/cms/common.mjs +1 -0
  181. package/dist/runtime/server/utils/cms/markdown.d.ts +2 -2
  182. package/dist/runtime/server/utils/cms/markdown.mjs +5 -5
  183. package/dist/runtime/server/utils/cms/mutations.mjs +8 -23
  184. package/dist/runtime/server/utils/cms/navigation.mjs +4 -4
  185. package/dist/runtime/server/utils/cms/path.d.ts +1 -0
  186. package/dist/runtime/server/utils/cms/path.mjs +8 -2
  187. package/dist/runtime/server/utils/cms/references.mjs +1 -7
  188. package/dist/runtime/server/utils/cms/search.d.ts +2 -2
  189. package/dist/runtime/server/utils/cms/sync.mjs +4 -2
  190. package/dist/runtime/server/utils/cms/taxonomy.d.ts +2 -2
  191. package/dist/runtime/server/utils/cms.d.ts +1 -1
  192. package/dist/runtime/server/utils/cms.mjs +1 -5
  193. package/dist/runtime/server/utils/comments-filter.d.ts +9 -7
  194. package/dist/runtime/server/utils/comments.d.ts +68 -55
  195. package/dist/runtime/server/utils/comments.mjs +21 -9
  196. package/dist/runtime/server/utils/config.d.ts +2 -2
  197. package/dist/runtime/server/utils/console.d.ts +3 -5
  198. package/dist/runtime/server/utils/context.d.ts +10 -10
  199. package/dist/runtime/server/utils/crypto.d.ts +20 -20
  200. package/dist/runtime/server/utils/domains.mjs +3 -1
  201. package/dist/runtime/server/utils/drizzle.d.ts +24 -25
  202. package/dist/runtime/server/utils/drizzle.mjs +17 -17
  203. package/dist/runtime/server/utils/durable-object.d.ts +27 -25
  204. package/dist/runtime/server/utils/durable-object.mjs +3 -10
  205. package/dist/runtime/server/utils/email-inbound.d.ts +10 -10
  206. package/dist/runtime/server/utils/impersonation.d.ts +18 -18
  207. package/dist/runtime/server/utils/legacy-hash.d.ts +23 -27
  208. package/dist/runtime/server/utils/lock.d.ts +20 -23
  209. package/dist/runtime/server/utils/mail.d.ts +19 -19
  210. package/dist/runtime/server/utils/mail.mjs +4 -2
  211. package/dist/runtime/server/utils/mcp.d.ts +20 -20
  212. package/dist/runtime/server/utils/mcp.mjs +22 -38
  213. package/dist/runtime/server/utils/notifications.d.ts +49 -38
  214. package/dist/runtime/server/utils/oauth.d.ts +3 -9
  215. package/dist/runtime/server/utils/organization.d.ts +28 -28
  216. package/dist/runtime/server/utils/organization.mjs +15 -5
  217. package/dist/runtime/server/utils/passwordless.d.ts +24 -24
  218. package/dist/runtime/server/utils/payments/checkout.d.ts +12 -12
  219. package/dist/runtime/server/utils/payments/checkout.mjs +1 -3
  220. package/dist/runtime/server/utils/payments/common.d.ts +3 -3
  221. package/dist/runtime/server/utils/payments/paddle.d.ts +4 -1
  222. package/dist/runtime/server/utils/payments/polar.d.ts +4 -1
  223. package/dist/runtime/server/utils/payments/stripe.mjs +5 -7
  224. package/dist/runtime/server/utils/payments/subscriptions.d.ts +14 -14
  225. package/dist/runtime/server/utils/payments/subscriptions.mjs +2 -6
  226. package/dist/runtime/server/utils/payments/usage.mjs +1 -3
  227. package/dist/runtime/server/utils/payments/webhooks.mjs +2 -2
  228. package/dist/runtime/server/utils/queue.d.ts +54 -58
  229. package/dist/runtime/server/utils/queue.mjs +2 -6
  230. package/dist/runtime/server/utils/rag.d.ts +23 -23
  231. package/dist/runtime/server/utils/rag.mjs +10 -5
  232. package/dist/runtime/server/utils/ratelimit.d.ts +21 -18
  233. package/dist/runtime/server/utils/rbac.d.ts +13 -15
  234. package/dist/runtime/server/utils/rbac.mjs +44 -10
  235. package/dist/runtime/server/utils/realtime.d.ts +53 -52
  236. package/dist/runtime/server/utils/role-env.d.ts +5 -4
  237. package/dist/runtime/server/utils/scheduled-task.d.ts +14 -15
  238. package/dist/runtime/server/utils/session.d.ts +40 -40
  239. package/dist/runtime/server/utils/sse.d.ts +23 -33
  240. package/dist/runtime/server/utils/sse.mjs +5 -14
  241. package/dist/runtime/server/utils/sso.mjs +3 -1
  242. package/dist/runtime/server/utils/storage.d.ts +20 -22
  243. package/dist/runtime/server/utils/storage.mjs +2 -2
  244. package/dist/runtime/server/utils/store/cart.d.ts +5 -3
  245. package/dist/runtime/server/utils/store/cart.mjs +14 -10
  246. package/dist/runtime/server/utils/store/checkout.mjs +4 -1
  247. package/dist/runtime/server/utils/store/common.d.ts +1 -1
  248. package/dist/runtime/server/utils/store/common.mjs +36 -12
  249. package/dist/runtime/server/utils/store/inventory.mjs +3 -1
  250. package/dist/runtime/server/utils/store/orders.mjs +32 -24
  251. package/dist/runtime/server/utils/store-localization.d.ts +9 -27
  252. package/dist/runtime/server/utils/store-localization.mjs +3 -3
  253. package/dist/runtime/server/utils/table-names.d.ts +15 -15
  254. package/dist/runtime/server/utils/table-names.mjs +1 -1
  255. package/dist/runtime/server/utils/tenant.d.ts +12 -12
  256. package/dist/runtime/server/utils/tenant.mjs +7 -4
  257. package/dist/runtime/server/utils/totp.d.ts +18 -18
  258. package/dist/runtime/server/utils/tracker.d.ts +5 -5
  259. package/dist/runtime/server/utils/turnstile.d.ts +9 -9
  260. package/dist/runtime/server/utils/urn.d.ts +5 -8
  261. package/dist/runtime/server/utils/workflows.d.ts +30 -31
  262. package/dist/runtime/server/utils/workflows.mjs +2 -4
  263. package/dist/runtime/server.d.ts +2 -2
  264. package/dist/runtime/service.d.ts +10 -10
  265. package/dist/runtime/test-utils.d.ts +10 -10
  266. package/dist/runtime/test-utils.mjs +9 -2
  267. package/dist/runtime/types/ai.d.ts +14 -14
  268. package/dist/runtime/types/d1.d.ts +6 -11
  269. package/dist/runtime/types/durable-object.d.ts +4 -8
  270. package/dist/runtime/types/email.d.ts +3 -9
  271. package/dist/runtime/types/index.d.ts +15 -21
  272. package/dist/runtime/types/r2.d.ts +5 -5
  273. package/dist/runtime/types/workflows.d.ts +5 -6
  274. package/dist/runtime/workflows.d.ts +1 -3
  275. package/dist/types/ai.d.ts +10 -17
  276. package/dist/types/auth.d.ts +5 -3
  277. package/dist/types/cache.d.ts +7 -7
  278. package/dist/types/cms.d.ts +30 -5
  279. package/dist/types/comments.d.ts +23 -21
  280. package/dist/types/console.d.ts +1 -3
  281. package/dist/types/db.d.ts +7 -7
  282. package/dist/types/index.d.ts +1 -0
  283. package/dist/types/options.d.ts +36 -24
  284. package/dist/types/site.d.ts +8 -2
  285. package/dist/types/storage.d.ts +2 -1
  286. package/dist/types/store-options.d.ts +10 -26
  287. package/dist/types/studio.d.ts +79 -0
  288. package/dist/utils/bots.d.ts +7 -3
  289. package/dist/utils/cms-table-names.d.ts +1 -1
  290. package/dist/utils/drizzle.d.ts +13 -14
  291. package/dist/utils/email-inbound.d.ts +4 -4
  292. package/dist/utils/features.d.ts +19 -5
  293. package/dist/utils/mcp.d.ts +1 -0
  294. package/dist/utils/migration-lock.d.ts +15 -29
  295. package/dist/utils/pkg.d.ts +6 -7
  296. package/dist/utils/schema-diff.d.ts +7 -11
  297. package/dist/utils/store-schema.d.ts +4 -6
  298. package/dist/utils/tools.d.ts +3 -3
  299. 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
- * ```vue
53
- * <script setup lang="ts">
54
- * const { subscription, isSubscribed, checkout, openPortal } = useSubscription()
55
- * </script>
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
- * Backed by `GET /__qarpeo/rbac/me` with deny-first evaluation matching the server.
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
- * ```ts
30
- * const canPublish = useCan("cms:publish")
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
- * optional canonical override, robots noindex, and Article JSON-LD when `type === "article"`.
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
- * Automatically parsed as JSON if valid, otherwise raw string.
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
- * ```vue
66
- * <script setup lang="ts">
67
- * const { data, status, close } = useEventStream("/api/live/metrics")
68
- * </script>
52
+ * ```vue
53
+ * <script setup lang="ts">
54
+ * const { data, status, close } = useEventStream("/api/live/metrics")
55
+ * </script>
69
56
  *
70
- * <template>
57
+ * <template>
71
58
  * <div>Status: {{ status }}</div>
72
59
  * <div v-if="data">Live Metric: {{ data.cpu }}%</div>
73
- * </template>
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(() => getUrl(), () => {
135
- open();
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
- * ```vue
121
- * <script setup lang="ts">
122
- * const { open, upload, isUploading, progress, preview } = useBlob('/api/upload')
123
- * </script>
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
- * ```vue
55
- * <script setup lang="ts">
56
- * const { cart, totals, itemCount, loading, addToCart, removeItem } = useCart()
57
- * </script>
54
+ * ```vue
55
+ * <script setup lang="ts">
56
+ * const { cart, totals, itemCount, loading, addToCart, removeItem } = useCart()
57
+ * </script>
58
58
  *
59
- * <template>
59
+ * <template>
60
60
  * <div>Items in cart: {{ itemCount }} — Total: ${{ totals.total }}</div>
61
- * </template>
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
- * debounced query parameters, and infinite pagination support.
91
+ * Headless reactive product catalog composable with automated filter watching, debounced query
92
+ * parameters, and infinite pagination support.
93
93
  *
94
94
  * @example
95
- * ```vue
96
- * <script setup lang="ts">
97
- * const search = ref('')
98
- * const { products, total, loading, loadMore, hasMore } = useProducts({ search })
99
- * </script>
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
- * ```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
- * ```
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 returned.
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
- * ```vue
160
- * <script setup lang="ts">
161
- * const { submitCheckout, loading, error } = useCheckout()
162
- * async function onPay() {
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
- * </script>
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
- * ```vue
176
- * <script setup>
177
- * const { currency, setCurrency, format, convert } = useCurrency()
178
- * </script>
179
- * <template>
176
+ * ```vue
177
+ * <script setup>
178
+ * const { currency, setCurrency, format, convert } = useCurrency()
179
+ * </script>
180
+ * <template>
180
181
  * <span>{{ format(product.basePrice) }}</span>
181
- * </template>
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 { computed, ref, toValue, watch } from "vue";
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
- * ```vue
36
- * <script setup lang="ts">
37
- * const { tenant, domains, addDomain, isCustomDomain } = useTenant()
38
- * </script>
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
- * ```vue
11
- * <script setup lang="ts">
12
- * const { siteKey } = useTurnstile()
13
- * </script>
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
- * ```vue
24
- * <script setup lang="ts">
25
- * const { setup2FA, verify2FA, loading } = useTwoFactor()
26
- * </script>
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
+ };