PageSourceSearch

https://slayhire.ai/assets/ResumeStyleControls-GL5W4qdL.js

js slayhire.ai collected 2026-10-02 01:13:11 UTC 11,156 bytes, 1 lines download raw bytes

1import"./rolldown-runtime-COnpUsM8.js";import{i as e,t}from"./react-B_hkAARH.js";import{t as n}from"./MIcon-203696qL.js";import{t as r}from"./resume-format-Ci6BVOIG.js";e();var i=r(),a=t(),o=[`Times New Roman`,`Helvetica`,`Arial`],s=[{value:`letter`,label:`Letter (8.5" × 11")`},{value:`a4`,label:`A4 (8.27" × 11.69")`}];function c({previewStyle:e,setPreviewStyle:t,scope:r=`resume`}){let c=r===`template`,p=e=>t(t=>({...t,...e})),m=(e,n)=>t(t=>({...t,spacing:{...t.spacing,[e]:parseFloat(n)}})),h=e=>t(t=>({...t,template_preset:e,spacing:{...i.SPACING_PRESETS[e]}})),g=()=>t({...i.DEFAULT_STYLE,spacing:{...i.DEFAULT_STYLE.spacing},auto_fit:!1,fit_one_page:!1});return(0,a.jsxs)(`div`,{className:`space-y-4 px-1`,children:[!c&&(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`div`,{className:`text-sm font-semibold text-[var(--sh-ink)] mb-2`,children:`Page Size`}),(0,a.jsx)(`select`,{value:e.paper_size,onChange:e=>p({paper_size:e.target.value}),className:`w-full px-3 py-2 text-sm bg-[var(--sh-s1)] border border-[var(--sh-line)] rounded-lg focus:outline-none focus:ring-2 focus:ring-primary`,children:s.map(e=>(0,a.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:[`standard`,`compact`].map(t=>{let r=e.template_preset===t;return(0,a.jsxs)(`button`,{onClick:()=>h(t),className:[`relative rounded-xl overflow-hidden border-2 transition-all`,r?`border-emerald-400 ring-2 ring-emerald-200`:`border-[var(--sh-line)] hover:border-[var(--sh-line)]`].join(` `),children:[(0,a.jsxs)(`div`,{className:`bg-white always-light px-3 py-3 h-32 text-[5px] leading-[7px] text-[var(--sh-ink-2)] overflow-hidden text-left`,children:[(0,a.jsx)(`div`,{className:`text-center font-bold text-[8px] mb-1`,children:`Resume`}),(0,a.jsx)(`div`,{className:`border-t border-[var(--sh-line)] my-1`}),Array.from({length:t===`compact`?22:16}).map((e,n)=>(0,a.jsx)(`div`,{className:n%5==0?`font-bold mt-0.5`:``,children:`─`.repeat(t===`compact`?30:22)},n))]}),(0,a.jsx)(`div`,{className:`text-xs font-medium py-1.5 text-center bg-[var(--sh-s1)] border-t border-[var(--sh-line-soft)] capitalize text-[var(--sh-ink-2)]`,children:t}),r&&t===`standard`&&(0,a.jsxs)(`div`,{className:`absolute top-1 left-1 px-1.5 py-0.5 bg-emerald-500 text-white text-[9px] font-medium rounded inline-flex items-center gap-0.5`,children:[(0,a.jsx)(n,{n:`star`,className:`text-[10px]`}),` Recommended`]})]},t)})}),c?(0,a.jsxs)(`button`,{onClick:g,className:`w-full px-3 py-2 text-sm border border-[var(--sh-line)] rounded-lg hover:bg-[var(--sh-s2)] text-[var(--sh-ink-2)] flex items-center justify-center gap-2`,children:[(0,a.jsx)(n,{n:`restart_alt`,className:`text-base`}),`Reset to defaults`]}):(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsxs)(`button`,{onClick:()=>p({fit_one_page:!e.fit_one_page}),className:`flex-1 px-3 py-2.5 bg-emerald-100 hover:bg-emerald-200 dark:bg-emerald-900/30 dark:hover:bg-emerald-900/50 text-emerald-700 dark:text-emerald-300 text-sm font-medium rounded-lg flex items-center justify-center gap-2`,children:[(0,a.jsx)(n,{n:`auto_fix_high`,className:`text-base`}),`Fit Resume to One Page`]}),(0,a.jsx)(`button`,{onClick:g,title:`Reset`,className:`p-2.5 border border-[var(--sh-line)] rounded-lg hover:bg-[var(--sh-s2)]`,children:(0,a.jsx)(n,{n:`restart_alt`,className:`text-base`})})]}),!c&&(0,a.jsx)(d,{label:`Auto Fit Resume to One Page`,value:e.auto_fit,onChange:e=>p({auto_fit:e})}),(0,a.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,a.jsx)(`div`,{className:`text-sm font-semibold text-[var(--sh-ink)]`,children:`Accent Color`}),(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsx)(`input`,{type:`color`,value:e.accent_color,onChange:e=>p({accent_color:e.target.value}),className:`w-8 h-8 rounded-md border border-[var(--sh-line)] cursor-pointer bg-transparent p-0.5`,title:`Section headings & rules`}),(0,a.jsx)(`span`,{className:`text-xs text-[var(--sh-ink-2)] uppercase tabular-nums`,children:e.accent_color})]})]}),(0,a.jsxs)(`div`,{className:`space-y-3`,children:[(0,a.jsx)(`div`,{className:`text-sm font-semibold text-[var(--sh-ink)]`,children:`Font`}),(0,a.jsx)(f,{label:`Font Family`,children:(0,a.jsx)(`select`,{value:e.font_family,onChange:e=>p({font_family:e.target.value}),className:`w-full px-3 py-2 text-sm bg-[var(--sh-s1)] border border-[var(--sh-line)] rounded-lg focus:outline-none focus:ring-2 focus:ring-primary`,children:o.map(e=>(0,a.jsx)(`option`,{value:e,children:e},e))})}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,a.jsx)(l,{label:`Name`,value:e.size_name,min:16,max:32,onChange:e=>p({size_name:e})}),(0,a.jsx)(l,{label:`Section Headers`,value:e.size_section,min:10,max:18,onChange:e=>p({size_section:e})}),(0,a.jsx)(l,{label:`Sub-Headers`,value:e.size_subheader,min:9,max:16,onChange:e=>p({size_subheader:e})}),(0,a.jsx)(l,{label:`Body Text`,value:e.size_body,min:8,max:14,onChange:e=>p({size_body:e})})]})]}),(0,a.jsxs)(`div`,{className:`space-y-3`,children:[(0,a.jsx)(`div`,{className:`text-sm font-semibold text-[var(--sh-ink)]`,children:`Content Style`}),(0,a.jsx)(f,{label:`Date Format`,children:(0,a.jsxs)(`select`,{value:e.date_format,onChange:e=>p({date_format:e.target.value}),className:`w-full px-3 py-2 text-sm bg-[var(--sh-s1)] border border-[var(--sh-line)] rounded-lg focus:outline-none focus:ring-2 focus:ring-primary`,children:[(0,a.jsx)(`option`,{value:`as_written`,children:`As written on your resume`}),(0,a.jsx)(`option`,{value:`short_month`,children:`Short month name (Jan 2024)`}),(0,a.jsx)(`option`,{value:`numeric`,children:`Numeric (01/2024)`})]})}),(0,a.jsx)(f,{label:`Bullet Icon`,children:(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[{v:`dot`,label:`•`},{v:`dash`,label:`—`}].map(t=>(0,a.jsx)(`button`,{onClick:()=>p({bullet_icon:t.v}),className:[`px-3 py-2 text-sm rounded-lg border transition-colors`,e.bullet_icon===t.v?`border-primary ring-1 ring-primary bg-primary/5 text-[var(--sh-ink)]`:`border-[var(--sh-line)] text-[var(--sh-ink-2)] hover:bg-[var(--sh-s2)]`].join(` `),children:t.label},t.v))})})]}),(0,a.jsxs)(`div`,{className:`space-y-3`,children:[(0,a.jsx)(`div`,{className:`text-sm font-semibold text-[var(--sh-ink)]`,children:`Layout`}),(0,a.jsx)(f,{label:`Header Alignment`,children:(0,a.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:[`left`,`center`,`right`].map(t=>(0,a.jsx)(`button`,{onClick:()=>p({header_align:t}),className:[`px-3 py-2 text-sm rounded-lg border capitalize transition-colors`,e.header_align===t?`border-primary ring-1 ring-primary bg-primary/5 text-[var(--sh-ink)]`:`border-[var(--sh-line)] text-[var(--sh-ink-2)] hover:bg-[var(--sh-s2)]`].join(` `),children:t},t))})}),(0,a.jsx)(f,{label:`Header Divider`,children:(0,a.jsxs)(`button`,{type:`button`,onClick:()=>p({hide_divider:!e.hide_divider}),role:`switch`,"aria-checked":!e.hide_divider,className:`w-full flex items-center justify-between px-3 py-2 rounded-lg border border-[var(--sh-line)] hover:bg-[var(--sh-s2)] transition-colors`,children:[(0,a.jsx)(`span`,{className:`text-sm text-[var(--sh-ink-2)]`,children:e.hide_divider?`Hidden`:`Shown`}),(0,a.jsx)(`span`,{className:[`relative inline-flex h-5 w-9 shrink-0 rounded-full transition-colors`,e.hide_divider?`bg-[var(--sh-s3)]`:`bg-primary`].join(` `),children:(0,a.jsx)(`span`,{className:[`absolute top-0.5 h-4 w-4 roun
1ded-full bg-white shadow transition-transform`,e.hide_divider?`translate-x-0.5`:`translate-x-[18px]`].join(` `)})})]})}),(0,a.jsx)(f,{label:`Skills Layout`,children:(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[{v:`two_col`,label:`Two-column`},{v:`stacked`,label:`Single line`}].map(t=>(0,a.jsx)(`button`,{onClick:()=>p({skills_layout:t.v}),className:[`px-3 py-2 text-xs font-medium rounded-lg border transition-colors`,e.skills_layout===t.v?`border-primary ring-1 ring-primary bg-primary/5 text-[var(--sh-ink)]`:`border-[var(--sh-line)] text-[var(--sh-ink-2)] hover:bg-[var(--sh-s2)]`].join(` `),children:t.label},t.v))})})]}),(0,a.jsxs)(`div`,{className:`space-y-2 bg-[var(--sh-s1)] border border-[var(--sh-line)] rounded-xl p-3`,children:[(0,a.jsx)(`div`,{className:`text-sm font-semibold text-[var(--sh-ink)]`,children:`Spacing & Margin`}),(0,a.jsx)(u,{label:`Section Spacing`,value:e.spacing.section,onChange:e=>m(`section`,e)}),(0,a.jsx)(u,{label:`Entry Spacing`,value:e.spacing.entry,onChange:e=>m(`entry`,e)}),(0,a.jsx)(u,{label:`Line Spacing`,value:e.spacing.line,onChange:e=>m(`line`,e)}),(0,a.jsx)(u,{label:`Top & Bottom Margin`,value:e.spacing.margin_y,onChange:e=>m(`margin_y`,e)}),(0,a.jsx)(u,{label:`Side Margins`,value:e.spacing.margin_x,onChange:e=>m(`margin_x`,e)}),(0,a.jsx)(d,{label:`Align Text Left & Right`,value:e.justify,onChange:e=>p({justify:e})})]}),(0,a.jsxs)(`button`,{onClick:g,className:`w-full px-3 py-2 text-sm border border-[var(--sh-line)] rounded-lg hover:bg-[var(--sh-s2)] text-[var(--sh-ink-2)] flex items-center justify-center gap-2`,children:[(0,a.jsx)(n,{n:`restart_alt`,className:`text-base`}),`Reset formatting`]})]})}function l({label:e,value:t,min:n,max:r,onChange:i}){return(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsx)(`div`,{className:`text-xs text-[var(--sh-ink-2)]`,children:e}),(0,a.jsx)(`select`,{value:t,onChange:e=>i(parseInt(e.target.value,10)),className:`w-full px-2 py-1.5 text-sm bg-[var(--sh-s1)] border border-[var(--sh-line)] rounded-lg focus:outline-none focus:ring-2 focus:ring-primary`,children:Array.from({length:r-n+1},(e,t)=>n+t).map(e=>(0,a.jsx)(`option`,{value:e,children:e},e))})]})}function u({label:e,value:t,onChange:n,min:r=0,max:i=2,step:o=.05}){let s=Number(t)||0,c=(s-r)/(i-r)*100;return(0,a.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,a.jsx)(`div`,{className:`text-xs text-[var(--sh-ink-2)]`,children:e}),(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsxs)(`span`,{className:`text-[11px] font-semibold text-emerald-600 dark:text-emerald-400 tabular-nums w-9 text-right`,children:[Math.round(c),`%`]}),(0,a.jsx)(`input`,{type:`range`,min:r,max:i,step:o,value:s,onChange:e=>n(e.target.value),"aria-label":e,"aria-valuetext":`${Math.round(c)} percent`,className:`flex-1 accent-[#10b981]`}),(0,a.jsx)(`span`,{className:`text-[10px] text-[var(--sh-ink-3)] tabular-nums w-9`,children:`100%`})]})]})}function d({label:e,value:t,onChange:r}){return(0,a.jsxs)(`button`,{onClick:()=>r(!t),className:`w-full flex items-center justify-between px-3 py-2 text-sm`,children:[(0,a.jsxs)(`span`,{className:`text-[var(--sh-ink-2)] flex items-center gap-1`,children:[e,(0,a.jsx)(n,{n:`help`,className:`text-sm text-[var(--sh-ink-3)]`})]}),(0,a.jsx)(`span`,{className:[`relative inline-flex h-5 w-9 rounded-full transition-colors`,t?`bg-emerald-500`:`bg-[var(--sh-s3)]`].join(` `),children:(0,a.jsx)(`span`,{className:[`inline-block h-4 w-4 rounded-full bg-white transform transition-transform mt-0.5`,t?`translate-x-4`:`translate-x-0.5`].join(` `)})})]})}function f({label:e,children:t}){return(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsx)(`div`,{className:`text-xs text-[var(--sh-ink-2)]`,children:e}),t]})}export{c as t};

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.