{"__browser":{"country":"US","device":"unknown_device","mobile":false,"name":"unknown browser","platform":"unknown_platform","version":"0"},"__constants":{},"__CPDATA":{"domain_iframe":"https://cdpn.io","environment":"production","host":"codepen.io","iframe_allow":"accelerometer *; ambient-light-sensor *; camera *; display-capture *; encrypted-media *; geolocation *; gyroscope *; microphone *; midi *; payment *; vr *; web-share *; serial *; xr-spatial-tracking *","iframe_sandbox":"allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups-to-escape-sandbox allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation"},"__graphql":{"data":{"data":{"sessionUser":{"id":"VoDkNZ","name":"Captain Anonymous","title":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","currentContext":{"id":"VoDkNZ","title":"Captain Anonymous","name":"Captain Anonymous","avatar":"https://assets.codepen.io/t-1/user-default-avatar.jpg?format=auto&version=0","username":"anon","__typename":"User"},"currentTeamId":null,"username":"anon","admin":false,"anon":true,"pro":false,"verified":false,"featureFlags":[],"teams":[],"__typename":"User"}}},"url":"https://codepen.io/graphql","api":"cprails"},"__user":{"anon":true,"base_url":"/anon/","cohorts":[],"current_team_hashid":null,"current_team_id":0,"hashid":"VoDkNZ","id":1,"itemType":"user","name":"Captain Anonymous","paid":false,"tier":0,"username":"anon","created_at":null,"email_verified":null,"collections_count":0,"collections_private_count":0,"followers_count":0,"followings_count":0,"pens_count":0,"pens_private_count":0,"projects_count":0,"projects_private_count":0},"__firebase":{"config":{"apiKey":"AIzaSyBgLAe7N_MdFpuVofMkcQLGwwhUu5tuxls","authDomain":"codepen-store-production.firebaseapp.com","databaseURL":"https://codepen-store-production.firebaseio.com","disabled":false,"projectId":"codepen-store-production"},"token":"eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImNsYWltcyI6eyJvd25lcklkIjoiVm9Ea05aIiwiYWRtaW4iOmZhbHNlfSwiZXhwIjoxNzI4NzE3OTEwLCJpYXQiOjE3Mjg3MTQzMTAsImlzcyI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLThva3lsQGNvZGVwZW4tc3RvcmUtcHJvZHVjdGlvbi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInVpZCI6IlZvRGtOWiJ9.AWJMwQMd2uAcq11p66J6ZY5jf1yoHw5Y8GnOhdqU9h-0eks6Wek7X1AVVJyteohh3qx4BxK0zx17xp5YN6sWzAd4ZDNPXOwGIVyZh956TGUpTsKR1FkEaCp3P__o-qhc8Xhg6J7RXwIEqQWSkG5DyNW9hvXnKt8mbeSf7SRBhdY-jvyIoaaLsxda_KqZxzXavb7X2d3elqouZsdSt1BQYT2VmOBKys3sdQ6v0zdatQqzKbiE4Zv3fFESQreuQ4vzbEWSqZu5w41s284aHPjVop6l1z5tOFbgs1goo8Ed8M9FOKJBfc72TXRcb2Uw2vVzKs26jOfGZ5rsf_MJVFLZmw"},"__pay_stripe_public_key":"pk_live_2GndomDfiklqpSNQn8FrGuwZSMIMzha7DkLJqlYe7IR0ihKAlKdiHg68JJc5eVPt68rzAjzAAVXcUwjySHRCsgjQQ00gtRBUFNH","__pay_braintree_env":"production","__item":"{\"id\":56569793,\"user_id\":1887094,\"html\":\"<div id=\\\"root\\\"><\\/div>\",\"css\":\"div.builder {\\n position: absolute;\\n left: 10px;\\n right: 10px;\\n top: 10px;\\n bottom: 10px;\\n}\",\"js\":\"import React, { useEffect, useRef } from \\\"https:\\/\\/cdn.skypack.dev\\/react\\\";\\nimport ReactDOM from \\\"https:\\/\\/cdn.skypack.dev\\/react-dom\\\";\\nimport { Builder } from \\\"https:\\/\\/cdn.skypack.dev\\/@tripetto\\/builder\\\";\\n\\nfunction TripettoBuilder(props) {\\n const elementRef = useRef();\\n const builderRef = useRef();\\n\\n useEffect(() => {\\n if (!builderRef.current) {\\n builderRef.current = Builder.open(props.definition, {\\n element: elementRef.current,\\n disableResizing: true,\\n onSave: props.onSave\\n });\\n }\\n }, []);\\n\\n useEffect(() => {\\n const resizeObserver = new ResizeObserver(() => {\\n if (builderRef.current) {\\n builderRef.current.resize();\\n }\\n });\\n\\n resizeObserver.observe(elementRef.current);\\n\\n return () => {\\n resizeObserver.disconnect();\\n };\\n });\\n\\n return <div ref={elementRef} className=\\\"builder\\\"><\\/div>;\\n}\\n\\nReactDOM.render(\\n <TripettoBuilder\\n onSave={(definition) => {\\n console.log(\\\"Form saved!\\\");\\n console.dir(definition);\\n }}\\n \\/>,\\n document.getElementById(\\\"root\\\")\\n);\\n\",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"less\",\"js_pre_processor\":\"typescript\",\"html_classes\":\"\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2021-11-11T21:40:37.100Z\",\"updated_at\":\"2023-04-05T13:19:44.557Z\",\"title\":\"Tripetto SDK \\/ Builder \\/ React \\/ Monitor host element resizing\",\"description\":\"\",\"slug_hash\":\"WNEgQMr\",\"head\":\"\",\"private\":true,\"slug_hash_private\":\"4b8d317efdaa40ee46b59eae92b3b0d4\",\"has_animation\":false,\"team_id\":0,\"css_prefix\":\"neither\",\"template\":false,\"parent_id\":0,\"comments_count\":0,\"custom_screenshot_filename\":null,\"loves_count\":0,\"pick\":false,\"popularity_score\":0,\"views_count\":0,\"pick_visible_at\":null,\"cpid\":\"017d10f2-086c-7cdd-9ed0-92d9846d5c8e\",\"is_new_editor_pen\":false,\"protected\":false,\"access\":\"Private\",\"pen_hash\":null,\"hashid\":\"WNEgQMr\"}"}