From 74b072bc2b81c0ae0f34da75ba7b02c2ef6ecd7d Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Mon, 9 Dec 2024 09:26:39 +0100 Subject: [PATCH 01/20] update next test --- apps/storyblok/package.json | 20 +- apps/storyblok/src/app/[[...slug]]/page.tsx | 20 +- .../src/components/DataContext/index.tsx | 10 +- packages/tailwind-config/lib/plugin.ts | 4 +- packages/ui/package.json | 2 +- pnpm-lock.yaml | 874 ++++++++++++++++-- 6 files changed, 848 insertions(+), 82 deletions(-) diff --git a/apps/storyblok/package.json b/apps/storyblok/package.json index a301871..fe16b36 100644 --- a/apps/storyblok/package.json +++ b/apps/storyblok/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev --port=4050 --experimental-https", + "dev": "next dev --turbo --port=4050 --experimental-https", "build": "next build", "start": "next start", "lint": "next lint", @@ -16,9 +16,9 @@ "dependencies": { "@shared/ui": "workspace:*", "@storyblok/react": "^3.0.10", - "next": ">=14.1.1", - "react": "^18", - "react-dom": "^18", + "next": "15.0.4", + "react": "19.0.0", + "react-dom": "19.0.0", "storyblok-rich-text-react-renderer": "^2.9.1" }, "devDependencies": { @@ -27,11 +27,11 @@ "@shared/ts-config": "workspace:*", "@tailwindcss/typography": "^0.5.10", "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", + "@types/react": "19.0.1", + "@types/react-dom": "19.0.1", "autoprefixer": "^10.0.1", "eslint": "^8", - "eslint-config-next": "14.1.0", + "eslint-config-next": "15.0.4", "postcss": "^8", "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.14", @@ -39,5 +39,11 @@ "storyblok-backup": "^0.3.0", "tailwindcss": "^3.4.3", "typescript": "5.4.5" + }, + "pnpm": { + "overrides": { + "@types/react": "19.0.1", + "@types/react-dom": "19.0.1" + } } } diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index e841ab5..0c018e1 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -8,22 +8,26 @@ import { fetchStoryBySlug, getMetaData, } from "@/lib/api"; +import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; -const isDraftModeEnv = process.env.NEXT_PUBLIC_IS_PREVIEW === "true"; -export const dynamic = isDraftModeEnv ? "force-dynamic" : "force-static"; +if (isPreview) { +} +export const fetchCache = "default-cache"; +export const dynamic = "force-static"; type Props = { - params: { slug?: string[] }; - searchParams: { [key: string]: string | string[] | undefined }; + params: Promise<{ slug?: string[] }>; + searchParams: Promise<{ [key: string]: string | string[] | undefined }>; }; -export async function generateMetadata({ params }: Props): Promise { +export async function generateMetadata(props: Props): Promise { + const params = await props.params; return await getMetaData(params.slug); } export async function generateStaticParams() { - if (isDraftModeEnv) return []; + // if (isPreview) return []; const pages = await fetchAllPages(); @@ -38,7 +42,9 @@ export async function generateStaticParams() { return paths; } -export default async function Home({ params, searchParams }: Props) { +export default async function Home(props: Props) { + const searchParams = await props.searchParams; + const params = await props.params; const isDraftModeEnabled = await checkDraftModeToken(searchParams); const { story, links } = await fetchStoryBySlug( diff --git a/apps/storyblok/src/components/DataContext/index.tsx b/apps/storyblok/src/components/DataContext/index.tsx index 2fb1af5..2494219 100644 --- a/apps/storyblok/src/components/DataContext/index.tsx +++ b/apps/storyblok/src/components/DataContext/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { createContext, useContext } from "react"; +import { createContext, use } from "react"; import type { IDataContextProviderProps, IDataContextValues } from "./types"; @@ -15,17 +15,19 @@ export function DataContextProvider({ headersAndFooters, }: IDataContextProviderProps) { return ( - + {/* @ts-ignore */} {children} - + ); } export const useDataContext = () => { - return useContext(DataContext); + return use(DataContext); }; diff --git a/packages/tailwind-config/lib/plugin.ts b/packages/tailwind-config/lib/plugin.ts index 61eeedf..999ca65 100644 --- a/packages/tailwind-config/lib/plugin.ts +++ b/packages/tailwind-config/lib/plugin.ts @@ -20,8 +20,8 @@ export const customPlugin = plugin( typography: { DEFAULT: { css: { - "--tw-prose-headings": `var("--text")`, - "--tw-prose-invert-headings": `var("--text")`, + "--tw-prose-headings": `var(--text)`, + "--tw-prose-invert-headings": `var(--text)`, }, }, }, diff --git a/packages/ui/package.json b/packages/ui/package.json index f7da5d8..cecced3 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -35,7 +35,7 @@ "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-switch": "^1.1.1", "@radix-ui/react-toast": "^1.1.5", - "@react-three/fiber": "^8.17.10", + "@react-three/fiber": "9.0.0-alpha.8", "@tanstack/react-table": "^8.17.3", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06c5408..31d3a7f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,19 +143,19 @@ importers: version: link:../../packages/ui '@storyblok/react': specifier: ^3.0.10 - version: 3.0.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.0.10(react-dom@19.0.0(react@19.0.0))(react@19.0.0) next: - specifier: '>=14.1.1' - version: 14.2.5(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 15.0.4 + version: 15.0.4(@babel/core@7.24.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: - specifier: ^18 - version: 18.3.1 + specifier: 19.0.0 + version: 19.0.0 react-dom: - specifier: ^18 - version: 18.3.1(react@18.3.1) + specifier: 19.0.0 + version: 19.0.0(react@19.0.0) storyblok-rich-text-react-renderer: specifier: ^2.9.1 - version: 2.9.2(react@18.3.1) + version: 2.9.2(react@19.0.0) devDependencies: '@shared/eslint-config': specifier: workspace:* @@ -173,11 +173,11 @@ importers: specifier: ^20 version: 20.14.10 '@types/react': - specifier: ^18 - version: 18.3.3 + specifier: 19.0.1 + version: 19.0.1 '@types/react-dom': - specifier: ^18 - version: 18.3.0 + specifier: 19.0.1 + version: 19.0.1 autoprefixer: specifier: ^10.0.1 version: 10.4.19(postcss@8.4.39) @@ -185,8 +185,8 @@ importers: specifier: ^8 version: 8.57.0 eslint-config-next: - specifier: 14.1.0 - version: 14.1.0(eslint@8.57.0)(typescript@5.4.5) + specifier: 15.0.4 + version: 15.0.4(eslint@8.57.0)(typescript@5.4.5) postcss: specifier: ^8 version: 8.4.39 @@ -300,8 +300,8 @@ importers: specifier: ^1.1.5 version: 1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@react-three/fiber': - specifier: ^8.17.10 - version: 8.17.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0) + specifier: 9.0.0-alpha.8 + version: 9.0.0-alpha.8(@types/react@18.3.3)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0) '@tanstack/react-table': specifier: ^8.17.3 version: 8.19.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1183,6 +1183,9 @@ packages: peerDependencies: '@noble/ciphers': ^1.0.0 + '@emnapi/runtime@1.3.1': + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + '@emotion/is-prop-valid@0.8.8': resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==} @@ -1534,6 +1537,111 @@ packages: '@vue/compiler-sfc': optional: true + '@img/sharp-darwin-arm64@0.33.5': + resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.33.5': + resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-darwin-arm64@1.0.4': + resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.0.4': + resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.0.4': + resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.0.5': + resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.0.4': + resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.0.4': + resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.33.5': + resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.33.5': + resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-s390x@0.33.5': + resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.33.5': + resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.33.5': + resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.33.5': + resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.33.5': + resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-ia32@0.33.5': + resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.33.5': + resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + '@inquirer/checkbox@4.0.0': resolution: {integrity: sha512-TNd+u1fAG8vf8YMgXzK2BI0u0xsphFv//T5rpF1eZ+8AAXby5Ll1qptr4/XVS45dvWDIzuBmmWIpVJRvnaNqzQ==} engines: {node: '>=18'} @@ -1662,51 +1770,99 @@ packages: '@next/env@14.2.5': resolution: {integrity: sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==} + '@next/env@15.0.4': + resolution: {integrity: sha512-WNRvtgnRVDD4oM8gbUcRc27IAhaL4eXQ/2ovGbgLnPGUvdyDr8UdXP4Q/IBDdAdojnD2eScryIDirv0YUCjUVw==} + '@next/eslint-plugin-next@14.1.0': resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==} + '@next/eslint-plugin-next@15.0.4': + resolution: {integrity: sha512-rbsF17XGzHtR7SDWzWpavSfum3/UdnF8bAaisnKwP//si3KWPTedVUsflAdjyK1zW3rweBjbALfKcavFneLGvg==} + '@next/swc-darwin-arm64@14.2.5': resolution: {integrity: sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] + '@next/swc-darwin-arm64@15.0.4': + resolution: {integrity: sha512-QecQXPD0yRHxSXWL5Ff80nD+A56sUXZG9koUsjWJwA2Z0ZgVQfuy7gd0/otjxoOovPVHR2eVEvPMHbtZP+pf9w==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + '@next/swc-darwin-x64@14.2.5': resolution: {integrity: sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] + '@next/swc-darwin-x64@15.0.4': + resolution: {integrity: sha512-pb7Bye3y1Og3PlCtnz2oO4z+/b3pH2/HSYkLbL0hbVuTGil7fPen8/3pyyLjdiTLcFJ+ymeU3bck5hd4IPFFCA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + '@next/swc-linux-arm64-gnu@14.2.5': resolution: {integrity: sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@next/swc-linux-arm64-gnu@15.0.4': + resolution: {integrity: sha512-12oSaBFjGpB227VHzoXF3gJoK2SlVGmFJMaBJSu5rbpaoT5OjP5OuCLuR9/jnyBF1BAWMs/boa6mLMoJPRriMA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@next/swc-linux-arm64-musl@14.2.5': resolution: {integrity: sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@next/swc-linux-arm64-musl@15.0.4': + resolution: {integrity: sha512-QARO88fR/a+wg+OFC3dGytJVVviiYFEyjc/Zzkjn/HevUuJ7qGUUAUYy5PGVWY1YgTzeRYz78akQrVQ8r+sMjw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@next/swc-linux-x64-gnu@14.2.5': resolution: {integrity: sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@next/swc-linux-x64-gnu@15.0.4': + resolution: {integrity: sha512-Z50b0gvYiUU1vLzfAMiChV8Y+6u/T2mdfpXPHraqpypP7yIT2UV9YBBhcwYkxujmCvGEcRTVWOj3EP7XW/wUnw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@next/swc-linux-x64-musl@14.2.5': resolution: {integrity: sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@next/swc-linux-x64-musl@15.0.4': + resolution: {integrity: sha512-7H9C4FAsrTAbA/ENzvFWsVytqRYhaJYKa2B3fyQcv96TkOGVMcvyS6s+sj4jZlacxxTcn7ygaMXUPkEk7b78zw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@next/swc-win32-arm64-msvc@14.2.5': resolution: {integrity: sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] + '@next/swc-win32-arm64-msvc@15.0.4': + resolution: {integrity: sha512-Z/v3WV5xRaeWlgJzN9r4PydWD8sXV35ywc28W63i37G2jnUgScA4OOgS8hQdiXLxE3gqfSuHTicUhr7931OXPQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + '@next/swc-win32-ia32-msvc@14.2.5': resolution: {integrity: sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg==} engines: {node: '>= 10'} @@ -1719,6 +1875,12 @@ packages: cpu: [x64] os: [win32] + '@next/swc-win32-x64-msvc@15.0.4': + resolution: {integrity: sha512-NGLchGruagh8lQpDr98bHLyWJXOBSmkEAfK980OiNBa7vNm6PsNoPvzTfstT78WyOeMRQphEQ455rggd7Eo+Dw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@noble/ciphers@1.0.0': resolution: {integrity: sha512-wH5EHOmLi0rEazphPbecAzmjd12I6/Yv/SiHdkA9LSycsQk7RuuTp7am5/o62qYr0RScE7Pc9icXGBbsr6cesA==} engines: {node: ^14.21.3 || >=16} @@ -2376,17 +2538,17 @@ packages: '@radix-ui/rect@1.1.0': resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} - '@react-three/fiber@8.17.10': - resolution: {integrity: sha512-S6bqa4DqUooEkInYv/W+Jklv2zjSYCXAhm6qKpAQyOXhTEt5gBXnA7W6aoJ0bjmp9pAeaSj/AZUoz1HCSof/uA==} + '@react-three/fiber@9.0.0-alpha.8': + resolution: {integrity: sha512-fgDsiHKfnrLT3Vl7n6hQlQbPnNOEXncIp7NgDCrEuqHs/9p3UkYm2sXwPSHDz/cJn2N8m8o0128T34w5cAwjCQ==} peerDependencies: expo: '>=43.0' expo-asset: '>=8.4' expo-file-system: '>=11.0' expo-gl: '>=11.0' - react: '>=18.0' - react-dom: '>=18.0' - react-native: '>=0.64' - three: '>=0.133' + react: '>=19.0' + react-dom: '>=19.0' + react-native: '>=0.69' + three: '>=0.141' peerDependenciesMeta: expo: optional: true @@ -2412,6 +2574,9 @@ packages: react: ^18 react-dom: ^18 + '@rtsao/scc@1.1.0': + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + '@rushstack/eslint-patch@1.10.3': resolution: {integrity: sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==} @@ -2802,6 +2967,9 @@ packages: '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + '@swc/helpers@0.5.13': + resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==} + '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} @@ -2903,9 +3071,6 @@ packages: '@types/conventional-commits-parser@5.0.0': resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} - '@types/debounce@1.2.4': - resolution: {integrity: sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==} - '@types/eslint@8.56.10': resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} @@ -2978,18 +3143,21 @@ packages: '@types/react-dom@18.3.0': resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} + '@types/react-dom@19.0.1': + resolution: {integrity: sha512-hljHij7MpWPKF6u5vojuyfV0YA4YURsQG7KT6SzV0Zs2BXAtgdTxG6A229Ub/xiWV4w/7JL8fi6aAyjshH4meA==} + '@types/react-is@18.3.0': resolution: {integrity: sha512-KZJpHUkAdzyKj/kUHJDc6N7KyidftICufJfOFpiG6haL/BDQNQt5i4n1XDUL/nDZAtGLHDSWRYpLzKTAKSvX6w==} - '@types/react-reconciler@0.26.7': - resolution: {integrity: sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==} - '@types/react-reconciler@0.28.8': resolution: {integrity: sha512-SN9c4kxXZonFhbX4hJrZy37yw9e7EIxcpHCxQv5JUS18wDE5ovkQKlqQEkufdJCCMfuI9BnjUJvhYeJ9x5Ra7g==} '@types/react@18.3.3': resolution: {integrity: sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==} + '@types/react@19.0.1': + resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==} + '@types/responselike@1.0.3': resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} @@ -3405,6 +3573,10 @@ packages: aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} @@ -3486,6 +3658,10 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axe-core@4.10.2: + resolution: {integrity: sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==} + engines: {node: '>=4'} + axe-core@4.9.1: resolution: {integrity: sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw==} engines: {node: '>=4'} @@ -3496,6 +3672,10 @@ packages: axobject-query@3.1.1: resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} @@ -3783,9 +3963,16 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + color2k@2.0.3: resolution: {integrity: sha512-zW190nQTIoXcGCaU08DvVNFTmQhUpnJfVuAKfWqUQkflXKpaDdpaYoM0iluLS9lgJNHyBF58KKA2FBEwkD7wog==} + color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + colors-named-hex@1.0.2: resolution: {integrity: sha512-k6kq1e1pUCQvSVwIaGFq2l0LrkAPQZWyeuZn1Z8nOiYSEZiKoFj4qx690h2Kd34DFl9Me0gKS6MUwAMBJj8nuA==} engines: {node: '>=14.16'} @@ -4147,6 +4334,10 @@ packages: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} @@ -4279,6 +4470,10 @@ packages: resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} engines: {node: '>= 0.4'} + es-iterator-helpers@1.2.0: + resolution: {integrity: sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==} + engines: {node: '>= 0.4'} + es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} @@ -4353,6 +4548,15 @@ packages: typescript: optional: true + eslint-config-next@15.0.4: + resolution: {integrity: sha512-97mLaAhbJKVQYXUBBrenRtEUAA6bNDPxWfaFEd6mEhKfpajP4wJrW4l7BUlHuYWxR8oQa9W014qBJpumpJQwWA==} + peerDependencies: + eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 + typescript: '>=3.3.1' + peerDependenciesMeta: + typescript: + optional: true + eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true @@ -4374,6 +4578,27 @@ packages: eslint: '*' eslint-plugin-import: '*' + eslint-module-utils@2.12.0: + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + eslint-module-utils@2.8.1: resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} @@ -4405,6 +4630,22 @@ packages: '@typescript-eslint/parser': optional: true + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + + eslint-plugin-jsx-a11y@6.10.2: + resolution: {integrity: sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 + eslint-plugin-jsx-a11y@6.9.0: resolution: {integrity: sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==} engines: {node: '>=4.0'} @@ -4417,12 +4658,24 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + eslint-plugin-react-hooks@5.1.0: + resolution: {integrity: sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + eslint-plugin-react@7.34.3: resolution: {integrity: sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint-plugin-react@7.37.2: + resolution: {integrity: sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint-plugin-tailwindcss@3.17.4: resolution: {integrity: sha512-gJAEHmCq2XFfUP/+vwEfEJ9igrPeZFg+skeMtsxquSQdxba9XRk5bn0Bp9jxG1VV9/wwPKi1g3ZjItu6MIjhNg==} engines: {node: '>=18.12.0'} @@ -4529,6 +4782,10 @@ packages: fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -5093,6 +5350,9 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -5120,6 +5380,10 @@ packages: resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==} engines: {node: '>= 0.4'} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + is-data-view@1.0.1: resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} engines: {node: '>= 0.4'} @@ -5368,6 +5632,10 @@ packages: iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + iterator.prototype@1.1.3: + resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} + engines: {node: '>= 0.4'} + its-fine@1.2.5: resolution: {integrity: sha512-fXtDA0X0t0eBYAGLVM5YsgJGsJ5jEmqZEPrGbzdf5awjv0xE7nqv3TVnvtUF060Tkes15DbDAKW/I48vsb6SyA==} peerDependencies: @@ -5898,6 +6166,27 @@ packages: sass: optional: true + next@15.0.4: + resolution: {integrity: sha512-nuy8FH6M1FG0lktGotamQDCXhh5hZ19Vo0ht1AOIQWrYJLP598TIUagKtvJrfJ5AGwB/WmDqkKaKhMpVifvGPA==} + engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 + babel-plugin-react-compiler: '*' + react: ^18.2.0 || 19.0.0-rc-66855b96-20241106 || ^19.0.0 + react-dom: ^18.2.0 || 19.0.0-rc-66855b96-20241106 || ^19.0.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + babel-plugin-react-compiler: + optional: true + sass: + optional: true + no-case@2.3.2: resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} @@ -6513,6 +6802,11 @@ packages: peerDependencies: react: ^18.3.1 + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + peerDependencies: + react: ^19.0.0 + react-fast-compare@3.2.2: resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==} @@ -6558,11 +6852,11 @@ packages: react-lifecycles-compat@3.0.4: resolution: {integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==} - react-reconciler@0.27.0: - resolution: {integrity: sha512-HmMDKciQjYmBRGuuhIaKA1ba/7a+UsM5FzOZsMO2JYHt9Jh8reCb7j1eDC95NOyUlKM9KRyvdx0flBuDvYSBoA==} + react-reconciler@0.31.0-rc-935180c7e0-20240524: + resolution: {integrity: sha512-qM2ilapJ/g050GdXEzy3SzbkGhw7Odda6Js6w/3sVBYcdbFYyfsJp5b/Y/o6v7hISAa2e1HNQ7sus/p4u8XD0Q==} engines: {node: '>=0.10.0'} peerDependencies: - react: ^18.0.0 + react: 19.0.0-rc-935180c7e0-20240524 react-refractor@2.2.0: resolution: {integrity: sha512-UvWkBVqH/2b9nkkkt4UNFtU3aY1orQfd4plPjx5rxbefy6vGajNHU9n+tv8CbykFyVirr3vEBfN2JTxyK0d36g==} @@ -6628,10 +6922,20 @@ packages: '@types/react': optional: true + react-use-measure@2.1.1: + resolution: {integrity: sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==} + peerDependencies: + react: '>=16.13' + react-dom: '>=16.13' + react@18.3.1: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -6895,12 +7199,15 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.21.0: - resolution: {integrity: sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==} - scheduler@0.23.2: resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + + scheduler@0.25.0-rc-935180c7e0-20240524: + resolution: {integrity: sha512-YfkorLQDTfVArSlFsSmTFMWW2CoUtNhkveeEzfbyqi5bShsEyQxAPLBGOUoBxaXEcQSJ2bXhkz3ZSTJCO/Th8A==} + scroll-into-view-if-needed@3.1.0: resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} @@ -6928,6 +7235,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + sentence-case@2.1.1: resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} @@ -6952,6 +7264,10 @@ packages: shallowequal@1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} + sharp@0.33.5: + resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -6982,6 +7298,9 @@ packages: silver-fleece@1.1.0: resolution: {integrity: sha512-V3vShUiLRVPMu9aSWpU5kLDoU/HO7muJKE236EO663po3YxivAkMLbRg+amV/FhbIfF5bWXX5TVX+VYmRaOBFA==} + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + simple-uuid@0.0.1: resolution: {integrity: sha512-ntM3nHmSaNrSfRL1M9xhnjS5dj9897VsNu4tIzrIk5+ESXPS9SIbwu20zcK+SrMllpcXW4qR4KhX0LXggox1AQ==} @@ -7116,10 +7435,17 @@ packages: string.prototype.includes@2.0.0: resolution: {integrity: sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==} + string.prototype.includes@2.0.1: + resolution: {integrity: sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==} + engines: {node: '>= 0.4'} + string.prototype.matchall@4.0.11: resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} engines: {node: '>= 0.4'} + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + string.prototype.trim@1.2.9: resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} engines: {node: '>= 0.4'} @@ -7198,6 +7524,19 @@ packages: babel-plugin-macros: optional: true + styled-jsx@5.1.6: + resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + stylis@4.3.2: resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} @@ -7880,12 +8219,18 @@ packages: zod@3.23.8: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} - zustand@3.7.2: - resolution: {integrity: sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==} + zustand@4.5.5: + resolution: {integrity: sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q==} engines: {node: '>=12.7.0'} peerDependencies: + '@types/react': '>=16.8' + immer: '>=9.0.6' react: '>=16.8' peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true react: optional: true @@ -9004,6 +9349,11 @@ snapshots: dependencies: '@noble/ciphers': 1.0.0 + '@emnapi/runtime@1.3.1': + dependencies: + tslib: 2.6.3 + optional: true + '@emotion/is-prop-valid@0.8.8': dependencies: '@emotion/memoize': 0.7.4 @@ -9242,6 +9592,81 @@ snapshots: transitivePeerDependencies: - supports-color + '@img/sharp-darwin-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.4 + optional: true + + '@img/sharp-darwin-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.4 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.0.5': + optional: true + + '@img/sharp-libvips-linux-s390x@1.0.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + optional: true + + '@img/sharp-linux-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.4 + optional: true + + '@img/sharp-linux-arm@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.5 + optional: true + + '@img/sharp-linux-s390x@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.4 + optional: true + + '@img/sharp-linux-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + optional: true + + '@img/sharp-wasm32@0.33.5': + dependencies: + '@emnapi/runtime': 1.3.1 + optional: true + + '@img/sharp-win32-ia32@0.33.5': + optional: true + + '@img/sharp-win32-x64@0.33.5': + optional: true + '@inquirer/checkbox@4.0.0(@types/node@22.0.2)': dependencies: '@inquirer/core': 10.0.0(@types/node@22.0.2) @@ -9456,37 +9881,67 @@ snapshots: '@next/env@14.2.5': {} + '@next/env@15.0.4': {} + '@next/eslint-plugin-next@14.1.0': dependencies: glob: 10.3.10 + '@next/eslint-plugin-next@15.0.4': + dependencies: + fast-glob: 3.3.1 + '@next/swc-darwin-arm64@14.2.5': optional: true + '@next/swc-darwin-arm64@15.0.4': + optional: true + '@next/swc-darwin-x64@14.2.5': optional: true + '@next/swc-darwin-x64@15.0.4': + optional: true + '@next/swc-linux-arm64-gnu@14.2.5': optional: true + '@next/swc-linux-arm64-gnu@15.0.4': + optional: true + '@next/swc-linux-arm64-musl@14.2.5': optional: true + '@next/swc-linux-arm64-musl@15.0.4': + optional: true + '@next/swc-linux-x64-gnu@14.2.5': optional: true + '@next/swc-linux-x64-gnu@15.0.4': + optional: true + '@next/swc-linux-x64-musl@14.2.5': optional: true + '@next/swc-linux-x64-musl@15.0.4': + optional: true + '@next/swc-win32-arm64-msvc@14.2.5': optional: true + '@next/swc-win32-arm64-msvc@15.0.4': + optional: true + '@next/swc-win32-ia32-msvc@14.2.5': optional: true '@next/swc-win32-x64-msvc@14.2.5': optional: true + '@next/swc-win32-x64-msvc@15.0.4': + optional: true + '@noble/ciphers@1.0.0': {} '@noble/curves@1.6.0': @@ -10137,24 +10592,25 @@ snapshots: '@radix-ui/rect@1.1.0': {} - '@react-three/fiber@8.17.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0)': + '@react-three/fiber@9.0.0-alpha.8(@types/react@18.3.3)(immer@10.1.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0)': dependencies: '@babel/runtime': 7.24.7 - '@types/debounce': 1.2.4 - '@types/react-reconciler': 0.26.7 - '@types/webxr': 0.5.20 + '@types/react-reconciler': 0.28.8 base64-js: 1.5.1 buffer: 6.0.3 - debounce: 1.2.1 its-fine: 1.2.5(react@18.3.1) react: 18.3.1 - react-reconciler: 0.27.0(react@18.3.1) - scheduler: 0.21.0 + react-reconciler: 0.31.0-rc-935180c7e0-20240524(react@18.3.1) + react-use-measure: 2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + scheduler: 0.25.0-rc-935180c7e0-20240524 suspend-react: 0.1.3(react@18.3.1) three: 0.170.0 - zustand: 3.7.2(react@18.3.1) + zustand: 4.5.5(@types/react@18.3.3)(immer@10.1.1)(react@18.3.1) optionalDependencies: react-dom: 18.3.1(react@18.3.1) + transitivePeerDependencies: + - '@types/react' + - immer '@rexxars/react-json-inspector@8.0.1(react@18.3.1)': dependencies: @@ -10171,6 +10627,8 @@ snapshots: react-lifecycles-compat: 3.0.4 react-style-proptype: 3.2.2 + '@rtsao/scc@1.1.0': {} + '@rushstack/eslint-patch@1.10.3': {} '@sanity/asset-utils@1.3.0': {} @@ -10672,11 +11130,11 @@ snapshots: dependencies: storyblok-js-client: 6.10.1 - '@storyblok/react@3.0.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@storyblok/react@3.0.10(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@storyblok/js': 3.0.8 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) '@storyblok/region-helper@1.1.0': {} @@ -10729,6 +11187,10 @@ snapshots: '@swc/counter@0.1.3': {} + '@swc/helpers@0.5.13': + dependencies: + tslib: 2.6.3 + '@swc/helpers@0.5.5': dependencies: '@swc/counter': 0.1.3 @@ -10924,8 +11386,6 @@ snapshots: dependencies: '@types/node': 20.14.10 - '@types/debounce@1.2.4': {} - '@types/eslint@8.56.10': dependencies: '@types/estree': 1.0.5 @@ -10997,11 +11457,11 @@ snapshots: dependencies: '@types/react': 18.3.3 - '@types/react-is@18.3.0': + '@types/react-dom@19.0.1': dependencies: '@types/react': 18.3.3 - '@types/react-reconciler@0.26.7': + '@types/react-is@18.3.0': dependencies: '@types/react': 18.3.3 @@ -11014,6 +11474,10 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 + '@types/react@19.0.1': + dependencies: + csstype: 3.1.3 + '@types/responselike@1.0.3': dependencies: '@types/node': 20.14.10 @@ -11531,6 +11995,8 @@ snapshots: dependencies: deep-equal: 2.2.3 + aria-query@5.3.2: {} + array-buffer-byte-length@1.0.1: dependencies: call-bind: 1.0.7 @@ -11641,6 +12107,8 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 + axe-core@4.10.2: {} + axe-core@4.9.1: {} axios@0.27.2: @@ -11654,6 +12122,8 @@ snapshots: dependencies: deep-equal: 2.2.3 + axobject-query@4.1.0: {} + b4a@1.6.6: {} babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.7): @@ -11990,8 +12460,20 @@ snapshots: color-name@1.1.4: {} + color-string@1.9.1: + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + optional: true + color2k@2.0.3: {} + color@4.2.3: + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + optional: true + colors-named-hex@1.0.2: {} colors-named@1.0.2: {} @@ -12371,6 +12853,9 @@ snapshots: detect-indent@6.1.0: {} + detect-libc@2.0.3: + optional: true + detect-node-es@1.1.0: {} didyoumean@1.2.2: {} @@ -12563,6 +13048,24 @@ snapshots: iterator.prototype: 1.1.2 safe-array-concat: 1.1.2 + es-iterator-helpers@1.2.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-set-tostringtag: 2.0.3 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + globalthis: 1.0.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + internal-slot: 1.0.7 + iterator.prototype: 1.1.3 + safe-array-concat: 1.1.2 + es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 @@ -12700,6 +13203,25 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-config-next@15.0.4(eslint@8.57.0)(typescript@5.4.5): + dependencies: + '@next/eslint-plugin-next': 15.0.4 + '@rushstack/eslint-patch': 1.10.3 + '@typescript-eslint/eslint-plugin': 7.16.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.0) + eslint-plugin-react: 7.37.2(eslint@8.57.0) + eslint-plugin-react-hooks: 5.1.0(eslint@8.57.0) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - eslint-import-resolver-webpack + - supports-color + eslint-config-prettier@9.1.0(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -12734,6 +13256,34 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 4.3.5 + enhanced-resolve: 5.17.0 + eslint: 8.57.0 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.5 + is-core-module: 2.14.0 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 @@ -12745,6 +13295,17 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 @@ -12772,6 +13333,54 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + '@rtsao/scc': 1.1.0 + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.15.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + string.prototype.trimend: 1.0.8 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.4.5) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.0): + dependencies: + aria-query: 5.3.2 + array-includes: 3.1.8 + array.prototype.flatmap: 1.3.2 + ast-types-flow: 0.0.8 + axe-core: 4.10.2 + axobject-query: 4.1.0 + damerau-levenshtein: 1.0.8 + emoji-regex: 9.2.2 + eslint: 8.57.0 + hasown: 2.0.2 + jsx-ast-utils: 3.3.5 + language-tags: 1.0.9 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + safe-regex-test: 1.0.3 + string.prototype.includes: 2.0.1 + eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): dependencies: aria-query: 5.1.3 @@ -12796,6 +13405,10 @@ snapshots: dependencies: eslint: 8.57.0 + eslint-plugin-react-hooks@5.1.0(eslint@8.57.0): + dependencies: + eslint: 8.57.0 + eslint-plugin-react@7.34.3(eslint@8.57.0): dependencies: array-includes: 3.1.8 @@ -12818,6 +13431,28 @@ snapshots: semver: 6.3.1 string.prototype.matchall: 4.0.11 + eslint-plugin-react@7.37.2(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlast: 1.2.5 + array.prototype.flatmap: 1.3.2 + array.prototype.tosorted: 1.1.4 + doctrine: 2.1.0 + es-iterator-helpers: 1.2.0 + eslint: 8.57.0 + estraverse: 5.3.0 + hasown: 2.0.2 + jsx-ast-utils: 3.3.5 + minimatch: 3.1.2 + object.entries: 1.1.8 + object.fromentries: 2.0.8 + object.values: 1.2.0 + prop-types: 15.8.1 + resolve: 2.0.0-next.5 + semver: 6.3.1 + string.prototype.matchall: 4.0.11 + string.prototype.repeat: 1.0.0 + eslint-plugin-tailwindcss@3.17.4(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.7.28)(@types/node@22.0.2)(typescript@5.4.5))): dependencies: fast-glob: 3.3.2 @@ -12978,6 +13613,14 @@ snapshots: fast-fifo@1.3.2: {} + fast-glob@3.3.1: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.7 + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -13628,6 +14271,9 @@ snapshots: is-arrayish@0.2.1: {} + is-arrayish@0.3.2: + optional: true + is-async-function@2.0.0: dependencies: has-tostringtag: 1.0.2 @@ -13655,6 +14301,10 @@ snapshots: dependencies: hasown: 2.0.2 + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + is-data-view@1.0.1: dependencies: is-typed-array: 1.1.13 @@ -13838,6 +14488,14 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 + iterator.prototype@1.1.3: + dependencies: + define-properties: 1.2.1 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.6 + set-function-name: 2.0.2 + its-fine@1.2.5(react@18.3.1): dependencies: '@types/react-reconciler': 0.28.8 @@ -14348,6 +15006,31 @@ snapshots: - '@babel/core' - babel-plugin-macros + next@15.0.4(@babel/core@7.24.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + '@next/env': 15.0.4 + '@swc/counter': 0.1.3 + '@swc/helpers': 0.5.13 + busboy: 1.6.0 + caniuse-lite: 1.0.30001640 + postcss: 8.4.31 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + styled-jsx: 5.1.6(@babel/core@7.24.7)(react@19.0.0) + optionalDependencies: + '@next/swc-darwin-arm64': 15.0.4 + '@next/swc-darwin-x64': 15.0.4 + '@next/swc-linux-arm64-gnu': 15.0.4 + '@next/swc-linux-arm64-musl': 15.0.4 + '@next/swc-linux-x64-gnu': 15.0.4 + '@next/swc-linux-x64-musl': 15.0.4 + '@next/swc-win32-arm64-msvc': 15.0.4 + '@next/swc-win32-x64-msvc': 15.0.4 + sharp: 0.33.5 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + no-case@2.3.2: dependencies: lower-case: 1.1.4 @@ -14948,6 +15631,11 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-dom@19.0.0(react@19.0.0): + dependencies: + react: 19.0.0 + scheduler: 0.25.0 + react-fast-compare@3.2.2: {} react-focus-lock@2.12.1(@types/react@18.3.3)(react@18.3.1): @@ -14985,11 +15673,10 @@ snapshots: react-lifecycles-compat@3.0.4: {} - react-reconciler@0.27.0(react@18.3.1): + react-reconciler@0.31.0-rc-935180c7e0-20240524(react@18.3.1): dependencies: - loose-envify: 1.4.0 react: 18.3.1 - scheduler: 0.21.0 + scheduler: 0.25.0-rc-935180c7e0-20240524 react-refractor@2.2.0(react@18.3.1): dependencies: @@ -15057,10 +15744,18 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 + react-use-measure@2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + debounce: 1.2.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react@18.3.1: dependencies: loose-envify: 1.4.0 + react@19.0.0: {} + read-cache@1.0.0: dependencies: pify: 2.3.0 @@ -15491,14 +16186,14 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.21.0: - dependencies: - loose-envify: 1.4.0 - scheduler@0.23.2: dependencies: loose-envify: 1.4.0 + scheduler@0.25.0: {} + + scheduler@0.25.0-rc-935180c7e0-20240524: {} + scroll-into-view-if-needed@3.1.0: dependencies: compute-scroll-into-view: 3.1.0 @@ -15522,6 +16217,9 @@ snapshots: semver@7.6.2: {} + semver@7.6.3: + optional: true + sentence-case@2.1.1: dependencies: no-case: 2.3.2 @@ -15553,6 +16251,33 @@ snapshots: shallowequal@1.1.0: {} + sharp@0.33.5: + dependencies: + color: 4.2.3 + detect-libc: 2.0.3 + semver: 7.6.3 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.33.5 + '@img/sharp-darwin-x64': 0.33.5 + '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-linux-arm': 0.33.5 + '@img/sharp-linux-arm64': 0.33.5 + '@img/sharp-linux-s390x': 0.33.5 + '@img/sharp-linux-x64': 0.33.5 + '@img/sharp-linuxmusl-arm64': 0.33.5 + '@img/sharp-linuxmusl-x64': 0.33.5 + '@img/sharp-wasm32': 0.33.5 + '@img/sharp-win32-ia32': 0.33.5 + '@img/sharp-win32-x64': 0.33.5 + optional: true + shebang-command@1.2.0: dependencies: shebang-regex: 1.0.0 @@ -15578,6 +16303,11 @@ snapshots: silver-fleece@1.1.0: {} + simple-swizzle@0.2.2: + dependencies: + is-arrayish: 0.3.2 + optional: true + simple-uuid@0.0.1: {} simple-wcswidth@1.0.1: {} @@ -15679,9 +16409,9 @@ snapshots: storyblok-js-client@6.10.1: {} - storyblok-rich-text-react-renderer@2.9.2(react@18.3.1): + storyblok-rich-text-react-renderer@2.9.2(react@19.0.0): dependencies: - react: 18.3.1 + react: 19.0.0 storyblok@3.35.0: dependencies: @@ -15750,6 +16480,12 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.3 + string.prototype.includes@2.0.1: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + string.prototype.matchall@4.0.11: dependencies: call-bind: 1.0.7 @@ -15765,6 +16501,11 @@ snapshots: set-function-name: 2.0.2 side-channel: 1.0.6 + string.prototype.repeat@1.0.0: + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.3 + string.prototype.trim@1.2.9: dependencies: call-bind: 1.0.7 @@ -15843,6 +16584,13 @@ snapshots: optionalDependencies: '@babel/core': 7.24.7 + styled-jsx@5.1.6(@babel/core@7.24.7)(react@19.0.0): + dependencies: + client-only: 0.0.1 + react: 19.0.0 + optionalDependencies: + '@babel/core': 7.24.7 + stylis@4.3.2: {} sucrase@3.35.0: @@ -16584,6 +17332,10 @@ snapshots: zod@3.23.8: {} - zustand@3.7.2(react@18.3.1): + zustand@4.5.5(@types/react@18.3.3)(immer@10.1.1)(react@18.3.1): + dependencies: + use-sync-external-store: 1.2.2(react@18.3.1) optionalDependencies: + '@types/react': 18.3.3 + immer: 10.1.1 react: 18.3.1 From 55ef27f2a0bb89d35497d67f6d0e3b40dc2d5584 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Mon, 9 Dec 2024 09:33:49 +0100 Subject: [PATCH 02/20] fix type --- .../ui/components/sections/carousel/index.tsx | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/ui/components/sections/carousel/index.tsx b/packages/ui/components/sections/carousel/index.tsx index 9acacc5..e047a2c 100644 --- a/packages/ui/components/sections/carousel/index.tsx +++ b/packages/ui/components/sections/carousel/index.tsx @@ -103,20 +103,22 @@ export function Carousel({ /> ({ - children: (({ - isNext, - isActive, - }: { - isNext: boolean; - isActive: boolean; - }) => ( - - )) as unknown as React.ReactNode, - }))} + slides={ + slides.map((slide) => ({ + children: (({ + isNext, + isActive, + }: { + isNext: boolean; + isActive: boolean; + }) => ( + + )) as unknown as React.ReactNode, + })) as any + } customModules={[ Navigation, ...(customModules || []), From 1da5f202a895392834946cca238c3ea0d9b8b175 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 11:37:47 +0100 Subject: [PATCH 03/20] feat: add conditional reading of search params, remove route "dynamic" config option --- apps/storyblok/src/app/[[...slug]]/page.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 0c018e1..46118a2 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -11,10 +11,7 @@ import { import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; -if (isPreview) { -} export const fetchCache = "default-cache"; -export const dynamic = "force-static"; type Props = { params: Promise<{ slug?: string[] }>; @@ -27,7 +24,7 @@ export async function generateMetadata(props: Props): Promise { } export async function generateStaticParams() { - // if (isPreview) return []; + if (isPreview) return []; const pages = await fetchAllPages(); @@ -43,9 +40,13 @@ export async function generateStaticParams() { } export default async function Home(props: Props) { - const searchParams = await props.searchParams; const params = await props.params; - const isDraftModeEnabled = await checkDraftModeToken(searchParams); + let isDraftModeEnabled = false; + + if (isPreview) { + const searchParams = await props.searchParams; + isDraftModeEnabled = await checkDraftModeToken(searchParams); + } const { story, links } = await fetchStoryBySlug( isDraftModeEnabled, From c8130d52f1454a0e109cb39714bc490e335af0ca Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 11:39:12 +0100 Subject: [PATCH 04/20] bump next --- apps/storyblok/package.json | 2 +- pnpm-lock.yaml | 120 +++++++++++++++++++----------------- 2 files changed, 63 insertions(+), 59 deletions(-) diff --git a/apps/storyblok/package.json b/apps/storyblok/package.json index fe16b36..249de95 100644 --- a/apps/storyblok/package.json +++ b/apps/storyblok/package.json @@ -16,7 +16,7 @@ "dependencies": { "@shared/ui": "workspace:*", "@storyblok/react": "^3.0.10", - "next": "15.0.4", + "next": "15.1.0", "react": "19.0.0", "react-dom": "19.0.0", "storyblok-rich-text-react-renderer": "^2.9.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31d3a7f..d0fd5f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,8 +145,8 @@ importers: specifier: ^3.0.10 version: 3.0.10(react-dom@19.0.0(react@19.0.0))(react@19.0.0) next: - specifier: 15.0.4 - version: 15.0.4(@babel/core@7.24.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + specifier: 15.1.0 + version: 15.1.0(@babel/core@7.24.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: specifier: 19.0.0 version: 19.0.0 @@ -1770,8 +1770,8 @@ packages: '@next/env@14.2.5': resolution: {integrity: sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==} - '@next/env@15.0.4': - resolution: {integrity: sha512-WNRvtgnRVDD4oM8gbUcRc27IAhaL4eXQ/2ovGbgLnPGUvdyDr8UdXP4Q/IBDdAdojnD2eScryIDirv0YUCjUVw==} + '@next/env@15.1.0': + resolution: {integrity: sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==} '@next/eslint-plugin-next@14.1.0': resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==} @@ -1785,8 +1785,8 @@ packages: cpu: [arm64] os: [darwin] - '@next/swc-darwin-arm64@15.0.4': - resolution: {integrity: sha512-QecQXPD0yRHxSXWL5Ff80nD+A56sUXZG9koUsjWJwA2Z0ZgVQfuy7gd0/otjxoOovPVHR2eVEvPMHbtZP+pf9w==} + '@next/swc-darwin-arm64@15.1.0': + resolution: {integrity: sha512-ZU8d7xxpX14uIaFC3nsr4L++5ZS/AkWDm1PzPO6gD9xWhFkOj2hzSbSIxoncsnlJXB1CbLOfGVN4Zk9tg83PUw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1797,8 +1797,8 @@ packages: cpu: [x64] os: [darwin] - '@next/swc-darwin-x64@15.0.4': - resolution: {integrity: sha512-pb7Bye3y1Og3PlCtnz2oO4z+/b3pH2/HSYkLbL0hbVuTGil7fPen8/3pyyLjdiTLcFJ+ymeU3bck5hd4IPFFCA==} + '@next/swc-darwin-x64@15.1.0': + resolution: {integrity: sha512-DQ3RiUoW2XC9FcSM4ffpfndq1EsLV0fj0/UY33i7eklW5akPUCo6OX2qkcLXZ3jyPdo4sf2flwAED3AAq3Om2Q==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1809,8 +1809,8 @@ packages: cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-gnu@15.0.4': - resolution: {integrity: sha512-12oSaBFjGpB227VHzoXF3gJoK2SlVGmFJMaBJSu5rbpaoT5OjP5OuCLuR9/jnyBF1BAWMs/boa6mLMoJPRriMA==} + '@next/swc-linux-arm64-gnu@15.1.0': + resolution: {integrity: sha512-M+vhTovRS2F//LMx9KtxbkWk627l5Q7AqXWWWrfIzNIaUFiz2/NkOFkxCFyNyGACi5YbA8aekzCLtbDyfF/v5Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1821,8 +1821,8 @@ packages: cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@15.0.4': - resolution: {integrity: sha512-QARO88fR/a+wg+OFC3dGytJVVviiYFEyjc/Zzkjn/HevUuJ7qGUUAUYy5PGVWY1YgTzeRYz78akQrVQ8r+sMjw==} + '@next/swc-linux-arm64-musl@15.1.0': + resolution: {integrity: sha512-Qn6vOuwaTCx3pNwygpSGtdIu0TfS1KiaYLYXLH5zq1scoTXdwYfdZtwvJTpB1WrLgiQE2Ne2kt8MZok3HlFqmg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1833,8 +1833,8 @@ packages: cpu: [x64] os: [linux] - '@next/swc-linux-x64-gnu@15.0.4': - resolution: {integrity: sha512-Z50b0gvYiUU1vLzfAMiChV8Y+6u/T2mdfpXPHraqpypP7yIT2UV9YBBhcwYkxujmCvGEcRTVWOj3EP7XW/wUnw==} + '@next/swc-linux-x64-gnu@15.1.0': + resolution: {integrity: sha512-yeNh9ofMqzOZ5yTOk+2rwncBzucc6a1lyqtg8xZv0rH5znyjxHOWsoUtSq4cUTeeBIiXXX51QOOe+VoCjdXJRw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1845,8 +1845,8 @@ packages: cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@15.0.4': - resolution: {integrity: sha512-7H9C4FAsrTAbA/ENzvFWsVytqRYhaJYKa2B3fyQcv96TkOGVMcvyS6s+sj4jZlacxxTcn7ygaMXUPkEk7b78zw==} + '@next/swc-linux-x64-musl@15.1.0': + resolution: {integrity: sha512-t9IfNkHQs/uKgPoyEtU912MG6a1j7Had37cSUyLTKx9MnUpjj+ZDKw9OyqTI9OwIIv0wmkr1pkZy+3T5pxhJPg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1857,8 +1857,8 @@ packages: cpu: [arm64] os: [win32] - '@next/swc-win32-arm64-msvc@15.0.4': - resolution: {integrity: sha512-Z/v3WV5xRaeWlgJzN9r4PydWD8sXV35ywc28W63i37G2jnUgScA4OOgS8hQdiXLxE3gqfSuHTicUhr7931OXPQ==} + '@next/swc-win32-arm64-msvc@15.1.0': + resolution: {integrity: sha512-WEAoHyG14t5sTavZa1c6BnOIEukll9iqFRTavqRVPfYmfegOAd5MaZfXgOGG6kGo1RduyGdTHD4+YZQSdsNZXg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1875,8 +1875,8 @@ packages: cpu: [x64] os: [win32] - '@next/swc-win32-x64-msvc@15.0.4': - resolution: {integrity: sha512-NGLchGruagh8lQpDr98bHLyWJXOBSmkEAfK980OiNBa7vNm6PsNoPvzTfstT78WyOeMRQphEQ455rggd7Eo+Dw==} + '@next/swc-win32-x64-msvc@15.1.0': + resolution: {integrity: sha512-J1YdKuJv9xcixzXR24Dv+4SaDKc2jj31IVUEMdO5xJivMTXuE6MAdIi4qPjSymHuFG8O5wbfWKnhJUcHHpj5CA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2967,8 +2967,8 @@ packages: '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - '@swc/helpers@0.5.13': - resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==} + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} @@ -6166,16 +6166,16 @@ packages: sass: optional: true - next@15.0.4: - resolution: {integrity: sha512-nuy8FH6M1FG0lktGotamQDCXhh5hZ19Vo0ht1AOIQWrYJLP598TIUagKtvJrfJ5AGwB/WmDqkKaKhMpVifvGPA==} + next@15.1.0: + resolution: {integrity: sha512-QKhzt6Y8rgLNlj30izdMbxAwjHMFANnLwDwZ+WQh5sMhyt4lEBqDK9QpvWHtIM4rINKPoJ8aiRZKg5ULSybVHw==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 '@playwright/test': ^1.41.2 babel-plugin-react-compiler: '*' - react: ^18.2.0 || 19.0.0-rc-66855b96-20241106 || ^19.0.0 - react-dom: ^18.2.0 || 19.0.0-rc-66855b96-20241106 || ^19.0.0 + react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': @@ -7733,6 +7733,9 @@ packages: tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} @@ -9228,7 +9231,7 @@ snapshots: '@commitlint/is-ignored@19.2.2': dependencies: '@commitlint/types': 19.0.3 - semver: 7.6.2 + semver: 7.6.3 '@commitlint/lint@19.2.2': dependencies: @@ -9881,7 +9884,7 @@ snapshots: '@next/env@14.2.5': {} - '@next/env@15.0.4': {} + '@next/env@15.1.0': {} '@next/eslint-plugin-next@14.1.0': dependencies: @@ -9894,43 +9897,43 @@ snapshots: '@next/swc-darwin-arm64@14.2.5': optional: true - '@next/swc-darwin-arm64@15.0.4': + '@next/swc-darwin-arm64@15.1.0': optional: true '@next/swc-darwin-x64@14.2.5': optional: true - '@next/swc-darwin-x64@15.0.4': + '@next/swc-darwin-x64@15.1.0': optional: true '@next/swc-linux-arm64-gnu@14.2.5': optional: true - '@next/swc-linux-arm64-gnu@15.0.4': + '@next/swc-linux-arm64-gnu@15.1.0': optional: true '@next/swc-linux-arm64-musl@14.2.5': optional: true - '@next/swc-linux-arm64-musl@15.0.4': + '@next/swc-linux-arm64-musl@15.1.0': optional: true '@next/swc-linux-x64-gnu@14.2.5': optional: true - '@next/swc-linux-x64-gnu@15.0.4': + '@next/swc-linux-x64-gnu@15.1.0': optional: true '@next/swc-linux-x64-musl@14.2.5': optional: true - '@next/swc-linux-x64-musl@15.0.4': + '@next/swc-linux-x64-musl@15.1.0': optional: true '@next/swc-win32-arm64-msvc@14.2.5': optional: true - '@next/swc-win32-arm64-msvc@15.0.4': + '@next/swc-win32-arm64-msvc@15.1.0': optional: true '@next/swc-win32-ia32-msvc@14.2.5': @@ -9939,7 +9942,7 @@ snapshots: '@next/swc-win32-x64-msvc@14.2.5': optional: true - '@next/swc-win32-x64-msvc@15.0.4': + '@next/swc-win32-x64-msvc@15.1.0': optional: true '@noble/ciphers@1.0.0': {} @@ -10664,7 +10667,7 @@ snapshots: node-machine-id: 1.1.12 pkg-dir: 5.0.0 prettier: 3.3.2 - semver: 7.6.2 + semver: 7.6.3 silver-fleece: 1.1.0 validate-npm-package-name: 3.0.0 transitivePeerDependencies: @@ -11187,9 +11190,9 @@ snapshots: '@swc/counter@0.1.3': {} - '@swc/helpers@0.5.13': + '@swc/helpers@0.5.15': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@swc/helpers@0.5.5': dependencies: @@ -11597,7 +11600,7 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.2 + semver: 7.6.3 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -11612,7 +11615,7 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.2 + semver: 7.6.3 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -13193,7 +13196,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.34.3(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -13245,7 +13248,7 @@ snapshots: enhanced-resolve: 5.17.0 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.14.0 @@ -13306,7 +13309,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -15006,11 +15009,11 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@15.0.4(@babel/core@7.24.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + next@15.1.0(@babel/core@7.24.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - '@next/env': 15.0.4 + '@next/env': 15.1.0 '@swc/counter': 0.1.3 - '@swc/helpers': 0.5.13 + '@swc/helpers': 0.5.15 busboy: 1.6.0 caniuse-lite: 1.0.30001640 postcss: 8.4.31 @@ -15018,14 +15021,14 @@ snapshots: react-dom: 19.0.0(react@19.0.0) styled-jsx: 5.1.6(@babel/core@7.24.7)(react@19.0.0) optionalDependencies: - '@next/swc-darwin-arm64': 15.0.4 - '@next/swc-darwin-x64': 15.0.4 - '@next/swc-linux-arm64-gnu': 15.0.4 - '@next/swc-linux-arm64-musl': 15.0.4 - '@next/swc-linux-x64-gnu': 15.0.4 - '@next/swc-linux-x64-musl': 15.0.4 - '@next/swc-win32-arm64-msvc': 15.0.4 - '@next/swc-win32-x64-msvc': 15.0.4 + '@next/swc-darwin-arm64': 15.1.0 + '@next/swc-darwin-x64': 15.1.0 + '@next/swc-linux-arm64-gnu': 15.1.0 + '@next/swc-linux-arm64-musl': 15.1.0 + '@next/swc-linux-x64-gnu': 15.1.0 + '@next/swc-linux-x64-musl': 15.1.0 + '@next/swc-win32-arm64-msvc': 15.1.0 + '@next/swc-win32-x64-msvc': 15.1.0 sharp: 0.33.5 transitivePeerDependencies: - '@babel/core' @@ -15069,7 +15072,7 @@ snapshots: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.14.0 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} @@ -16217,8 +16220,7 @@ snapshots: semver@7.6.2: {} - semver@7.6.3: - optional: true + semver@7.6.3: {} sentence-case@2.1.1: dependencies: @@ -16882,6 +16884,8 @@ snapshots: tslib@2.6.3: {} + tslib@2.8.1: {} + tunnel-agent@0.6.0: dependencies: safe-buffer: 5.2.1 From 04c1dfa037f9f5628922cd62a0f5fcaadf880d76 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 12:08:43 +0100 Subject: [PATCH 05/20] add auto --- apps/storyblok/src/app/[[...slug]]/page.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 46118a2..96ba0dd 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -12,6 +12,7 @@ import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; export const fetchCache = "default-cache"; +export const dynamic = "auto"; type Props = { params: Promise<{ slug?: string[] }>; From 0260a514f101217b398b3f0371246f935c27a452 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 12:23:11 +0100 Subject: [PATCH 06/20] add await connection and logs --- apps/storyblok/src/app/[[...slug]]/page.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 96ba0dd..2c72047 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -1,5 +1,6 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; +import { connection } from "next/server"; import { StoryblokStory } from "@storyblok/react/rsc"; import { @@ -12,7 +13,6 @@ import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; export const fetchCache = "default-cache"; -export const dynamic = "auto"; type Props = { params: Promise<{ slug?: string[] }>; @@ -21,6 +21,7 @@ type Props = { export async function generateMetadata(props: Props): Promise { const params = await props.params; + return await getMetaData(params.slug); } @@ -44,7 +45,16 @@ export default async function Home(props: Props) { const params = await props.params; let isDraftModeEnabled = false; + console.log("isPreview: ", isPreview); + + console.log( + "reading search params, therefore should opt in dynamic rendering", + ); if (isPreview) { + await connection(); + + console.log("is preview condition triggered"); + const searchParams = await props.searchParams; isDraftModeEnabled = await checkDraftModeToken(searchParams); } @@ -57,6 +67,8 @@ export default async function Home(props: Props) { }, ); + console.log("story: ", story); + if (!story) { notFound(); } From 215be59bdd699dae7a5bf94f7bdf9b00fc81179b Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 12:30:56 +0100 Subject: [PATCH 07/20] add dynamicParamd --- apps/storyblok/src/app/[[...slug]]/page.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 2c72047..bfa676e 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -13,6 +13,7 @@ import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; export const fetchCache = "default-cache"; +export const dynamicParams = true; type Props = { params: Promise<{ slug?: string[] }>; From ebcb7634ba3366c064ec9ac907809c87755c741b Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 13:37:26 +0100 Subject: [PATCH 08/20] update preview mode for storyblok --- apps/storyblok/src/app/[[...slug]]/page.tsx | 29 +++++-------------- .../app/api/{checkToken => draft}/route.ts | 17 +++++++---- 2 files changed, 19 insertions(+), 27 deletions(-) rename apps/storyblok/src/app/api/{checkToken => draft}/route.ts (55%) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index bfa676e..2b34f22 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -1,10 +1,10 @@ import type { Metadata } from "next"; +import { draftMode } from "next/headers"; import { notFound } from "next/navigation"; -import { connection } from "next/server"; import { StoryblokStory } from "@storyblok/react/rsc"; import { - checkDraftModeToken, + checkDraftMode, fetchAllPages, fetchStoryBySlug, getMetaData, @@ -13,7 +13,6 @@ import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; export const fetchCache = "default-cache"; -export const dynamicParams = true; type Props = { params: Promise<{ slug?: string[] }>; @@ -44,31 +43,17 @@ export async function generateStaticParams() { export default async function Home(props: Props) { const params = await props.params; - let isDraftModeEnabled = false; + const { isEnabled } = await draftMode(); console.log("isPreview: ", isPreview); - console.log( - "reading search params, therefore should opt in dynamic rendering", - ); if (isPreview) { - await connection(); - - console.log("is preview condition triggered"); - - const searchParams = await props.searchParams; - isDraftModeEnabled = await checkDraftModeToken(searchParams); + await checkDraftMode(await props.searchParams, params.slug); } - const { story, links } = await fetchStoryBySlug( - isDraftModeEnabled, - params.slug, - { - resolve_relations: "header,footer", - }, - ); - - console.log("story: ", story); + const { story, links } = await fetchStoryBySlug(isEnabled, params.slug, { + resolve_relations: "header,footer", + }); if (!story) { notFound(); diff --git a/apps/storyblok/src/app/api/checkToken/route.ts b/apps/storyblok/src/app/api/draft/route.ts similarity index 55% rename from apps/storyblok/src/app/api/checkToken/route.ts rename to apps/storyblok/src/app/api/draft/route.ts index 3eaaf84..d11264f 100644 --- a/apps/storyblok/src/app/api/checkToken/route.ts +++ b/apps/storyblok/src/app/api/draft/route.ts @@ -1,11 +1,13 @@ import crypto from "crypto"; +import { draftMode } from "next/headers"; +import { redirect } from "next/navigation"; export async function GET(request: Request) { - // Parse query string parameters - const { searchParams } = new URL(`http://localhost:3000/${request.url}`); + const { searchParams, origin } = new URL(request.url); const space_id = searchParams.get("space_id"); const timestamp = searchParams.get("timestamp"); const token = searchParams.get("token"); + const slug = searchParams.get("slug"); const validationString = space_id + ":" + process.env.SB_PREVIEW_TOKEN + ":" + timestamp; @@ -19,9 +21,14 @@ export async function GET(request: Request) { token == validationToken && Number(timestamp) > Math.floor(Date.now() / 1000) - 3600 ) { - // you're in the edit mode. - return Response.json({ result: true }); + (await draftMode()).enable(); + + console.log("🔥 draft mode enabled"); + + redirect(`${origin}/${slug}`); } - return Response.json({ result: false }); + console.log("❌ draft mode is NOT enabled, invalid token"); + + return new Response("Draft mode is NOT enabled, invalid token"); } From b5dcb37f9eeaf7c6bf5bbe9881cac2132fda3b38 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 13:49:00 +0100 Subject: [PATCH 09/20] update draft mode logic --- apps/storyblok/src/app/[[...slug]]/page.tsx | 1 + apps/storyblok/src/components/Page/index.tsx | 29 +++++++++++------- apps/storyblok/src/lib/api.ts | 31 ++++++++------------ 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 2b34f22..3e36e84 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -45,6 +45,7 @@ export default async function Home(props: Props) { const params = await props.params; const { isEnabled } = await draftMode(); + console.log("is draft mode enabled: ", isEnabled); console.log("isPreview: ", isPreview); if (isPreview) { diff --git a/apps/storyblok/src/components/Page/index.tsx b/apps/storyblok/src/components/Page/index.tsx index e4658aa..871efad 100644 --- a/apps/storyblok/src/components/Page/index.tsx +++ b/apps/storyblok/src/components/Page/index.tsx @@ -1,31 +1,38 @@ -import { StoryblokComponent, StoryblokStory } from "@storyblok/react/rsc"; +import { + StoryblokComponent, + // StoryblokStory +} from "@storyblok/react/rsc"; import { cn, CookieBanner } from "@shared/ui"; -import { useDataContext } from "../DataContext"; +// import { useDataContext } from "../DataContext"; import type { IPageContainerProps } from "./types"; -import { getHeaderAndFooterStories } from "./utils"; + +// import { getHeaderAndFooterStories } from "./utils"; export default function PageContainer({ blok }: IPageContainerProps) { - const { headersAndFooters } = useDataContext(); + // const { headersAndFooters } = useDataContext(); const { sections, showCookieBanner, theme } = blok; if (!sections) return null; - const { header, footer } = getHeaderAndFooterStories( - headersAndFooters, - blok.header, - blok.footer, - ); + // const { header, footer } = getHeaderAndFooterStories( + // headersAndFooters, + // blok.header, + // blok.footer, + // ); + + // console.log("header", header); + // console.log("footer", footer); return (
- + {/* */} {sections.map((s) => ( ))} - + {/* */} {showCookieBanner && }
); diff --git a/apps/storyblok/src/lib/api.ts b/apps/storyblok/src/lib/api.ts index b447c26..a443ae5 100644 --- a/apps/storyblok/src/lib/api.ts +++ b/apps/storyblok/src/lib/api.ts @@ -70,7 +70,7 @@ export async function fetchStoryBySlug( ); const { story, links, rels } = await fetch( - `${API_GATE}/stories/${slug?.join("/") || ""}?${searchParams.toString()}`, + `${API_GATE}/stories/${slug.join("/")}?${searchParams.toString()}`, ).then((res) => res.json()); // REST storyblok API doesnt resolve relations in the response, only uuid @@ -168,23 +168,18 @@ export async function fetchStoriesByParams( } } -// Check if the draft mode token is valid -export async function checkDraftModeToken(searchParams: { - [key: string]: string | string[] | undefined; -}) { - if (isDevMode) return true; - - let isDraftModeEnabled = process.env.NEXT_PUBLIC_IS_PREVIEW === "true"; - - if (isDraftModeEnabled && process.env.NODE_ENV !== "development") { - isDraftModeEnabled = await fetch( - `${process.env.NEXT_PUBLIC_DOMAIN}/api/checkToken?space_id=${searchParams?.["_storyblok_tk[space_id]"]}×tamp=${searchParams?.["_storyblok_tk[timestamp]"]}&token=${searchParams?.["_storyblok_tk[token]"]}`, - ) - .then((res) => res.json()) - .then((res) => res.result); - } - - return isDraftModeEnabled; +export async function checkDraftMode( + searchParams: { + [key: string]: string | string[] | undefined; + }, + slug: string[] = ["home"], +) { + await fetch( + `${process.env.NEXT_PUBLIC_DOMAIN}/api/draft?space_id=${searchParams?.["_storyblok_tk[space_id]"]}×tamp=${searchParams?.["_storyblok_tk[timestamp]"]}&token=${searchParams?.["_storyblok_tk[token]"]}&slug=${slug}`, + { + cache: "no-store", + }, + ); } export async function getMetaData(slug?: string[]): Promise { From 4d07c6e8d642c3ae7156580d7d650eed3670e5e2 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 13:57:14 +0100 Subject: [PATCH 10/20] generate pages for preview --- apps/storyblok/src/app/[[...slug]]/page.tsx | 2 -- apps/storyblok/src/lib/api.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 7a4a667..69d8c93 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -26,8 +26,6 @@ export async function generateMetadata(props: Props): Promise { } export async function generateStaticParams() { - if (isPreview) return []; - const pages = await fetchAllPages(); const paths = pages diff --git a/apps/storyblok/src/lib/api.ts b/apps/storyblok/src/lib/api.ts index 40b6121..655455c 100644 --- a/apps/storyblok/src/lib/api.ts +++ b/apps/storyblok/src/lib/api.ts @@ -73,8 +73,6 @@ export async function fetchStoryBySlug( `${API_GATE}/stories/${slug?.join("/") || ""}?${searchParams.toString()}`, ).then((res) => res.json()); - console.log("links length: ", links.length); - return { story, links, From 723f071123c08fa8fd5337a1c7f784d30ec79f69 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 13:58:25 +0100 Subject: [PATCH 11/20] add more params --- apps/storyblok/src/app/[[...slug]]/page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 69d8c93..590b4ad 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -13,6 +13,8 @@ import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; export const fetchCache = "default-cache"; +export const dynamicParams = true; +export const dynamic = "force-static"; type Props = { params: Promise<{ slug?: string[] }>; From 4cbe7ce6f7858e0c989d6100b649d9b3d3f42bc9 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 14:26:49 +0100 Subject: [PATCH 12/20] wip --- apps/storyblok/src/app/[[...slug]]/page.tsx | 12 +++++----- apps/storyblok/src/app/api/draft/route.ts | 25 +++++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 590b4ad..5df3152 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -4,7 +4,7 @@ import { notFound } from "next/navigation"; import { StoryblokStory } from "@storyblok/react/rsc"; import { - checkDraftMode, + // checkDraftMode, fetchAllPages, fetchStoryBySlug, getMetaData, @@ -13,8 +13,8 @@ import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; export const fetchCache = "default-cache"; -export const dynamicParams = true; -export const dynamic = "force-static"; +// export const dynamicParams = true; +// export const dynamic = "force-static"; type Props = { params: Promise<{ slug?: string[] }>; @@ -48,9 +48,9 @@ export default async function Home(props: Props) { console.log("is draft mode enabled: ", isEnabled); console.log("isPreview: ", isPreview); - if (isPreview) { - await checkDraftMode(await props.searchParams, params.slug); - } + // if (isPreview) { + // await checkDraftMode(await props.searchParams, params.slug); + // } const { story, links } = await fetchStoryBySlug(isEnabled, params.slug); diff --git a/apps/storyblok/src/app/api/draft/route.ts b/apps/storyblok/src/app/api/draft/route.ts index d11264f..cfd8fb3 100644 --- a/apps/storyblok/src/app/api/draft/route.ts +++ b/apps/storyblok/src/app/api/draft/route.ts @@ -1,25 +1,26 @@ -import crypto from "crypto"; +// import crypto from "crypto"; import { draftMode } from "next/headers"; import { redirect } from "next/navigation"; export async function GET(request: Request) { const { searchParams, origin } = new URL(request.url); - const space_id = searchParams.get("space_id"); - const timestamp = searchParams.get("timestamp"); - const token = searchParams.get("token"); + // const space_id = searchParams.get("space_id"); + // const timestamp = searchParams.get("timestamp"); + // const token = searchParams.get("token"); const slug = searchParams.get("slug"); - const validationString = - space_id + ":" + process.env.SB_PREVIEW_TOKEN + ":" + timestamp; + // const validationString = + // space_id + ":" + process.env.SB_PREVIEW_TOKEN + ":" + timestamp; - const validationToken = crypto - .createHash("sha1") - .update(validationString) - .digest("hex"); + // const validationToken = crypto + // .createHash("sha1") + // .update(validationString) + // .digest("hex"); if ( - token == validationToken && - Number(timestamp) > Math.floor(Date.now() / 1000) - 3600 + true + // token == validationToken && + // Number(timestamp) > Math.floor(Date.now() / 1000) - 3600 ) { (await draftMode()).enable(); From 51a789c94f1972765d72cc99ab43eaefbc5da366 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 14:34:45 +0100 Subject: [PATCH 13/20] wip --- apps/storyblok/src/app/[[...slug]]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 5df3152..feb4e13 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -12,7 +12,7 @@ import { import { isPreview } from "@/lib/utils"; import CoreLayout from "@/components/CoreLayout"; -export const fetchCache = "default-cache"; +// export const fetchCache = "default-cache"; // export const dynamicParams = true; // export const dynamic = "force-static"; From 2f31c5e3fb3fe787b45d3d3809d175d93e4046a7 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 14:48:01 +0100 Subject: [PATCH 14/20] wip --- apps/storyblok/src/app/[[...slug]]/page.tsx | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index feb4e13..d396f39 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -5,7 +5,7 @@ import { StoryblokStory } from "@storyblok/react/rsc"; import { // checkDraftMode, - fetchAllPages, + // fetchAllPages, fetchStoryBySlug, getMetaData, } from "@/lib/api"; @@ -27,19 +27,19 @@ export async function generateMetadata(props: Props): Promise { return await getMetaData(params.slug); } -export async function generateStaticParams() { - const pages = await fetchAllPages(); +// export async function generateStaticParams() { +// const pages = await fetchAllPages(); - const paths = pages - .filter((page) => page.is_folder === false) - .map((page) => { - return { - slug: page.slug.split("/"), - }; - }); +// const paths = pages +// .filter((page) => page.is_folder === false) +// .map((page) => { +// return { +// slug: page.slug.split("/"), +// }; +// }); - return paths; -} +// return paths; +// } export default async function Home(props: Props) { const params = await props.params; From cc7a855a79fcdf8d81d5c4f5d9afb0abbcb2b417 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 14:51:52 +0100 Subject: [PATCH 15/20] wip --- apps/storyblok/src/app/[[...slug]]/page.tsx | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index d396f39..9c6be7f 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -27,19 +27,20 @@ export async function generateMetadata(props: Props): Promise { return await getMetaData(params.slug); } -// export async function generateStaticParams() { -// const pages = await fetchAllPages(); +export async function generateStaticParams() { + return []; + // const pages = await fetchAllPages(); -// const paths = pages -// .filter((page) => page.is_folder === false) -// .map((page) => { -// return { -// slug: page.slug.split("/"), -// }; -// }); + // const paths = pages + // .filter((page) => page.is_folder === false) + // .map((page) => { + // return { + // slug: page.slug.split("/"), + // }; + // }); -// return paths; -// } + return paths; +} export default async function Home(props: Props) { const params = await props.params; From ee131f98462c5ac0a47c629a4c24dcccad508956 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 14:54:54 +0100 Subject: [PATCH 16/20] wip --- apps/storyblok/src/app/[[...slug]]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 9c6be7f..8422e2b 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -39,7 +39,7 @@ export async function generateStaticParams() { // }; // }); - return paths; + // return paths; } export default async function Home(props: Props) { From 110009ae744b52d1ee438993c7fed7ca33b964f1 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 15:58:54 +0100 Subject: [PATCH 17/20] add getStaticProps generateStaticParams --- apps/storyblok/src/app/[[...slug]]/page.tsx | 40 ++++++++++++++------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 8422e2b..395aeb0 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -5,7 +5,7 @@ import { StoryblokStory } from "@storyblok/react/rsc"; import { // checkDraftMode, - // fetchAllPages, + fetchAllPages, fetchStoryBySlug, getMetaData, } from "@/lib/api"; @@ -27,19 +27,33 @@ export async function generateMetadata(props: Props): Promise { return await getMetaData(params.slug); } +export async function getStaticProps() { + const pages = await fetchAllPages(); + + const paths = pages + .filter((page) => page.is_folder === false) + .map((page) => { + return { + slug: page.slug.split("/"), + }; + }); + + return paths; + // return []; +} + export async function generateStaticParams() { - return []; - // const pages = await fetchAllPages(); - - // const paths = pages - // .filter((page) => page.is_folder === false) - // .map((page) => { - // return { - // slug: page.slug.split("/"), - // }; - // }); - - // return paths; + const pages = await fetchAllPages(); + + const paths = pages + .filter((page) => page.is_folder === false) + .map((page) => { + return { + slug: page.slug.split("/"), + }; + }); + + return paths; } export default async function Home(props: Props) { From 364b6ec2b74ba0c8210650e4821a395f53c08e89 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 16:00:54 +0100 Subject: [PATCH 18/20] remove getStaticProps --- apps/storyblok/src/app/[[...slug]]/page.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index 395aeb0..feb4e13 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -27,21 +27,6 @@ export async function generateMetadata(props: Props): Promise { return await getMetaData(params.slug); } -export async function getStaticProps() { - const pages = await fetchAllPages(); - - const paths = pages - .filter((page) => page.is_folder === false) - .map((page) => { - return { - slug: page.slug.split("/"), - }; - }); - - return paths; - // return []; -} - export async function generateStaticParams() { const pages = await fetchAllPages(); From c38e29eade06f59d25b8a010fb5cbaba24323354 Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 16:40:29 +0100 Subject: [PATCH 19/20] add hack to enable draft mode in iframe previews --- apps/storyblok/src/app/[[...slug]]/page.tsx | 15 +------- apps/storyblok/src/app/api/draft/route.ts | 42 ++++++++++++++------- apps/storyblok/src/lib/api.ts | 14 ------- 3 files changed, 30 insertions(+), 41 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index feb4e13..e1b0054 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -3,13 +3,7 @@ import { draftMode } from "next/headers"; import { notFound } from "next/navigation"; import { StoryblokStory } from "@storyblok/react/rsc"; -import { - // checkDraftMode, - fetchAllPages, - fetchStoryBySlug, - getMetaData, -} from "@/lib/api"; -import { isPreview } from "@/lib/utils"; +import { fetchAllPages, fetchStoryBySlug, getMetaData } from "@/lib/api"; import CoreLayout from "@/components/CoreLayout"; // export const fetchCache = "default-cache"; @@ -45,12 +39,7 @@ export default async function Home(props: Props) { const params = await props.params; const { isEnabled } = await draftMode(); - console.log("is draft mode enabled: ", isEnabled); - console.log("isPreview: ", isPreview); - - // if (isPreview) { - // await checkDraftMode(await props.searchParams, params.slug); - // } + console.log("draft mode: ", isEnabled); const { story, links } = await fetchStoryBySlug(isEnabled, params.slug); diff --git a/apps/storyblok/src/app/api/draft/route.ts b/apps/storyblok/src/app/api/draft/route.ts index cfd8fb3..ef4fe8b 100644 --- a/apps/storyblok/src/app/api/draft/route.ts +++ b/apps/storyblok/src/app/api/draft/route.ts @@ -1,29 +1,43 @@ -// import crypto from "crypto"; -import { draftMode } from "next/headers"; +import crypto from "crypto"; +import { cookies, draftMode } from "next/headers"; import { redirect } from "next/navigation"; export async function GET(request: Request) { const { searchParams, origin } = new URL(request.url); - // const space_id = searchParams.get("space_id"); - // const timestamp = searchParams.get("timestamp"); - // const token = searchParams.get("token"); + const space_id = searchParams.get("_storyblok_tk[space_id]"); + const timestamp = searchParams.get("_storyblok_tk[timestamp]"); + const token = searchParams.get("_storyblok_tk[token]"); const slug = searchParams.get("slug"); - // const validationString = - // space_id + ":" + process.env.SB_PREVIEW_TOKEN + ":" + timestamp; + const validationString = + space_id + ":" + process.env.SB_PREVIEW_TOKEN + ":" + timestamp; - // const validationToken = crypto - // .createHash("sha1") - // .update(validationString) - // .digest("hex"); + const validationToken = crypto + .createHash("sha1") + .update(validationString) + .digest("hex"); if ( - true - // token == validationToken && - // Number(timestamp) > Math.floor(Date.now() / 1000) - 3600 + token == validationToken && + Number(timestamp) > Math.floor(Date.now() / 1000) - 3600 ) { (await draftMode()).enable(); + const c = await cookies(); + + const draft = c.get("__prerender_bypass"); + const draftValue = draft?.value; + if (draftValue) { + c.set({ + name: "__prerender_bypass", + value: draftValue, + httpOnly: true, + path: "/", + secure: true, + sameSite: "none", + }); + } + console.log("🔥 draft mode enabled"); redirect(`${origin}/${slug}`); diff --git a/apps/storyblok/src/lib/api.ts b/apps/storyblok/src/lib/api.ts index 655455c..0a45812 100644 --- a/apps/storyblok/src/lib/api.ts +++ b/apps/storyblok/src/lib/api.ts @@ -153,20 +153,6 @@ export async function fetchStoriesByParams( } } -export async function checkDraftMode( - searchParams: { - [key: string]: string | string[] | undefined; - }, - slug: string[] = ["home"], -) { - await fetch( - `${process.env.NEXT_PUBLIC_DOMAIN}/api/draft?space_id=${searchParams?.["_storyblok_tk[space_id]"]}×tamp=${searchParams?.["_storyblok_tk[timestamp]"]}&token=${searchParams?.["_storyblok_tk[token]"]}&slug=${slug}`, - { - cache: "no-store", - }, - ); -} - export async function getMetaData(slug?: string[]): Promise { const isDraftModeEnabled = isDraftModeEnv; From ac4e84476f81d74c97de26793da0a1ca8138c57b Mon Sep 17 00:00:00 2001 From: maksim hodasevich Date: Tue, 17 Dec 2024 16:59:42 +0100 Subject: [PATCH 20/20] try with allowed 3d prty cookies --- apps/storyblok/src/app/[[...slug]]/page.tsx | 2 ++ apps/storyblok/src/app/api/draft/route.ts | 17 +---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/apps/storyblok/src/app/[[...slug]]/page.tsx b/apps/storyblok/src/app/[[...slug]]/page.tsx index e1b0054..934fa2a 100644 --- a/apps/storyblok/src/app/[[...slug]]/page.tsx +++ b/apps/storyblok/src/app/[[...slug]]/page.tsx @@ -22,6 +22,8 @@ export async function generateMetadata(props: Props): Promise { } export async function generateStaticParams() { + return []; + const pages = await fetchAllPages(); const paths = pages diff --git a/apps/storyblok/src/app/api/draft/route.ts b/apps/storyblok/src/app/api/draft/route.ts index ef4fe8b..b09a50b 100644 --- a/apps/storyblok/src/app/api/draft/route.ts +++ b/apps/storyblok/src/app/api/draft/route.ts @@ -1,5 +1,5 @@ import crypto from "crypto"; -import { cookies, draftMode } from "next/headers"; +import { draftMode } from "next/headers"; import { redirect } from "next/navigation"; export async function GET(request: Request) { @@ -23,21 +23,6 @@ export async function GET(request: Request) { ) { (await draftMode()).enable(); - const c = await cookies(); - - const draft = c.get("__prerender_bypass"); - const draftValue = draft?.value; - if (draftValue) { - c.set({ - name: "__prerender_bypass", - value: draftValue, - httpOnly: true, - path: "/", - secure: true, - sameSite: "none", - }); - } - console.log("🔥 draft mode enabled"); redirect(`${origin}/${slug}`);