diff --git a/package-lock.json b/package-lock.json index d9d20f9a..9b50ba1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "payload": "3.85.1", "react": "^19.2.7", "react-dom": "^19.2.7", + "react-player": "^3.4.0", "sanitize-html": "^2.17.5", "sass": "^1.101.0", "sharp": "^0.35.2", @@ -2860,6 +2861,74 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/@mux/mux-data-google-ima": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@mux/mux-data-google-ima/-/mux-data-google-ima-0.3.17.tgz", + "integrity": "sha512-4wpH6dYybyZhqLn9qGn/+67Z8MZnQRAdqTFEEZw2bx61M9q01uPYYHxd8qwOnYtUGEeafsdTwVHVxKHGD3oc1A==", + "license": "MIT", + "dependencies": { + "mux-embed": "5.18.1" + } + }, + "node_modules/@mux/mux-player": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@mux/mux-player/-/mux-player-3.13.0.tgz", + "integrity": "sha512-vh4CIMahUa29gys+mlfsOFKYKAKXxE07jSWk9WZxkdpGBW1fKfCQXlNxBoAIQlPa9Uk4MZuM3HVgqdW6aTuaZg==", + "license": "MIT", + "dependencies": { + "@mux/mux-video": "0.31.0", + "@mux/playback-core": "0.35.0", + "media-chrome": "~4.19.0", + "player.style": "^0.3.0" + } + }, + "node_modules/@mux/mux-player-react": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@mux/mux-player-react/-/mux-player-react-3.13.0.tgz", + "integrity": "sha512-7IkImo1H3rUYeuWHI/L0L7sGUqBvZCvptx3+4igc+P/V3WgqNFjOyQlcyxzxgXNtNNhGmkn5NaF3TU9DPbOmAQ==", + "license": "MIT", + "dependencies": { + "@mux/mux-player": "3.13.0", + "@mux/playback-core": "0.35.0", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^17.0.0-0 || ^18 || ^18.0.0-0 || ^19 || ^19.0.0-0", + "react": "^17.0.2 || ^17.0.0-0 || ^18 || ^18.0.0-0 || ^19 || ^19.0.0-0", + "react-dom": "^17.0.2 || ^17.0.2-0 || ^18 || ^18.0.0-0 || ^19 || ^19.0.0-0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@mux/mux-video": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/@mux/mux-video/-/mux-video-0.31.0.tgz", + "integrity": "sha512-DvO2GynIJhPDc0LMuWvC144lCF+E07NI+chrg/vcRQlCf2fPdNNqCSMoaRdWu2S2v/Orsc85giT9K6GRbjbzgA==", + "license": "MIT", + "dependencies": { + "@mux/mux-data-google-ima": "^0.3.4", + "@mux/playback-core": "0.35.0", + "castable-video": "~1.1.13", + "custom-media-element": "~1.4.6", + "media-tracks": "~0.3.5" + } + }, + "node_modules/@mux/playback-core": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/@mux/playback-core/-/playback-core-0.35.0.tgz", + "integrity": "sha512-7Zi1EJ9sQNIUlQVBjJCXV0CB+rUVEsU3vNRElRV4xnD7dbpoioIAhe1SjZNBifjnK5aBKLDwQHypbnL3Cw3a5A==", + "license": "MIT", + "dependencies": { + "hls.js": "~1.6.15", + "mux-embed": "^5.16.1" + } + }, "node_modules/@mvriu5/payload-ai": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@mvriu5/payload-ai/-/payload-ai-1.3.2.tgz", @@ -5636,6 +5705,129 @@ "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "license": "MIT" }, + "node_modules/@svta/cml-608": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@svta/cml-608/-/cml-608-1.0.2.tgz", + "integrity": "sha512-ZEJ68330gcLKfvVv6Qifr1HR7+GldDUxzkjqSbqRK7jHtHSLSV1JAyDwlYe8+C7ABuY1bp8MpgJ4/Gg+jl+pLQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + } + }, + "node_modules/@svta/cml-cmcd": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@svta/cml-cmcd/-/cml-cmcd-2.3.2.tgz", + "integrity": "sha512-SKBBjLmci0WK8HMjuv+36tVIMktonoOoxsXblOFZmB+ePPV2zjRMTD+2ZmE/1VEPJkKHENyhSjSHgJyeOlvZ1A==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-structured-field-values": "1.1.3", + "@svta/cml-utils": "1.5.0" + } + }, + "node_modules/@svta/cml-cmsd": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@svta/cml-cmsd/-/cml-cmsd-1.0.6.tgz", + "integrity": "sha512-LUORV6bb0TbU4rSC2HoPqUCix1igLrXkRQXWiIyJo2OMzb14kAK/1jsW0mzY6up6w1GrjKQcjc6OwqJdo/zd/g==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-cta": "1.0.6", + "@svta/cml-structured-field-values": "1.1.3", + "@svta/cml-utils": "1.5.0" + } + }, + "node_modules/@svta/cml-cta": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@svta/cml-cta/-/cml-cta-1.0.6.tgz", + "integrity": "sha512-l13/4myTX1EbRd38nY8J1umVY5UdR/nZO6CeKqVLXnMMIayg7/fu0TueZckjTA9Loal55MGK1xbHnXVjz7OUUw==", + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-structured-field-values": "1.1.3", + "@svta/cml-utils": "1.5.0" + } + }, + "node_modules/@svta/cml-dash": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@svta/cml-dash/-/cml-dash-1.0.6.tgz", + "integrity": "sha512-4XtHYlPrzL/dRe/8XmRQoLnTo9S86tISgrl67eUqKl5MtNTpZBYTncuPrspslPZPZROBBWNrBuepYfYUtU9CKA==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-utils": "1.5.0" + } + }, + "node_modules/@svta/cml-id3": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@svta/cml-id3/-/cml-id3-1.0.6.tgz", + "integrity": "sha512-63j8gkAnPOmOBWlp0hIZPvsIioZttdbg6/TgwITqMYbSLYVJ+6QGa/UtIP0I84NsfstANw6QdCn7i8SS08kn1A==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-utils": "1.5.0" + } + }, + "node_modules/@svta/cml-request": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@svta/cml-request/-/cml-request-1.0.12.tgz", + "integrity": "sha512-4sJvnnoNpq58j2mCGP8k+MF6wVy/qa4gbt6kfT1dPIKmn3mPxw+JVfilhcWsUi+peK2yCZxOJJYyHj1cAcQE1w==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-cmcd": "2.3.2", + "@svta/cml-utils": "1.5.0", + "@svta/cml-xml": "1.1.4" + } + }, + "node_modules/@svta/cml-structured-field-values": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@svta/cml-structured-field-values/-/cml-structured-field-values-1.1.3.tgz", + "integrity": "sha512-XqLzQOTznz6kh/nsSh8dy1kV7GQjL4csG+2U5EvLGhAqNuNUczbVg5EAsDobKDVg8xhdthdXx2UuwM+ZHQCxSg==", + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-utils": "1.5.0" + } + }, + "node_modules/@svta/cml-utils": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@svta/cml-utils/-/cml-utils-1.5.0.tgz", + "integrity": "sha512-JMqclD7Akd+GSJiuaYNUHOP2wNtf/nauKeszlYeivSHfi0Lp3pmSW5PXDvJ2dO4aPmmSOQbF0ztTsW9Vcs2Whw==", + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=20" + } + }, + "node_modules/@svta/cml-xml": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@svta/cml-xml/-/cml-xml-1.1.4.tgz", + "integrity": "sha512-jbixqjiJIc16SGxylHwiOzO+DuhkGfuP+fJ9AHeVJKdFDKnabgfCDpnp6dvZpZnjMj4nHvzVtuUV7RISPIwYXw==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@svta/cml-utils": "1.5.0" + } + }, "node_modules/@swc-node/core": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@swc-node/core/-/core-1.14.1.tgz", @@ -6684,6 +6876,16 @@ "node": ">= 20" } }, + "node_modules/@vimeo/player": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/@vimeo/player/-/player-2.29.0.tgz", + "integrity": "sha512-9JjvjeqUndb9otCCFd0/+2ESsLk7VkDE6sxOBy9iy2ukezuQbplVRi+g9g59yAurKofbmTi/KcKxBGO/22zWRw==", + "license": "MIT", + "dependencies": { + "native-promise-only": "0.8.1", + "weakmap-polyfill": "2.0.4" + } + }, "node_modules/@zag-js/accordion": { "version": "1.41.1", "resolved": "https://registry.npmjs.org/@zag-js/accordion/-/accordion-1.41.1.tgz", @@ -7848,6 +8050,16 @@ "node": ">=6.0.0" } }, + "node_modules/bcp-47-match": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz", + "integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -7970,6 +8182,15 @@ ], "license": "CC-BY-4.0" }, + "node_modules/castable-video": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/castable-video/-/castable-video-1.1.16.tgz", + "integrity": "sha512-wBhe2dZu2afhewL3EaGgVYTyDsa9HvNhY98clMZkNzDrLelOValSrTaoMos9YX7PPBCrgpd1j6YmNyyI2Vbq3w==", + "license": "MIT", + "dependencies": { + "custom-media-element": "~1.4.6" + } + }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", @@ -7980,6 +8201,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ce-la-react": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ce-la-react/-/ce-la-react-0.3.2.tgz", + "integrity": "sha512-QJ6k4lOD/btI08xG8jBPxRCGXvCnusGGkTsiXk0u3NqUu/W+BXRnFD4PYjwtqh8AWmGa5LDbGk0fLQsqr0nSMA==", + "license": "BSD-3-Clause", + "peerDependencies": { + "react": ">=17.0.0" + } + }, "node_modules/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -8077,6 +8307,12 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "license": "MIT" }, + "node_modules/cloudflare-video-element": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/cloudflare-video-element/-/cloudflare-video-element-1.3.5.tgz", + "integrity": "sha512-zj9gjJa6xW8MNrfc4oKuwgGS0njRLpOlQjdifbuNxvy8k4Y3pKCyKCMG2XIsjd2iQGhgjS57b1P5VWdJlxcXBw==", + "license": "MIT" + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -8103,6 +8339,12 @@ "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, + "node_modules/codem-isoboxer": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/codem-isoboxer/-/codem-isoboxer-0.3.10.tgz", + "integrity": "sha512-eNk3TRV+xQMJ1PEj0FQGY8KD4m0GPxT487XJ+Iftm7mVa9WpPFDMWqPt+46buiP5j5Wzqe5oMIhqBcAeKfygSA==", + "license": "MIT" + }, "node_modules/codemirror": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", @@ -8231,6 +8473,48 @@ "integrity": "sha512-RFPahj0sXcmUyjrObAK+DOWtMvMIFV328n4qZJhgX3x2RqkQgOTU2mCUmiFR0CzM6AzChlRSUErjiJeEt8BaQA==", "license": "MIT" }, + "node_modules/custom-media-element": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/custom-media-element/-/custom-media-element-1.4.6.tgz", + "integrity": "sha512-/HRYqJOa1ob5ik4q7FIJVYxTJCFs/FL3+cQPAJjUf2uiqrDEzbTgB315gQ2rG8oK3w094W9m5tcB8S5Qah+caA==", + "license": "MIT" + }, + "node_modules/dash-video-element": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/dash-video-element/-/dash-video-element-0.3.2.tgz", + "integrity": "sha512-eN1IqgtTAbq4zVkbt82BDwQtybQ6WOXyQU5HbftUSnqo+SHAPbZCif1Y7uViAhgvuEPvZtbiXDiacvvTeGxc/g==", + "license": "MIT", + "dependencies": { + "custom-media-element": "^1.4.6", + "dashjs": "^5.0.3", + "media-tracks": "^0.3.5" + } + }, + "node_modules/dashjs": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dashjs/-/dashjs-5.2.0.tgz", + "integrity": "sha512-2W2KHFN53Sk7+rtdnIfSUK/3Oov+hraMTeVZwDOTSCNKM1cQtFiJdblNzRMnl59a/QDseG7JW+PC9mh/B+CMcg==", + "license": "BSD-3-Clause", + "dependencies": { + "@svta/cml-608": "1.0.2", + "@svta/cml-cmcd": "2.3.2", + "@svta/cml-cmsd": "1.0.6", + "@svta/cml-dash": "1.0.6", + "@svta/cml-id3": "1.0.6", + "@svta/cml-request": "1.0.12", + "@svta/cml-xml": "1.1.4", + "bcp-47-match": "^2.0.3", + "codem-isoboxer": "0.3.10", + "fast-deep-equal": "3.1.3", + "html-entities": "^2.6.0", + "imsc": "^1.1.5", + "localforage": "^1.10.0", + "path-browserify": "^1.0.1" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/dataloader": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.2.3.tgz", @@ -9058,6 +9342,23 @@ "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", "license": "MIT" }, + "node_modules/hls-video-element": { + "version": "1.5.11", + "resolved": "https://registry.npmjs.org/hls-video-element/-/hls-video-element-1.5.11.tgz", + "integrity": "sha512-tJJ65/52CDxj8XFyIve6zT9nVVdUIc6mqvKR25X0ycPKHk07rpjp4xxVteeCefDUBSf/tFLhlICFmn3KWj37xA==", + "license": "MIT", + "dependencies": { + "custom-media-element": "^1.4.6", + "hls.js": "^1.6.5", + "media-tracks": "^0.3.5" + } + }, + "node_modules/hls.js": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.6.16.tgz", + "integrity": "sha512-VSIRpLfRwlAAdGL4wiTucx2ScRipo0ed1FBatWkyt832jC4CReKstga6yIhYVwGu9LOBjuX9wzmRMeQdBJtzEA==", + "license": "Apache-2.0" + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -9067,6 +9368,22 @@ "react-is": "^16.7.0" } }, + "node_modules/html-entities": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, "node_modules/html-void-elements": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", @@ -9137,6 +9454,12 @@ "node": ">=16.x" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, "node_modules/immutable": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.5.tgz", @@ -9159,6 +9482,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/imsc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/imsc/-/imsc-1.1.5.tgz", + "integrity": "sha512-V8je+CGkcvGhgl2C1GlhqFFiUOIEdwXbXLiu1Fcubvvbo+g9inauqT3l0pNYXGoLPBj3jxtZz9t+wCopMkwadQ==", + "license": "BSD-2-Clause", + "dependencies": { + "sax": "1.2.1" + } + }, "node_modules/ipaddr.js": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", @@ -9499,6 +9831,15 @@ "url": "https://github.com/sponsors/dmonad" } }, + "node_modules/lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lightningcss": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", @@ -9766,6 +10107,15 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "license": "MIT" }, + "node_modules/localforage": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", + "license": "Apache-2.0", + "dependencies": { + "lie": "3.1.1" + } + }, "node_modules/lodash": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", @@ -9945,6 +10295,27 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/media-chrome": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/media-chrome/-/media-chrome-4.19.2.tgz", + "integrity": "sha512-4ai1ITN8wBhwugQcRgqe3tN0z6OSKGOXqHLNrS04MgKFfsLqu6Dm8MPq02pI9Y9ZKoXtFjIl85jOryIW9es3BA==", + "license": "MIT", + "dependencies": { + "ce-la-react": "^0.3.2" + } + }, + "node_modules/media-played-ranges-mixin": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/media-played-ranges-mixin/-/media-played-ranges-mixin-0.1.0.tgz", + "integrity": "sha512-zTsvkleu5sAyTsPVxDI+KUbCwy/lXwHgOPi3ER9S3lhtAWhGTQH6qxvfrVMym1cvoLU36SPbVr6Qe8Zxyc0WpA==", + "license": "MIT" + }, + "node_modules/media-tracks": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/media-tracks/-/media-tracks-0.3.5.tgz", + "integrity": "sha512-l54rkKXlLBt3ob3zOLWHcnjvwUmX5bNEZ70igyapOZZC9imzqBmq1oz8p2roiV04KhjblFIi2hetLPF1oYVLRA==", + "license": "MIT" + }, "node_modules/memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", @@ -10576,6 +10947,12 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/mux-embed": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/mux-embed/-/mux-embed-5.18.1.tgz", + "integrity": "sha512-ePsHjiEKY+FgrSBiMmaF+LOtTQSSBWv/1zqpREQFN96JE93xlsArT/MEi30yKOE06MgjOlL70YI750molu3y7g==", + "license": "MIT" + }, "node_modules/nanoid": { "version": "3.3.12", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", @@ -10594,6 +10971,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha512-zkVhZUA3y8mbz652WrL5x0fB0ehrBkulWT3TomAQ9iDtyXZvzKeEA6GPxAItBYeNYl5yngKRX612qHOhvMkDeg==", + "license": "MIT" + }, "node_modules/next": { "version": "16.2.9", "resolved": "https://registry.npmjs.org/next/-/next-16.2.9.tgz", @@ -11447,6 +11830,12 @@ "integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==", "license": "MIT" }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "license": "MIT" + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -11719,6 +12108,22 @@ "node": ">= 6" } }, + "node_modules/player.style": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/player.style/-/player.style-0.3.4.tgz", + "integrity": "sha512-5O9bkbq0APQIkhptyZwp0gUgheCeImGPFo4hvPF2M5xBmgsUYzsUPHCfMye2xyeRE1zvQBKtziaC3jPgnHE1tw==", + "license": "MIT", + "workspaces": [ + ".", + "site", + "examples/*", + "scripts/*", + "themes/*" + ], + "dependencies": { + "media-chrome": "~4.19.0" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -12022,6 +12427,29 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "license": "MIT" }, + "node_modules/react-player": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/react-player/-/react-player-3.4.0.tgz", + "integrity": "sha512-QpQSHXtnMBKjQVNeaCYMtTVcynWQ0DDDhz/FJu1OR9PHLC1Aih94UqNstywzSHbJ6Oc7lI8/7kDDqcIvyTI6zQ==", + "license": "MIT", + "dependencies": { + "@mux/mux-player-react": "^3.8.0", + "cloudflare-video-element": "^1.3.4", + "dash-video-element": "^0.3.0", + "hls-video-element": "^1.5.9", + "spotify-audio-element": "^1.0.3", + "tiktok-video-element": "^0.1.1", + "twitch-video-element": "^0.1.5", + "vimeo-video-element": "^1.6.1", + "wistia-video-element": "^1.3.5", + "youtube-video-element": "^1.8.0" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18 || ^19", + "react": "^17.0.2 || ^18 || ^19", + "react-dom": "^17.0.2 || ^18 || ^19" + } + }, "node_modules/react-remove-scroll": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz", @@ -12343,6 +12771,12 @@ "@parcel/watcher": "^2.4.1" } }, + "node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==", + "license": "ISC" + }, "node_modules/scheduler": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", @@ -12540,6 +12974,12 @@ "node": ">= 10.x" } }, + "node_modules/spotify-audio-element": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spotify-audio-element/-/spotify-audio-element-1.0.4.tgz", + "integrity": "sha512-QdKrJPkYCzaNwwz2vN2eDGyoW0KmQFmnwVprB41mpMzj4qujbqr6pegEchQeTn0b5PceKiLoVu0pp2QDpTcWnw==", + "license": "MIT" + }, "node_modules/state-local": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz", @@ -12632,6 +13072,12 @@ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", "license": "MIT" }, + "node_modules/super-media-element": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/super-media-element/-/super-media-element-1.4.2.tgz", + "integrity": "sha512-9pP/CVNp4NF2MNlRzLwQkjiTgKKe9WYXrLh9+8QokWmMxz+zt2mf1utkWLco26IuA3AfVcTb//qtlTIjY3VHxA==", + "license": "MIT" + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -12690,6 +13136,12 @@ "real-require": "^0.2.0" } }, + "node_modules/tiktok-video-element": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tiktok-video-element/-/tiktok-video-element-0.1.2.tgz", + "integrity": "sha512-w6TboLm236XJKKiIXIhCbYCnUxbixBbaAoty0etaEAZ/2kHkVIdfZdv2oouMU/HGMsWCHI/VjQ3wU3MJ+s192Q==", + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -13274,6 +13726,12 @@ "@esbuild/win32-x64": "0.28.0" } }, + "node_modules/twitch-video-element": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/twitch-video-element/-/twitch-video-element-0.1.6.tgz", + "integrity": "sha512-X7l8gy+DEFKJ/EztUwaVnAYwQN9fUJxPkOVJj2sE62sGvGU4DNLyvmOsmVulM+8Plc5dMg6hYIMNRAPaH+39Uw==", + "license": "MIT" + }, "node_modules/typescript": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", @@ -13551,6 +14009,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/vimeo-video-element": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/vimeo-video-element/-/vimeo-video-element-1.7.2.tgz", + "integrity": "sha512-7QM7fvSZvTTSq4igxBuO6Gc+0u3Exgk4IaLNixVzilCPzHEf7SN8b6YLXSM5QCs0ineTJI4XjiUCSoIbabHvwg==", + "license": "MIT", + "dependencies": { + "@vimeo/player": "2.29.0", + "media-played-ranges-mixin": "^0.1.0" + } + }, "node_modules/w3c-keyname": { "version": "2.2.8", "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", @@ -13567,6 +14035,15 @@ "node": "20 || >=22" } }, + "node_modules/weakmap-polyfill": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/weakmap-polyfill/-/weakmap-polyfill-2.0.4.tgz", + "integrity": "sha512-ZzxBf288iALJseijWelmECm/1x7ZwQn3sMYIkDr2VvZp7r6SEKuT8D0O9Wiq6L9Nl5mazrOMcmiZE/2NCenaxw==", + "license": "MIT", + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/web-haptics": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/web-haptics/-/web-haptics-0.0.6.tgz", @@ -13602,6 +14079,15 @@ "node": ">=12" } }, + "node_modules/wistia-video-element": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/wistia-video-element/-/wistia-video-element-1.4.0.tgz", + "integrity": "sha512-udI8/yiMZ+KIGwYK1qNOFiXl+s/wffiY+XkwTXlBFICZylFalOS0QYEQqYOmuBsm3jNfGUS4O50tLuN7Ejqm3A==", + "license": "MIT", + "dependencies": { + "super-media-element": "~1.4.2" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -13687,6 +14173,15 @@ "url": "https://github.com/sponsors/dmonad" } }, + "node_modules/youtube-video-element": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/youtube-video-element/-/youtube-video-element-1.9.0.tgz", + "integrity": "sha512-Hh0dbQM+FVlUaYUbpYkZNUvdKxTNcSNvTGzkQKYShltnX+LRHEp2eYvC2Zm43eU8Np+CBZuoNR2i+seCYzzAyg==", + "license": "MIT", + "dependencies": { + "media-played-ranges-mixin": "^0.1.0" + } + }, "node_modules/zod": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", diff --git a/package.json b/package.json index f39a09a5..8e71a127 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "payload": "3.85.1", "react": "^19.2.7", "react-dom": "^19.2.7", + "react-player": "^3.4.0", "sanitize-html": "^2.17.5", "sass": "^1.101.0", "sharp": "^0.35.2", diff --git a/public/sitemap.xml b/public/sitemap.xml index f9e622d0..e84e6df2 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,30 +1,30 @@ -http://localhost:30002026-07-01T07:11:35.694Zdaily0.7 -http://localhost:3000/en2026-07-01T07:11:35.695Zweekly1 -http://localhost:3000/en/about-us2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/actions2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/blog2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/community-edition2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/contact2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/enterprise-edition2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/features2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/jobs2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/legal-notice2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/privacy2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/subscription2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/en/terms2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de2026-07-01T07:11:35.695Zweekly1 -http://localhost:3000/de/about-us2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/actions2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/blog2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/community-edition2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/contact2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/enterprise-edition2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/features2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/jobs2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/legal-notice2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/privacy2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/subscription2026-07-01T07:11:35.695Zweekly0.7 -http://localhost:3000/de/terms2026-07-01T07:11:35.695Zweekly0.7 +http://localhost:30002026-07-03T11:35:32.670Zdaily0.7 +http://localhost:3000/en2026-07-03T11:35:32.671Zweekly1 +http://localhost:3000/en/about-us2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/actions2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/blog2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/community-edition2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/contact2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/enterprise-edition2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/features2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/jobs2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/legal-notice2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/privacy2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/subscription2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/en/terms2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de2026-07-03T11:35:32.671Zweekly1 +http://localhost:3000/de/about-us2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/actions2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/blog2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/community-edition2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/contact2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/enterprise-edition2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/features2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/jobs2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/legal-notice2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/privacy2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/subscription2026-07-03T11:35:32.671Zweekly0.7 +http://localhost:3000/de/terms2026-07-03T11:35:32.671Zweekly0.7 \ No newline at end of file diff --git a/src/blocks/ActionShowcaseBlock.ts b/src/blocks/ActionShowcaseBlock.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/blocks/BlogPreviewBlock.ts b/src/blocks/BlogPreviewBlock.ts new file mode 100644 index 00000000..e339a451 --- /dev/null +++ b/src/blocks/BlogPreviewBlock.ts @@ -0,0 +1,65 @@ +import type { Block } from "payload" + +export const BlogPreviewBlock: Block = { + slug: "blogPreview", + labels: { + singular: "Blog Preview", + plural: "Blog Previews", + }, + fields: [ + { + type: "collapsible", + label: "Section", + fields: [ + { + name: "sectionHeading", + label: "Section Heading", + type: "text", + required: false, + localized: true, + }, + { + name: "sectionLayout", + label: "Section Layout", + type: "select", + required: true, + defaultValue: "imageCenter", + options: [ + { + label: "Image center", + value: "imageCenter", + }, + { + label: "Image left", + value: "imageLeft", + }, + { + label: "Image right", + value: "imageRight", + }, + ], + }, + { + name: "sectionDescription", + label: "Section Description", + type: "textarea", + required: false, + localized: true, + }, + ], + }, + { + name: "blog", + label: "Blog", + type: "relationship", + relationTo: "blog", + required: true, + }, + { + name: "showBorder", + label: "Show Border", + type: "checkbox", + defaultValue: false, + }, + ], +} diff --git a/src/blocks/OffsetCardsBlock.ts b/src/blocks/OffsetCardsBlock.ts index 9baf290c..2e4542e4 100644 --- a/src/blocks/OffsetCardsBlock.ts +++ b/src/blocks/OffsetCardsBlock.ts @@ -35,6 +35,27 @@ export const OffsetCardsBlock: Block = { }, ], }, + { + name: "cardPlacement", + label: "Card Placement", + type: "select", + required: true, + defaultValue: "alternate", + options: [ + { + label: "Alternate", + value: "alternate", + }, + { + label: "Right", + value: "right", + }, + { + label: "Left", + value: "left", + }, + ], + }, { name: "sectionDescription", label: "Section Description", @@ -93,6 +114,37 @@ export const OffsetCardsBlock: Block = { relationTo: "media", required: false, }, + { + name: "showImageBorder", + label: "Show Image Border", + type: "checkbox", + defaultValue: true, + }, + { + name: "mask", + label: "Image Mask", + type: "select", + hasMany: true, + required: false, + options: [ + { + label: "Top", + value: "top", + }, + { + label: "Right", + value: "right", + }, + { + label: "Bottom", + value: "bottom", + }, + { + label: "Left", + value: "left", + }, + ], + }, { name: "bulletPoints", label: "Bullet Points", diff --git a/src/blocks/VideoBlock.ts b/src/blocks/VideoBlock.ts new file mode 100644 index 00000000..a83e5862 --- /dev/null +++ b/src/blocks/VideoBlock.ts @@ -0,0 +1,148 @@ +import type { Block } from "payload" + +function getSourceType(siblingData: unknown) { + if (!siblingData || typeof siblingData !== "object") return undefined + return "sourceType" in siblingData ? siblingData.sourceType : undefined +} + +export const VideoBlock: Block = { + slug: "video", + labels: { + singular: "Video", + plural: "Video Blocks", + }, + fields: [ + { + type: "collapsible", + label: "Section", + fields: [ + { + name: "sectionHeading", + label: "Section Heading", + type: "text", + required: false, + localized: true, + }, + { + name: "sectionDescription", + label: "Section Description", + type: "textarea", + required: false, + localized: true, + }, + { + name: "sectionLinkButton", + label: "Section Link Button", + type: "group", + fields: [ + { + name: "label", + type: "text", + required: false, + localized: true, + }, + { + name: "url", + type: "text", + required: false, + }, + ], + }, + ], + }, + { + name: "sourceType", + label: "Video Source", + type: "select", + required: true, + defaultValue: "url", + options: [ + { + label: "URL", + value: "url", + }, + { + label: "Media", + value: "media", + }, + ], + }, + { + name: "videoUrl", + label: "Video URL", + type: "text", + admin: { + condition: (_, siblingData) => siblingData.sourceType === "url", + }, + validate: (value: string | null | undefined, { siblingData }: { siblingData: unknown }) => { + if (getSourceType(siblingData) !== "url") return true + return value?.trim() ? true : "A video URL is required." + }, + }, + { + name: "video", + label: "Video Media", + type: "upload", + relationTo: "media", + filterOptions: { + mimeType: { + contains: "video/", + }, + }, + admin: { + condition: (_, siblingData) => siblingData.sourceType === "media", + }, + validate: (value: unknown, { siblingData }: { siblingData: unknown }) => { + if (getSourceType(siblingData) !== "media") return true + return value ? true : "A video media file is required." + }, + }, + { + name: "poster", + label: "Poster Image", + type: "upload", + relationTo: "media", + filterOptions: { + mimeType: { + contains: "image/", + }, + }, + required: false, + }, + { + type: "row", + fields: [ + { + name: "controls", + label: "Show Controls", + type: "checkbox", + defaultValue: true, + }, + { + name: "autoPlay", + label: "Autoplay", + type: "checkbox", + defaultValue: false, + }, + { + name: "muted", + label: "Muted", + type: "checkbox", + defaultValue: false, + }, + { + name: "loop", + label: "Loop", + type: "checkbox", + defaultValue: false, + }, + { + name: "playsInline", + label: "Play Inline", + type: "checkbox", + defaultValue: true, + }, + ], + }, + ], +} diff --git a/src/collections/pages.ts b/src/collections/pages.ts index d2119625..dbc70c4b 100644 --- a/src/collections/pages.ts +++ b/src/collections/pages.ts @@ -1,6 +1,7 @@ import { ActionBlock } from "@/blocks/ActionBlock" import { SwipeCardBlock } from "@/blocks/SwipeCardBlock" import { BlogBlock } from "../blocks/BlogBlock" +import { BlogPreviewBlock } from "../blocks/BlogPreviewBlock" import { BrandBlock } from "../blocks/BrandBlock" import { CardRowBlock } from "../blocks/CardRowBlock" import { ContactBlock } from "../blocks/ContactBlock" @@ -16,6 +17,7 @@ import { RoadmapBlock } from "../blocks/RoadmapBlock" import { ScrollCardBlock } from "../blocks/ScrollCardBlock" import type { CollectionConfig } from "payload" import { StandaloneBlock } from "@/blocks/StandaloneBlock" +import { VideoBlock } from "@/blocks/VideoBlock" export const Pages: CollectionConfig = { slug: "pages", @@ -74,6 +76,7 @@ export const Pages: CollectionConfig = { CtaBlock, JobsBlock, BlogBlock, + BlogPreviewBlock, ActionBlock, MarkdownBlock, ContactBlock, @@ -81,6 +84,7 @@ export const Pages: CollectionConfig = { RoadmapBlock, ScrollCardBlock, StandaloneBlock, + VideoBlock, ], required: false, localized: true, diff --git a/src/components/PageBlockRenderer.tsx b/src/components/PageBlockRenderer.tsx index e47b5a20..ab2262c5 100644 --- a/src/components/PageBlockRenderer.tsx +++ b/src/components/PageBlockRenderer.tsx @@ -1,4 +1,5 @@ import { BrandSection } from "@/components/sections/BrandSection" +import { BlogPreviewSection } from "@/components/sections/BlogPreviewSection" import { CardRowSection } from "@/components/sections/CardRowSection" import { CtaSection } from "@/components/sections/CtaSection" import { FaqSection } from "@/components/sections/FaqSection" @@ -13,6 +14,7 @@ import type { AppLocale } from "@/lib/i18n" import type { Page } from "@/payload-types" import React, { type ReactNode } from "react" import { StandaloneCardSection } from "./sections/StandaloneCardSection" +import { VideoSection } from "./sections/VideoSection" type PageBlock = NonNullable[number] @@ -29,6 +31,7 @@ type BlockRenderer = (block: PageBlock, options: PageBlockRenderOptions) => Reac const pageBlockRenderers: Partial> = { hero: (block) => } />, bento: (block, options) => } locale={options.locale} />, + blogPreview: (block, options) => } locale={options.locale} />, brand: (block) => } />, offsetCards: (block) => } />, cardRow: (block, options) => }>{options.cardRowChildren}, @@ -39,6 +42,7 @@ const pageBlockRenderers: Partial> scrollCards: (block) => } />, swipeCards: (block) => } />, standaloneCard: (block) => } />, + video: (block) => } />, } function renderPageBlock(block: PageBlock, options: PageBlockRenderOptions) { diff --git a/src/components/sections/ActionShowcaseSection.tsx b/src/components/sections/ActionShowcaseSection.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/components/sections/BlogPreviewSection.tsx b/src/components/sections/BlogPreviewSection.tsx new file mode 100644 index 00000000..78dbc0ba --- /dev/null +++ b/src/components/sections/BlogPreviewSection.tsx @@ -0,0 +1,79 @@ +import { Card } from "@/components/ui/Card" +import { Section } from "@/components/ui/Section" +import { formatLongDate } from "@/lib/formatters" +import { getBlogPostBySlug, type BlogPreviewLayoutBlock } from "@/lib/cms" +import type { AppLocale } from "@/lib/i18n" +import { getMediaUrl } from "@/lib/media" +import { cn } from "@/lib/utils" +import type { Media } from "@/payload-types" +import Image from "next/image" +import Link from "next/link" +import type { ReactNode } from "react" + +interface BlogPreviewSectionProps { + content?: BlogPreviewLayoutBlock | null + locale?: AppLocale +} + +function PreviewFrame({ children, showBorder }: { children: ReactNode; showBorder: boolean }) { + if (!showBorder) return children + + return ( + + {children} + + ) +} + +export async function BlogPreviewSection({ content, locale = "en" }: BlogPreviewSectionProps) { + const referencedPost = content?.blog && typeof content.blog === "object" ? content.blog : null + + if (!content || !referencedPost) return null + + const post = typeof referencedPost.heroImage === "number" ? ((await getBlogPostBySlug(referencedPost.slug, locale)) ?? referencedPost) : referencedPost + + const heroImage = post.heroImage && typeof post.heroImage === "object" ? (post.heroImage as Media) : null + const heroImageUrl = getMediaUrl(heroImage?.url) + const authorName = post.author && typeof post.author === "object" ? post.author.name : null + const publishedDate = formatLongDate(new Date(post.createdAt), locale) + const isImageCenter = content.sectionLayout === "imageCenter" + const isImageRight = content.sectionLayout === "imageRight" + const postHref = `/${locale}/blog/${post.slug}` + + return ( +
+ + +
+
+ {heroImageUrl ? ( + {heroImage?.alt + ) : ( +
{locale === "de" ? "Kein Bild" : "No image"}
+ )} +
+ +
+

{[authorName, publishedDate].filter(Boolean).join(" ยท ")}

+

{post.title}

+ {post.shortDescription &&

{post.shortDescription}

} +
+
+
+ +
+ ) +} diff --git a/src/components/sections/OffsetCardsSection.tsx b/src/components/sections/OffsetCardsSection.tsx index 1b05c6d7..949f7ae6 100644 --- a/src/components/sections/OffsetCardsSection.tsx +++ b/src/components/sections/OffsetCardsSection.tsx @@ -15,6 +15,12 @@ interface OffsetCardsSectionProps { } const OFFSET_CARD_ANIMATION_SEQUENCE: Exclude[] = ["slide-left", "slide-right", "slide-left"] +const IMAGE_MASK_CLASSES = { + top: "inset-x-0 top-0 h-1/3 bg-linear-to-b from-primary to-transparent", + right: "inset-y-0 right-0 w-1/3 bg-linear-to-l from-primary to-transparent", + bottom: "inset-x-0 bottom-0 h-1/3 bg-linear-to-t from-primary to-transparent", + left: "inset-y-0 left-0 w-1/3 bg-linear-to-r from-primary to-transparent", +} as const const staggerContainer: Variants = { hidden: {}, show: { @@ -53,11 +59,13 @@ export function OffsetCardsSection({ content }: OffsetCardsSectionProps) { const animationConfig = ANIMATION_PRESETS[animationPreset] const image = item.image as Media const imageUrl = getMediaUrl(image?.url) + const cardPlacement = content.cardPlacement ?? "alternate" + const isCardLeft = cardPlacement === "left" || (cardPlacement === "alternate" && index % 2 !== 0) return ( )} - + {imageUrl && {image.alt} + {item.mask?.map((side) => ( +