Skip to content

Write HTML. Render video. Built for agents.

14.0 KB
Raw Blame
{"html":"<!doctype html>\n<html\n  lang=\"en\"\n  data-composition-variables='[{\"id\":\"shareTitle\",\"type\":\"string\",\"role\":\"content\",\"label\":\"Sheet title\",\"description\":\"Heading at the top of the share sheet.\",\"default\":\"Share\"},{\"id\":\"senderName\",\"type\":\"string\",\"role\":\"content\",\"label\":\"Sender\",\"description\":\"Name of the brand this video promotes, shown as the sender offering the item. Use the real name of that brand.\",\"portrays\":[\"subject_name\"],\"default\":\"HyperFrames\"},{\"id\":\"itemLabel\",\"type\":\"string\",\"role\":\"content\",\"label\":\"Item\",\"description\":\"What the sender is offering, completing the sentence \\\"… would like to share …\\\".\",\"default\":\"a video\"},{\"id\":\"stripText\",\"type\":\"string\",\"role\":\"content\",\"label\":\"Brand strip\",\"description\":\"Positioning line of the brand this video promotes, in small caps beside its logo.\",\"portrays\":[\"subject_tagline\"],\"default\":\"OPEN-SOURCE VIDEO ENGINE · SHIP FROM HTML\"},{\"id\":\"acceptLabel\",\"type\":\"string\",\"role\":\"content\",\"label\":\"Accept label\",\"description\":\"Right-hand action button.\",\"default\":\"Accept\"},{\"id\":\"declineLabel\",\"type\":\"string\",\"role\":\"content\",\"label\":\"Decline label\",\"description\":\"Left-hand action button.\",\"default\":\"Decline\"},{\"id\":\"slideImage1\",\"type\":\"image\",\"role\":\"content\",\"label\":\"Slide image 1\",\"description\":\"First carousel image; also fills the blurred background.\",\"default\":\"/public/catalog/assets/b027e8df2ebc91b8.jpg\"},{\"id\":\"slideImage2\",\"type\":\"image\",\"role\":\"content\",\"label\":\"Slide image 2\",\"description\":\"Second carousel image; also fills the blurred background.\",\"default\":\"/public/catalog/assets/e0afd7322aaec59a.jpg\"},{\"id\":\"slideImage3\",\"type\":\"image\",\"role\":\"content\",\"label\":\"Slide image 3\",\"description\":\"Third carousel image; also fills the blurred background.\",\"default\":\"/public/catalog/assets/cd908527295c4367.jpg\"},{\"id\":\"slideImage4\",\"type\":\"image\",\"role\":\"content\",\"label\":\"Slide image 4\",\"description\":\"Fourth carousel image; also fills the blurred background.\",\"default\":\"/public/catalog/assets/734322e45db3b243.jpg\"},{\"id\":\"brandLogo\",\"type\":\"image\",\"role\":\"content\",\"label\":\"Brand logo\",\"description\":\"Transparent horizontal wordmark of the brand this video promotes, in the preview strip.\",\"portrays\":[\"subject_logo\"],\"default\":\"/public/catalog/assets/dc156e7c21b47474.svg\"}]'\n>\n  <head><base href=\"/public/catalog/items/share-sheet-carousel/\">\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=1080, height=1920\" />\n    <title>Share-Sheet Carousel</title>\n    <script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js\"></script>\n    <style>\n      * {\n        margin: 0;\n        padding: 0;\n        box-sizing: border-box;\n      }\n      body {\n        background: #000;\n      }\n      #ssc-root {\n        position: relative;\n        width: 1080px;\n        height: 1920px;\n        overflow: hidden;\n        background: #000;\n        font-family: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", sans-serif;\n      }\n      #ssc-scene {\n        position: absolute;\n        inset: 0;\n      }\n\n      /* ---------------- fullscreen grounds ---------------- */\n      /* the ground behind the sheet is the current slide blown up and blurred,\n         exactly as the source footage was */\n      .ssc-bg {\n        position: absolute;\n        left: -80px;\n        top: -80px;\n        width: 1240px;\n        height: 2080px;\n        object-fit: cover;\n        filter: blur(46px) saturate(1.1) brightness(0.88);\n      }\n\n      /* ---------------- the share sheet ---------------- */\n      /* geometry measured from the reference: 668x974 card at (206,473),\n         spring entry sampled frame-by-frame (spec provenance: measured) */\n      #ssc-card {\n        position: absolute;\n        left: 206px;\n        top: 473px;\n        width: 668px;\n        height: 974px;\n        background: #f9f9f9;\n        border-radius: 34px;\n        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);\n        opacity: 0;\n      }\n      #ssc-cardclipper {\n        position: absolute;\n        inset: 0;\n        border-radius: 34px;\n        overflow: hidden;\n      }\n      #ssc-title {\n        position: absolute;\n        top: 49px;\n        left: 0;\n        width: 100%;\n        text-align: center;\n        font-size: 44px;\n        font-weight: 600;\n        color: #101010;\n        line-height: 44px;\n        letter-spacing: 0.2px;\n      }\n      #ssc-subtitle {\n        position: absolute;\n        top: 117px;\n        left: 0;\n        width: 100%;\n        text-align: center;\n        font-size: 29px;\n        font-weight: 400;\n        color: #313131;\n        line-height: 29px;\n      }\n      #ssc-subtitle b {\n        font-weight: 700;\n      }\n      #ssc-imagebox {\n        position: absolute;\n        left: 43px;\n        top: 191px;\n        width: 582px;\n        height: 632px;\n        border-radius: 24px;\n        overflow: hidden;\n      }\n      .ssc-slide {\n        position: absolute;\n        left: 0;\n        top: 0;\n        width: 582px;\n        height: 476px;\n        object-fit: cover;\n      }\n      /* the brand strip riding the bottom of the preview, as the reference had */\n      #ssc-strip {\n        position: absolute;\n        left: 0;\n        top: 476px;\n        width: 582px;\n        height: 156px;\n        background: #f2ecdf;\n        display: grid;\n        place-items: center;\n        align-content: center;\n        gap: 14px;\n      }\n      #ssc-strip img {\n        height: 38px;\n        display: block;\n      }\n      #ssc-strip-text {\n        font-size: 17px;\n        font-weight: 600;\n        letter-spacing: 2.4px;\n        color: #4a4438;\n        text-transform: uppercase;\n      }\n      #ssc-hdivider {\n        position: absolute;\n        left: 0;\n        top: 859px;\n        width: 100%;\n        height: 1.5px;\n        background: #dfdfdf;\n      }\n      #ssc-vdivider {\n        position: absolute;\n        left: 333px;\n        top: 861px;\n        width: 1.5px;\n        bottom: 0;\n        background: #dfdfdf;\n      }\n      #ssc-presscell {\n        position: absolute;\n        left: 335px;\n        top: 861px;\n        right: 0;\n        bottom: 0;\n        background: #e9e9e9;\n        border-radius: 0 0 34px 0;\n        opacity: 0;\n      }\n      .ssc-btn {\n        position: absolute;\n        top: 861px;\n        bottom: 0;\n        display: grid;\n        place-items: center;\n        font-size: 34px;\n      }\n      #ssc-decline {\n        left: 0;\n        width: 333px;\n        color: #6f6f73;\n        font-weight: 400;\n      }\n      #ssc-accept {\n        left: 335px;\n        right: 0;\n        color: var(--hf-ui-accent, #087a57);\n        font-weight: 600;\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"ssc-root\"\n      data-composition-id=\"share-sheet-carousel\"\n      data-start=\"0\"\n      data-width=\"1080\"\n      data-height=\"1920\"\n      data-duration=\"7.2333\"\n      data-fps=\"30\"\n    >\n      <section\n        id=\"ssc-scene\"\n        class=\"clip\"\n        data-start=\"0\"\n        data-duration=\"7.2333\"\n        data-track-index=\"1\"\n      >\n        <img\n          class=\"ssc-bg\"\n          id=\"ssc-bg-1\"\n          data-var-src=\"slideImage1\"\n          src=\"/public/catalog/assets/b027e8df2ebc91b8.jpg\"\n          alt=\"\"\n          style=\"opacity: 1\"\n        />\n        <img\n          class=\"ssc-bg\"\n          id=\"ssc-bg-2\"\n          data-var-src=\"slideImage2\"\n          src=\"/public/catalog/assets/e0afd7322aaec59a.jpg\"\n          alt=\"\"\n          style=\"opacity: 0\"\n        />\n        <img\n          class=\"ssc-bg\"\n          id=\"ssc-bg-3\"\n          data-var-src=\"slideImage3\"\n          src=\"/public/catalog/assets/cd908527295c4367.jpg\"\n          alt=\"\"\n          style=\"opacity: 0\"\n        />\n        <img\n          class=\"ssc-bg\"\n          id=\"ssc-bg-4\"\n          data-var-src=\"slideImage4\"\n          src=\"/public/catalog/assets/734322e45db3b243.jpg\"\n          alt=\"\"\n          style=\"opacity: 0\"\n        />\n        <div id=\"ssc-card\">\n          <div id=\"ssc-cardclipper\">\n            <div id=\"ssc-title\">Share</div>\n            <div id=\"ssc-subtitle\"><b>HyperFrames</b>&nbsp;would like to share a video</div>\n            <div id=\"ssc-imagebox\">\n              <img\n                class=\"ssc-slide\"\n                id=\"ssc-slide-1\"\n                data-var-src=\"slideImage1\"\n                src=\"/public/catalog/assets/b027e8df2ebc91b8.jpg\"\n                alt=\"\"\n                style=\"opacity: 1\"\n              />\n              <img\n                class=\"ssc-slide\"\n                id=\"ssc-slide-2\"\n                data-var-src=\"slideImage2\"\n                src=\"/public/catalog/assets/e0afd7322aaec59a.jpg\"\n                alt=\"\"\n                style=\"opacity: 0\"\n              />\n              <img\n                class=\"ssc-slide\"\n                id=\"ssc-slide-3\"\n                data-var-src=\"slideImage3\"\n                src=\"/public/catalog/assets/cd908527295c4367.jpg\"\n                alt=\"\"\n                style=\"opacity: 0\"\n              />\n              <img\n                class=\"ssc-slide\"\n                id=\"ssc-slide-4\"\n                data-var-src=\"slideImage4\"\n                src=\"/public/catalog/assets/734322e45db3b243.jpg\"\n                alt=\"\"\n                style=\"opacity: 0\"\n              />\n              <div id=\"ssc-strip\">\n                <img\n                  data-var-src=\"brandLogo\"\n                  src=\"/public/catalog/assets/dc156e7c21b47474.svg\"\n                  alt=\"Brand logo\"\n                />\n                <div id=\"ssc-strip-text\">OPEN-SOURCE VIDEO ENGINE · SHIP FROM HTML</div>\n              </div>\n            </div>\n            <div id=\"ssc-hdivider\"></div>\n            <div id=\"ssc-presscell\"></div>\n            <div id=\"ssc-vdivider\"></div>\n            <div id=\"ssc-decline\" class=\"ssc-btn\">Decline</div>\n            <div id=\"ssc-accept\" class=\"ssc-btn\">Accept</div>\n          </div>\n        </div>\n      </section>\n    </div>\n    <script>\n      (function () {\n        \"use strict\";\n\n        /* -------- variables -------- */\n        var vars =\n          window.__hyperframes && typeof window.__hyperframes.getVariables === \"function\"\n            ? window.__hyperframes.getVariables()\n            : {};\n\n        function text(value, fallback) {\n          if (typeof value !== \"string\") return fallback;\n          var t = value.trim();\n          if (!t) return fallback;\n          return t.length > 60 ? t.slice(0, 60) : t;\n        }\n\n        document.getElementById(\"ssc-title\").textContent = text(vars.shareTitle, \"Share\");\n        var subtitle = document.getElementById(\"ssc-subtitle\");\n        subtitle.innerHTML = \"\";\n        var sender = document.createElement(\"b\");\n        sender.textContent = text(vars.senderName, \"HyperFrames\");\n        subtitle.appendChild(sender);\n        subtitle.appendChild(\n          document.createTextNode(\" would like to share \" + text(vars.itemLabel, \"a video\")),\n        );\n        document.getElementById(\"ssc-strip-text\").textContent = text(\n          vars.stripText,\n          \"OPEN-SOURCE VIDEO ENGINE · SHIP FROM HTML\",\n        );\n        document.getElementById(\"ssc-decline\").textContent = text(vars.declineLabel, \"Decline\");\n        document.getElementById(\"ssc-accept\").textContent = text(vars.acceptLabel, \"Accept\");\n\n        /* -------- timeline: spring entry and cut rhythm measured from the reference -------- */\n        window.__timelines = window.__timelines || {};\n        var tl = gsap.timeline({ paused: true });\n\n        tl.set(\"#ssc-card\", { y: 1450, autoAlpha: 0 }, 0.001);\n        tl.set(\"#ssc-presscell\", { autoAlpha: 0 }, 0.001);\n\n        /* sheet spring-up: frame-sampled from the reference, kept verbatim */\n        var SPRING = [\n          [0.056667, 1198, 0.13],\n          [0.09, 903, 0.21],\n          [0.123333, 648, 0.36],\n          [0.156667, 437, 0.43],\n          [0.19, 262, 0.5],\n          [0.223333, 120, 0.62],\n          [0.256667, 8, 0.78],\n          [0.29, -76, 0.89],\n          [0.323333, -138, 1.0],\n          [0.356667, -175, null],\n          [0.39, -191, null],\n          [0.423333, -192, null],\n          [0.456667, -181, null],\n          [0.49, -159, null],\n          [0.523333, -131, null],\n          [0.556667, -100, null],\n          [0.59, -68, null],\n          [0.623333, -41, null],\n          [0.656667, -18, null],\n          [0.69, -5, null],\n          [0.723333, 0, null],\n        ];\n        SPRING.forEach(function (step) {\n          var props = { y: step[1] };\n          if (step[2] !== null) props.autoAlpha = step[2];\n          tl.set(\"#ssc-card\", props, step[0]);\n        });\n\n        /* cut rhythm: fourteen swaps, cycling the four stills */\n        var SLIDE_COUNT = 4;\n        var CUTS = [\n          0.99, 1.356667, 1.69, 2.023333, 2.356667, 2.69, 3.09, 3.456667, 3.79, 4.123333, 4.456667,\n          4.79, 5.156667,\n        ];\n        var current = 0;\n        CUTS.forEach(function (t, i) {\n          var next = (i + 1) % SLIDE_COUNT;\n          tl.set([\"#ssc-bg-\" + (current + 1), \"#ssc-slide-\" + (current + 1)], { autoAlpha: 0 }, t);\n          tl.set([\"#ssc-bg-\" + (next + 1), \"#ssc-slide-\" + (next + 1)], { autoAlpha: 1 }, t);\n          current = next;\n        });\n\n        /* accept press: cell highlights and the card dips, then releases */\n        tl.set(\"#ssc-card\", { y: 3 }, 6.323333);\n        tl.set(\"#ssc-presscell\", { autoAlpha: 1 }, 6.323333);\n        tl.set(\"#ssc-card\", { y: 0 }, 6.656667);\n        tl.set(\"#ssc-presscell\", { autoAlpha: 0 }, 6.656667);\n        tl.set({}, {}, 7.2333);\n\n        window.__timelines[\"share-sheet-carousel\"] = tl;\n      })();\n    </script>\n  </body>\n</html>\n"}