@shopbite-de/storefront 1.24.0 → 1.26.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 (96) hide show
  1. package/.env.example +3 -0
  2. package/CLAUDE.md +10 -3
  3. package/README.md +0 -1
  4. package/app/app.config.ts +3 -2
  5. package/app/app.vue +4 -1
  6. package/app/assets/css/main.css +16 -0
  7. package/app/components/AddToWishlist.vue +13 -6
  8. package/app/components/Cart/Bar.vue +102 -0
  9. package/app/components/Cart/QuickView.vue +4 -0
  10. package/app/components/Cart/Upsell.vue +106 -0
  11. package/app/components/Category/Listing.vue +11 -3
  12. package/app/components/Checkout/DeliveryTimeSelect.vue +28 -2
  13. package/app/components/Checkout/Summary.vue +25 -3
  14. package/app/components/DemoBanner.vue +13 -0
  15. package/app/components/Feature/Card.vue +121 -0
  16. package/app/components/Features.vue +14 -9
  17. package/app/components/Footer/Contact.vue +5 -1
  18. package/app/components/Header/Right.vue +44 -15
  19. package/app/components/Hero.vue +126 -36
  20. package/app/components/Product/Card.vue +102 -50
  21. package/app/components/Product/CardCompact.vue +72 -0
  22. package/app/components/Product/CardDietBadges.vue +38 -31
  23. package/app/components/Product/CardIngredients.vue +35 -0
  24. package/app/components/Product/CardSkeleton.vue +10 -18
  25. package/app/components/Product/Category.vue +9 -2
  26. package/app/components/Product/Configurator.vue +11 -7
  27. package/app/components/Product/CrossSelling.vue +45 -34
  28. package/app/components/Product/DeselectIngredient.vue +37 -31
  29. package/app/components/Product/Detail.vue +73 -13
  30. package/app/components/Product/QuickView.vue +77 -0
  31. package/app/components/Topseller.vue +44 -34
  32. package/app/composables/useAddToCart.ts +3 -30
  33. package/app/composables/useBusinessHours.ts +10 -3
  34. package/app/composables/useCartQuickView.ts +19 -0
  35. package/app/composables/useCartUpsell.ts +100 -0
  36. package/app/composables/useCategorySeo.ts +5 -4
  37. package/app/composables/useHolidays.ts +7 -3
  38. package/app/composables/useOpeningHoursData.ts +53 -0
  39. package/app/composables/useProductCartQuantity.ts +15 -0
  40. package/app/composables/useProductCrossSelling.ts +1 -0
  41. package/app/composables/useProductDetail.ts +15 -1
  42. package/app/composables/useProductEvents.ts +30 -0
  43. package/app/composables/useProductQuickView.ts +65 -0
  44. package/app/composables/useTopSellers.ts +22 -0
  45. package/app/composables/useTrackEvent.ts +7 -0
  46. package/app/pages/bestellung/bestaetigen.vue +0 -3
  47. package/app/pages/bestellung/warenkorb.vue +0 -3
  48. package/app/pages/bestellung/zahlung-versand.vue +0 -3
  49. package/app/pages/bestellung.vue +22 -14
  50. package/app/pages/index.vue +3 -1
  51. package/app/pages/suche.vue +18 -5
  52. package/app/types/Association.d.ts +1 -0
  53. package/app/utils/openingHours.ts +31 -8
  54. package/app/utils/product.ts +31 -0
  55. package/app/utils/retry.ts +17 -0
  56. package/content/index.yml +16 -11
  57. package/content.config.ts +13 -0
  58. package/docs/notes/2026-09-12-issue-319-stylesheet-cost.md +154 -0
  59. package/docs/notes/2026-09-12-issue-325-product-card.md +100 -0
  60. package/docs/notes/2026-09-12-issue-327-home-hero.md +64 -0
  61. package/docs/notes/2026-09-13-demo-banner.md +32 -0
  62. package/docs/notes/2026-09-13-issue-332-home-info-cards.md +46 -0
  63. package/docs/notes/2026-09-13-quick-view-flicker.md +65 -0
  64. package/docs/notes/2026-09-14-cart-upsell.md +105 -0
  65. package/docs/notes/2026-09-14-demo-noindex.md +57 -0
  66. package/docs/notes/2026-09-16-issue-339-checkout-hydration.md +49 -0
  67. package/docs/notes/2026-09-16-issue-349-order-button-loading.md +39 -0
  68. package/docs/notes/2026-09-16-issue-350-remove-pinia.md +41 -0
  69. package/docs/notes/2026-09-16-issue-355-opening-hours-error.md +57 -0
  70. package/nuxt.config.ts +25 -2
  71. package/package.json +2 -3
  72. package/scripts/perf/first-render.mjs +30 -0
  73. package/scripts/perf/h2-proxy.cjs +49 -0
  74. package/scripts/perf/lighthouse.sh +22 -0
  75. package/scripts/perf/quick-view-layout.mjs +126 -0
  76. package/server/api/listing/[categoryId].get.ts +2 -0
  77. package/server/api/search.get.ts +2 -0
  78. package/test/e2e/simple-checkout-as-recurring-customer.test.ts +13 -17
  79. package/test/nuxt/CartBar.test.ts +110 -0
  80. package/test/nuxt/CartUpsell.test.ts +125 -0
  81. package/test/nuxt/CheckoutSummary.test.ts +127 -0
  82. package/test/nuxt/DemoBanner.test.ts +12 -0
  83. package/test/nuxt/useAddToCart.test.ts +6 -19
  84. package/test/nuxt/useCartUpsell.test.ts +126 -0
  85. package/test/nuxt/useOpeningHoursData.test.ts +120 -0
  86. package/test/nuxt/useTrackEvent.test.ts +15 -0
  87. package/test/unit/openingHours.spec.ts +32 -1
  88. package/test/unit/product.spec.ts +72 -0
  89. package/test/unit/retry.spec.ts +58 -0
  90. package/test/unit/useCategorySeo.spec.ts +2 -1
  91. package/test/visual/playwright.config.ts +33 -0
  92. package/test/visual/visual.spec.ts +87 -0
  93. package/app/components/Product/CardDescription.vue +0 -27
  94. package/app/components/Product/CardFooter.vue +0 -61
  95. package/app/composables/useCheckoutStore.ts +0 -1
  96. package/app/stores/checkout.ts +0 -22
@@ -0,0 +1,87 @@
1
+ // Screenshot comparison of the pages the stylesheet work touches (#319).
2
+ // Run against the production build behind scripts/perf/h2-proxy.cjs:
3
+ // pnpm playwright test --config test/visual/playwright.config.ts --update-snapshots # baseline
4
+ // pnpm playwright test --config test/visual/playwright.config.ts # compare
5
+ import { test, expect, type Page } from "@playwright/test";
6
+
7
+ const modes = ["light", "dark"] as const;
8
+
9
+ async function settle(page: Page) {
10
+ // hydrate scroll-based sections and reveal AnimatedSection blocks
11
+ const h = await page.evaluate(() => document.body.scrollHeight);
12
+ for (let y = 0; y < h + 800; y += 500) {
13
+ await page.evaluate((y) => window.scrollTo(0, y), y);
14
+ await page.waitForTimeout(80);
15
+ }
16
+ await page.evaluate(() => window.scrollTo(0, 0));
17
+ await page.waitForTimeout(400);
18
+ }
19
+
20
+ async function open(page: Page, path: string, mode: string) {
21
+ await page.addInitScript((m) => {
22
+ try {
23
+ localStorage.setItem("nuxt-color-mode", m);
24
+ } catch {
25
+ // storage can be unavailable in the sandboxed init script
26
+ }
27
+ }, mode);
28
+ await page.emulateMedia({ reducedMotion: "reduce" });
29
+ await page.goto(path, { waitUntil: "networkidle" });
30
+ await page.addStyleTag({
31
+ content:
32
+ "*,*::before,*::after{animation:none!important;transition:none!important;caret-color:transparent!important}",
33
+ });
34
+ await settle(page);
35
+ }
36
+
37
+ for (const mode of modes) {
38
+ test.describe(mode, () => {
39
+ test("home", async ({ page }) => {
40
+ await open(page, "/", mode);
41
+ await expect(page).toHaveScreenshot(`home-${mode}.png`, {
42
+ fullPage: true,
43
+ });
44
+ await expect(page.locator("footer").first()).toHaveScreenshot(
45
+ `footer-${mode}.png`,
46
+ );
47
+ });
48
+
49
+ test("category", async ({ page }) => {
50
+ await open(page, "/c/Pizza/", mode);
51
+ await expect(page).toHaveScreenshot(`category-${mode}.png`, {
52
+ fullPage: true,
53
+ });
54
+ });
55
+
56
+ test("cart drawer and checkout", async ({ page }) => {
57
+ await open(page, "/c/Pizza/", mode);
58
+ const card = page.locator('[id^="product-card-"]').first();
59
+ await card.scrollIntoViewIfNeeded();
60
+ await card.locator("button .i-lucide\\:shopping-cart").click();
61
+ const add = page.getByRole("button", { name: "In den Warenkorb" });
62
+ await expect(add).toBeVisible({ timeout: 10000 });
63
+ await page.waitForTimeout(300);
64
+ await expect(page).toHaveScreenshot(`card-options-${mode}.png`);
65
+ await add.click();
66
+ await expect(add).not.toBeVisible({ timeout: 10000 });
67
+ await page
68
+ .locator("button .i-lucide\\:shopping-bag")
69
+ .locator("..")
70
+ .first()
71
+ .click();
72
+ const drawer = page.locator('[data-vaul-drawer][data-state="open"]');
73
+ await expect(drawer).toBeVisible({ timeout: 10000 });
74
+ await page.waitForTimeout(800);
75
+ await expect(page).toHaveScreenshot(`cart-drawer-${mode}.png`);
76
+ await page.goto("/bestellung/warenkorb", { waitUntil: "networkidle" });
77
+ await page.addStyleTag({
78
+ content:
79
+ "*,*::before,*::after{animation:none!important;transition:none!important;caret-color:transparent!important}",
80
+ });
81
+ await settle(page);
82
+ await expect(page).toHaveScreenshot(`checkout-${mode}.png`, {
83
+ fullPage: true,
84
+ });
85
+ });
86
+ });
87
+ }
@@ -1,27 +0,0 @@
1
- <script setup lang="ts">
2
- import type { Schemas } from "#shopware";
3
-
4
- const props = defineProps<{
5
- description: string | null | undefined;
6
- sortedProperties: Schemas["PropertyGroup"][] | undefined;
7
- }>();
8
-
9
- const mainIngredients = computed<Schemas["PropertyGroupOption"][]>(() => {
10
- const group = props.sortedProperties?.find(
11
- (propertyGroup) => propertyGroup.translated.name === "Hauptzutaten",
12
- );
13
- return group?.options ?? [];
14
- });
15
- </script>
16
-
17
- <template>
18
- <div class="flex flex-col gap-2">
19
- <div>{{ description }}</div>
20
- <div
21
- v-if="mainIngredients.length > 0"
22
- class="font-extralight text-sm text-pretty"
23
- >
24
- {{ mainIngredients.map((i) => i.translated.name).join(", ") }}
25
- </div>
26
- </div>
27
- </template>
@@ -1,61 +0,0 @@
1
- <script setup lang="ts">
2
- import type { Schemas } from "#shopware";
3
-
4
- defineProps<{
5
- price: number;
6
- product: Schemas["Product"];
7
- withFavoriteButton: boolean;
8
- withAddToCartButton: boolean;
9
- }>();
10
-
11
- const emit = defineEmits<{
12
- variantSelected: [variant: Schemas["Product"]];
13
- }>();
14
-
15
- const { isCheckoutEnabled } = useShopBiteConfig();
16
-
17
- const { getFormattedPrice } = useCommercePrice();
18
-
19
- const openDetails = ref(false);
20
- // The collapsible is created on the first toggle: mounting one per card
21
- // (with its height measurement) was a large part of the listing's
22
- // hydration cost (#314). Never rendered on the server.
23
- const detailsMounted = ref(false);
24
-
25
- async function toggleDetails() {
26
- if (!detailsMounted.value) {
27
- detailsMounted.value = true;
28
- await nextTick();
29
- }
30
- openDetails.value = !openDetails.value;
31
- }
32
- </script>
33
-
34
- <template>
35
- <div class="flex flex-row justify-between content-center w-full">
36
- <p>{{ getFormattedPrice(price) }}</p>
37
- <div class="flex flex-row gap-2">
38
- <AddToWishlist v-if="withFavoriteButton" :product="product" />
39
- <UButton
40
- v-if="withAddToCartButton && isCheckoutEnabled"
41
- icon="i-lucide-shopping-cart"
42
- variant="subtle"
43
- aria-label="Öffnet Produkt-Optionen"
44
- @click="toggleDetails"
45
- />
46
- </div>
47
- </div>
48
- <UCollapsible
49
- v-if="detailsMounted"
50
- v-model:open="openDetails"
51
- class="flex flex-col gap-2"
52
- >
53
- <template #content>
54
- <LazyProductDetail
55
- :product-id="product.id"
56
- @product-added="toggleDetails"
57
- @variant-selected="emit('variantSelected', $event)"
58
- />
59
- </template>
60
- </UCollapsible>
61
- </template>
@@ -1 +0,0 @@
1
- export { useCheckoutStore } from "../stores/checkout";
@@ -1,22 +0,0 @@
1
- const stepRoutes = [
2
- "/bestellung/warenkorb",
3
- "/bestellung/zahlung-versand",
4
- "/bestellung/bestaetigen",
5
- ] as const;
6
-
7
- export const useCheckoutStore = defineStore("checkout", () => {
8
- const step = ref(0);
9
-
10
- function setStep(index: number) {
11
- step.value = index;
12
- }
13
-
14
- async function navigateToStep(index: number) {
15
- if (index < 0 || index >= stepRoutes.length) return;
16
- if (index <= step.value) {
17
- await navigateTo(stepRoutes[index]);
18
- }
19
- }
20
-
21
- return { step, setStep, navigateToStep };
22
- });