@revenexx/cover 0.1.0

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 (408) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -0
  3. package/app/api/account.ts +8 -0
  4. package/app/api/categories.ts +3 -0
  5. package/app/api/checkout.ts +6 -0
  6. package/app/api/images.ts +4 -0
  7. package/app/api/markets.ts +3 -0
  8. package/app/api/product.ts +3 -0
  9. package/app/api/products.ts +4 -0
  10. package/app/api/search.ts +4 -0
  11. package/app/app.config.ts +29 -0
  12. package/app/assets/css/cover.css +25 -0
  13. package/app/components/account/AccountMenu.vue +30 -0
  14. package/app/components/account/AccountShell.vue +18 -0
  15. package/app/components/account/AccountSidebar.vue +90 -0
  16. package/app/components/account/address/AccountAddressCard.vue +287 -0
  17. package/app/components/account/carts/AccountCartsTable.vue +284 -0
  18. package/app/components/account/dashboard/AccountDashboard.vue +351 -0
  19. package/app/components/account/directorder/AccountDirectOrder.vue +512 -0
  20. package/app/components/account/governance/AccountApprovalLimitsTable.vue +221 -0
  21. package/app/components/account/governance/AccountCostCenterDetail.vue +276 -0
  22. package/app/components/account/governance/AccountCostCentersTable.vue +252 -0
  23. package/app/components/account/governance/AccountRequisitionDetail.vue +295 -0
  24. package/app/components/account/governance/AccountRequisitionsTable.vue +255 -0
  25. package/app/components/account/governance/AccountWorkflowDetail.vue +215 -0
  26. package/app/components/account/governance/AccountWorkflowsTable.vue +168 -0
  27. package/app/components/account/governance/GovernanceApprovalLimitModal.vue +183 -0
  28. package/app/components/account/governance/GovernanceCostCenterModal.vue +188 -0
  29. package/app/components/account/governance/GovernanceWorkflowModal.vue +191 -0
  30. package/app/components/account/orderlists/AccountOrderListDetail.vue +349 -0
  31. package/app/components/account/orderlists/AccountOrderListsTable.vue +352 -0
  32. package/app/components/account/orders/AccountOrderDetail.vue +376 -0
  33. package/app/components/account/orders/AccountOrdersTable.vue +281 -0
  34. package/app/components/account/preferences/AccountPreferences.vue +50 -0
  35. package/app/components/auth/AuthForgotPasswordPanel.vue +88 -0
  36. package/app/components/auth/AuthLoginPanel.vue +103 -0
  37. package/app/components/auth/AuthLoginTeaser.vue +24 -0
  38. package/app/components/auth/AuthPageHeader.vue +21 -0
  39. package/app/components/auth/AuthRegisterPanel.vue +431 -0
  40. package/app/components/auth/AuthRegisterTeaser.vue +24 -0
  41. package/app/components/auth/AuthResetPasswordPanel.vue +115 -0
  42. package/app/components/cart/CartButton.vue +42 -0
  43. package/app/components/cart/actions/CartCostCenterModal.vue +110 -0
  44. package/app/components/cart/actions/CartExportModal.vue +82 -0
  45. package/app/components/cart/actions/CartPositionTextsModal.vue +92 -0
  46. package/app/components/cart/actions/CartSaveToListModal.vue +177 -0
  47. package/app/components/cart/actions/CartWorkflowPickerModal.vue +64 -0
  48. package/app/components/cart/drawer/CartDrawer.vue +49 -0
  49. package/app/components/cart/item/CartItem.vue +318 -0
  50. package/app/components/cart/manage/CartNameModal.vue +68 -0
  51. package/app/components/cart/position/CartPosition.vue +369 -0
  52. package/app/components/cart/quickadd/CartQuickAdd.vue +145 -0
  53. package/app/components/cart/recommend/CartCrossSell.vue +102 -0
  54. package/app/components/cart/recommend/CartRecommendCard.vue +59 -0
  55. package/app/components/cart/recommend/CartReorderStrip.vue +108 -0
  56. package/app/components/cart/requisition/CartRequisitionGroup.vue +74 -0
  57. package/app/components/cart/skeleton/CartSkeleton.vue +18 -0
  58. package/app/components/cart/summary/CartSummary.vue +25 -0
  59. package/app/components/cart/summary/CartSummaryBreakdown.vue +35 -0
  60. package/app/components/cart/switcher/CartSwitcher.vue +147 -0
  61. package/app/components/cart/target/CartTargetModal.vue +129 -0
  62. package/app/components/cart/view/CartApprovalsPanel.vue +89 -0
  63. package/app/components/cart/view/CartListHeader.vue +86 -0
  64. package/app/components/cart/view/CartPositionList.vue +94 -0
  65. package/app/components/cart/view/CartSummaryPanel.vue +254 -0
  66. package/app/components/cart/view/CartView.vue +310 -0
  67. package/app/components/category/info/CategoryPrice.vue +47 -0
  68. package/app/components/category/info/CategorySku.vue +15 -0
  69. package/app/components/category/info/CategoryStock.vue +25 -0
  70. package/app/components/category/list/CategoryItemCount.vue +27 -0
  71. package/app/components/category/list/CategoryListPagination.vue +81 -0
  72. package/app/components/category/skeleton/CategoryDetailSkeleton.vue +12 -0
  73. package/app/components/category/skeleton/CategoryListSkeleton.vue +65 -0
  74. package/app/components/category/view/CategoryViewToggle.vue +33 -0
  75. package/app/components/category/view/GridView.vue +78 -0
  76. package/app/components/category/view/ListView.vue +80 -0
  77. package/app/components/checkout/confirmation/CheckoutConfirmationView.vue +289 -0
  78. package/app/components/checkout/form/CheckoutSchemaForm.vue +72 -0
  79. package/app/components/checkout/onepage/CheckoutAddressPickerModal.vue +260 -0
  80. package/app/components/checkout/onepage/CheckoutAddressSection.vue +186 -0
  81. package/app/components/checkout/onepage/CheckoutDeliverySection.vue +158 -0
  82. package/app/components/checkout/onepage/CheckoutGate.vue +67 -0
  83. package/app/components/checkout/onepage/CheckoutGuestDetailsSection.vue +154 -0
  84. package/app/components/checkout/onepage/CheckoutNotesSection.vue +62 -0
  85. package/app/components/checkout/onepage/CheckoutOnePageView.vue +77 -0
  86. package/app/components/checkout/onepage/CheckoutPaymentSection.vue +181 -0
  87. package/app/components/checkout/onepage/CheckoutSectionTitle.vue +18 -0
  88. package/app/components/checkout/onepage/CheckoutSummarySection.vue +211 -0
  89. package/app/components/checkout/onepage/CheckoutWorkflowPanel.vue +38 -0
  90. package/app/components/layout/AppLogo.vue +21 -0
  91. package/app/components/layout/footer/Footer.vue +148 -0
  92. package/app/components/layout/header/AppBar.vue +75 -0
  93. package/app/components/layout/header/CategoryNav.vue +93 -0
  94. package/app/components/layout/header/HeaderActionItem.vue +81 -0
  95. package/app/components/layout/header/LocaleSwitcher.vue +123 -0
  96. package/app/components/layout/header/MainNav.vue +61 -0
  97. package/app/components/layout/header/MobileMenu.vue +81 -0
  98. package/app/components/layout/header/TopBar.vue +63 -0
  99. package/app/components/listing/ListingView.vue +227 -0
  100. package/app/components/product/detail/ProductDetailAddToCart.vue +188 -0
  101. package/app/components/product/detail/ProductDetailDescription.vue +20 -0
  102. package/app/components/product/detail/ProductDetailImageGallery.vue +58 -0
  103. package/app/components/product/detail/ProductDetailPricing.vue +108 -0
  104. package/app/components/product/detail/ProductDetailSaveToList.vue +291 -0
  105. package/app/components/product/detail/ProductDetailSpecifications.vue +33 -0
  106. package/app/components/product/detail/ProductDetailStock.vue +36 -0
  107. package/app/components/search/filter/SearchFacets.vue +256 -0
  108. package/app/components/search/filter/SearchFacetsDrawer.vue +58 -0
  109. package/app/components/ui/AppShell.vue +7 -0
  110. package/app/components/ui/debug/PiniaStateCard.vue +106 -0
  111. package/app/components/ui/feedback/EmptyState.vue +30 -0
  112. package/app/components/ui/feedback/ErrorBoundary.vue +44 -0
  113. package/app/components/ui/feedback/NotFound.vue +34 -0
  114. package/app/components/ui/forms/CountrySelection.vue +14 -0
  115. package/app/components/ui/forms/FormKitDatePicker.vue +124 -0
  116. package/app/components/ui/forms/PasswordInput.vue +136 -0
  117. package/app/components/ui/forms/SearchInput.vue +213 -0
  118. package/app/components/ui/table/TableSortButton.vue +51 -0
  119. package/app/components/ui/table/TableToolbar.vue +66 -0
  120. package/app/composables/useAccount.ts +27 -0
  121. package/app/composables/useAccountAddresses.ts +116 -0
  122. package/app/composables/useAccountOrders.ts +18 -0
  123. package/app/composables/useAppUrl.ts +38 -0
  124. package/app/composables/useAuthStore.ts +202 -0
  125. package/app/composables/useB2BContext.ts +23 -0
  126. package/app/composables/useCartActions.ts +25 -0
  127. package/app/composables/useCartCalculation.ts +90 -0
  128. package/app/composables/useCartSelection.ts +46 -0
  129. package/app/composables/useCartStore.ts +837 -0
  130. package/app/composables/useCartSummaryFormatting.ts +28 -0
  131. package/app/composables/useCategories.ts +29 -0
  132. package/app/composables/useCheckoutOnePage.ts +438 -0
  133. package/app/composables/useCheckoutProfileSource.ts +8 -0
  134. package/app/composables/useCheckoutSchema.ts +28 -0
  135. package/app/composables/useDataTable.ts +14 -0
  136. package/app/composables/useFormValidation.ts +29 -0
  137. package/app/composables/useIcons.ts +17 -0
  138. package/app/composables/useLocalePreferences.ts +45 -0
  139. package/app/composables/useMarkets.ts +15 -0
  140. package/app/composables/useProduct.ts +89 -0
  141. package/app/composables/useProductCard.ts +8 -0
  142. package/app/composables/useProductCardActions.ts +106 -0
  143. package/app/composables/useProductImage.ts +12 -0
  144. package/app/composables/useProductListing.ts +210 -0
  145. package/app/composables/useProductUrl.ts +17 -0
  146. package/app/composables/useProducts.ts +130 -0
  147. package/app/composables/useSearch.ts +12 -0
  148. package/app/composables/useThemeStore.ts +81 -0
  149. package/app/composables/useViewMode.ts +18 -0
  150. package/app/config/countries.ts +74 -0
  151. package/app/config/icons.ts +283 -0
  152. package/app/config/navigation.ts +191 -0
  153. package/app/config/palette.ts +13 -0
  154. package/app/config/themes.ts +20 -0
  155. package/app/formkit.config.ts +50 -0
  156. package/app/interfaces/account/address-list.ts +34 -0
  157. package/app/interfaces/account/order-list.ts +47 -0
  158. package/app/interfaces/account/order-lists.ts +35 -0
  159. package/app/interfaces/account/profile.ts +17 -0
  160. package/app/interfaces/account.ts +3 -0
  161. package/app/interfaces/address.ts +9 -0
  162. package/app/interfaces/auth.ts +104 -0
  163. package/app/interfaces/b2b.ts +234 -0
  164. package/app/interfaces/cart-calculation.ts +131 -0
  165. package/app/interfaces/cart-item.ts +45 -0
  166. package/app/interfaces/checkout-draft.ts +4 -0
  167. package/app/interfaces/checkout.ts +43 -0
  168. package/app/interfaces/delivery.ts +13 -0
  169. package/app/interfaces/market.ts +24 -0
  170. package/app/interfaces/payment.ts +19 -0
  171. package/app/interfaces/persisted-cart.ts +10 -0
  172. package/app/interfaces/product-detail.ts +54 -0
  173. package/app/interfaces/product-list.ts +33 -0
  174. package/app/interfaces/search-facets.ts +14 -0
  175. package/app/interfaces/validation.ts +14 -0
  176. package/app/layouts/default.vue +78 -0
  177. package/app/layouts/focus.vue +80 -0
  178. package/app/plugins/formkit-locale.client.ts +23 -0
  179. package/app/shared/constants.ts +1 -0
  180. package/app/validations/companyName.ts +18 -0
  181. package/app/validations/emailFormat.ts +10 -0
  182. package/app/validations/formValidationConfig.ts +50 -0
  183. package/app/validations/maxLength.ts +12 -0
  184. package/app/validations/minLength.ts +9 -0
  185. package/app/validations/optionalCompanyName.ts +23 -0
  186. package/app/validations/passwordsMatch.ts +5 -0
  187. package/app/validations/phoneNumber.ts +19 -0
  188. package/app/validations/required.ts +11 -0
  189. package/app/validations/termsRequired.ts +4 -0
  190. package/app/validations/types.ts +10 -0
  191. package/app/validations/zipCode.ts +15 -0
  192. package/i18n/locales/de/account.json +458 -0
  193. package/i18n/locales/de/auth.json +155 -0
  194. package/i18n/locales/de/cart.json +263 -0
  195. package/i18n/locales/de/checkout.json +217 -0
  196. package/i18n/locales/de/common.json +80 -0
  197. package/i18n/locales/de/cover.json +33 -0
  198. package/i18n/locales/de/order.json +1 -0
  199. package/i18n/locales/de/product.json +71 -0
  200. package/i18n/locales/de/search.json +54 -0
  201. package/i18n/locales/de/validation.json +12 -0
  202. package/i18n/locales/en/account.json +458 -0
  203. package/i18n/locales/en/auth.json +155 -0
  204. package/i18n/locales/en/cart.json +263 -0
  205. package/i18n/locales/en/checkout.json +217 -0
  206. package/i18n/locales/en/common.json +80 -0
  207. package/i18n/locales/en/cover.json +33 -0
  208. package/i18n/locales/en/order.json +1 -0
  209. package/i18n/locales/en/product.json +71 -0
  210. package/i18n/locales/en/search.json +54 -0
  211. package/i18n/locales/en/validation.json +12 -0
  212. package/nuxt.config.ts +109 -0
  213. package/package.json +65 -0
  214. package/public/img/product-placeholder.svg +8 -0
  215. package/public/templates/direct-order-template.csv +3 -0
  216. package/public/templates/direct-order-template.xlsx +0 -0
  217. package/server/api/account/address/[id].delete.ts +51 -0
  218. package/server/api/account/address/[id].put.ts +83 -0
  219. package/server/api/account/address/index.post.ts +60 -0
  220. package/server/api/account/addresses.get.ts +25 -0
  221. package/server/api/account/context.get.ts +16 -0
  222. package/server/api/account/governance/[domain]/[id].put.ts +57 -0
  223. package/server/api/account/governance/[domain].post.ts +111 -0
  224. package/server/api/account/order-lists/[id].delete.ts +22 -0
  225. package/server/api/account/order-lists/[id].get.ts +17 -0
  226. package/server/api/account/order-lists/[id].put.ts +46 -0
  227. package/server/api/account/order-lists/index.get.ts +14 -0
  228. package/server/api/account/order-lists/index.post.ts +38 -0
  229. package/server/api/account/orders/[id].get.ts +35 -0
  230. package/server/api/account/orders.get.ts +35 -0
  231. package/server/api/account/profile.get.ts +56 -0
  232. package/server/api/account/profile.put.ts +128 -0
  233. package/server/api/account/requisitions/[id].get.ts +15 -0
  234. package/server/api/account/requisitions.get.ts +23 -0
  235. package/server/api/auth/login.post.ts +37 -0
  236. package/server/api/auth/logout.post.ts +4 -0
  237. package/server/api/auth/me.get.ts +3 -0
  238. package/server/api/auth/personas.get.ts +7 -0
  239. package/server/api/auth/recovery.post.ts +32 -0
  240. package/server/api/auth/recovery.put.ts +37 -0
  241. package/server/api/auth/register.post.ts +126 -0
  242. package/server/api/cart/calculate.post.ts +25 -0
  243. package/server/api/cart/export.post.ts +81 -0
  244. package/server/api/cart/index.delete.ts +10 -0
  245. package/server/api/cart/index.get.ts +10 -0
  246. package/server/api/cart/sync.post.ts +14 -0
  247. package/server/api/carts/[id]/activate.post.ts +18 -0
  248. package/server/api/carts/[id]/index.delete.ts +18 -0
  249. package/server/api/carts/[id]/index.put.ts +19 -0
  250. package/server/api/carts/[id]/items.post.ts +21 -0
  251. package/server/api/carts/index.get.ts +14 -0
  252. package/server/api/carts/index.post.ts +14 -0
  253. package/server/api/categories/[slug].get.ts +22 -0
  254. package/server/api/categories/index.get.ts +11 -0
  255. package/server/api/checkout/profile.get.ts +21 -0
  256. package/server/api/checkout/schema/[key].get.ts +19 -0
  257. package/server/api/checkout/session.post.ts +8 -0
  258. package/server/api/images/detail/[filename].get.ts +18 -0
  259. package/server/api/images/list/[filename].get.ts +17 -0
  260. package/server/api/markets.get.ts +9 -0
  261. package/server/api/orders/index.post.ts +376 -0
  262. package/server/api/payment/methods.post.ts +65 -0
  263. package/server/api/product/[id].get.ts +29 -0
  264. package/server/api/products/[id].get.ts +30 -0
  265. package/server/api/products/index.get.ts +21 -0
  266. package/server/api/requisitions/index.post.ts +67 -0
  267. package/server/api/shipping/rates.post.ts +70 -0
  268. package/server/api/themes/index.get.ts +9 -0
  269. package/server/api/typesense/drop.get.ts +22 -0
  270. package/server/api/typesense/health.get.ts +9 -0
  271. package/server/api/typesense/search.post.ts +199 -0
  272. package/server/api/typesense/seed.get.ts +112 -0
  273. package/server/api/typesense/suggest.post.ts +69 -0
  274. package/server/config/account/organization.json +146 -0
  275. package/server/config/account/personas.json +169 -0
  276. package/server/config/account/user.json +8 -0
  277. package/server/config/account/workflows.json +19 -0
  278. package/server/data/account/address-list.json +103 -0
  279. package/server/data/account/order-list.json +491 -0
  280. package/server/data/account/order-lists.json +149 -0
  281. package/server/data/account/profile.json +9 -0
  282. package/server/data/account/registration-requests.json +3 -0
  283. package/server/data/account/requisitions.json +686 -0
  284. package/server/data/categories.json +186 -0
  285. package/server/data/forms/checkout/add-address.json +24 -0
  286. package/server/data/list/5137-1.png +0 -0
  287. package/server/data/list/5498-1.png +0 -0
  288. package/server/data/list/5498-2.png +0 -0
  289. package/server/data/list/5498-3.png +0 -0
  290. package/server/data/list/5498-4.png +0 -0
  291. package/server/data/list/5498-5.png +0 -0
  292. package/server/data/list/5498-6.png +0 -0
  293. package/server/data/list/5519-1.png +0 -0
  294. package/server/data/list/5713-1.png +0 -0
  295. package/server/data/list/5789-1.png +0 -0
  296. package/server/data/list/5930-1.png +0 -0
  297. package/server/data/list/6127-1.png +0 -0
  298. package/server/data/list/6234-1.png +0 -0
  299. package/server/data/list/6238-1.png +0 -0
  300. package/server/data/list/6246-1.png +0 -0
  301. package/server/data/list/6270-1.png +0 -0
  302. package/server/data/list/6330-1.png +0 -0
  303. package/server/data/list/6336-1.png +0 -0
  304. package/server/data/list/6360-1.png +0 -0
  305. package/server/data/list/6363-1.png +0 -0
  306. package/server/data/list/6375-1.png +0 -0
  307. package/server/data/list/6385-1.png +0 -0
  308. package/server/data/list/6413-1.png +0 -0
  309. package/server/data/list/6418-1.png +0 -0
  310. package/server/data/list/6465-1.png +0 -0
  311. package/server/data/list/6477-1.png +0 -0
  312. package/server/data/list/6509-1.png +0 -0
  313. package/server/data/list/6545-1.png +0 -0
  314. package/server/data/list/6548-1.png +0 -0
  315. package/server/data/list/6566-1.png +0 -0
  316. package/server/data/list/6581-1.png +0 -0
  317. package/server/data/list/6609-1.png +0 -0
  318. package/server/data/list/6611-1.png +0 -0
  319. package/server/data/list/6641-1.png +0 -0
  320. package/server/data/list/6659-1.png +0 -0
  321. package/server/data/list/6662-1.png +0 -0
  322. package/server/data/list/6689-1.png +0 -0
  323. package/server/data/list/6698-1.png +0 -0
  324. package/server/data/list/6701-1.png +0 -0
  325. package/server/data/list/6752-1.png +0 -0
  326. package/server/data/list/6755-1.png +0 -0
  327. package/server/data/list/6837-1.png +0 -0
  328. package/server/data/list/6841-1.png +0 -0
  329. package/server/data/list/6844-1.png +0 -0
  330. package/server/data/list/6846-1.png +0 -0
  331. package/server/data/list/6886-1.png +0 -0
  332. package/server/data/list/6895-1.png +0 -0
  333. package/server/data/list/6897-1.png +0 -0
  334. package/server/data/list/6919-1.png +0 -0
  335. package/server/data/list/6977-1.png +0 -0
  336. package/server/data/list/6983-1.png +0 -0
  337. package/server/data/list/6984-1.png +0 -0
  338. package/server/data/list/6985-1.png +0 -0
  339. package/server/data/list/6986-1.png +0 -0
  340. package/server/data/list/6989-1.png +0 -0
  341. package/server/data/list/6995-1.png +0 -0
  342. package/server/data/list/6998-1.png +0 -0
  343. package/server/data/markets.json +24 -0
  344. package/server/data/product-detail.json +2450 -0
  345. package/server/data/product-list.json +2450 -0
  346. package/server/data/themes.json +8 -0
  347. package/server/interfaces/account.ts +20 -0
  348. package/server/interfaces/auth.ts +32 -0
  349. package/server/interfaces/b2bContext.ts +23 -0
  350. package/server/interfaces/cart.ts +46 -0
  351. package/server/interfaces/cartCalculation.ts +17 -0
  352. package/server/interfaces/category.ts +12 -0
  353. package/server/interfaces/checkoutProfile.ts +5 -0
  354. package/server/interfaces/log.ts +3 -0
  355. package/server/interfaces/market.ts +10 -0
  356. package/server/interfaces/product.ts +21 -0
  357. package/server/interfaces/schema.ts +20 -0
  358. package/server/interfaces/theme.ts +10 -0
  359. package/server/services/ApiAuthService.ts +138 -0
  360. package/server/services/ApiCartService.ts +254 -0
  361. package/server/services/ApiCategoryService.ts +25 -0
  362. package/server/services/ApiMarketService.ts +71 -0
  363. package/server/services/ApiProductService.ts +53 -0
  364. package/server/services/LocalFileCategoryService.ts +23 -0
  365. package/server/services/LocalFileCheckoutProfileService.ts +117 -0
  366. package/server/services/LocalFileProductService.ts +128 -0
  367. package/server/services/LocalFileSchemaService.ts +70 -0
  368. package/server/services/LocalFileThemeService.ts +18 -0
  369. package/server/services/LogService.ts +28 -0
  370. package/server/services/MockAccountService.ts +58 -0
  371. package/server/services/MockAuthService.ts +105 -0
  372. package/server/services/MockB2BContextService.ts +149 -0
  373. package/server/services/MockCartCalculationService.ts +395 -0
  374. package/server/services/MockMarketService.ts +18 -0
  375. package/server/services/SdkAccountService.ts +56 -0
  376. package/server/services/SdkAuthService.ts +83 -0
  377. package/server/services/SessionCartService.ts +31 -0
  378. package/server/utils/accountService.ts +30 -0
  379. package/server/utils/authCookie.ts +13 -0
  380. package/server/utils/authService.ts +43 -0
  381. package/server/utils/b2bService.ts +49 -0
  382. package/server/utils/cartService.ts +59 -0
  383. package/server/utils/categoryService.ts +19 -0
  384. package/server/utils/checkoutProfileService.ts +9 -0
  385. package/server/utils/checkoutSession.ts +38 -0
  386. package/server/utils/coverData.ts +84 -0
  387. package/server/utils/governanceStore.ts +38 -0
  388. package/server/utils/i18n.ts +76 -0
  389. package/server/utils/inventoryService.ts +14 -0
  390. package/server/utils/liveCatalog.ts +234 -0
  391. package/server/utils/liveInventories.ts +76 -0
  392. package/server/utils/liveOrders.ts +139 -0
  393. package/server/utils/livePrices.ts +93 -0
  394. package/server/utils/locale.ts +39 -0
  395. package/server/utils/logService.ts +19 -0
  396. package/server/utils/marketService.ts +24 -0
  397. package/server/utils/orderService.ts +14 -0
  398. package/server/utils/paymentService.ts +14 -0
  399. package/server/utils/priceService.ts +14 -0
  400. package/server/utils/productService.ts +28 -0
  401. package/server/utils/productsSchema.ts +30 -0
  402. package/server/utils/revenexxApi.ts +136 -0
  403. package/server/utils/schemaService.ts +25 -0
  404. package/server/utils/serviceMode.ts +70 -0
  405. package/server/utils/shippingService.ts +14 -0
  406. package/server/utils/shopSdk.ts +88 -0
  407. package/server/utils/themeService.ts +16 -0
  408. package/server/utils/typesense.ts +27 -0
@@ -0,0 +1,74 @@
1
+ export interface Country {
2
+ label: string;
3
+ value: string;
4
+ }
5
+
6
+ /**
7
+ * Country list ordered by German-speaking countries first, then Europe
8
+ * alphabetically, then major international countries.
9
+ * Values use German country names to match the existing address data format.
10
+ */
11
+ export const COUNTRIES: Country[] = [
12
+ { label: "Deutschland", value: "Deutschland" },
13
+ { label: "Österreich", value: "Österreich" },
14
+ { label: "Schweiz", value: "Schweiz" },
15
+ { label: "Liechtenstein", value: "Liechtenstein" },
16
+ { label: "Luxemburg", value: "Luxemburg" },
17
+ { label: "Albanien", value: "Albanien" },
18
+ { label: "Andorra", value: "Andorra" },
19
+ { label: "Belgien", value: "Belgien" },
20
+ { label: "Bosnien und Herzegowina", value: "Bosnien und Herzegowina" },
21
+ { label: "Bulgarien", value: "Bulgarien" },
22
+ { label: "Dänemark", value: "Dänemark" },
23
+ { label: "Estland", value: "Estland" },
24
+ { label: "Finnland", value: "Finnland" },
25
+ { label: "Frankreich", value: "Frankreich" },
26
+ { label: "Griechenland", value: "Griechenland" },
27
+ { label: "Irland", value: "Irland" },
28
+ { label: "Island", value: "Island" },
29
+ { label: "Italien", value: "Italien" },
30
+ { label: "Kosovo", value: "Kosovo" },
31
+ { label: "Kroatien", value: "Kroatien" },
32
+ { label: "Lettland", value: "Lettland" },
33
+ { label: "Litauen", value: "Litauen" },
34
+ { label: "Malta", value: "Malta" },
35
+ { label: "Moldau", value: "Moldau" },
36
+ { label: "Monaco", value: "Monaco" },
37
+ { label: "Montenegro", value: "Montenegro" },
38
+ { label: "Niederlande", value: "Niederlande" },
39
+ { label: "Nordmazedonien", value: "Nordmazedonien" },
40
+ { label: "Norwegen", value: "Norwegen" },
41
+ { label: "Polen", value: "Polen" },
42
+ { label: "Portugal", value: "Portugal" },
43
+ { label: "Rumänien", value: "Rumänien" },
44
+ { label: "San Marino", value: "San Marino" },
45
+ { label: "Schweden", value: "Schweden" },
46
+ { label: "Serbien", value: "Serbien" },
47
+ { label: "Slowakei", value: "Slowakei" },
48
+ { label: "Slowenien", value: "Slowenien" },
49
+ { label: "Spanien", value: "Spanien" },
50
+ { label: "Tschechien", value: "Tschechien" },
51
+ { label: "Türkei", value: "Türkei" },
52
+ { label: "Ukraine", value: "Ukraine" },
53
+ { label: "Ungarn", value: "Ungarn" },
54
+ { label: "Vatikanstadt", value: "Vatikanstadt" },
55
+ { label: "Vereinigtes Königreich", value: "Vereinigtes Königreich" },
56
+ { label: "Weißrussland", value: "Weißrussland" },
57
+ { label: "Zypern", value: "Zypern" },
58
+ { label: "Australien", value: "Australien" },
59
+ { label: "Brasilien", value: "Brasilien" },
60
+ { label: "China", value: "China" },
61
+ { label: "Indien", value: "Indien" },
62
+ { label: "Japan", value: "Japan" },
63
+ { label: "Kanada", value: "Kanada" },
64
+ { label: "Mexiko", value: "Mexiko" },
65
+ { label: "Neuseeland", value: "Neuseeland" },
66
+ { label: "Russland", value: "Russland" },
67
+ { label: "Saudi-Arabien", value: "Saudi-Arabien" },
68
+ { label: "Singapur", value: "Singapur" },
69
+ { label: "Südafrika", value: "Südafrika" },
70
+ { label: "Südkorea", value: "Südkorea" },
71
+ { label: "Taiwan", value: "Taiwan" },
72
+ { label: "Vereinigte Arabische Emirate", value: "Vereinigte Arabische Emirate" },
73
+ { label: "Vereinigte Staaten", value: "Vereinigte Staaten" },
74
+ ];
@@ -0,0 +1,283 @@
1
+ /**
2
+ * Cover icon system — built on Solar Icons (https://solar-icons.vercel.app),
3
+ * consumed as Iconify names (`i-solar-{base}-{weight}`).
4
+ *
5
+ * Icons are referenced by semantic token (e.g. "cart", "success") or by raw
6
+ * Solar basename for one-off content icons (e.g. category data from the BFF).
7
+ * The weight (Linear, Bold, BoldDuotone, …) is a theme decision — it is
8
+ * appended at render time via `solarIcon()` / `useIcons()`, never stored in
9
+ * configs or data.
10
+ */
11
+
12
+ export const SOLAR_ICON_WEIGHTS = [
13
+ "linear",
14
+ "outline",
15
+ "broken",
16
+ "line-duotone",
17
+ "bold",
18
+ "bold-duotone",
19
+ ] as const;
20
+
21
+ export type SolarIconWeight = (typeof SOLAR_ICON_WEIGHTS)[number];
22
+
23
+ export const SOLAR_ICON_WEIGHT_LABELS: Record<SolarIconWeight, string> = {
24
+ "linear": "Linear",
25
+ "outline": "Outline",
26
+ "broken": "Broken",
27
+ "line-duotone": "Line Duotone",
28
+ "bold": "Bold",
29
+ "bold-duotone": "Bold Duotone",
30
+ };
31
+
32
+ export const DEFAULT_ICON_WEIGHT: SolarIconWeight = "linear";
33
+
34
+ export interface CoverIconGroup {
35
+ id: string;
36
+ label: string;
37
+ description: string;
38
+ icons: Record<string, string>;
39
+ }
40
+
41
+ /**
42
+ * The icon set that ships with the design system: semantic token → Solar
43
+ * basename. Grouped for the docs gallery; flattened into `coverIcons` below.
44
+ */
45
+ export const coverIconGroups: CoverIconGroup[] = [
46
+ {
47
+ id: "navigation",
48
+ label: "Navigation",
49
+ description: "Arrows, chevrons and structural navigation.",
50
+ icons: {
51
+ "arrow-left": "arrow-left",
52
+ "arrow-right": "arrow-right",
53
+ "arrow-up": "arrow-up",
54
+ "arrow-down": "arrow-down",
55
+ "chevron-up": "alt-arrow-up",
56
+ "chevron-down": "alt-arrow-down",
57
+ "chevron-left": "alt-arrow-left",
58
+ "chevron-right": "alt-arrow-right",
59
+ "chevron-double-left": "double-alt-arrow-left",
60
+ "chevron-double-right": "double-alt-arrow-right",
61
+ "external": "arrow-right-up",
62
+ "menu": "hamburger-menu",
63
+ "ellipsis": "menu-dots",
64
+ "panel-open": "square-alt-arrow-right",
65
+ "panel-close": "square-alt-arrow-left",
66
+ "drag": "reorder",
67
+ },
68
+ },
69
+ {
70
+ id: "actions",
71
+ label: "Actions",
72
+ description: "Interactive verbs — search, edit, delete, toggle.",
73
+ icons: {
74
+ "search": "magnifer",
75
+ "plus": "add-circle",
76
+ "minus": "minus-circle",
77
+ "close": "close-circle",
78
+ "edit": "pen-2",
79
+ "delete": "trash-bin-trash",
80
+ "copy": "copy",
81
+ "copy-check": "clipboard-check",
82
+ "upload": "upload",
83
+ "scan": "scanner",
84
+ "reset": "restart",
85
+ "login": "login-2",
86
+ "logout": "logout-2",
87
+ "register": "user-plus",
88
+ "eye": "eye",
89
+ "eye-off": "eye-closed",
90
+ "stop": "stop",
91
+ "filters": "tuning-2",
92
+ "sort": "round-sort-vertical",
93
+ "sort-asc": "sort-from-bottom-to-top",
94
+ "sort-desc": "sort-from-top-to-bottom",
95
+ },
96
+ },
97
+ {
98
+ id: "status",
99
+ label: "Status & Feedback",
100
+ description: "Validation, alerts and empty states.",
101
+ icons: {
102
+ "check": "check-read",
103
+ "success": "check-circle",
104
+ "error": "close-circle",
105
+ "alert": "danger-circle",
106
+ "warning": "danger-triangle",
107
+ "info": "info-circle",
108
+ "tip": "lightbulb",
109
+ "loading": "refresh",
110
+ "no-results": "minimalistic-magnifer",
111
+ "empty": "box-minimalistic",
112
+ "coming-soon": "sledgehammer",
113
+ },
114
+ },
115
+ {
116
+ id: "commerce",
117
+ label: "Commerce",
118
+ description: "Cart, ordering and fulfillment.",
119
+ icons: {
120
+ "cart": "cart-3",
121
+ "orders": "bag-4",
122
+ "orders-empty": "bag-cross",
123
+ "package": "box",
124
+ "delivery": "delivery",
125
+ "payment": "card",
126
+ "store": "shop",
127
+ "direct-order": "keyboard",
128
+ "order-list": "clipboard-list",
129
+ "list": "list",
130
+ "grid": "widget",
131
+ },
132
+ },
133
+ {
134
+ id: "account",
135
+ label: "Account & B2B",
136
+ description: "Users, organizations and access.",
137
+ icons: {
138
+ "user": "user",
139
+ "users": "users-group-rounded",
140
+ "company": "buildings-2",
141
+ "briefcase": "case",
142
+ "key": "key",
143
+ "shield": "shield",
144
+ },
145
+ },
146
+ {
147
+ id: "contact",
148
+ label: "Contact & Places",
149
+ description: "Reaching out and getting there.",
150
+ icons: {
151
+ "mail": "letter",
152
+ "phone": "phone",
153
+ "location": "map-point",
154
+ "location-missing": "map-point-remove",
155
+ "globe": "global",
156
+ "clock": "alarm",
157
+ },
158
+ },
159
+ {
160
+ id: "system",
161
+ label: "System & Appearance",
162
+ description: "Color modes, files and technical surfaces.",
163
+ icons: {
164
+ "light": "sun",
165
+ "dark": "moon",
166
+ "system": "monitor",
167
+ "palette": "palette",
168
+ "blocks": "widget-add",
169
+ "template": "structure",
170
+ "file": "file",
171
+ "folder": "folder",
172
+ "folder-open": "folder-open",
173
+ "folder-tree": "folder-path-connect",
174
+ "hash": "hashtag",
175
+ "smartphone": "smartphone",
176
+ "cpu": "cpu",
177
+ "database": "database",
178
+ "bolt": "bolt",
179
+ "flask": "test-tube",
180
+ "route": "route",
181
+ "satellite": "satellite",
182
+ "wind": "wind",
183
+ },
184
+ },
185
+ ];
186
+
187
+ /** Flat token → Solar basename map derived from the grouped registry. */
188
+ export const coverIcons: Record<string, string> = Object.fromEntries(
189
+ coverIconGroups.flatMap((group) => Object.entries(group.icons)),
190
+ );
191
+
192
+ export type CoverIconName = keyof typeof coverIcons;
193
+
194
+ /**
195
+ * Control icons keep a fixed weight regardless of the theme: checkmarks
196
+ * and chevrons inside form controls (checkboxes, selects, selected-state
197
+ * indicators) must read instantly — a duotone or broken check looks like
198
+ * a rendering glitch, not a state.
199
+ */
200
+ export const FIXED_ICON_WEIGHTS: Record<string, SolarIconWeight> = {
201
+ "success": "bold",
202
+ "chevron-up": "bold",
203
+ "chevron-down": "bold",
204
+ "chevron-left": "bold",
205
+ "chevron-right": "bold",
206
+ "chevron-double-left": "bold",
207
+ "chevron-double-right": "bold",
208
+ };
209
+
210
+ /**
211
+ * Resolves an icon reference to a full Iconify name in the given weight.
212
+ * Accepts a semantic token ("cart"), a raw Solar basename ("medical-kit"),
213
+ * or a pre-resolved Iconify name ("i-solar-…"), which passes through as-is.
214
+ * Control tokens (see FIXED_ICON_WEIGHTS) ignore the theme weight.
215
+ */
216
+ export function solarIcon(name: string, weight: SolarIconWeight = DEFAULT_ICON_WEIGHT): string {
217
+ if (name.startsWith("i-")) {
218
+ return name;
219
+ }
220
+ const base = coverIcons[name] ?? name;
221
+ const effectiveWeight = FIXED_ICON_WEIGHTS[name] ?? weight;
222
+ return `i-solar-${base}-${effectiveWeight}`;
223
+ }
224
+
225
+ /**
226
+ * Nuxt UI `ui.icons` app-config keys mapped to cover icon tokens. Applied as
227
+ * static defaults in the layer app.config and re-applied with the active
228
+ * weight by the theme store — analog to the color tokens.
229
+ */
230
+ export const NUXT_UI_ICON_TOKENS: Record<string, string> = {
231
+ arrowDown: "arrow-down",
232
+ arrowLeft: "arrow-left",
233
+ arrowRight: "arrow-right",
234
+ arrowUp: "arrow-up",
235
+ caution: "alert",
236
+ // Solar ships no bare check stroke (check-read doubles in linear and
237
+ // fills a squircle in bold) — the checkbox/select indicator uses the
238
+ // lucide check, the only non-Solar glyph in the system.
239
+ check: "i-lucide-check",
240
+ chevronDoubleLeft: "chevron-double-left",
241
+ chevronDoubleRight: "chevron-double-right",
242
+ chevronDown: "chevron-down",
243
+ chevronLeft: "chevron-left",
244
+ chevronRight: "chevron-right",
245
+ chevronUp: "chevron-up",
246
+ close: "close",
247
+ copy: "copy",
248
+ copyCheck: "copy-check",
249
+ dark: "dark",
250
+ drag: "drag",
251
+ ellipsis: "ellipsis",
252
+ error: "error",
253
+ external: "external",
254
+ eye: "eye",
255
+ eyeOff: "eye-off",
256
+ file: "file",
257
+ folder: "folder",
258
+ folderOpen: "folder-open",
259
+ hash: "hash",
260
+ info: "info",
261
+ light: "light",
262
+ loading: "loading",
263
+ menu: "menu",
264
+ minus: "minus",
265
+ panelClose: "panel-close",
266
+ panelOpen: "panel-open",
267
+ plus: "plus",
268
+ reload: "reset",
269
+ search: "search",
270
+ stop: "stop",
271
+ success: "success",
272
+ system: "system",
273
+ tip: "tip",
274
+ upload: "upload",
275
+ warning: "warning",
276
+ };
277
+
278
+ /** Builds the Nuxt UI `ui.icons` config for a given weight. */
279
+ export function nuxtUiIcons(weight: SolarIconWeight): Record<string, string> {
280
+ return Object.fromEntries(
281
+ Object.entries(NUXT_UI_ICON_TOKENS).map(([key, token]) => [key, solarIcon(token, weight)]),
282
+ );
283
+ }
@@ -0,0 +1,191 @@
1
+ export interface ProductSubcategory {
2
+ label: string;
3
+ slug: string;
4
+ icon: string;
5
+ }
6
+
7
+ export interface ProductCategory {
8
+ label: string;
9
+ slug: string;
10
+ icon: string;
11
+ subcategories: ProductSubcategory[];
12
+ }
13
+
14
+ export const footerLinks = {
15
+ products: {
16
+ heading: "Products",
17
+ links: [
18
+ { label: "All Products", to: "/products" },
19
+ { label: "New Arrivals", to: "/products/new" },
20
+ { label: "Featured", to: "/products/featured" },
21
+ { label: "Browse Catalog", to: "/catalog" },
22
+ ],
23
+ },
24
+ account: {
25
+ heading: "Account",
26
+ links: [
27
+ { label: "Orders", to: "/account/orders" },
28
+ { label: "Invoices", to: "/account/invoices" },
29
+ { label: "Saved Lists", to: "/account/lists" },
30
+ { label: "Contracts", to: "/account/contracts" },
31
+ ],
32
+ },
33
+ support: {
34
+ heading: "Support",
35
+ links: [
36
+ { label: "Contact", to: "/support/contact" },
37
+ { label: "Documentation", to: "/support/docs" },
38
+ { label: "System Status", to: "/support/status" },
39
+ { label: "Request Quote", to: "/quote" },
40
+ ],
41
+ },
42
+ };
43
+
44
+ export const legalLinks = [
45
+ { label: "Privacy Policy", to: "/legal/privacy" },
46
+ { label: "Terms of Service", to: "/legal/terms" },
47
+ { label: "Cookie Policy", to: "/legal/cookies" },
48
+ ];
49
+
50
+ export const shopContact = {
51
+ address: "200 Market Street, Suite 800, San Francisco, CA 94105",
52
+ phone: "+1 (800) 555-0100",
53
+ email: "support@covercorp.com",
54
+ };
55
+
56
+ /* ------------------------------------------------------------------ */
57
+ /* Storefront chrome — structure adopted from the relation prototype */
58
+ /* (topbar · header · main nav · account area). Labels are i18n keys. */
59
+ /* ------------------------------------------------------------------ */
60
+
61
+ export interface NavItem {
62
+ /** i18n key, resolved by the rendering component */
63
+ labelKey: string;
64
+ to: string;
65
+ icon?: string;
66
+ }
67
+
68
+ export interface TopbarUsp {
69
+ labelKey: string;
70
+ icon: string;
71
+ }
72
+
73
+ /** Left side of the topbar — unique selling points. */
74
+ export const topbarUsps: TopbarUsp[] = [
75
+ { labelKey: "topbar.freeShipping", icon: "delivery" },
76
+ { labelKey: "topbar.nextDayDelivery", icon: "clock" },
77
+ ];
78
+
79
+ /** Right side of the topbar — quick links. */
80
+ export const topbarQuickLinks: NavItem[] = [
81
+ { labelKey: "topbar.contact", to: "/support/contact" },
82
+ { labelKey: "topbar.aboutUs", to: "/about" },
83
+ { labelKey: "topbar.locations", to: "/locations" },
84
+ ];
85
+
86
+ /** Primary navigation (dark bar below the header). */
87
+ export const mainNavigation: NavItem[] = [
88
+ { labelKey: "nav.home", to: "/" },
89
+ { labelKey: "nav.products", to: "/category/office-supplies" },
90
+ { labelKey: "nav.spareParts", to: "/spare-parts" },
91
+ { labelKey: "nav.services", to: "/services" },
92
+ { labelKey: "nav.knowledge", to: "/knowledge" },
93
+ ];
94
+
95
+ /** Secondary links on the right side of the main navigation. */
96
+ export const mainNavigationSecondary: NavItem[] = [
97
+ { labelKey: "header.projects", to: "/account/projects" },
98
+ { labelKey: "header.orderLists", to: "/account/order-lists" },
99
+ { labelKey: "topbar.orderStatus", to: "/account/orders" },
100
+ ];
101
+
102
+ export interface AccountNavLink {
103
+ labelKey: string;
104
+ to: string;
105
+ /** Cover icon token or raw Solar basename, shown before the label. */
106
+ icon: string;
107
+ /** False for roadmap entries served by the coming-soon catch-all. */
108
+ implemented?: boolean;
109
+ }
110
+
111
+ export interface AccountNavGroup {
112
+ labelKey: string;
113
+ links: AccountNavLink[];
114
+ }
115
+
116
+ /**
117
+ * The full B2B account navigation tree. Implemented routes point at real
118
+ * pages; everything else shows where the journey is heading and renders the
119
+ * coming-soon page (apps consume it via the account/[...section] catch-all).
120
+ */
121
+ export const accountNavigation: AccountNavGroup[] = [
122
+ {
123
+ labelKey: "account.nav.groups.account",
124
+ links: [
125
+ { labelKey: "account.nav.dashboard", icon: "grid", to: "/account", implemented: true },
126
+ { labelKey: "account.nav.carts", icon: "cart", to: "/account/carts", implemented: true },
127
+ { labelKey: "account.nav.orderTemplates", icon: "template", to: "/account/order-templates" },
128
+ { labelKey: "account.nav.orderLists", icon: "order-list", to: "/account/order-lists", implemented: true },
129
+ { labelKey: "account.nav.projects", icon: "folder", to: "/account/projects" },
130
+ { labelKey: "account.nav.devices", icon: "smartphone", to: "/account/devices" },
131
+ { labelKey: "account.nav.points", icon: "star", to: "/account/points" },
132
+ { labelKey: "account.nav.configurations", icon: "settings", to: "/account/configurations" },
133
+ ],
134
+ },
135
+ {
136
+ labelKey: "account.nav.groups.orders",
137
+ links: [
138
+ { labelKey: "account.nav.inquiries", icon: "mail", to: "/account/inquiries" },
139
+ { labelKey: "account.nav.quotes", icon: "file", to: "/account/quotes" },
140
+ { labelKey: "account.nav.orders", icon: "orders", to: "/account/orders", implemented: true },
141
+ { labelKey: "account.nav.deliveries", icon: "delivery", to: "/account/deliveries" },
142
+ { labelKey: "account.nav.subscriptions", icon: "calendar", to: "/account/subscriptions" },
143
+ { labelKey: "account.nav.downloads", icon: "download", to: "/account/downloads" },
144
+ { labelKey: "account.nav.statistics", icon: "chart-2", to: "/account/statistics" },
145
+ ],
146
+ },
147
+ {
148
+ labelKey: "account.nav.groups.orderProcess",
149
+ links: [
150
+ { labelKey: "account.nav.approvals", icon: "shield", to: "/account/approvals", implemented: true },
151
+ { labelKey: "account.nav.costCenters", icon: "briefcase", to: "/account/cost-centers", implemented: true },
152
+ { labelKey: "account.nav.requisitions", icon: "check", to: "/account/requisitions", implemented: true },
153
+ { labelKey: "account.nav.workflows", icon: "route", to: "/account/workflows", implemented: true },
154
+ { labelKey: "account.nav.collectiveOrders", icon: "layers", to: "/account/collective-orders" },
155
+ { labelKey: "account.nav.assortmentRestrictions", icon: "filter", to: "/account/assortment-restrictions" },
156
+ { labelKey: "account.nav.inquiriesAndQuotes", icon: "chat-round-dots", to: "/account/inquiries-and-quotes" },
157
+ ],
158
+ },
159
+ {
160
+ labelKey: "account.nav.groups.integrations",
161
+ links: [
162
+ { labelKey: "account.nav.punchouts", icon: "external", to: "/account/punchouts" },
163
+ { labelKey: "account.nav.orderingDevices", icon: "direct-order", to: "/account/ordering-devices" },
164
+ { labelKey: "account.nav.mobileScanners", icon: "scan", to: "/account/mobile-scanners" },
165
+ { labelKey: "account.nav.iotDevices", icon: "cpu", to: "/account/iot-devices" },
166
+ ],
167
+ },
168
+ {
169
+ labelKey: "account.nav.groups.settings",
170
+ links: [
171
+ { labelKey: "account.nav.catalogs", icon: "book-2", to: "/account/catalogs" },
172
+ { labelKey: "account.nav.accountSettings", icon: "user", to: "/account/profile", implemented: true },
173
+ { labelKey: "account.nav.orderSettings", icon: "settings", to: "/account/preferences", implemented: true },
174
+ { labelKey: "account.nav.addresses", icon: "location", to: "/account/addresses", implemented: true },
175
+ { labelKey: "account.nav.users", icon: "users", to: "/account/users" },
176
+ { labelKey: "account.nav.roles", icon: "key", to: "/account/roles" },
177
+ { labelKey: "account.nav.customArticleNumbers", icon: "hash", to: "/account/custom-article-numbers" },
178
+ ],
179
+ },
180
+ ];
181
+
182
+ /** Resolves an account navigation link by its path (used by the catch-all page). */
183
+ export function findAccountNavLink(path: string): AccountNavLink | undefined {
184
+ for (const group of accountNavigation) {
185
+ const link = group.links.find(l => l.to === path);
186
+ if (link) {
187
+ return link;
188
+ }
189
+ }
190
+ return undefined;
191
+ }
@@ -0,0 +1,13 @@
1
+ export const palette: Record<string, Record<number, string>> = {
2
+ indigo: { 50: "oklch(96.2% 0.018 272.314)", 100: "oklch(93% 0.034 272.788)", 200: "oklch(87% 0.065 274.039)", 300: "oklch(78.5% 0.115 274.713)", 400: "oklch(67.3% 0.182 276.935)", 500: "oklch(58.5% 0.233 277.117)", 600: "oklch(51.1% 0.262 276.966)", 700: "oklch(45.7% 0.24 277.023)", 800: "oklch(39.8% 0.195 277.366)", 900: "oklch(35.9% 0.144 278.697)", 950: "oklch(25.7% 0.09 281.288)" },
3
+ violet: { 50: "oklch(96.9% 0.016 293.756)", 100: "oklch(94.3% 0.029 294.588)", 200: "oklch(89.4% 0.057 293.283)", 300: "oklch(81.1% 0.111 293.571)", 400: "oklch(70.2% 0.183 293.541)", 500: "oklch(60.6% 0.25 292.717)", 600: "oklch(54.1% 0.281 293.009)", 700: "oklch(49.1% 0.27 292.581)", 800: "oklch(43.2% 0.232 292.759)", 900: "oklch(38% 0.189 293.745)", 950: "oklch(28.3% 0.141 291.089)" },
4
+ orange: { 50: "oklch(98% 0.016 73.684)", 100: "oklch(95.4% 0.038 75.164)", 200: "oklch(90.1% 0.076 70.697)", 300: "oklch(83.7% 0.128 66.29)", 400: "oklch(75% 0.183 55.934)", 500: "oklch(70.5% 0.213 47.604)", 600: "oklch(64.6% 0.222 41.116)", 700: "oklch(55.3% 0.195 38.402)", 800: "oklch(47% 0.157 37.304)", 900: "oklch(40.8% 0.123 38.172)", 950: "oklch(26.6% 0.079 36.259)" },
5
+ sky: { 50: "oklch(97.7% 0.013 236.62)", 100: "oklch(95.1% 0.026 236.824)", 200: "oklch(90.1% 0.058 230.902)", 300: "oklch(82.8% 0.111 230.318)", 400: "oklch(74.6% 0.16 232.661)", 500: "oklch(68.5% 0.169 237.323)", 600: "oklch(58.8% 0.158 241.966)", 700: "oklch(50% 0.134 242.749)", 800: "oklch(44.3% 0.11 240.79)", 900: "oklch(39.1% 0.09 240.876)", 950: "oklch(29.3% 0.066 243.157)" },
6
+ emerald: { 50: "oklch(97.9% 0.021 166.113)", 100: "oklch(95% 0.052 163.051)", 200: "oklch(90.5% 0.093 164.15)", 300: "oklch(84.5% 0.143 164.978)", 400: "oklch(76.5% 0.177 163.223)", 500: "oklch(69.6% 0.17 162.48)", 600: "oklch(59.6% 0.145 163.225)", 700: "oklch(50.8% 0.118 165.612)", 800: "oklch(43.2% 0.095 166.913)", 900: "oklch(37.8% 0.077 168.94)", 950: "oklch(26.2% 0.051 172.552)" },
7
+ rose: { 50: "oklch(96.9% 0.015 12.422)", 100: "oklch(94.1% 0.03 12.58)", 200: "oklch(89.2% 0.058 10.001)", 300: "oklch(81% 0.117 11.638)", 400: "oklch(71.2% 0.194 13.428)", 500: "oklch(64.5% 0.246 16.439)", 600: "oklch(58.6% 0.253 17.585)", 700: "oklch(51.4% 0.222 16.935)", 800: "oklch(45.5% 0.188 13.697)", 900: "oklch(41% 0.159 10.272)", 950: "oklch(27.1% 0.105 12.094)" },
8
+ zinc: { 50: "oklch(98.5% 0 0)", 100: "oklch(96.7% 0.001 286.375)", 200: "oklch(92% 0.004 286.32)", 300: "oklch(87.1% 0.006 286.286)", 400: "oklch(70.5% 0.015 286.067)", 500: "oklch(55.2% 0.016 285.938)", 600: "oklch(44.2% 0.017 285.786)", 700: "oklch(37% 0.013 285.805)", 800: "oklch(27.4% 0.006 286.033)", 900: "oklch(21% 0.006 285.885)", 950: "oklch(14.1% 0.005 285.823)" },
9
+ slate: { 50: "oklch(98.4% 0.003 247.858)", 100: "oklch(96.8% 0.007 247.896)", 200: "oklch(92.9% 0.013 255.508)", 300: "oklch(86.9% 0.022 252.894)", 400: "oklch(70.4% 0.04 256.788)", 500: "oklch(55.4% 0.046 257.417)", 600: "oklch(44.6% 0.043 257.281)", 700: "oklch(37.2% 0.044 257.287)", 800: "oklch(27.9% 0.041 260.031)", 900: "oklch(20.8% 0.042 265.755)", 950: "oklch(12.9% 0.042 264.695)" },
10
+ stone: { 50: "oklch(98.5% 0.001 106.423)", 100: "oklch(97% 0.001 106.424)", 200: "oklch(92.3% 0.003 48.717)", 300: "oklch(86.9% 0.005 56.366)", 400: "oklch(70.9% 0.01 56.259)", 500: "oklch(55.3% 0.013 58.071)", 600: "oklch(44.4% 0.011 73.639)", 700: "oklch(37.4% 0.01 67.558)", 800: "oklch(26.8% 0.007 34.298)", 900: "oklch(21.6% 0.006 56.043)", 950: "oklch(14.7% 0.004 49.25)" },
11
+ };
12
+
13
+ export const COLOR_SHADES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;
@@ -0,0 +1,20 @@
1
+ import type { SolarIconWeight } from "./icons";
2
+
3
+ export interface Theme {
4
+ id: string;
5
+ name: string;
6
+ colors: { primary: string; neutral: string };
7
+ tokens: { radius: string };
8
+ icons: { weight: SolarIconWeight };
9
+ }
10
+
11
+ export const DEFAULT_THEME_ID = "midnight";
12
+
13
+ export const themes: Theme[] = [
14
+ { id: "midnight", name: "Midnight", colors: { primary: "indigo", neutral: "zinc" }, tokens: { radius: "0.375rem" }, icons: { weight: "linear" } },
15
+ { id: "aurora", name: "Aurora", colors: { primary: "violet", neutral: "slate" }, tokens: { radius: "0.5rem" }, icons: { weight: "line-duotone" } },
16
+ { id: "ember", name: "Ember", colors: { primary: "orange", neutral: "stone" }, tokens: { radius: "0.375rem" }, icons: { weight: "bold" } },
17
+ { id: "ocean", name: "Ocean", colors: { primary: "sky", neutral: "slate" }, tokens: { radius: "0.5rem" }, icons: { weight: "outline" } },
18
+ { id: "forest", name: "Forest", colors: { primary: "emerald", neutral: "zinc" }, tokens: { radius: "0.25rem" }, icons: { weight: "broken" } },
19
+ { id: "blossom", name: "Blossom", colors: { primary: "rose", neutral: "zinc" }, tokens: { radius: "0.75rem" }, icons: { weight: "bold-duotone" } },
20
+ ];
@@ -0,0 +1,50 @@
1
+ import { de, en } from "@formkit/i18n";
2
+ import { generateClasses } from "@formkit/themes";
3
+ import { createInput, defineFormKitConfig } from "@formkit/vue";
4
+
5
+ import FormKitDatePicker from "./components/ui/forms/FormKitDatePicker.vue";
6
+
7
+ /**
8
+ * FormKit configuration for the cover design system.
9
+ *
10
+ * Forms render SSR (no ClientOnly needed) and are styled with the same
11
+ * Nuxt UI tokens as the rest of the system. Validation messages come from
12
+ * FormKit's locale packs; the active locale follows the app locale (see
13
+ * the schema form components).
14
+ */
15
+ export default defineFormKitConfig({
16
+ locales: { de, en },
17
+ locale: "de",
18
+ // Custom inputs: `datepicker` wraps Nuxt UI's UCalendar (ISO string value).
19
+ inputs: {
20
+ datepicker: createInput(FormKitDatePicker, {
21
+ props: ["minDays", "maxDays", "disableWeekends"],
22
+ }),
23
+ },
24
+ config: {
25
+ classes: generateClasses({
26
+ global: {
27
+ form: "flex flex-col gap-4",
28
+ outer: "flex flex-col gap-1 data-[disabled]:opacity-50",
29
+ label: "text-sm font-medium text-highlighted",
30
+ inner: "w-full",
31
+ input: `w-full px-3 py-2 text-sm border rounded-md bg-transparent
32
+ border-(--ui-border) focus:outline-none focus:ring-2 focus:ring-(--ui-primary)
33
+ placeholder:text-muted`,
34
+ messages: "list-none p-0 m-0 flex flex-col gap-0.5",
35
+ message: "text-xs text-red-500",
36
+ help: "text-xs text-muted",
37
+ },
38
+ select: {
39
+ input: `w-full px-3 py-2 text-sm border rounded-md bg-default
40
+ border-(--ui-border) focus:outline-none focus:ring-2 focus:ring-(--ui-primary)`,
41
+ },
42
+ checkbox: {
43
+ wrapper: "flex items-center gap-2 cursor-pointer",
44
+ inner: "flex items-center !w-auto",
45
+ input: "w-4 h-4 rounded border-(--ui-border) accent-(--ui-primary)",
46
+ label: "text-sm text-highlighted !font-normal",
47
+ },
48
+ }),
49
+ },
50
+ });
@@ -0,0 +1,34 @@
1
+ export type AccountAddressType = "billing" | "shipping";
2
+
3
+ export interface AccountAddress {
4
+ readonly id: string;
5
+ readonly company: string;
6
+ readonly label: string;
7
+ readonly firstName: string;
8
+ readonly lastName: string;
9
+ readonly street: string;
10
+ readonly streetNumber: string;
11
+ readonly city: string;
12
+ readonly zip: string;
13
+ readonly country: string;
14
+ readonly isDefault: boolean;
15
+ readonly type: AccountAddressType;
16
+ }
17
+
18
+ export interface AccountAddressFormState {
19
+ company: string;
20
+ label: string;
21
+ firstName: string;
22
+ lastName: string;
23
+ street: string;
24
+ streetNumber: string;
25
+ city: string;
26
+ zip: string;
27
+ country: string;
28
+ type: AccountAddressType;
29
+ isDefault: boolean;
30
+ }
31
+
32
+ export interface AccountAddressListResponse {
33
+ readonly addresses: AccountAddress[];
34
+ }