PageSourceSearch

https://www.guycameron.me/vite/assets/DesignWizApp-3UAN7vg5.js

js guycameron.me collected 2026-09-29 11:55:45 UTC 5,443 bytes, 1 lines download raw bytes

1import{j as e,R as n}from"./RenderReact-D01794dB.js";import{C as w}from"./ConfigTanstackQuery-vtCUV_at.js";import{s as g,C}from"./index-Bi5lei3d.js";import{C as S}from"./getAuthenticityToken-CMfMkA-b.js";import{T as P,a as N,b as p,c as x,P as U,d as T}from"./ThemeCustomizationTab-C9mRdG-d.js";import{S as j,a as W,l as O,b as R,c as k,d as $,e as z}from"./index-Bfjrilrr.js";import{I as h}from"./iconify-DOvuEbFR.js";import{T as B,a as D}from"./ThemeFontTab-CPVKwCXc.js";import"./index-BrgB-2s_.js";import"./isObjectLike-nLWjQ9zq.js";import"./index-CFcgNnu0.js";import"./refreshPreview-BuhiaIfi.js";import"./clsx-B7rjN5bm.js";import"./AppearanceValueSelect-mME5J_h8.js";import"./index-DVSp3ZRh.js";import"./JsErb-DabgBzwQ.js";import"./findPropertyMatch-Ch7iOhxA.js";import"./find-C0QuYxBI.js";import"./index.prod-DA3Fci0A.js";import"./TileGrid-ubL13F6Z.js";import"./bundle.esm-CW22UBVJ.js";function I({designMods:t}){const o=()=>{g("/design-wiz/apply",{method:"POST",body:{_d:JSON.stringify(t)}})};return e.jsx("div",{className:"btn",onClick:o,children:"Apply design to existing site"})}function E({designMods:t}){const o=()=>{g("/onboarding/demo",{method:"POST",body:{_d:JSON.stringify(t)}})};return e.jsx("div",{className:"btn",onClick:o,children:"Start site using this design"})}const F=n.createContext(),_=F;function M(){const[t,o]=n.useContext(j);return e.jsx(W,{renderNav:e.jsx("a",{href:"/",children:e.jsx("img",{src:O,style:{display:"block",margin:"12px",width:"32px",height:"32px"}})}),actions:e.jsx("div",{className:"hidden-md-up",style:{marginRight:"-16px"},children:e.jsx("div",{className:"tooltip tooltip-bottom","data-tip":"Preview",children:e.jsx("div",{className:"btn btn-sm btn-circle btn-ghost",onClick:()=>o(!1),children:e.jsx(h,{icon:"material-symbols:wysiwyg",height:"24"})})})})})}const v=n.createContext();function y(){return n.useContext(v)}function q({children:t}){const[o,i]=n.useState();return e.jsx(v.Provider,{value:{previewUrl:o,setPreviewUrl:i},children:t})}function A(){const t=n.useContext(_),{previewUrl:o,setPreviewUrl:i}=y(),[s,d]=n.useState(t.design_mods),m=a=>{const r={...s};a.theme_id&&(r.theme_id=a.theme_id),a.default_font&&(r.default_font=a.default_font),d(r)},l=a=>{const r={...s};["color1","color2","color3","link_color","header_color","footer_color","sidebar_color","background_color","navlink_color"].forEach(c=>{a[c]&&(r[c]=a[c])}),d(r)};let u;return t.port?u=`https://${t.host}:${t.port}/`:u=`https://${t.host}/`,n.useEffect(()=>{const r=JSON.stringify(s),c=encodeURIComponent(r);i(`${u}?_d=${c}`),console.log(r)},[s]),e.jsxs(R,{children:[e.jsx(M,{}),e.jsxs(k,{children:[e.jsxs($,{children:[e.jsx("h2",{className:"blt-h2 blt-weight-bold",children:"Design Wiz"}),t.creation_status==="new"&&e.jsxs(e.Fragment,{children:[e.jsx("hr",{className:"space-12"}),e.jsx(E,{designMods:s})]}),t.creation_status==="apply"&&e.jsxs(e.Fragment,{children:[e.jsx("hr",{className:"space-12"}),e.jsx(I,{designMods:s})]})]}),e.jsxs(P,{initialId:"theme",children:[e.jsxs(N,{children:[e.jsx(p,{id:"theme",label:"Theme"}),e.jsx(p,{id:"font",label:"Font"}),e.jsx(p,{id:"palette",label:"Palette"}),e.jsx(p,{id:"customize",label:"Customize"})]}),e.jsx(x,{id:"theme",children:e.jsx(B,{themeId:s.theme_id,onUpdate:m})}),e.jsx(x,{id:"font",children:e.jsx(D,{font:s.default_font,onUpdate:m})}),e.jsx(x,{id:"palette",children:e.jsx(U,{appearance:s,onUpdate:l})}),e.jsx(x,{id:"customize",children:e.jsx(T,{appearance:s,onUpdate:l,themeId:s.theme_id})})]})]})]})}function J(){return e.jsx(A,{})}const L="_root_1ots2_1",H="_body_1ots2_10",Q="_iframe_1ots2_18",f={root:L,body:H,iframe:Q},G="_root_1i946_1",K="_addressBar_1i946_8",b={root:G,addressBar:K};function X({displayUrl:t}){return e.jsxs("div",{className:`${b.root} flex flex-row items-center`,children:[e.jsx("div",{className:"flex-none hidden-md-up",style:{marginLeft:"-8px",marginRight:"8px"},children:e.jsx(Z,{})}),e.jsx("div",{className:"flex-none hidden-sm-down",style:{marginLeft:"-8px",marginRight:"8px"},children:e.jsx(Y,{})}),e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:b.addressBar,children:t})})]})}
1function Y(){const[t,o]=n.useContext(j),i=()=>{o(!t)},s=t?"Close sidebar":"Open sidebar";return e.jsx("div",{className:"tooltip tooltip-right","data-tip":s,children:e.jsx("div",{className:"btn btn-sm btn-ghost btn-circle",onClick:i,children:t?e.jsx(h,{icon:"material-symbols:fullscreen",height:"24"}):e.jsx(h,{icon:"material-symbols:fullscreen-exit",height:"24"})})})}function Z(){const[t,o]=n.useContext(j);return t?null:e.jsx("div",{className:"btn btn-sm btn-ghost btn-circle",onClick:()=>o(!0),children:e.jsx(h,{icon:"material-symbols:close",height:"24"})})}function V(){const{previewUrl:t,setPreviewUrl:o}=y(),i=n.useRef(null),s=n.useRef(!0),d=n.useMemo(()=>{try{const l=new URL(t);return`${l.protocol}//${l.host}`}catch{return null}},[t]),m=n.useCallback(()=>{t&&(s.current?(i.current.contentWindow.location.href=t,s.current=!1):i.current.contentWindow.location.replace(t))},[t]);return n.useEffect(()=>{m()},[t]),e.jsxs("div",{className:f.root,children:[e.jsx(X,{displayUrl:d}),e.jsx("div",{className:f.body,children:e.jsx("iframe",{src:"about:blank",ref:i,className:f.iframe})})]})}function ee(){return e.jsx(q,{children:e.jsx(z,{leftPanel:e.jsx(J,{}),rightPanel:e.jsx(V,{})})})}function ye(t){return e.jsx(_.Provider,{value:t,children:e.jsx(w,{children:e.jsx(S,{children:e.jsx(C,{children:e.jsx(ee,{})})})})})}export{ye as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.