@invisibleloop/pulse 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/.claude/settings.local.json +113 -0
  2. package/.github/workflows/publish.yml +11 -21
  3. package/docs/public/.pulse-ui-version +1 -1
  4. package/docs/public/docs.css +19 -1
  5. package/docs/public/pulse-ui.css +1 -0
  6. package/docs/server.js +5 -2
  7. package/docs/src/lib/highlight.js +57 -13
  8. package/docs/src/lib/layout.js +5 -2
  9. package/docs/src/pages/faq.js +5 -2
  10. package/docs/src/pages/home.js +9 -5
  11. package/docs/src/pages/meta.js +21 -0
  12. package/docs/src/pages/routing.js +12 -1
  13. package/package.json +1 -1
  14. package/src/agent/guide-routing.md +20 -0
  15. package/src/agent/guide-spec.md +9 -1
  16. package/src/cli/scaffold.js +63 -2
  17. package/src/server/index.js +21 -6
  18. package/src/server/server.test.js +47 -0
  19. package/docs/public/dist/accessibility.boot-5DVTARJU.js +0 -115
  20. package/docs/public/dist/actions.boot-P66HKQEM.js +0 -164
  21. package/docs/public/dist/auth.boot-IMAJAUPH.js +0 -140
  22. package/docs/public/dist/caching.boot-DVR6KDE7.js +0 -53
  23. package/docs/public/dist/components--accordion.boot-3HVKMNWC.js +0 -11
  24. package/docs/public/dist/components--alert.boot-GCEXOZAC.js +0 -6
  25. package/docs/public/dist/components--app-badge.boot-DVT3GCHJ.js +0 -6
  26. package/docs/public/dist/components--avatar.boot-PSW24EVA.js +0 -5
  27. package/docs/public/dist/components--badge.boot-TYDY2RMK.js +0 -7
  28. package/docs/public/dist/components--banner.boot-EI5PZSZK.js +0 -7
  29. package/docs/public/dist/components--breadcrumbs.boot-SMA2E2GO.js +0 -34
  30. package/docs/public/dist/components--button.boot-J54BQM2E.js +0 -23
  31. package/docs/public/dist/components--card.boot-PZGNDIB6.js +0 -138
  32. package/docs/public/dist/components--carousel.boot-TP6LPFZZ.js +0 -12
  33. package/docs/public/dist/components--charts.boot-2EOYQWKL.js +0 -108
  34. package/docs/public/dist/components--checkbox.boot-DS5BSL6T.js +0 -54
  35. package/docs/public/dist/components--cluster.boot-HHVIBBJG.js +0 -9
  36. package/docs/public/dist/components--code-window.boot-2GR2DV33.js +0 -20
  37. package/docs/public/dist/components--container.boot-7LOOGK2K.js +0 -5
  38. package/docs/public/dist/components--cta.boot-FSNZ5YRT.js +0 -11
  39. package/docs/public/dist/components--divider.boot-3NI2C3QG.js +0 -6
  40. package/docs/public/dist/components--empty.boot-YX2UR3PV.js +0 -7
  41. package/docs/public/dist/components--feature.boot-MUD7NSUO.js +0 -13
  42. package/docs/public/dist/components--fieldset.boot-J7BYHMKF.js +0 -19
  43. package/docs/public/dist/components--fileupload.boot-NIKVTTPD.js +0 -52
  44. package/docs/public/dist/components--footer.boot-EYUK5FRG.js +0 -14
  45. package/docs/public/dist/components--grid.boot-URDQVDDR.js +0 -59
  46. package/docs/public/dist/components--heading.boot-BPQKU43E.js +0 -44
  47. package/docs/public/dist/components--hero.boot-4RAPRGAB.js +0 -17
  48. package/docs/public/dist/components--icons.boot-ZITNU5JP.js +0 -68
  49. package/docs/public/dist/components--image.boot-XEEGHQZF.js +0 -19
  50. package/docs/public/dist/components--input.boot-SGASZG5K.js +0 -7
  51. package/docs/public/dist/components--list.boot-W3XC5MHD.js +0 -55
  52. package/docs/public/dist/components--media.boot-5VFIETZO.js +0 -13
  53. package/docs/public/dist/components--modal.boot-RZUYXBN2.js +0 -47
  54. package/docs/public/dist/components--nav.boot-ODBOHU7O.js +0 -33
  55. package/docs/public/dist/components--pricing.boot-4AQ4ZVBY.js +0 -21
  56. package/docs/public/dist/components--progress.boot-GHAGYZOK.js +0 -30
  57. package/docs/public/dist/components--prose.boot-QANJL6JI.js +0 -67
  58. package/docs/public/dist/components--pullquote.boot-Q2WMNAZU.js +0 -22
  59. package/docs/public/dist/components--radio.boot-TJRDQ2OL.js +0 -75
  60. package/docs/public/dist/components--rating.boot-QBAN6DEL.js +0 -38
  61. package/docs/public/dist/components--search.boot-PXH5O5AG.js +0 -17
  62. package/docs/public/dist/components--section.boot-AQGIYHWW.js +0 -12
  63. package/docs/public/dist/components--segmented.boot-BEVTKEJO.js +0 -33
  64. package/docs/public/dist/components--select.boot-47X5RHOC.js +0 -10
  65. package/docs/public/dist/components--slider.boot-PSRRX7XL.js +0 -47
  66. package/docs/public/dist/components--spinner.boot-MZ5MO2OH.js +0 -22
  67. package/docs/public/dist/components--stack.boot-DI4NJXBF.js +0 -9
  68. package/docs/public/dist/components--stat.boot-QMFUWBQT.js +0 -9
  69. package/docs/public/dist/components--stepper.boot-34PP2NEV.js +0 -22
  70. package/docs/public/dist/components--table.boot-FCQGSFIQ.js +0 -11
  71. package/docs/public/dist/components--testimonial.boot-DWQPDKYG.js +0 -11
  72. package/docs/public/dist/components--textarea.boot-QVXLBOJ5.js +0 -4
  73. package/docs/public/dist/components--timeline.boot-26LN52P2.js +0 -95
  74. package/docs/public/dist/components--toggle.boot-IQQEI76S.js +0 -29
  75. package/docs/public/dist/components--tooltip.boot-LGHCO6NN.js +0 -9
  76. package/docs/public/dist/components.boot-SE6PQ4P7.js +0 -103
  77. package/docs/public/dist/config.boot-DTRRWUE6.js +0 -126
  78. package/docs/public/dist/constraints.boot-DUHDZBMC.js +0 -71
  79. package/docs/public/dist/deploy.boot-SLAD3NI2.js +0 -163
  80. package/docs/public/dist/docs-8e3d4b5c.css +0 -1
  81. package/docs/public/dist/extending.boot-UA3CN243.js +0 -159
  82. package/docs/public/dist/faq.boot-6EQAWLQR.js +0 -43
  83. package/docs/public/dist/getting-started.boot-TDKIFL5U.js +0 -86
  84. package/docs/public/dist/guard.boot-AUHAWTG4.js +0 -80
  85. package/docs/public/dist/home.boot-BVQXRH32.js +0 -383
  86. package/docs/public/dist/how-it-works.boot-LTWAKWKW.js +0 -104
  87. package/docs/public/dist/hydration.boot-JRM6IPJL.js +0 -78
  88. package/docs/public/dist/images.boot-M6ZVKTZS.js +0 -80
  89. package/docs/public/dist/manifest.json +0 -94
  90. package/docs/public/dist/meta.boot-7NXGPHR4.js +0 -79
  91. package/docs/public/dist/mutations.boot-F6F43UDX.js +0 -79
  92. package/docs/public/dist/navigation.boot-AOXWS3ZF.js +0 -57
  93. package/docs/public/dist/performance.boot-C3UPCOBK.js +0 -98
  94. package/docs/public/dist/persist.boot-WT32PQOQ.js +0 -61
  95. package/docs/public/dist/project-structure.boot-FB3LRVJ4.js +0 -63
  96. package/docs/public/dist/prompt-examples.boot-YKR4VDK4.js +0 -31
  97. package/docs/public/dist/pulse-ui-81a85c03.css +0 -1
  98. package/docs/public/dist/raw-responses.boot-M4KA5YXL.js +0 -104
  99. package/docs/public/dist/routing.boot-FNX5FDGH.js +0 -70
  100. package/docs/public/dist/runtime-B73WLANC.js +0 -1
  101. package/docs/public/dist/runtime-KO4BHUQ3.js +0 -49
  102. package/docs/public/dist/runtime-L2HNXIHW.js +0 -59
  103. package/docs/public/dist/runtime-QFURDKA2.js +0 -5
  104. package/docs/public/dist/runtime-UVPXO4IR.js +0 -375
  105. package/docs/public/dist/runtime-VMJA3Z4N.js +0 -10
  106. package/docs/public/dist/runtime-ZJ4FXT5O.js +0 -11
  107. package/docs/public/dist/server-api.boot-K7X3LCFB.js +0 -219
  108. package/docs/public/dist/server-data.boot-Y7HQYC4R.js +0 -157
  109. package/docs/public/dist/slash-commands.boot-V2UV7OW2.js +0 -26
  110. package/docs/public/dist/spec.boot-2WU7ZHCV.js +0 -159
  111. package/docs/public/dist/state.boot-B24GUE3R.js +0 -73
  112. package/docs/public/dist/store.boot-TLIB4XHH.js +0 -150
  113. package/docs/public/dist/streaming.boot-W2DZSMW4.js +0 -80
  114. package/docs/public/dist/stripe.boot-QN3C2GEL.js +0 -164
  115. package/docs/public/dist/supabase.boot-BG4XXLZE.js +0 -303
  116. package/docs/public/dist/testing.boot-6U4WKMTE.js +0 -130
  117. package/docs/public/dist/validation.boot-PQHYGW5B.js +0 -100
@@ -1,52 +0,0 @@
1
- import{a as e,b as m}from"./runtime-ZJ4FXT5O.js";import{ob as t}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s,h as n,i as r}from"./runtime-L2HNXIHW.js";import{a as i,b as d}from"./runtime-B73WLANC.js";var{prev:u,next:f}=s("/components/file-upload"),c={route:"/components/file-upload",meta:{title:"File Upload \u2014 Pulse Docs",description:"Drag-and-drop file upload zone component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{fileName:"",fileSize:""},mutations:{setFile:(o,p)=>{let l=p.target.files[0];return l?{fileName:l.name,fileSize:(l.size/1024).toFixed(1)+" KB"}:{fileName:"",fileSize:""}}},view:o=>m({currentHref:"/components/file-upload",prev:u,next:f,name:"fileUpload",description:'Drag-and-drop upload zone with a hidden <code>&lt;input type="file"&gt;</code>. Clicking or dropping files opens the picker. Requires <code>pulse-ui.js</code> for drag highlighting and click-to-open behaviour.',content:`
2
-
3
- <h2 class="doc-h2" id="basic">Basic</h2>
4
- ${e(t({name:"file",label:"Upload file",hint:"PNG, JPG, PDF up to 10 MB",event:"change:setFile"})+(o.fileName?`<p class="u-mt-3 u-text-sm">Selected: <strong>${o.fileName}</strong> (${o.fileSize})</p>`:""),"fileUpload({ name: 'file', label: 'Upload file', hint: 'PNG, JPG, PDF up to 10 MB', event: 'change:setFile' })",{col:!0})}
5
-
6
- <h2 class="doc-h2" id="accept">Accepted file types</h2>
7
- ${e(t({name:"avatar",label:"Profile photo",accept:"image/*",hint:"PNG or JPG"}),"fileUpload({ name: 'avatar', label: 'Profile photo', accept: 'image/*', hint: 'PNG or JPG' })",{col:!0})}
8
-
9
- <h2 class="doc-h2" id="multiple">Multiple files</h2>
10
- ${e(t({name:"docs",label:"Attachments",multiple:!0,hint:"Select one or more files"}),"fileUpload({ name: 'docs', label: 'Attachments', multiple: true, hint: 'Select one or more files' })",{col:!0})}
11
-
12
- <h2 class="doc-h2" id="error">Error state</h2>
13
- ${e(t({name:"file",label:"Upload file",error:"File must be under 10 MB"}),"fileUpload({ name: 'file', label: 'Upload file', error: 'File must be under 10 MB' })",{col:!0})}
14
-
15
- <h2 class="doc-h2" id="disabled">Disabled</h2>
16
- ${e(t({name:"file",label:"Upload file",disabled:!0,hint:"Uploads are currently unavailable"}),"fileUpload({ name: 'file', label: 'Upload file', disabled: true, hint: 'Uploads are currently unavailable' })",{col:!0})}
17
-
18
- <h2 class="doc-h2" id="with-action">Reading the file in an action</h2>
19
- <p class="u-mb-4 u-text-sm u-color-muted">Use the component inside a <code>&lt;form data-action="..."&gt;</code>. The file is available in FormData under <code>name</code>.</p>
20
- ${e(t({name:"attachment",label:"Attachment",accept:".pdf,.doc,.docx",required:!0}),`// view
21
- \`<form data-action="upload" class="u-flex u-flex-col u-gap-4">
22
- \${fileUpload({ name: 'attachment', label: 'Attachment', accept: '.pdf,.doc,.docx', required: true })}
23
- \${button({ label: 'Upload', type: 'submit', variant: 'primary' })}
24
- </form>\`
25
-
26
- // action
27
- upload: {
28
- onStart: (state) => ({ status: 'loading' }),
29
- run: async (state, serverState, formData) => {
30
- const file = formData.get('attachment') // File object
31
- // process file...
32
- },
33
- onSuccess: (state) => ({ status: 'success' }),
34
- onError: (state, err) => ({ status: 'error', message: err.message }),
35
- }`,{col:!0})}
36
-
37
- <h2 class="doc-h2" id="with-mutation">Live file name via mutation</h2>
38
- <p class="u-mb-4 u-text-sm u-color-muted">Use <code>event: 'change:mutationName'</code> to capture the selected filename in state immediately \u2014 without a form submission.</p>
39
- ${e(t({name:"photo",label:"Photo",event:"change:setFile",accept:"image/*"}),`// state
40
- { fileName: '' }
41
-
42
- // mutation \u2014 e.target.files[0] gives the File object
43
- setFile: (state, e) => ({ fileName: e.target.files[0]?.name ?? '' })
44
-
45
- // view
46
- fileUpload({ name: 'photo', label: 'Photo', accept: 'image/*', event: 'change:setFile' })
47
- \${state.fileName ? \`<p class="u-mt-2 u-text-sm">\${state.fileName}</p>\` : ''}`,{col:!0})}
48
-
49
- ${r("note","The file object itself cannot be stored in Pulse state \u2014 state must be serialisable. Store the filename or a preview URL (via <code>URL.createObjectURL</code>) instead, and upload the file in an action via FormData.")}
50
-
51
- ${n(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name \u2014 file available in FormData under this key"],["<code>label</code>","string","\u2014","Visible label text"],["<code>hint</code>","string","\u2014","Helper text, e.g. accepted types and max size"],["<code>error</code>","string","\u2014","Validation error message"],["<code>accept</code>","string","\u2014","Accepted MIME types or extensions, e.g. <code>image/*</code> or <code>.pdf,.docx</code>"],["<code>multiple</code>","boolean","false","Allow selecting multiple files"],["<code>required</code>","boolean","false",""],["<code>disabled</code>","boolean","false",""],["<code>event</code>","string","\u2014","data-event on the input \u2014 use <code>change:mutationName</code> to capture file selection in state"],["<code>id</code>","string","\u2014","Override the generated <code>id</code>"],["<code>class</code>","string","\u2014",""]])}
52
- `})};var a=document.getElementById("pulse-root");a&&!a.dataset.pulseMounted&&(a.dataset.pulseMounted="1",i(c,a,window.__PULSE_SERVER__||{},{ssr:!0}),d(a,i));var N=c;export{N as default};
@@ -1,14 +0,0 @@
1
- import{a as s,b as n}from"./runtime-ZJ4FXT5O.js";import{_a as a}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as l,h as r}from"./runtime-L2HNXIHW.js";import{a as e,b as i}from"./runtime-B73WLANC.js";var{prev:c,next:p}=l("/components/footer"),t={route:"/components/footer",meta:{title:"Footer \u2014 Pulse Docs",description:"Accessible site footer with logo slot, navigation links, and legal text.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>n({currentHref:"/components/footer",prev:c,next:p,name:"footer",description:"Accessible site footer with logo slot, navigation links, and legal text. Handles responsive stacking, hover states, and focus styles automatically.",content:`
2
- ${s(a({logo:"MyApp",logoHref:"/",links:[{label:"Docs",href:"/docs"},{label:"Pricing",href:"/pricing"},{label:"Blog",href:"/blog"},{label:"GitHub",href:"https://github.com"}],legal:"\xA9 2026 MyApp Ltd."}),`footer({
3
- logo: 'MyApp',
4
- logoHref: '/',
5
- links: [
6
- { label: 'Docs', href: '/docs' },
7
- { label: 'Pricing', href: '/pricing' },
8
- { label: 'GitHub', href: 'https://github.com' },
9
- ],
10
- legal: '\xA9 2026 MyApp Ltd.',
11
- })`)}
12
-
13
- ${r(["Prop","Type","Default",""],[["<code>logo</code>","string (HTML)","\u2014","Raw HTML slot \u2014 SVG, img, or text"],["<code>logoHref</code>","string","'/'","Logo link destination"],["<code>links</code>","array","[]","[{label, href}] \u2014 footer navigation links"],["<code>legal</code>","string","\u2014","Copyright / legal text"]])}
14
- `})};var o=document.getElementById("pulse-root");o&&!o.dataset.pulseMounted&&(o.dataset.pulseMounted="1",e(t,o,window.__PULSE_SERVER__||{},{ssr:!0}),i(o,e));var v=t;export{v as default};
@@ -1,59 +0,0 @@
1
- import{a as t,b as u}from"./runtime-ZJ4FXT5O.js";import{Ca as n,Ha as r,Ia as c,Pa as o,c as i}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as d,h as p}from"./runtime-L2HNXIHW.js";import{a,b as m}from"./runtime-B73WLANC.js";var{prev:h,next:f}=d("/components/grid"),e=g=>`<div style="background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:1.25rem;text-align:center;color:var(--muted)">${g}</div>`,l={route:"/components/grid",meta:{title:"Grid \u2014 Pulse Docs",description:"Grid component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>u({currentHref:"/components/grid",prev:h,next:f,name:"grid",description:"Responsive CSS grid. Collapses to a single column on mobile. Direct children of the content slot become grid items \u2014 no wrapper needed.",content:`
2
- <h2 class="doc-h2" id="cols">Column counts</h2>
3
- <p>Use <code>cols</code> to set the number of columns. All layouts collapse to one column on mobile.</p>
4
-
5
- <h3 class="doc-h3">2 columns</h3>
6
- ${t(o({cols:2,content:e("Left")+e("Right")}),"grid({ cols: 2, content: left + right })")}
7
-
8
- <h3 class="doc-h3">3 columns (default)</h3>
9
- ${t(o({cols:3,content:e("One")+e("Two")+e("Three")}),"grid({ cols: 3, content: items.join('') })")}
10
-
11
- <h3 class="doc-h3">4 columns</h3>
12
- ${t(o({cols:4,content:e("A")+e("B")+e("C")+e("D")}),"grid({ cols: 4, content: items.join('') })")}
13
-
14
- <h2 class="doc-h2" id="gap">Gap sizes</h2>
15
- <p>Control spacing between items with <code>gap: 'sm' | 'md' | 'lg'</code>. Default is <code>'md'</code>.</p>
16
-
17
- <h3 class="doc-h3">Small gap</h3>
18
- ${t(o({cols:3,gap:"sm",content:e("One")+e("Two")+e("Three")}),"grid({ cols: 3, gap: 'sm', content: items.join('') })")}
19
-
20
- <h3 class="doc-h3">Large gap</h3>
21
- ${t(o({cols:3,gap:"lg",content:e("One")+e("Two")+e("Three")}),"grid({ cols: 3, gap: 'lg', content: items.join('') })")}
22
-
23
- <h2 class="doc-h2" id="with-components">With components</h2>
24
- <p>Grid accepts any HTML string as content \u2014 pass other component outputs directly.</p>
25
-
26
- <h3 class="doc-h3">Feature grid</h3>
27
- ${t(o({cols:3,content:[c({icon:"\u26A1",title:"Fast",description:"Sub-100ms server responses with streaming SSR."}),c({icon:"\u{1F512}",title:"Secure",description:"Security headers on every response, including errors."}),c({icon:"\u{1F3AF}",title:"Simple",description:"No build step, no virtual DOM, no dependencies."})].join("")}),`grid({
28
- cols: 3,
29
- content: features.map(f => feature(f)).join(''),
30
- })`)}
31
-
32
- <h3 class="doc-h3">Stat grid</h3>
33
- ${t(o({cols:4,content:[n({label:"Monthly users",value:"24.8k",change:"+12%",trend:"up"}),n({label:"Revenue",value:"$18.2k",change:"+8.4%",trend:"up"}),n({label:"Churn rate",value:"2.1%",change:"\u22120.3%",trend:"down"}),n({label:"Uptime",value:"99.98%",change:"0.0%",trend:"neutral"})].join("")}),`grid({
34
- cols: 4,
35
- content: stats.map(s => stat(s)).join(''),
36
- })`)}
37
-
38
- <h3 class="doc-h3">Testimonial grid</h3>
39
- ${t(o({cols:3,content:[r({quote:"Shipped our redesign in a weekend. No boilerplate, no config hell.",name:"Alex Morgan",role:"CTO at Launchpad",rating:5}),r({quote:"The streaming SSR makes our pages feel instant. Lighthouse is happy.",name:"Sara Kim",role:"Lead Engineer, Orbit",rating:5}),r({quote:"Finally a UI kit that doesn't fight the platform. Just HTML.",name:"Dan Okafor",role:"Founder, Stackly",rating:5})].join("")}),`grid({
40
- cols: 3,
41
- content: testimonials.map(t => testimonial(t)).join(''),
42
- })`)}
43
-
44
- <h3 class="doc-h3">Card grid</h3>
45
- ${t(o({cols:3,gap:"md",content:[i({title:"Getting started",content:'<p style="color:var(--muted);margin:0">Install and run your first Pulse app in under five minutes.</p>',footer:'<span class="ui-badge">Guide</span>'}),i({title:"Components",content:'<p style="color:var(--muted);margin:0">30+ accessible, composable UI primitives ready to drop in.</p>',footer:'<span class="ui-badge">Reference</span>'}),i({title:"Deployment",content:'<p style="color:var(--muted);margin:0">Static hosting, Node servers, or edge runtimes \u2014 one build.</p>',footer:'<span class="ui-badge">Deploy</span>'})].join("")}),`grid({
46
- cols: 3,
47
- content: docs.map(d => card({
48
- title: d.title,
49
- content: \`<p>\${d.summary}</p>\`,
50
- footer: badge({ label: d.tag }),
51
- })).join(''),
52
- })`)}
53
-
54
- <h2 class="doc-h2" id="1col">Single column</h2>
55
- <p>Use <code>cols: 1</code> for a stacked list with consistent spacing \u2014 useful for form sections or timelines.</p>
56
- ${t(o({cols:1,gap:"sm",content:e("Step one")+e("Step two")+e("Step three")}),"grid({ cols: 1, gap: 'sm', content: steps.join('') })")}
57
-
58
- ${p(["Prop","Type","Default",""],[["<code>content</code>","string (HTML)","\u2014","Raw HTML slot \u2014 direct children are grid items"],["<code>cols</code>","number","3","1 \xB7 2 \xB7 3 \xB7 4"],["<code>gap</code>","string","'md'","'sm' \xB7 'md' \xB7 'lg'"]])}
59
- `})};var s=document.getElementById("pulse-root");s&&!s.dataset.pulseMounted&&(s.dataset.pulseMounted="1",a(l,s,window.__PULSE_SERVER__||{},{ssr:!0}),m(s,a));var C=l;export{C as default};
@@ -1,44 +0,0 @@
1
- import{a as t,b as d}from"./runtime-ZJ4FXT5O.js";import{c as r,ub as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as n,h as i}from"./runtime-L2HNXIHW.js";import{a as l,b as c}from"./runtime-B73WLANC.js";var{prev:h,next:u}=n("/components/heading"),a={route:"/components/heading",meta:{title:"Heading \u2014 Pulse Docs",description:"Styled semantic heading component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/heading",prev:h,next:u,name:"heading",description:"Styled semantic heading. Renders the correct HTML tag (<code>h1</code>\u2013<code>h6</code>) with consistent typography tokens. Use this instead of raw heading tags so you get the right visual style without remembering utility classes.",content:`
2
-
3
- <h2 class="doc-h2" id="levels">All levels</h2>
4
- <p>Each level has a default visual size. The semantic tag and visual size are independent \u2014 see <a href="#size-override">size override</a> below.</p>
5
- ${t([1,2,3,4,5,6].map(s=>e({level:s,text:`Heading level ${s}`})).join(""),`heading({ level: 1, text: 'Page title' })
6
- heading({ level: 2, text: 'Section title' })
7
- heading({ level: 3, text: 'Subsection' })
8
- heading({ level: 4, text: 'Card heading' })
9
- heading({ level: 5, text: 'Label' })
10
- heading({ level: 6, text: 'Caption' })`,{col:!0})}
11
-
12
- <h2 class="doc-h2" id="size-override">Size override</h2>
13
- <p>The <code>size</code> prop lets you use a different visual scale than the default for that level. Useful when you need the correct semantic structure for SEO or accessibility but want a different visual weight.</p>
14
- ${t([e({level:2,text:"Semantic h2, looks like h4",size:"xl"}),e({level:3,text:"Semantic h3, extra large",size:"4xl"})].join(""),`// h2 for structure, but visually smaller
15
- heading({ level: 2, text: 'Related articles', size: 'xl' })
16
-
17
- // h3 that needs to be visually prominent
18
- heading({ level: 3, text: 'Featured', size: '4xl' })`,{col:!0})}
19
-
20
- <h2 class="doc-h2" id="color">Color</h2>
21
- ${t([e({level:3,text:"Default colour"}),e({level:3,text:"Muted \u2014 for secondary labels",color:"muted"}),e({level:3,text:"Accent \u2014 for highlights",color:"accent"})].join(""),`heading({ level: 3, text: 'Default colour' })
22
- heading({ level: 3, text: 'Muted \u2014 for secondary labels', color: 'muted' })
23
- heading({ level: 3, text: 'Accent \u2014 for highlights', color: 'accent' })`,{col:!0})}
24
-
25
- <h2 class="doc-h2" id="spacing">Spacing</h2>
26
- <p><code>heading()</code> adds no margin. Use <code>u-mt-*</code> and <code>u-mb-*</code> utility classes to control spacing in context.</p>
27
- ${t(r({content:`
28
- ${e({level:2,text:"Account settings",class:"u-mb-2"})}
29
- <p class="u-text-muted u-text-sm">Manage your profile and preferences.</p>
30
- `}),`card({ content: \`
31
- \${heading({ level: 2, text: 'Account settings', class: 'u-mb-2' })}
32
- <p class="u-text-muted u-text-sm">Manage your profile and preferences.</p>
33
- \`})`,{col:!0})}
34
-
35
- <h2 class="doc-h2" id="balance">Preventing orphans</h2>
36
- <p>When a heading wraps across lines, the last line can be left with a single short word \u2014 an orphan. The <code>balance</code> prop adds <code>text-wrap: balance</code>, which distributes text evenly across all lines so no word is stranded.</p>
37
- ${t([e({level:2,text:"The quick brown fox jumps over the lazy dog tonight"}),e({level:2,text:"The quick brown fox jumps over the lazy dog tonight",balance:!0})].join('<p class="u-text-muted u-text-sm u-mt-2 u-mb-4">\u2191 without balance \u2014 \u2193 with balance: true</p>'),`// Without \u2014 last line may have a single word
38
- heading({ level: 2, text: 'The quick brown fox jumps over the lazy dog tonight' })
39
-
40
- // With \u2014 text distributed evenly across lines
41
- heading({ level: 2, text: 'The quick brown fox jumps over the lazy dog tonight', balance: true })`,{col:!0})}
42
-
43
- ${i(["Prop","Type","Default",""],[["<code>level</code>","number (1\u20136)","2","Controls both the HTML tag and the default visual size"],["<code>text</code>","string","\u2014","Heading text \u2014 escaped automatically"],["<code>size</code>","<code>xs | sm | base | lg | xl | 2xl | 3xl | 4xl</code>","\u2014","Override the visual font size independently of the semantic level. Defaults: h1=4xl, h2=3xl, h3=2xl, h4=xl, h5=base, h6=sm"],["<code>color</code>","<code>default | muted | accent</code>","<code>default</code>","Text colour token"],["<code>balance</code>","boolean","<code>false</code>","Adds <code>text-wrap: balance</code> \u2014 prevents orphaned words on the last line when the heading wraps"],["<code>class</code>","string","\u2014","Extra classes \u2014 use for spacing utilities such as <code>u-mb-4</code>"]])}
44
- `})};var o=document.getElementById("pulse-root");o&&!o.dataset.pulseMounted&&(o.dataset.pulseMounted="1",l(a,o,window.__PULSE_SERVER__||{},{ssr:!0}),c(o,l));var w=a;export{w as default};
@@ -1,17 +0,0 @@
1
- import{a as t,b as d}from"./runtime-ZJ4FXT5O.js";import{Ga as r,Ma as s}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as l,h as a}from"./runtime-L2HNXIHW.js";import{a as o,b as n}from"./runtime-B73WLANC.js";var{prev:p,next:c}=l("/components/hero"),i={route:"/components/hero",meta:{title:"Hero \u2014 Pulse Docs",description:"Hero component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/hero",prev:p,next:c,name:"hero",description:"Full-width hero section. The <code>actions</code> slot accepts any combination of <code>button()</code> and <code>appBadge()</code> calls. Set <code>align: 'left'</code> for a split-layout hero. Use <code>size: 'sm'</code> for inner-page headers that don't need the full vertical padding.",content:`
2
- ${t(r({eyebrow:"Now available",title:"The app your phone deserves",subtitle:"Beautifully simple. Ridiculously fast. Available on iOS and Android.",actions:s({store:"apple",href:"#"})+" "+s({store:"google",href:"#"})}),`hero({
3
- eyebrow: 'Now available',
4
- title: 'The app your phone deserves',
5
- subtitle: 'Beautifully simple. Ridiculously fast.',
6
- actions: appBadge({ store: 'apple', href: appStoreUrl }) +
7
- appBadge({ store: 'google', href: playStoreUrl }),
8
- })`)}
9
-
10
- ${t(r({title:"Blog",subtitle:"Thoughts on building for the web.",size:"sm"}),`hero({
11
- title: 'Blog',
12
- subtitle: 'Thoughts on building for the web.',
13
- size: 'sm',
14
- })`)}
15
-
16
- ${a(["Prop","Type","Default",""],[["<code>eyebrow</code>","string","\u2014","Small label above the title"],["<code>title</code>","string","\u2014",""],["<code>subtitle</code>","string","\u2014",""],["<code>actions</code>","string (HTML)","\u2014","Raw HTML slot"],["<code>align</code>","string","'center'","'center' or 'left'"],["<code>size</code>","string","'md'","'md' (5rem padding) or 'sm' (2.5rem top, no bottom) \u2014 use sm for inner-page headers"]])}
17
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",o(i,e,window.__PULSE_SERVER__||{},{ssr:!0}),n(e,o));var v=i;export{v as default};
@@ -1,68 +0,0 @@
1
- import{a as n,b as x}from"./runtime-ZJ4FXT5O.js";import{$ as ln,A as b,B as X,C as l,D as V,E as C,F as N,G as O,H as Z,I as _,Ia as o,J as W,K as j,L as J,M as t,N as K,O as z,P as Q,Q as Y,R as nn,S as en,T as on,U as cn,V as an,W as rn,X as tn,Y as d,Z as sn,_ as S,a as i,aa as dn,ba as pn,ca as mn,da as un,e as P,ea as p,f as U,fa as gn,g as $,ga as fn,h as D,ha as hn,i as M,ia as bn,j as L,ja as Cn,k as A,ka as zn,l as q,la as Sn,m as E,ma as wn,n as H,na as vn,o as T,oa as yn,p as I,pa as m,q as R,qa as e,r as c,ra as kn,s as g,sa as xn,t as a,ta as Pn,u as B,ua as Un,v as r,va as $n,w as f,wa as Dn,x as F,y as G,z as h}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as v,h as y}from"./runtime-L2HNXIHW.js";import{a as u,b as k}from"./runtime-B73WLANC.js";var{prev:En,next:Hn}=v("/components/icons"),Tn=[{group:"Navigation & Direction",icons:[{name:"iconArrowLeft",fn:P},{name:"iconArrowRight",fn:U},{name:"iconArrowUp",fn:$},{name:"iconArrowDown",fn:D},{name:"iconChevronLeft",fn:M},{name:"iconChevronRight",fn:L},{name:"iconChevronUp",fn:A},{name:"iconChevronDown",fn:q},{name:"iconExternalLink",fn:E},{name:"iconMenu",fn:H},{name:"iconX",fn:T},{name:"iconMoreHorizontal",fn:I},{name:"iconMoreVertical",fn:R}]},{group:"Status",icons:[{name:"iconCheck",fn:c},{name:"iconCheckCircle",fn:g},{name:"iconXCircle",fn:a},{name:"iconAlertCircle",fn:B},{name:"iconAlertTriangle",fn:r},{name:"iconInfo",fn:f}]},{group:"Actions",icons:[{name:"iconPlus",fn:F},{name:"iconMinus",fn:G},{name:"iconEdit",fn:h},{name:"iconTrash",fn:b},{name:"iconCopy",fn:X},{name:"iconSearch",fn:l},{name:"iconFilter",fn:V},{name:"iconDownload",fn:C},{name:"iconUpload",fn:N},{name:"iconRefresh",fn:O},{name:"iconSend",fn:Z}]},{group:"UI Controls",icons:[{name:"iconEye",fn:_},{name:"iconEyeOff",fn:W},{name:"iconLock",fn:j},{name:"iconUnlock",fn:J},{name:"iconSettings",fn:t},{name:"iconBell",fn:K}]},{group:"People & Communication",icons:[{name:"iconUser",fn:z},{name:"iconUsers",fn:Q},{name:"iconMail",fn:Y},{name:"iconMessageSquare",fn:nn}]},{group:"Navigation & Pages",icons:[{name:"iconHome",fn:en},{name:"iconMapPin",fn:Dn},{name:"iconLogOut",fn:on},{name:"iconLogIn",fn:cn}]},{group:"Content & Files",icons:[{name:"iconFile",fn:an},{name:"iconImage",fn:rn},{name:"iconLink",fn:tn},{name:"iconCode",fn:d},{name:"iconCalendar",fn:sn},{name:"iconClock",fn:S},{name:"iconBookmark",fn:ln},{name:"iconTag",fn:dn}]},{group:"Media & Rating",icons:[{name:"iconPlay",fn:pn},{name:"iconPause",fn:mn},{name:"iconVolume",fn:un},{name:"iconStar",fn:p},{name:"iconHeart",fn:gn}]},{group:"Devices",icons:[{name:"iconPhone",fn},{name:"iconGamepad",fn:hn}]},{group:"Hand Pointers",icons:[{name:"iconHandPointUp",fn:bn},{name:"iconHandPointDown",fn:Cn},{name:"iconHandPointLeft",fn:zn},{name:"iconHandPointRight",fn:Sn}]},{group:"Misc",icons:[{name:"iconGlobe",fn:yn},{name:"iconShield",fn:m},{name:"iconZap",fn:e},{name:"iconTrendingUp",fn:kn},{name:"iconTrendingDown",fn:xn},{name:"iconLoader",fn:Pn},{name:"iconGrid",fn:Un},{name:"iconBug",fn:$n}]},{group:"Theme",icons:[{name:"iconSun",fn:wn},{name:"iconMoon",fn:vn}]}];function In(){return Tn.map(({group:Mn,icons:Ln})=>`
2
- <h3 class="doc-h3" style="margin-top:2rem">${Mn}</h3>
3
- <div class="icon-grid">
4
- ${Ln.map(({name:An,fn:qn})=>`
5
- <div class="icon-grid-item">
6
- <div class="icon-grid-preview">${qn({size:20})}</div>
7
- <span class="icon-grid-name">${An}</span>
8
- </div>
9
- `).join("")}
10
- </div>
11
- `).join("")}var w={route:"/components/icons",meta:{title:"Icons \u2014 Pulse Docs",description:"Built-in icon set for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>x({currentHref:"/components/icons",prev:En,next:Hn,name:"icons",description:'55 curated icons. All are pure functions returning an SVG string \u2014 no external library, no DOM dependency, tree-shakeable. Style: 24\xD724 viewBox, <code>stroke="currentColor"</code>, compatible with any colour token.',content:`
12
-
13
- <h2 class="doc-h2" id="usage">Usage</h2>
14
- <p>Import the icon functions you need alongside other components. Call each as a function \u2014 optionally pass <code>size</code> and <code>class</code>.</p>
15
- ${n('<div style="display:flex;gap:1rem;align-items:center;flex-wrap:wrap">'+c({size:20})+l({size:20})+z({size:20})+p({size:20})+e({size:20})+t({size:20})+"</div>",`import { iconCheck, iconSearch, iconUser } from '@invisibleloop/pulse/ui'
16
-
17
- // Default size (16px)
18
- iconCheck()
19
-
20
- // Custom size
21
- iconSearch({ size: 20 })
22
-
23
- // With extra class
24
- iconUser({ size: 20, class: 'u-text-accent' })`)}
25
-
26
- <h2 class="doc-h2" id="with-button">With button</h2>
27
- <p>Pass an icon into the <code>icon</code> prop of <code>button()</code>.</p>
28
- ${n('<div style="display:flex;gap:.75rem;flex-wrap:wrap;align-items:center">'+i({label:"Download",variant:"primary",icon:C({size:14})})+i({label:"Edit",variant:"secondary",icon:h({size:14})})+i({label:"Delete",variant:"danger",icon:b({size:14})})+i({label:"Search",variant:"ghost",icon:l({size:14})})+"</div>",`button({ label: 'Download', variant: 'primary', icon: iconDownload({ size: 14 }) })
29
- button({ label: 'Edit', variant: 'secondary', icon: iconEdit({ size: 14 }) })
30
- button({ label: 'Delete', variant: 'danger', icon: iconTrash({ size: 14 }) })
31
- button({ label: 'Search', variant: 'ghost', icon: iconSearch({ size: 14 }) })`)}
32
-
33
- <h2 class="doc-h2" id="with-feature">With feature</h2>
34
- <p>Icons compose naturally into the <code>feature()</code> icon slot.</p>
35
- ${n('<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:1rem">'+o({icon:e({size:20}),title:"Fast",description:"Streaming SSR. No build step."})+o({icon:m({size:20}),title:"Secure",description:"Security headers on every response."})+o({icon:d({size:20}),title:"Simple",description:"Plain JS objects, no JSX."})+"</div>",`feature({ icon: iconZap({ size: 20 }), title: 'Fast', description: '...' })
36
- feature({ icon: iconShield({ size: 20 }), title: 'Secure', description: '...' })
37
- feature({ icon: iconCode({ size: 20 }), title: 'Simple', description: '...' })`)}
38
-
39
- <h2 class="doc-h2" id="background">Background</h2>
40
- <p>Add <code>bg: 'circle'</code> or <code>bg: 'square'</code> to wrap the icon in a tinted background. Use <code>bgColor</code> to pick the colour \u2014 defaults to <code>'accent'</code>.</p>
41
-
42
- <h3 class="doc-h3">Circle</h3>
43
- ${n('<div style="display:flex;gap:1rem;align-items:center;flex-wrap:wrap">'+e({size:20,bg:"circle",bgColor:"accent"})+c({size:20,bg:"circle",bgColor:"success"})+r({size:20,bg:"circle",bgColor:"warning"})+a({size:20,bg:"circle",bgColor:"error"})+t({size:20,bg:"circle",bgColor:"muted"})+"</div>",`iconZap({ size: 20, bg: 'circle', bgColor: 'accent' })
44
- iconCheck({ size: 20, bg: 'circle', bgColor: 'success' })
45
- iconAlertTriangle({ size: 20, bg: 'circle', bgColor: 'warning' })
46
- iconXCircle({ size: 20, bg: 'circle', bgColor: 'error' })
47
- iconSettings({ size: 20, bg: 'circle', bgColor: 'muted' })`)}
48
-
49
- <h3 class="doc-h3">Square (rounded)</h3>
50
- ${n('<div style="display:flex;gap:1rem;align-items:center;flex-wrap:wrap">'+e({size:20,bg:"square",bgColor:"accent"})+c({size:20,bg:"square",bgColor:"success"})+r({size:20,bg:"square",bgColor:"warning"})+a({size:20,bg:"square",bgColor:"error"})+t({size:20,bg:"square",bgColor:"muted"})+"</div>","iconZap({ size: 20, bg: 'square', bgColor: 'accent' })")}
51
-
52
- <h3 class="doc-h3">With feature()</h3>
53
- <p>Pairs naturally with the <code>feature()</code> icon slot at larger sizes.</p>
54
- ${n('<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:1rem">'+o({icon:e({size:22,bg:"square",bgColor:"accent"}),title:"Fast",description:"Streaming SSR, zero config."})+o({icon:m({size:22,bg:"square",bgColor:"success"}),title:"Secure",description:"Security headers by default."})+o({icon:d({size:22,bg:"square",bgColor:"muted"}),title:"Simple",description:"Plain JS objects, no JSX."})+"</div>",`feature({ icon: iconZap({ size: 22, bg: 'square', bgColor: 'accent' }), title: 'Fast', description: '...' })
55
- feature({ icon: iconShield({ size: 22, bg: 'square', bgColor: 'success' }), title: 'Secure', description: '...' })
56
- feature({ icon: iconCode({ size: 22, bg: 'square', bgColor: 'muted' }), title: 'Simple', description: '...' })`)}
57
-
58
- <h2 class="doc-h2" id="colour">Colour</h2>
59
- <p>Icons inherit <code>color</code> from their parent \u2014 use utility classes or CSS tokens to tint them.</p>
60
- ${n(`<div style="display:flex;gap:1.25rem;align-items:center"><span class="u-text-accent">${p({size:20})}</span><span class="u-text-green">${g({size:20})}</span><span class="u-text-red">${a({size:20})}</span><span class="u-text-yellow">${r({size:20})}</span><span class="u-text-blue">${f({size:20})}</span><span class="u-text-muted">${S({size:20})}</span></div>`,'<span class="u-text-accent">${iconStar({ size: 20 })}</span>\n<span class="u-text-green">${iconCheckCircle({ size: 20 })}</span>\n<span class="u-text-red">${iconXCircle({ size: 20 })}</span>\n<span class="u-text-yellow">${iconAlertTriangle({ size: 20 })}</span>')}
61
-
62
- <h2 class="doc-h2" id="all-icons">All icons</h2>
63
- <p>Click any icon name to copy the import.</p>
64
-
65
- ${In()}
66
-
67
- ${y(["Prop","Type","Default",""],[["<code>size</code>","number","16","Width and height in px"],["<code>class</code>","string","\u2014","Extra CSS classes (on wrapper when <code>bg</code> is set, otherwise on the SVG)"],["<code>bg</code>","string","\u2014","'circle' \xB7 'square' \u2014 wraps the icon in a tinted background"],["<code>bgColor</code>","string","'accent'","'accent' \xB7 'success' \xB7 'warning' \xB7 'error' \xB7 'muted'"]])}
68
- `})};var s=document.getElementById("pulse-root");s&&!s.dataset.pulseMounted&&(s.dataset.pulseMounted="1",u(w,s,window.__PULSE_SERVER__||{},{ssr:!0}),k(s,u));var Zn=w;export{Zn as default};
@@ -1,19 +0,0 @@
1
- import{a as o,b as s}from"./runtime-ZJ4FXT5O.js";import{rb as t}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as r}from"./runtime-L2HNXIHW.js";import{a as i,b as d}from"./runtime-B73WLANC.js";var{prev:n,next:p}=c("/components/image"),a={route:"/components/image",meta:{title:"Image \u2014 Pulse Docs",description:"Responsive image component with optional aspect-ratio crop and caption for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>s({currentHref:"/components/image",prev:n,next:p,name:"uiImage",description:'Responsive image component. Supports aspect-ratio cropping with <code>object-fit: cover</code>, optional caption, and rounded corners. Always uses <code>loading="lazy"</code> and <code>decoding="async"</code>.',content:`
2
-
3
- <h2 class="doc-h2" id="ratio">With aspect ratio</h2>
4
- <p>Set <code>ratio</code> to constrain the image to a fixed aspect ratio. The image fills the crop area with <code>object-fit: cover</code>.</p>
5
- ${o(t({src:"https://picsum.photos/seed/pulse1/800/450",alt:"Mountain landscape at dusk",ratio:"16/9"}),"uiImage({ src: '/img/photo.jpg', alt: 'Mountain landscape at dusk', ratio: '16/9' })",{col:!0})}
6
-
7
- <h2 class="doc-h2" id="rounded">Square and rounded</h2>
8
- ${o(`<div style="max-width:200px;margin:0 auto">${t({src:"https://picsum.photos/seed/pulse2/400/400",alt:"Profile photo",ratio:"1/1",rounded:!0})}</div>`,"uiImage({ src: '/img/avatar.jpg', alt: 'Profile photo', ratio: '1/1', rounded: true })",{col:!0})}
9
-
10
- <h2 class="doc-h2" id="caption">With caption</h2>
11
- ${o(t({src:"https://picsum.photos/seed/pulse3/800/600",alt:"Aerial view of a coastal town",ratio:"4/3",caption:"Aerial view of Porto, Portugal. Photo by Jo\xE3o Silva."}),`uiImage({
12
- src: '/img/photo.jpg',
13
- alt: 'Aerial view of a coastal town',
14
- ratio: '4/3',
15
- caption: 'Aerial view of Porto, Portugal. Photo by Jo\xE3o Silva.',
16
- })`,{col:!0})}
17
-
18
- ${r(["Prop","Type","Default",""],[["<code>src</code>","string","\u2014","Image source URL"],["<code>alt</code>","string","\u2014","Alt text \u2014 required for accessibility"],["<code>caption</code>","string","\u2014","Renders a <code>&lt;figcaption&gt;</code> below the image"],["<code>ratio</code>","string","\u2014","CSS aspect-ratio string e.g. <code>'16/9'</code>, <code>'4/3'</code>, <code>'1/1'</code>. When set, the image fills the crop area with <code>object-fit: cover</code>."],["<code>rounded</code>","boolean","false","Applies full border-radius to the image wrap"],["<code>width</code>","number","\u2014","Sets the <code>width</code> attribute on the <code>&lt;img&gt;</code>"],["<code>height</code>","number","\u2014","Sets the <code>height</code> attribute on the <code>&lt;img&gt;</code>"],["<code>class</code>","string","\u2014",""]])}
19
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",i(a,e,window.__PULSE_SERVER__||{},{ssr:!0}),d(e,i));var b=a;export{b as default};
@@ -1,7 +0,0 @@
1
- import{a as i,b as n}from"./runtime-ZJ4FXT5O.js";import{d as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as d,h as r}from"./runtime-L2HNXIHW.js";import{a as t,b as l}from"./runtime-B73WLANC.js";var{prev:c,next:s}=d("/components/input"),a={route:"/components/input",meta:{title:"Input \u2014 Pulse Docs",description:"Input component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>n({currentHref:"/components/input",prev:c,next:s,name:"input",description:"The label and error are wired up automatically \u2014 <code>for</code>/<code>id</code> and <code>aria-describedby</code> are set from <code>name</code>. You don't need to manage ids yourself.",content:`
2
- ${i(o({name:"email1",label:"Email address",type:"email",placeholder:"you@example.com"})+o({name:"email2",label:"Email address",type:"email",value:"bad@",error:"Enter a valid email address"})+o({name:"search",label:"Search",placeholder:"Filter by name\u2026",hint:"Results update as you type"}),`input({ name: 'email', label: 'Email address', type: 'email', placeholder: 'you@example.com' })
3
- input({ name: 'email', label: 'Email address', error: 'Enter a valid email address', value: state.email })
4
- input({ name: 'search', label: 'Search', placeholder: 'Filter by name\u2026', hint: 'Results update as you type' })`,{col:!0})}
5
-
6
- ${r(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Also used as id base: <code>field-{name}</code>"],["<code>label</code>","string","\u2014",""],["<code>type</code>","string","text","Any valid HTML input type"],["<code>placeholder</code>","string","\u2014",""],["<code>value</code>","string","\u2014","Pre-filled value \u2014 escaped automatically"],["<code>error</code>","string","\u2014",'Triggers <code>aria-invalid</code> and <code>role="alert"</code>'],["<code>hint</code>","string","\u2014","Helper text below the input"],["<code>required</code>","boolean","false","Adds <code>required</code>, <code>aria-required</code>, and a visual asterisk"],["<code>disabled</code>","boolean","false",""],["<code>id</code>","string","\u2014","Override the generated id"],["<code>attrs</code>","object","{}","Extra attributes on the <code>&lt;input&gt;</code> element"]])}
7
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(a,e,window.__PULSE_SERVER__||{},{ssr:!0}),l(e,t));var v=a;export{v as default};
@@ -1,55 +0,0 @@
1
- import{a as t,b as c}from"./runtime-ZJ4FXT5O.js";import{vb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as d,h as i}from"./runtime-L2HNXIHW.js";import{a as o,b as n}from"./runtime-B73WLANC.js";var{prev:a,next:p}=d("/components/list"),r={route:"/components/list",meta:{title:"List \u2014 Pulse Docs",description:"Styled ordered and unordered list component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>c({currentHref:"/components/list",prev:a,next:p,name:"list",description:"Styled unordered or ordered list with consistent spacing and colour tokens. Use this instead of raw <code>&lt;ul&gt;</code> / <code>&lt;ol&gt;</code>. Items are HTML strings \u2014 other components can be passed as items.",content:`
2
-
3
- <h2 class="doc-h2" id="unordered">Unordered</h2>
4
- ${t(e({items:["Streaming SSR on every page","Security headers by default","Zero client-side dependencies","Lighthouse 100 out of the box"]}),`list({
5
- items: [
6
- 'Streaming SSR on every page',
7
- 'Security headers by default',
8
- 'Zero client-side dependencies',
9
- 'Lighthouse 100 out of the box',
10
- ],
11
- })`,{col:!0})}
12
-
13
- <h2 class="doc-h2" id="ordered">Ordered</h2>
14
- ${t(e({ordered:!0,items:["Create a new Pulse project","Add your pages to <code>src/pages/</code>","Run <code>pulse dev</code> to start the server","Deploy when ready"]}),`list({
15
- ordered: true,
16
- items: [
17
- 'Create a new Pulse project',
18
- 'Add your pages to src/pages/',
19
- 'Run pulse dev to start the server',
20
- 'Deploy when ready',
21
- ],
22
- })`,{col:!0})}
23
-
24
- <h2 class="doc-h2" id="gap">Gap</h2>
25
- <p>Control vertical spacing between items with the <code>gap</code> prop.</p>
26
- ${t(`<div class="u-flex u-gap-8">
27
- <div>
28
- <p class="u-text-muted u-text-sm u-mb-2">xs</p>
29
- ${e({gap:"xs",items:["Design","Build","Ship"]})}
30
- </div>
31
- <div>
32
- <p class="u-text-muted u-text-sm u-mb-2">sm (default)</p>
33
- ${e({gap:"sm",items:["Design","Build","Ship"]})}
34
- </div>
35
- <div>
36
- <p class="u-text-muted u-text-sm u-mb-2">md</p>
37
- ${e({gap:"md",items:["Design","Build","Ship"]})}
38
- </div>
39
- </div>`,`list({ gap: 'xs', items: [...] })
40
- list({ gap: 'sm', items: [...] }) // default
41
- list({ gap: 'md', items: [...] })`,{col:!0})}
42
-
43
- <h2 class="doc-h2" id="rich-items">Items with markup</h2>
44
- <p>Items are HTML strings \u2014 pass any markup including other components. Always escape user data before including it in item strings.</p>
45
- ${t(e({items:["<strong>spec.state</strong> \u2014 initial client state, deep-cloned on mount","<strong>spec.mutations</strong> \u2014 synchronous state updates","<strong>spec.actions</strong> \u2014 async operations with lifecycle hooks","<strong>spec.server</strong> \u2014 server-side data fetchers"]}),`list({
46
- items: [
47
- '<strong>spec.state</strong> \u2014 initial client state',
48
- '<strong>spec.mutations</strong> \u2014 synchronous state updates',
49
- '<strong>spec.actions</strong> \u2014 async operations with lifecycle hooks',
50
- '<strong>spec.server</strong> \u2014 server-side data fetchers',
51
- ],
52
- })`,{col:!0})}
53
-
54
- ${i(["Prop","Type","Default",""],[["<code>items</code>","string[]","\u2014","Array of HTML strings for each list item \u2014 escape user data before passing"],["<code>ordered</code>","boolean","<code>false</code>","<code>false</code> renders <code>&lt;ul&gt;</code>, <code>true</code> renders <code>&lt;ol&gt;</code>"],["<code>gap</code>","<code>xs | sm | md</code>","<code>sm</code>","Vertical spacing between items"],["<code>class</code>","string","\u2014","Extra classes on the list element"]])}
55
- `})};var s=document.getElementById("pulse-root");s&&!s.dataset.pulseMounted&&(s.dataset.pulseMounted="1",o(r,s,window.__PULSE_SERVER__||{},{ssr:!0}),n(s,o));var x=r;export{x as default};
@@ -1,13 +0,0 @@
1
- import{a as i,b as s}from"./runtime-ZJ4FXT5O.js";import{Qa as d,Ua as m,a as c}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as n}from"./runtime-L2HNXIHW.js";import{a as t,b as a}from"./runtime-B73WLANC.js";var{prev:l,next:p}=r("/components/media"),o={route:"/components/media",meta:{title:"Media \u2014 Pulse Docs",description:"Media component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>s({currentHref:"/components/media",prev:l,next:p,name:"media",description:"Two-column image + text layout. Stacks vertically on mobile. Set <code>reverse</code> to alternate image position for multi-block feature sections.",content:`
2
- ${i(m({image:'<div style="background:var(--ui-surface-2);border:1px solid var(--ui-border);border-radius:8px;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;color:var(--ui-muted);font-size:.875rem">Screenshot</div>',content:d({gap:"md",content:'<h3 style="font-size:1.25rem;font-weight:700;color:var(--ui-text);margin:0">One-tap controls</h3><p style="color:var(--ui-muted);margin:0">Tap to flap. Chippy Bird takes seconds to learn and a lifetime to conquer.</p>'+c({label:"Download",href:"#"})})}),`media({
3
- image: \`<img src="\${screenshot}" alt="App screenshot">\`,
4
- content: stack({ gap: 'md', content:
5
- '<h3>One-tap controls</h3>' +
6
- '<p>Tap to flap.</p>' +
7
- button({ label: 'Download', href: appStoreUrl })
8
- }),
9
- reverse: false,
10
- })`)}
11
-
12
- ${n(["Prop","Type","Default",""],[["<code>image</code>","string (HTML)","\u2014","Raw HTML slot \u2014 img, figure, SVG, or styled div"],["<code>content</code>","string (HTML)","\u2014","Raw HTML slot"],["<code>reverse</code>","boolean","false","Puts text left, image right"],["<code>align</code>","string","'center'","'center' \xB7 'start'"],["<code>gap</code>","string","'md'","'sm' \xB7 'md' \xB7 'lg'"]])}
13
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(o,e,window.__PULSE_SERVER__||{},{ssr:!0}),a(e,t));var w=o;export{w as default};
@@ -1,47 +0,0 @@
1
- import{a as i,b as g}from"./runtime-ZJ4FXT5O.js";import{Ra as l,Wa as o,Xa as t,a as r}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as a,i as d}from"./runtime-L2HNXIHW.js";import{a as n,b as m}from"./runtime-B73WLANC.js";var{prev:p,next:u}=c("/components/modal"),s={route:"/components/modal",meta:{title:"Modal \u2014 Pulse Docs",description:"Modal dialog component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>g({currentHref:"/components/modal",prev:p,next:u,name:"modal / modalTrigger",description:"A <code>&lt;dialog&gt;</code>-based modal with backdrop, animated open/close, and keyboard dismiss. The Pulse runtime handles open and close natively \u2014 no extra script needed.",content:`
2
- ${i(l({justify:"center",content:t({target:"demo-modal",label:"Open modal"})+o({id:"demo-modal",title:"Confirm action",content:'<p style="color:var(--ui-muted);margin:0">Are you sure you want to delete this item? This action cannot be undone.</p>',footer:r({label:"Cancel",variant:"secondary",type:"submit"})+r({label:"Delete",variant:"danger"})})}),`// Render the dialog somewhere on the page
3
- modal({
4
- id: 'confirm-delete',
5
- title: 'Confirm action',
6
- content: '<p>Are you sure? This cannot be undone.</p>',
7
- footer:
8
- button({ label: 'Cancel', variant: 'secondary' }) +
9
- button({ label: 'Delete', variant: 'danger' }),
10
- })
11
-
12
- // Open it with a trigger button (or any element with data-dialog-open)
13
- modalTrigger({ target: 'confirm-delete', label: 'Delete item', variant: 'danger' })`)}
14
-
15
- <h3 class="doc-h3" id="sizes"><a href="#sizes" class="heading-anchor">Sizes</a></h3>
16
- ${i(l({gap:"sm",justify:"center",content:t({target:"demo-sm",label:"Small",variant:"secondary",size:"sm"})+t({target:"demo-lg",label:"Large",variant:"secondary",size:"sm"})+o({id:"demo-sm",title:"Small modal",size:"sm",content:'<p style="color:var(--ui-muted);margin:0">A compact dialog for quick confirmations.</p>'})+o({id:"demo-lg",title:"Large modal",size:"lg",content:'<p style="color:var(--ui-muted);margin:0">Use large modals for forms, rich content, or detail views that need more space.</p>'})}),"modal({ id: 'my-modal', title: 'Large modal', size: 'lg', content: '...' })")}
17
-
18
- ${a(["Prop","Type","Default",""],[["<code>id</code>","string","\u2014","Unique ID \u2014 required for triggers to target this dialog"],["<code>title</code>","string","\u2014",""],["<code>level</code>","number","2","Heading tag for the title (1\u20136). Visual style is unchanged."],["<code>content</code>","string (HTML)","\u2014","Body HTML"],["<code>footer</code>","string (HTML)","\u2014","Footer HTML \u2014 typically button() calls"],["<code>size</code>","<code>sm | md | lg | xl</code>","<code>md</code>",""],["<code>class</code>","string","\u2014",""]])}
19
-
20
- <h3 class="doc-h3" id="trigger-props"><a href="#trigger-props" class="heading-anchor">modalTrigger props</a></h3>
21
-
22
- ${a(["Prop","Type","Default",""],[["<code>target</code>","string","\u2014","The modal's <code>id</code>"],["<code>label</code>","string","<code>Open</code>",""],["<code>variant</code>","<code>primary | secondary | ghost | danger</code>","<code>primary</code>",""],["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>",""],["<code>class</code>","string","\u2014",""]])}
23
-
24
- <h3 class="doc-h3" id="custom-trigger"><a href="#custom-trigger" class="heading-anchor">Custom triggers</a></h3>
25
- <p class="doc-body">Any element with <code>data-dialog-open="&lt;id&gt;"</code> opens the dialog when clicked. Use <code>data-dialog-close</code> on any element inside or outside the dialog to close it programmatically:</p>
26
- <pre class="code-block"><code>&lt;button data-dialog-open="my-modal"&gt;Open&lt;/button&gt;
27
- &lt;button data-dialog-close&gt;Cancel&lt;/button&gt;</code></pre>
28
- ${d("tip",'The dialog also closes on ESC, backdrop click, and <code>&lt;form method="dialog"&gt;</code> submit \u2014 all native browser behaviour, no JavaScript needed.')}
29
-
30
- <h3 class="doc-h3" id="forms-inside"><a href="#forms-inside" class="heading-anchor">Forms inside a modal</a></h3>
31
- <p class="doc-body"><code>modal()</code> wraps all content in <code>&lt;form method="dialog"&gt;</code> for native close behaviour. You <strong>cannot nest a <code>&lt;form data-action="..."&gt;</code> inside it</strong> \u2014 browsers silently discard nested forms, so the action will never fire.</p>
32
- <p class="doc-body">When a modal button needs to trigger a Pulse action, place the form <em>outside</em> the modal and use the HTML <code>form</code> attribute to associate the button with it:</p>
33
- <pre class="code-block"><code>// The action form lives outside the modal \u2014 hidden, no visible fields needed
34
- &lt;form id="delete-form" data-action="deleteAccount" style="display:none"&gt;&lt;/form&gt;
35
-
36
- \${modal({
37
- id: 'confirm-delete',
38
- title: 'Delete account?',
39
- content: '&lt;p&gt;This cannot be undone.&lt;/p&gt;',
40
- footer:
41
- // type="submit" with no form= closes the modal natively (submits &lt;form method="dialog"&gt;)
42
- button({ label: 'Cancel', variant: 'secondary', type: 'submit' }) +
43
- // form="delete-form" associates this button with the external form \u2192 fires the action
44
- button({ label: 'Confirm delete', variant: 'danger', attrs: { form: 'delete-form', type: 'submit' } }),
45
- })}</code></pre>
46
- ${d("note","The hidden form needs no visible fields. <code>onStart</code> receives <code>state</code> and <code>formData</code> \u2014 read anything you need from state directly.")}
47
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",n(s,e,window.__PULSE_SERVER__||{},{ssr:!0}),m(e,n));var C=s;export{C as default};
@@ -1,33 +0,0 @@
1
- import{a as s,b as d}from"./runtime-ZJ4FXT5O.js";import{La as t,a as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as i,h as a}from"./runtime-L2HNXIHW.js";import{a as l,b as r}from"./runtime-B73WLANC.js";var{prev:c,next:p}=i("/components/nav"),n={route:"/components/nav",meta:{title:"Nav \u2014 Pulse Docs",description:"Nav component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/nav",prev:c,next:p,name:"nav",description:"Sticky-capable site header with logo, navigation links, and an optional CTA button. On mobile (&lt; 640px) links collapse behind a burger button \u2014 clicking it reveals an overlay panel that sits on top of page content without pushing it down. Wired automatically by <code>pulse-ui.js</code>.",content:`
2
- ${s(t({logo:"<strong>MyApp</strong>",logoHref:"/",links:[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"FAQ",href:"#faq"}],action:o({label:"Download",size:"sm"}),sticky:!1}),`nav({
3
- logo: '<strong>MyApp</strong>',
4
- logoHref: '/',
5
- links: [
6
- { label: 'Features', href: '#features' },
7
- { label: 'Pricing', href: '#pricing' },
8
- { label: 'FAQ', href: '#faq' },
9
- ],
10
- action: button({ label: 'Download', size: 'sm' }),
11
- sticky: true,
12
- })`)}
13
-
14
- <h2 class="doc-h2" id="mobile">Mobile view</h2>
15
- <p>At &lt; 640px the links and action are hidden and replaced with a burger button. The panel opens as an overlay \u2014 no layout shift.</p>
16
-
17
- <div class="demo-phone demo-mobile-nav">
18
- <div class="demo-phone-statusbar"><div class="demo-phone-pill"></div></div>
19
- ${t({logo:"<strong>MyApp</strong>",logoHref:"/",links:[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"FAQ",href:"#faq"}],action:o({label:"Download",size:"sm"})})}
20
- <div class="demo-phone-content"><p>Tap the burger to open the overlay</p></div>
21
- </div>
22
-
23
- <h2 class="doc-h2" id="burger-left">Burger on the left</h2>
24
- <p>Set <code>burgerAlign: 'left'</code> to place the burger before the logo \u2014 common in app-style layouts.</p>
25
-
26
- <div class="demo-phone demo-mobile-nav">
27
- <div class="demo-phone-statusbar"><div class="demo-phone-pill"></div></div>
28
- ${t({logo:"<strong>MyApp</strong>",logoHref:"/",links:[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"FAQ",href:"#faq"}],action:o({label:"Download",size:"sm"}),burgerAlign:"left"})}
29
- <div class="demo-phone-content"><p>Burger on the left \u2014 logo stays right</p></div>
30
- </div>
31
-
32
- ${a(["Prop","Type","Default",""],[["<code>logo</code>","string (HTML)","\u2014","Raw HTML slot \u2014 SVG, img, or text"],["<code>logoHref</code>","string","'/'",""],["<code>links</code>","array","[]","<code>{ label, href }[]</code>"],["<code>action</code>","string (HTML)","\u2014","Raw HTML slot \u2014 shown in desktop bar and mobile menu"],["<code>sticky</code>","boolean","false","position: sticky with backdrop blur"],["<code>burgerAlign</code>","string","'right'","'right' or 'left' \u2014 mobile burger position"]])}
33
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",l(n,e,window.__PULSE_SERVER__||{},{ssr:!0}),r(e,l));var k=n;export{k as default};
@@ -1,21 +0,0 @@
1
- import{a as o,b as p}from"./runtime-ZJ4FXT5O.js";import{Ja as t,a as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a,e as d,h as c}from"./runtime-L2HNXIHW.js";import{a as r,b as s}from"./runtime-B73WLANC.js";var{prev:l,next:g}=a("/components/pricing"),n={route:"/components/pricing",meta:{title:"Pricing \u2014 Pulse Docs",description:"Pricing component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>p({currentHref:"/components/pricing",prev:l,next:g,name:"pricing",description:"Single plan card with a feature list and CTA. Set <code>highlighted: true</code> on the recommended plan \u2014 it gets an accent border and a floating <code>badge</code> label.",content:`
2
- ${o(t({name:"Pro",price:"$9",period:"/month",description:"For growing teams",features:["Unlimited pages","Priority support","Custom domain"],highlighted:!0,badge:"Most popular",action:e({label:"Get started",fullWidth:!0})}),`pricing({
3
- name: 'Pro',
4
- price: '$9',
5
- period: '/month',
6
- description: 'For growing teams',
7
- features: ['Unlimited pages', 'Priority support', 'Custom domain'],
8
- highlighted: true,
9
- badge: 'Most popular',
10
- action: button({ label: 'Get started', fullWidth: true }),
11
- })`,{col:!0})}
12
-
13
- ${d("multi-plan","Multi-plan layout")}
14
- ${o('<div class="ui-pricing-grid ui-pricing-grid--cols-3">'+t({name:"Free",price:"$0",period:"/month",description:"For personal projects",features:["3 pages","Community support"],action:e({label:"Get started",variant:"secondary",fullWidth:!0})})+t({name:"Pro",price:"$9",period:"/month",description:"For growing teams",features:["Unlimited pages","Priority support","Custom domain"],highlighted:!0,badge:"Most popular",action:e({label:"Get started",fullWidth:!0})})+t({name:"Team",price:"$29",period:"/month",description:"For large organisations",features:["Everything in Pro","SSO","SLA"],action:e({label:"Get started",variant:"secondary",fullWidth:!0})})+"</div>",`<div class="ui-pricing-grid ui-pricing-grid--cols-3">
15
- \${pricing({ name: 'Free', price: '$0', ... })}
16
- \${pricing({ name: 'Pro', price: '$9', highlighted: true, badge: 'Most popular', ... })}
17
- \${pricing({ name: 'Team', price: '$29', ... })}
18
- </div>`)}
19
-
20
- ${c(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014",""],["<code>level</code>","number","3","Heading tag for the plan name (1\u20136). Visual style is unchanged."],["<code>price</code>","string","\u2014",'Formatted string \u2014 e.g. "$9", "Free"'],["<code>period</code>","string","\u2014",'e.g. "/month", "/year"'],["<code>description</code>","string","\u2014",""],["<code>features</code>","string[]","[]","List of feature strings"],["<code>action</code>","string (HTML)","\u2014","Raw HTML slot \u2014 typically a button()"],["<code>highlighted</code>","boolean","false","Accent border + elevated appearance"],["<code>badge</code>","string","\u2014","Floating label above the card"]])}
21
- `})};var i=document.getElementById("pulse-root");i&&!i.dataset.pulseMounted&&(i.dataset.pulseMounted="1",r(n,i,window.__PULSE_SERVER__||{},{ssr:!0}),s(i,r));var v=n;export{v as default};
@@ -1,30 +0,0 @@
1
- import{a as o,b as d}from"./runtime-ZJ4FXT5O.js";import{Qa as a,hb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as l,h as n}from"./runtime-L2HNXIHW.js";import{a as t,b as c}from"./runtime-B73WLANC.js";var{prev:u,next:i}=l("/components/progress"),s={route:"/components/progress",meta:{title:"Progress \u2014 Pulse Docs",description:"Progress bar component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/progress",prev:u,next:i,name:"progress",description:'Horizontal progress bar with determinate and indeterminate states. Correct <code>role="progressbar"</code> and ARIA attributes are set automatically.',content:`
2
-
3
- <h2 class="doc-h2" id="default">Default</h2>
4
- ${o(a({gap:"md",content:e({value:25})+e({value:50})+e({value:75})+e({value:100})}),`progress({ value: 25 })
5
- progress({ value: 50 })
6
- progress({ value: 75 })
7
- progress({ value: 100 })`,{col:!0})}
8
-
9
- <h2 class="doc-h2" id="label">With label and value</h2>
10
- <p>Set <code>showLabel</code> and <code>showValue</code> to render text above the bar.</p>
11
- ${o(a({gap:"lg",content:e({value:68,label:"Storage used",showLabel:!0,showValue:!0})+e({value:32,label:"Upload complete",showLabel:!0,showValue:!0})}),`progress({ value: 68, label: 'Storage used', showLabel: true, showValue: true })
12
- progress({ value: 32, label: 'Upload complete', showLabel: true, showValue: true })`,{col:!0})}
13
-
14
- <h2 class="doc-h2" id="variants">Variants</h2>
15
- ${o(a({gap:"md",content:e({value:80,variant:"accent"})+e({value:80,variant:"success"})+e({value:80,variant:"warning"})+e({value:80,variant:"error"})}),`progress({ value: 80, variant: 'accent' })
16
- progress({ value: 80, variant: 'success' })
17
- progress({ value: 80, variant: 'warning' })
18
- progress({ value: 80, variant: 'error' })`,{col:!0})}
19
-
20
- <h2 class="doc-h2" id="sizes">Sizes</h2>
21
- ${o(a({gap:"md",content:e({value:60,size:"sm"})+e({value:60,size:"md"})+e({value:60,size:"lg"})}),`progress({ value: 60, size: 'sm' })
22
- progress({ value: 60, size: 'md' })
23
- progress({ value: 60, size: 'lg' })`,{col:!0})}
24
-
25
- <h2 class="doc-h2" id="indeterminate">Indeterminate</h2>
26
- <p>Omit <code>value</code> when the total duration is unknown \u2014 the bar animates continuously.</p>
27
- ${o(e({label:"Loading\u2026"}),"progress({ label: 'Loading\u2026' }) // no value = indeterminate",{col:!0})}
28
-
29
- ${n(["Prop","Type","Default",""],[["<code>value</code>","number","\u2014","Current value. Omit for indeterminate."],["<code>max</code>","number","100",""],["<code>label</code>","string","\u2014","Sets <code>aria-label</code> and the visible label when <code>showLabel</code> is true"],["<code>showLabel</code>","boolean","false","Render label text above the bar"],["<code>showValue</code>","boolean","false","Render percentage above the bar (right-aligned)"],["<code>variant</code>","<code>accent | success | warning | error</code>","<code>accent</code>",""],["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>",".25rem / .5rem / 1rem"],["<code>class</code>","string","\u2014",""]])}
30
- `})};var r=document.getElementById("pulse-root");r&&!r.dataset.pulseMounted&&(r.dataset.pulseMounted="1",t(s,r,window.__PULSE_SERVER__||{},{ssr:!0}),c(r,t));var z=s;export{z as default};