@shopbite-de/storefront 1.28.0 → 1.30.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 (59) hide show
  1. package/.env.example +9 -0
  2. package/CLAUDE.md +4 -1
  3. package/README.md +14 -14
  4. package/app/components/Category/Listing.vue +1 -0
  5. package/app/components/Home/Faq.vue +58 -0
  6. package/app/components/Home/Highlights.vue +69 -0
  7. package/app/components/Home/MenuCategories.vue +148 -0
  8. package/app/components/Product/Card.vue +46 -10
  9. package/app/components/Product/CardDietBadges.vue +7 -13
  10. package/app/components/Product/CrossSelling.vue +18 -2
  11. package/app/components/Product/DeselectIngredient.vue +10 -3
  12. package/app/components/Product/Detail.vue +33 -2
  13. package/app/components/Product/QuickView.vue +20 -1
  14. package/app/composables/useMenuSectionSchema.ts +21 -8
  15. package/app/composables/useProductCrossSelling.ts +1 -0
  16. package/app/composables/useProductQuickView.ts +151 -9
  17. package/app/composables/useRestaurantSchema.ts +40 -3
  18. package/app/composables/useShareLink.ts +47 -0
  19. package/app/composables/useTopSellers.ts +4 -1
  20. package/app/pages/index.vue +19 -11
  21. package/app/types/Association.d.ts +2 -0
  22. package/app/utils/product.ts +28 -0
  23. package/app/utils/productUrl.ts +87 -0
  24. package/app/utils/schema.ts +82 -1
  25. package/app/utils/seo.ts +13 -0
  26. package/content/index.yml +25 -4
  27. package/content.config.ts +28 -17
  28. package/docs/notes/2026-09-23-issue-388-home-sections.md +45 -0
  29. package/docs/notes/2026-09-25-dependency-update.md +55 -0
  30. package/docs/notes/2026-10-05-issue-289-product-deep-links.md +28 -0
  31. package/docs/notes/2026-10-05-issue-400-menu-item-ingredients-diet.md +18 -0
  32. package/docs/notes/2026-10-05-issue-401-restaurant-schema-ordering.md +21 -0
  33. package/docs/notes/2026-10-05-issue-402-llms-txt.md +17 -0
  34. package/docs/notes/2026-10-05-issue-403-ai-crawlers.md +15 -0
  35. package/docs/notes/2026-10-05-issue-404-faq.md +21 -0
  36. package/docs/notes/2026-10-05-issue-411-quick-view-share.md +22 -0
  37. package/nuxt.config.ts +20 -1
  38. package/package.json +9 -10
  39. package/pnpm-workspace.yaml +0 -1
  40. package/server/api/listing/[categoryId].get.ts +3 -0
  41. package/server/api/product/[productId]/cross-selling.get.ts +2 -1
  42. package/server/plugins/ai-crawlers.ts +27 -0
  43. package/server/routes/llms.txt.ts +213 -0
  44. package/server/utils/aiCrawlers.ts +79 -0
  45. package/server/utils/llmsTxt.ts +207 -0
  46. package/test/nuxt/HomeFaq.test.ts +34 -0
  47. package/test/nuxt/HomeMenuCategories.test.ts +94 -0
  48. package/test/nuxt/ProductCrossSelling.test.ts +20 -0
  49. package/test/nuxt/ProductDeselectIngredient.test.ts +34 -0
  50. package/test/nuxt/useShareLink.test.ts +76 -0
  51. package/test/unit/aiCrawlers.spec.ts +48 -0
  52. package/test/unit/llmsTxt.spec.ts +149 -0
  53. package/test/unit/product.spec.ts +20 -0
  54. package/test/unit/productUrl.spec.ts +90 -0
  55. package/test/unit/schema.spec.ts +123 -0
  56. package/test/unit/seo.spec.ts +13 -0
  57. package/app/components/Food/Marquee.vue +0 -35
  58. package/app/components/Food/MarqueeItem.vue +0 -77
  59. package/app/components/Topseller.vue +0 -53
@@ -1,77 +0,0 @@
1
- <script setup lang="ts">
2
- import { useProductSearch } from "@shopware/composables";
3
- import type { Schemas } from "#shopware";
4
-
5
- export type MarqueeItem = {
6
- productId: string;
7
- image: string;
8
- };
9
-
10
- const props = defineProps<MarqueeItem>();
11
-
12
- const { productId, image } = toRefs(props);
13
- const { search } = useProductSearch();
14
-
15
- const productResponse = await search(productId.value);
16
-
17
- // object that keeps a Product entity
18
- const product: Schemas["Product"] = productResponse.product;
19
-
20
- const CART_SUCCESS_TITLE = "Gute Wahl!";
21
-
22
- const { addLineItems } = useCartMutations();
23
- const toast = useToast();
24
-
25
- // Synchronous guard: a double-click fires before a reactive :disabled
26
- // binding reaches the DOM.
27
- const isAdding = ref(false);
28
-
29
- const alt = computed(() => product.name + " #" + product.productNumber);
30
-
31
- async function showSuccessToast() {
32
- toast.add({
33
- title: CART_SUCCESS_TITLE,
34
- description: `${product.translated.name} wurde in den Warenkorb gelegt.`,
35
- icon: "i-lucide-shopping-cart",
36
- color: "success",
37
- progress: false,
38
- });
39
- }
40
-
41
- async function addToCart(productId: string) {
42
- if (isAdding.value) return;
43
- isAdding.value = true;
44
- try {
45
- const newCart = await addLineItems([
46
- { id: productId, quantity: 1, type: "product" },
47
- ]);
48
- if (!newCart) return;
49
- await showSuccessToast();
50
- } finally {
51
- isAdding.value = false;
52
- }
53
- }
54
- </script>
55
-
56
- <template>
57
- <div v-if="product" :id="product.id" class="relative inline-block">
58
- <img
59
- :src="image"
60
- :alt="alt"
61
- loading="lazy"
62
- decoding="async"
63
- class="rounded-lg shadow-2xl ring ring-default h-50 md:h-80"
64
- />
65
- <div
66
- class="absolute bottom-0 left-0 right-0 bg-black/60 text-white px-4 py-2 rounded-b-md flex justify-between items-center"
67
- >
68
- <p class="text-sm font-medium truncate">{{ product.translated.name }}</p>
69
- <UButton
70
- icon="i-lucide-shopping-cart"
71
- size="lg"
72
- :disabled="isAdding"
73
- @click="addToCart(product.id)"
74
- />
75
- </div>
76
- </div>
77
- </template>
@@ -1,53 +0,0 @@
1
- <script setup lang="ts">
2
- // Top sellers as a horizontal snap scroller below the hero (#327); a tap
3
- // opens the product quick view (#325). Renders nothing without top sellers.
4
- const { loadTopSellers } = useTopSellers();
5
-
6
- const { data: topSellers } = await useAsyncData("top-sellers", () =>
7
- loadTopSellers(),
8
- );
9
-
10
- const products = computed(() => topSellers.value ?? []);
11
- const quickView = useProductQuickView(products);
12
- </script>
13
-
14
- <template>
15
- <section v-if="products.length > 0" aria-labelledby="top-sellers-title">
16
- <UContainer class="flex flex-col gap-3 pt-6 sm:pt-8">
17
- <div class="flex items-baseline justify-between gap-4">
18
- <h2
19
- id="top-sellers-title"
20
- class="text-xl font-extrabold tracking-tight text-highlighted sm:text-2xl"
21
- >
22
- Beliebt bei unseren Gästen
23
- </h2>
24
- <UButton
25
- label="Speisekarte"
26
- to="/speisekarte/"
27
- variant="link"
28
- color="primary"
29
- trailing-icon="i-lucide-arrow-right"
30
- class="shrink-0 px-0"
31
- />
32
- </div>
33
- </UContainer>
34
- <!-- Scrolls edge to edge on phones, padded like the container. -->
35
- <div
36
- class="flex snap-x snap-mandatory gap-3 overflow-x-auto px-4 py-2 pb-4 sm:px-6 lg:px-8 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
37
- >
38
- <div class="mx-auto flex w-full max-w-(--ui-container) gap-3">
39
- <ProductCardCompact
40
- v-for="product in products"
41
- :key="product.id"
42
- :product="product"
43
- @select="quickView.show"
44
- />
45
- </div>
46
- </div>
47
- <LazyProductQuickView
48
- v-if="quickView.mounted.value"
49
- v-model:open="quickView.open.value"
50
- :product="quickView.product.value"
51
- />
52
- </section>
53
- </template>