@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,67 +0,0 @@
1
- import{a as o,b as d}from"./runtime-ZJ4FXT5O.js";import{tb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as i,h as n,i as l}from"./runtime-L2HNXIHW.js";import{a as s,b as a}from"./runtime-B73WLANC.js";var{prev:c,next:p}=i("/components/prose"),u=`<h2>Why great coffee starts with water</h2>
2
- <p>Most home baristas obsess over beans and grinders, but water quality is the single biggest variable in your cup. Tap water that is too hard leaves bitter, chalky espresso. Too soft and your shots taste flat and lifeless.</p>
3
- <h3>The ideal mineral balance</h3>
4
- <p>Speciality roasters recommend water with a total dissolved solids (TDS) between <strong>75\u2013150 mg/L</strong> and a magnesium content of at least 10 mg/L. Magnesium is the mineral most responsible for extracting the fruity, floral notes from light roasts.</p>
5
- <h3>What to do if your tap water is off</h3>
6
- <ul>
7
- <li>Use a filter jug \u2014 Brita Maxtra+ reduces hardness and chlorine</li>
8
- <li>Try third-wave water sachets \u2014 add to distilled water for precise control</li>
9
- <li>Blend tap with still mineral water to hit the right TDS range</li>
10
- </ul>
11
- <blockquote>Water is the ingredient you can control most precisely, yet almost nobody does.</blockquote>
12
- <p>Once your water is dialled in, even a modest grinder will produce noticeably better results. <a href="#">Read our water guide</a> for a full breakdown by region.</p>`,r={route:"/components/prose",meta:{title:"Prose \u2014 Pulse Docs",description:"Typography wrapper for CMS output and rich text content in Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/prose",prev:c,next:p,name:"prose",description:"Typography wrapper for rich text you don't control: CMS output, markdown-rendered HTML, database content, blog posts. Styles all descendant elements \u2014 headings, paragraphs, lists, blockquotes, code, tables \u2014 using <code>--ui-*</code> tokens. No classes needed on individual elements.",content:`
13
-
14
- <h2 class="doc-h2" id="basic">Basic</h2>
15
- <p>Pass any HTML string to <code>content</code>. All elements inside are styled automatically.</p>
16
- ${o(e({content:u}),`import { prose } from '@invisibleloop/pulse/ui'
17
-
18
- // CMS rich text field \u2014 output directly, fully styled
19
- prose({ content: server.article.bodyHtml })
20
-
21
- // Markdown rendered to HTML
22
- prose({ content: renderMarkdown(server.post.body) })`,{col:!0})}
23
-
24
- <h2 class="doc-h2" id="size">Size</h2>
25
- <p>Scale the base font size for different contexts.</p>
26
- ${o(`<div class="u-flex u-flex-col u-gap-8">
27
- <div>
28
- <p class="u-text-muted u-text-sm u-mb-3">sm \u2014 footnotes, sidebars</p>
29
- ${e({content:"<p>The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.</p><ul><li>Smaller text</li><li>Tighter line height</li></ul>",size:"sm"})}
30
- </div>
31
- <div>
32
- <p class="u-text-muted u-text-sm u-mb-3">base (default)</p>
33
- ${e({content:"<p>The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.</p><ul><li>Default size</li><li>Standard line height</li></ul>"})}
34
- </div>
35
- <div>
36
- <p class="u-text-muted u-text-sm u-mb-3">lg \u2014 hero intro, feature descriptions</p>
37
- ${e({content:"<p>The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.</p><ul><li>Larger text</li><li>More generous spacing</li></ul>",size:"lg"})}
38
- </div>
39
- </div>`,`prose({ content: cms.body, size: 'sm' }) // footnotes, sidebars
40
- prose({ content: cms.body }) // default
41
- prose({ content: cms.intro, size: 'lg' }) // hero intro`,{col:!0})}
42
-
43
- <h2 class="doc-h2" id="elements">Styled elements</h2>
44
- <p>Every common HTML element rendered inside <code>prose()</code> is styled using <code>--ui-*</code> tokens:</p>
45
- ${o(e({content:`
46
- <h2>h2 heading</h2>
47
- <h3>h3 heading</h3>
48
- <p>A paragraph with <strong>bold</strong>, <em>italic</em>, and <a href="#">a link</a>. Also <code>inline code</code>.</p>
49
- <ul><li>Unordered item one</li><li>Unordered item two</li></ul>
50
- <ol><li>Ordered item one</li><li>Ordered item two</li></ol>
51
- <blockquote>A blockquote with an accent left border.</blockquote>
52
- <pre><code>// A code block
53
- const x = 1 + 2</code></pre>
54
- <hr>
55
- <p class="u-text-sm u-text-muted">End of content.</p>
56
- `}),`prose({ content: \`
57
- <h2>Section heading</h2>
58
- <p>Paragraph with <strong>bold</strong> and <a href="#">a link</a>.</p>
59
- <ul><li>List item</li></ul>
60
- <blockquote>A quote.</blockquote>
61
- <pre><code>const x = 1</code></pre>
62
- \` })`,{col:!0})}
63
-
64
- ${l("warning","<strong>Do not escape the content prop.</strong> <code>prose()</code> renders raw HTML \u2014 it is designed for trusted server-side content only. Never pass unescaped user input directly. Sanitise CMS output before rendering if your CMS allows arbitrary HTML.")}
65
-
66
- ${n(["Prop","Type","Default",""],[["<code>content</code>","string","\u2014","Raw HTML string \u2014 rendered as-is, not escaped. Use for server-side content only."],["<code>size</code>","<code>sm | base | lg</code>","<code>base</code>","Base font size scale. <code>sm</code>=0.875rem, <code>base</code>=1rem, <code>lg</code>=1.125rem"],["<code>class</code>","string","\u2014","Extra classes on the wrapper <code>&lt;div&gt;</code>"]])}
67
- `})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",s(r,t,window.__PULSE_SERVER__||{},{ssr:!0}),a(t,s));var x=r;export{x as default};
@@ -1,22 +0,0 @@
1
- import{a as t,b as d}from"./runtime-ZJ4FXT5O.js";import{sb as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as n,h as l}from"./runtime-L2HNXIHW.js";import{a as i,b as c}from"./runtime-B73WLANC.js";var{prev:u,next:r}=n("/components/pullquote"),s={route:"/components/pullquote",meta:{title:"Pullquote \u2014 Pulse Docs",description:"Styled blockquote component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/pullquote",prev:u,next:r,name:"pullquote",description:"Styled blockquote with an accent left border and optional attribution. Use it to highlight key quotes or testimonials within body content.",content:`
2
-
3
- <h2 class="doc-h2" id="basic">Basic</h2>
4
- ${t(o({quote:"Design is not just what it looks like and feels like. Design is how it works.",cite:"Steve Jobs, co-founder of Apple"}),`pullquote({
5
- quote: 'Design is not just what it looks like and feels like. Design is how it works.',
6
- cite: 'Steve Jobs, co-founder of Apple',
7
- })`)}
8
-
9
- <h2 class="doc-h2" id="large">Large</h2>
10
- ${t(o({quote:"Simplicity is the ultimate sophistication.",cite:"Leonardo da Vinci",size:"lg"}),`pullquote({
11
- quote: 'Simplicity is the ultimate sophistication.',
12
- cite: 'Leonardo da Vinci',
13
- size: 'lg',
14
- })`)}
15
-
16
- <h2 class="doc-h2" id="no-cite">Without attribution</h2>
17
- ${t(o({quote:"Good design makes a product understandable."}),`pullquote({
18
- quote: 'Good design makes a product understandable.',
19
- })`)}
20
-
21
- ${l(["Prop","Type","Default",""],[["<code>quote</code>","string","\u2014","The quote text \u2014 escaped automatically"],["<code>cite</code>","string","\u2014","Attribution text \u2014 rendered in a <code>&lt;figcaption&gt;</code>"],["<code>size</code>","<code>md | lg</code>","<code>md</code>","Controls the font size of the quote text"],["<code>class</code>","string","\u2014",""]])}
22
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",i(s,e,window.__PULSE_SERVER__||{},{ssr:!0}),c(e,i));var k=s;export{k as default};
@@ -1,75 +0,0 @@
1
- import{a as e,b as s}from"./runtime-ZJ4FXT5O.js";import{db as t,eb as o,ya as p}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as i,h as l,i as n}from"./runtime-L2HNXIHW.js";import{a as d,b as c}from"./runtime-B73WLANC.js";var{prev:u,next:m}=i("/components/radio"),r={route:"/components/radio",meta:{title:"Radio \u2014 Pulse Docs",description:"Radio button and radio group components for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>s({currentHref:"/components/radio",prev:u,next:m,name:"radio",description:"Custom-styled radio buttons with full keyboard and screen-reader support. Use <code>radio()</code> for a single option or <code>radioGroup()</code> for a semantic group inside a form.",content:`
2
-
3
- <h2 class="doc-h2" id="group">Radio group</h2>
4
- <p>The standard usage. <code>radioGroup()</code> renders a <code>&lt;fieldset&gt;</code> with a <code>&lt;legend&gt;</code> and marks the currently selected option via the <code>value</code> prop.</p>
5
- ${e(o({name:"plan",legend:"Plan",value:"pro",options:[{value:"starter",label:"Starter"},{value:"pro",label:"Pro"},{value:"team",label:"Team"}]}),`radioGroup({
6
- name: 'plan',
7
- legend: 'Plan',
8
- value: state.plan, // marks the selected option
9
- options: [
10
- { value: 'starter', label: 'Starter' },
11
- { value: 'pro', label: 'Pro' },
12
- { value: 'team', label: 'Team' },
13
- ],
14
- })`,{col:!0})}
15
-
16
- <h2 class="doc-h2" id="hints">Per-option hints</h2>
17
- <p>Each option accepts a <code>hint</code> string for supporting copy below the label.</p>
18
- ${e(o({name:"billing",legend:"Billing cycle",value:"annual",options:[{value:"monthly",label:"Monthly",hint:"Billed every month. Cancel any time."},{value:"annual",label:"Annual",hint:"Billed once a year. Save 20%."}]}),`radioGroup({
19
- name: 'billing',
20
- legend: 'Billing cycle',
21
- value: state.billing,
22
- options: [
23
- { value: 'monthly', label: 'Monthly', hint: 'Billed every month. Cancel any time.' },
24
- { value: 'annual', label: 'Annual', hint: 'Billed once a year. Save 20%.' },
25
- ],
26
- })`,{col:!0})}
27
-
28
- <h2 class="doc-h2" id="error">Error state</h2>
29
- <p>Pass <code>error</code> to show a validation message below the group. The message is linked via <code>aria-describedby</code>.</p>
30
- ${e(o({name:"size",legend:"Size",error:"Please select a size.",options:[{value:"sm",label:"Small"},{value:"md",label:"Medium"},{value:"lg",label:"Large"}]}),`radioGroup({
31
- name: 'size',
32
- legend: 'Size',
33
- error: server.errors.size,
34
- options: [
35
- { value: 'sm', label: 'Small' },
36
- { value: 'md', label: 'Medium' },
37
- { value: 'lg', label: 'Large' },
38
- ],
39
- })`,{col:!0})}
40
-
41
- <h2 class="doc-h2" id="disabled">Disabled options</h2>
42
- <p>Set <code>disabled: true</code> on individual options, or pass <code>disabled</code> at the group level to disable all.</p>
43
- ${e(o({name:"tier",legend:"Tier",value:"basic",options:[{value:"basic",label:"Basic"},{value:"pro",label:"Pro"},{value:"enterprise",label:"Enterprise",disabled:!0}]}),`radioGroup({
44
- name: 'tier',
45
- legend: 'Tier',
46
- value: state.tier,
47
- options: [
48
- { value: 'basic', label: 'Basic' },
49
- { value: 'pro', label: 'Pro' },
50
- { value: 'enterprise', label: 'Enterprise', disabled: true },
51
- ],
52
- })`,{col:!0})}
53
-
54
- <h2 class="doc-h2" id="gap">Gap</h2>
55
- <p>Control spacing between options with <code>gap</code>: <code>'sm'</code> \xB7 <code>'md'</code> (default) \xB7 <code>'lg'</code>.</p>
56
- ${e(o({name:"color",legend:"Colour",gap:"lg",value:"blue",options:[{value:"red",label:"Red"},{value:"blue",label:"Blue"},{value:"green",label:"Green"}]}),"radioGroup({ ..., gap: 'lg' })")}
57
-
58
- <h2 class="doc-h2" id="single">Single radio</h2>
59
- <p>Use <code>radio()</code> directly when you need to compose your own group layout \u2014 for example inside a <a href="/components/fieldset">fieldset</a> alongside other controls.</p>
60
- ${e(p({legend:"Preferred contact",content:t({name:"contact",value:"email",label:"Email",checked:!0})+t({name:"contact",value:"phone",label:"Phone"})}),`fieldset({
61
- legend: 'Preferred contact',
62
- content:
63
- radio({ name: 'contact', value: 'email', label: 'Email', checked: true }) +
64
- radio({ name: 'contact', value: 'phone', label: 'Phone' }),
65
- })`,{col:!0})}
66
-
67
- <h2 class="doc-h2" id="in-forms">In forms</h2>
68
- ${n("note","Radio groups submit the selected <code>value</code> string under <code>name</code> in FormData. If nothing is selected, the field is absent from FormData. Read it in <code>action.onStart</code> or <code>action.run</code> via <code>formData.get('plan')</code>.")}
69
-
70
- <h2 class="doc-h2" id="props-group">radioGroup() props</h2>
71
- ${l(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Shared <code>name</code> attribute for all inputs in the group"],["<code>legend</code>","string","\u2014","Group label \u2014 renders as a <code>&lt;legend&gt;</code>"],["<code>options</code>","array","<code>[]</code>","Array of <code>{ value, label, hint?, disabled? }</code>"],["<code>value</code>","string","\u2014","The currently selected value \u2014 marks the matching option as <code>checked</code>"],["<code>hint</code>","string","\u2014","Helper text below the group"],["<code>error</code>","string","\u2014","Validation error \u2014 linked via <code>aria-describedby</code>"],["<code>gap</code>","<code>sm | md | lg</code>","<code>md</code>","Spacing between options"],["<code>class</code>","string","\u2014",""]])}
72
-
73
- <h2 class="doc-h2" id="props-radio">radio() props</h2>
74
- ${l(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name"],["<code>value</code>","string","\u2014","Submitted value when this option is selected"],["<code>label</code>","string","\u2014","Visible label"],["<code>checked</code>","boolean","false",""],["<code>disabled</code>","boolean","false",""],["<code>id</code>","string","\u2014","Override the generated <code>id</code>"],["<code>class</code>","string","\u2014",""]])}
75
- `})};var a=document.getElementById("pulse-root");a&&!a.dataset.pulseMounted&&(a.dataset.pulseMounted="1",d(r,a,window.__PULSE_SERVER__||{},{ssr:!0}),c(a,d));var w=r;export{w as default};
@@ -1,38 +0,0 @@
1
- import{a,b as l}from"./runtime-ZJ4FXT5O.js";import{c,fb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s,h as r,i as n}from"./runtime-L2HNXIHW.js";import{a as i,b as d}from"./runtime-B73WLANC.js";var{prev:m,next:u}=s("/components/rating"),o={route:"/components/rating",meta:{title:"Rating \u2014 Pulse Docs",description:"Star rating display and interactive input component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/rating",prev:m,next:u,name:"rating",description:"Star rating component with two modes. Without <code>name</code>: a read-only display that supports half-star values. With <code>name</code>: an interactive radio group that submits the selected value in FormData \u2014 no JavaScript required.",content:`
2
-
3
- <h2 class="doc-h2" id="display">Display (read-only)</h2>
4
- <p>Omit <code>name</code> to render a read-only display. Pass <code>value</code> as a number \u2014 halves are supported.</p>
5
- ${a('<div style="display:flex;flex-direction:column;gap:1rem;align-items:flex-start">'+e({value:5})+e({value:3.5})+e({value:2})+e({value:0})+"</div>",`rating({ value: 5 }) // 5 stars
6
- rating({ value: 3.5 }) // 3\xBD stars
7
- rating({ value: 2 }) // 2 stars
8
- rating({ value: 0 }) // empty`)}
9
-
10
- <h2 class="doc-h2" id="sizes">Sizes</h2>
11
- <p><code>'sm'</code> \xB7 <code>'md'</code> (default) \xB7 <code>'lg'</code></p>
12
- ${a('<div style="display:flex;flex-direction:column;gap:1rem;align-items:flex-start">'+e({value:4,size:"sm"})+e({value:4,size:"md"})+e({value:4,size:"lg"})+"</div>",`rating({ value: 4, size: 'sm' })
13
- rating({ value: 4, size: 'md' })
14
- rating({ value: 4, size: 'lg' })`)}
15
-
16
- <h2 class="doc-h2" id="interactive">Interactive</h2>
17
- <p>Add <code>name</code> to render radio inputs. Hovering a star previews the selection; clicking locks it. The selected value is submitted in FormData.</p>
18
- ${a(e({name:"score",label:"Your rating",value:3,size:"lg"}),"rating({ name: 'score', label: 'Your rating', value: state.score, size: 'lg' })")}
19
-
20
- <h2 class="doc-h2" id="in-card">In a card</h2>
21
- ${a('<div style="max-width:320px">'+c({title:"Noise-Cancelling Headphones",content:'<div style="display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem">'+e({value:4.5})+'<span style="color:var(--ui-muted);font-size:.85rem">4.5 \xB7 1,284 reviews</span></div><p style="color:var(--ui-muted);margin:0;font-size:.9rem">Crystal-clear audio with 40-hour battery life and adaptive noise cancellation.</p>'})+"</div>",`card({
22
- title: 'Noise-Cancelling Headphones',
23
- content:
24
- '<div style="display:flex;align-items:center;gap:.75rem">' +
25
- rating({ value: 4.5 }) +
26
- '<span>4.5 \xB7 1,284 reviews</span>' +
27
- '</div>' +
28
- '<p>Crystal-clear audio...</p>',
29
- })`)}
30
-
31
- <h2 class="doc-h2" id="disabled">Disabled</h2>
32
- ${a(e({name:"locked",value:4,disabled:!0}),"rating({ name: 'locked', value: 4, disabled: true })")}
33
-
34
- <h2 class="doc-h2" id="in-forms">In forms</h2>
35
- ${n("note","The interactive rating submits the selected star count as a number string under <code>name</code> in FormData. Read it with <code>Number(formData.get('score'))</code>. If nothing is selected, the field is absent from FormData.")}
36
-
37
- ${r(["Prop","Type","Default",""],[["<code>value</code>","number","0","Current rating. Supports 0.5 steps in display mode."],["<code>max</code>","number","5","Total number of stars"],["<code>name</code>","string","\u2014","Field name \u2014 enables interactive radio mode"],["<code>label</code>","string","\u2014","Accessible group label (interactive mode only)"],["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>","1rem / 1.5rem / 2rem"],["<code>disabled</code>","boolean","false","Interactive mode only"],["<code>class</code>","string","\u2014",""]])}
38
- `})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",i(o,t,window.__PULSE_SERVER__||{},{ssr:!0}),d(t,i));var z=o;export{z as default};
@@ -1,17 +0,0 @@
1
- import{a as d,b as l}from"./runtime-ZJ4FXT5O.js";import{xa as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as n}from"./runtime-L2HNXIHW.js";import{a as t,b as r}from"./runtime-B73WLANC.js";var{prev:s,next:i}=c("/components/search"),a={route:"/components/search",meta:{title:"Search \u2014 Pulse Docs",description:"Search input component with icon, debounce binding, and clear button.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/search",prev:s,next:i,name:"search",description:"A search input with a built-in icon and optional clear button. Handles the native browser cancel button, <code>data-event</code> binding, and debounce in one component. Use this instead of <code>input({ type: 'search' })</code>.",content:`
2
- ${d(o({name:"q",label:"Search",placeholder:"Search products\u2026"})+o({name:"q2",label:"Search",placeholder:"Search\u2026",value:"lamp",clearEvent:"clearSearch",labelHidden:!0}),`search({ name: 'q', label: 'Search', placeholder: 'Search products\u2026' })
3
-
4
- // With value, clear button, and hidden label:
5
- search({
6
- name: 'q',
7
- label: 'Search',
8
- labelHidden: true,
9
- placeholder: 'Search\u2026',
10
- value: state.search,
11
- event: 'input:setSearch',
12
- debounce: 200,
13
- clearEvent: 'clearSearch',
14
- })`,{col:!0})}
15
-
16
- ${n(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name and id base"],["<code>label</code>","string","\u2014","Label text \u2014 always provide for accessibility"],["<code>labelHidden</code>","boolean","false","Hides label visually; still read by screen readers"],["<code>placeholder</code>","string","\u2014",""],["<code>value</code>","string","\u2014","Current value \u2014 controls clear button visibility"],["<code>event</code>","string","\u2014","<code>data-event</code> binding, e.g. <code>'input:setSearch'</code>"],["<code>debounce</code>","number","200","Debounce delay in ms \u2014 only applied when <code>event</code> is set"],["<code>clearEvent</code>","string","\u2014","Click event for the \xD7 button \u2014 only shown when <code>value</code> is non-empty"],["<code>disabled</code>","boolean","false",""],["<code>id</code>","string","\u2014","Override generated id"],["<code>class</code>","string","\u2014","Extra classes on the wrapper"],["<code>attrs</code>","object","{}","Extra attributes on the <code>&lt;input&gt;</code>"]])}
17
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(a,e,window.__PULSE_SERVER__||{},{ssr:!0}),r(e,t));var S=a;export{S as default};
@@ -1,12 +0,0 @@
1
- import{a as s,b as d}from"./runtime-ZJ4FXT5O.js";import{Na as o,Oa as n}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as c}from"./runtime-L2HNXIHW.js";import{a as t,b as a}from"./runtime-B73WLANC.js";var{prev:l,next:p}=r("/components/section"),i={route:"/components/section",meta:{title:"Section \u2014 Pulse Docs",description:"Vertical padding wrapper with optional background. Compose with container() for full-width background with constrained content.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/section",prev:l,next:p,name:"section",description:"Vertical padding wrapper with optional background. Compose with <code>container()</code> for full-width background with constrained content.",content:`
2
- ${s(n({eyebrow:"Why Pulse",title:"Built for speed.",subtitle:"Every page scores 100 on Lighthouse by design, not by optimisation.",align:"center",variant:"alt",content:o({size:"md",content:'<p style="text-align:center;color:var(--ui-muted)">Content goes here</p>'})})+n({variant:"dark",content:o({size:"md",content:'<p style="text-align:center;color:var(--ui-muted)">Dark background \xB7 no header</p>'})}),`section({
3
- eyebrow: 'Why Pulse',
4
- title: 'Built for speed.',
5
- subtitle: 'Every page scores 100 on Lighthouse by design.',
6
- align: 'center',
7
- variant: 'alt',
8
- content: container({ size: 'lg', content: featureGrid }),
9
- })`)}
10
-
11
- ${c(["Prop","Type","Default",""],[["<code>content</code>","string (HTML)","\u2014","Raw HTML slot"],["<code>variant</code>","string","'default'","'default' \xB7 'alt' \xB7 'dark'"],["<code>padding</code>","string","'md'","'sm' \xB7 'md' \xB7 'lg'"],["<code>id</code>","string","\u2014","Anchor id for nav links"],["<code>eyebrow</code>","string","\u2014","Small label above the title"],["<code>title</code>","string","\u2014","Section heading"],["<code>level</code>","number","2","Heading tag for the title (1\u20136). Visual style is unchanged."],["<code>subtitle</code>","string","\u2014","Supporting text beneath the heading"],["<code>align</code>","string","'left'","'left' \xB7 'center'"]])}
12
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(i,e,window.__PULSE_SERVER__||{},{ssr:!0}),a(e,t));var v=i;export{v as default};
@@ -1,33 +0,0 @@
1
- import{a as t,b as m}from"./runtime-ZJ4FXT5O.js";import{Qa as c,nb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s,h as i,i as n}from"./runtime-L2HNXIHW.js";import{a,b as d}from"./runtime-B73WLANC.js";var{prev:r,next:u}=s("/components/segmented"),l={route:"/components/segmented",meta:{title:"Segmented \u2014 Pulse Docs",description:"iOS-style segmented control component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>m({currentHref:"/components/segmented",prev:r,next:u,name:"segmented",description:"iOS-style segmented control built from hidden radio inputs. The selected segment is highlighted via CSS \u2014 no JavaScript required.",content:`
2
-
3
- <h2 class="doc-h2" id="basic">Basic</h2>
4
- ${t(e({name:"period",value:"week",options:[{value:"day",label:"Day"},{value:"week",label:"Week"},{value:"month",label:"Month"}]}),`segmented({
5
- name: 'period',
6
- value: state.period,
7
- options: [
8
- { value: 'day', label: 'Day' },
9
- { value: 'week', label: 'Week' },
10
- { value: 'month', label: 'Month' },
11
- ],
12
- })`)}
13
-
14
- <h2 class="doc-h2" id="sizes">Sizes</h2>
15
- ${t(c({gap:"md",content:e({name:"size-sm",value:"b",size:"sm",options:[{value:"a",label:"Small"},{value:"b",label:"Sizes"},{value:"c",label:"Here"}]})+e({name:"size-md",value:"b",size:"md",options:[{value:"a",label:"Medium"},{value:"b",label:"Default"},{value:"c",label:"Size"}]})+e({name:"size-lg",value:"b",size:"lg",options:[{value:"a",label:"Large"},{value:"b",label:"Size"},{value:"c",label:"Here"}]})}),`segmented({ name: 'view', value: 'b', size: 'sm', options: [...] })
16
- segmented({ name: 'view', value: 'b', size: 'md', options: [...] })
17
- segmented({ name: 'view', value: 'b', size: 'lg', options: [...] })`)}
18
-
19
- <h2 class="doc-h2" id="ui-context">View toggle</h2>
20
- <p>A common use case \u2014 toggling between Grid and List views.</p>
21
- ${t(e({name:"layout",value:"grid",options:[{value:"grid",label:"Grid"},{value:"list",label:"List"}]}),`segmented({
22
- name: 'layout',
23
- value: state.layout,
24
- options: [
25
- { value: 'grid', label: 'Grid' },
26
- { value: 'list', label: 'List' },
27
- ],
28
- })`)}
29
-
30
- ${n("note","The segmented control submits the selected <code>value</code> string under <code>name</code> in FormData. Read it via <code>formData.get('period')</code> in <code>action.onStart</code> or <code>action.run</code>.")}
31
-
32
- ${i(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name \u2014 submitted in FormData"],["<code>options</code>","array","[]","Array of <code>{ value, label }</code>"],["<code>value</code>","string","\u2014","The currently selected value"],["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>",""],["<code>disabled</code>","boolean","false","Disables all options"],["<code>class</code>","string","\u2014",""]])}
33
- `})};var o=document.getElementById("pulse-root");o&&!o.dataset.pulseMounted&&(o.dataset.pulseMounted="1",a(l,o,window.__PULSE_SERVER__||{},{ssr:!0}),d(o,a));var w=l;export{w as default};
@@ -1,10 +0,0 @@
1
- import{a as n,b as a}from"./runtime-ZJ4FXT5O.js";import{za as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as l}from"./runtime-L2HNXIHW.js";import{a as t,b as r}from"./runtime-B73WLANC.js";var{prev:i,next:c}=l("/components/select"),s={route:"/components/select",meta:{title:"Select \u2014 Pulse Docs",description:"Select component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>a({currentHref:"/components/select",prev:i,next:c,name:"select",description:"Options can be plain strings or <code>{ value, label }</code> objects. Pass <code>value</code> to mark the current selection.",content:`
2
- ${n(o({name:"role",label:"Role",options:["Admin","Editor","Viewer"],value:"Editor"})+o({name:"status",label:"Status",options:[{value:"active",label:"Active"},{value:"paused",label:"Paused"}],error:"Please select a status"}),`select({ name: 'role', label: 'Role', options: ['Admin', 'Editor', 'Viewer'], value: state.role })
3
- select({
4
- name: 'country',
5
- label: 'Country',
6
- options: [{ value: 'gb', label: 'United Kingdom' }, { value: 'us', label: 'United States' }],
7
- value: state.country,
8
- required: true,
9
- })`,{col:!0})}
10
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(s,e,window.__PULSE_SERVER__||{},{ssr:!0}),r(e,t));var E=s;export{E as default};
@@ -1,47 +0,0 @@
1
- import{a as e,b as u}from"./runtime-ZJ4FXT5O.js";import{mb as t}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as l,i as s}from"./runtime-L2HNXIHW.js";import{a as i,b as d}from"./runtime-B73WLANC.js";var{prev:m,next:h}=r("/components/slider"),n={route:"/components/slider",meta:{title:"Slider \u2014 Pulse Docs",description:"Styled range input slider component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{brightness:100},mutations:{setBrightness:(o,c)=>({brightness:Number(c.target.value)})},view:o=>u({currentHref:"/components/slider",prev:m,next:h,name:"slider",description:"Styled range input with label, hint, and a CSS-driven fill gradient that tracks the thumb live as you drag.",content:`
2
-
3
- <h2 class="doc-h2" id="basic">Basic</h2>
4
- ${e(t({name:"volume",label:"Volume",showValue:!0}),"slider({ name: 'volume', label: 'Volume', showValue: true })",{col:!0})}
5
-
6
- <h2 class="doc-h2" id="min-max-step">Min, max, step, and hint</h2>
7
- ${e(t({name:"brightness",label:"Brightness",min:0,max:200,step:10,value:100,showValue:!0,hint:"Adjust display brightness (0\u2013200)"}),`slider({
8
- name: 'brightness',
9
- label: 'Brightness',
10
- min: 0,
11
- max: 200,
12
- step: 10,
13
- value: 100,
14
- showValue: true,
15
- hint: 'Adjust display brightness (0\u2013200)',
16
- })`,{col:!0})}
17
-
18
- <h2 class="doc-h2" id="live-value">Live value in state</h2>
19
- <p class="u-mb-4 u-text-sm u-color-muted">Use <code>data-event="change:mutationName"</code> to capture the value when the user releases the handle. The fill gradient always updates live \u2014 no mutation needed for that.</p>
20
- ${e(`<div>
21
- ${t({name:"brightness",label:"Brightness",value:o.brightness,min:0,max:200,step:10,showValue:!0,event:"change:setBrightness"})}
22
- </div>`,`// state
23
- { brightness: 100 }
24
-
25
- // mutation
26
- setBrightness: (state, e) => ({ brightness: Number(e.target.value) })
27
-
28
- // view
29
- slider({
30
- name: 'brightness',
31
- label: 'Brightness',
32
- min: 0,
33
- max: 200,
34
- step: 10,
35
- value: state.brightness,
36
- showValue: true,
37
- event: 'change:setBrightness',
38
- })`,{col:!0})}
39
-
40
- <h2 class="doc-h2" id="disabled">Disabled</h2>
41
- ${e(t({name:"opacity",label:"Opacity",value:30,disabled:!0}),"slider({ name: 'opacity', label: 'Opacity', value: 30, disabled: true })",{col:!0})}
42
-
43
- ${s("note",'The fill gradient updates live during drag automatically. To read the final value, either use <code>data-event="change:mutationName"</code> on the slider or submit it as part of a form \u2014 the value is available in FormData as a number string under <code>name</code>.')}
44
- ${s("warning",'Do not use <code>data-event="input:mutationName"</code> on a slider. Pulse replaces <code>innerHTML</code> on every mutation, which interrupts the drag mid-gesture. Use <code>change</code> instead \u2014 it fires once when the user releases the handle.')}
45
-
46
- ${l(["Prop","Type","Default",""],[["<code>name</code>","string","\u2014","Field name \u2014 submitted in FormData"],["<code>label</code>","string","\u2014","Visible label text"],["<code>min</code>","number","0","Minimum value"],["<code>max</code>","number","100","Maximum value"],["<code>step</code>","number","1","Step increment"],["<code>value</code>","number","50","Current value"],["<code>showValue</code>","boolean","false","Show current value live beside the label as you drag"],["<code>disabled</code>","boolean","false",""],["<code>hint</code>","string","\u2014","Helper text below the slider"],["<code>event</code>","string","\u2014","<code>data-event</code> binding, e.g. <code>change:mutationName</code>"],["<code>id</code>","string","\u2014","Override the generated <code>id</code>"],["<code>class</code>","string","\u2014",""]])}
47
- `})};var a=document.getElementById("pulse-root");a&&!a.dataset.pulseMounted&&(a.dataset.pulseMounted="1",i(n,a,window.__PULSE_SERVER__||{},{ssr:!0}),d(a,i));var V=n;export{V as default};
@@ -1,22 +0,0 @@
1
- import{a as n,b as l}from"./runtime-ZJ4FXT5O.js";import{Ra as i,a as s,gb as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as d}from"./runtime-L2HNXIHW.js";import{a as t,b as a}from"./runtime-B73WLANC.js";var{prev:p,next:m}=c("/components/spinner"),r={route:"/components/spinner",meta:{title:"Spinner \u2014 Pulse Docs",description:"Loading spinner component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>l({currentHref:"/components/spinner",prev:p,next:m,name:"spinner",description:"CSS-animated loading ring. No JavaScript required. Use to indicate background activity \u2014 inside buttons, next to labels, or as a full-area overlay.",content:`
2
-
3
- <h2 class="doc-h2" id="sizes">Sizes</h2>
4
- ${n(i({gap:"lg",align:"center",content:e({size:"sm"})+e({size:"md"})+e({size:"lg"})}),`spinner({ size: 'sm' })
5
- spinner({ size: 'md' })
6
- spinner({ size: 'lg' })`)}
7
-
8
- <h2 class="doc-h2" id="colors">Colours</h2>
9
- ${n(i({gap:"lg",align:"center",content:e({color:"accent"})+e({color:"muted"})+'<span style="background:var(--ui-accent);padding:.75rem;border-radius:var(--ui-radius);display:inline-flex">'+e({color:"white"})+"</span>"}),`spinner({ color: 'accent' })
10
- spinner({ color: 'muted' })
11
- spinner({ color: 'white' })`)}
12
-
13
- <h2 class="doc-h2" id="in-button">Inside a button</h2>
14
- <p>Pair with a <code>button()</code> to show loading state. Pass the spinner as the button's <code>icon</code> prop.</p>
15
- ${n(s({label:"Saving",icon:e({size:"sm",color:"white"}),disabled:!0})+" "+s({label:"Loading",icon:e({size:"sm"}),variant:"secondary",disabled:!0}),`button({
16
- label: 'Saving',
17
- icon: spinner({ size: 'sm', color: 'white' }),
18
- disabled: state.loading,
19
- })`)}
20
-
21
- ${d(["Prop","Type","Default",""],[["<code>size</code>","<code>sm | md | lg</code>","<code>md</code>","1rem / 1.5rem / 2.5rem"],["<code>color</code>","<code>accent | muted | white</code>","<code>accent</code>",""],["<code>label</code>","string","<code>Loading\u2026</code>",'Sets <code>aria-label</code> on the <code>role="status"</code> element'],["<code>class</code>","string","\u2014",""]])}
22
- `})};var o=document.getElementById("pulse-root");o&&!o.dataset.pulseMounted&&(o.dataset.pulseMounted="1",t(r,o,window.__PULSE_SERVER__||{},{ssr:!0}),a(o,t));var S=r;export{S as default};
@@ -1,9 +0,0 @@
1
- import{a as c,b as i}from"./runtime-ZJ4FXT5O.js";import{Qa as m,a as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a,h as r}from"./runtime-L2HNXIHW.js";import{a as o,b as s}from"./runtime-B73WLANC.js";var{prev:l,next:d}=a("/components/stack"),n={route:"/components/stack",meta:{title:"Stack \u2014 Pulse Docs",description:"Stack component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>i({currentHref:"/components/stack",prev:l,next:d,name:"stack",description:"Flex column with consistent vertical gap. Replaces the common pattern of adding <code>margin-bottom</code> to every child element.",content:`
2
- ${c(m({gap:"sm",content:e({label:"Primary action"})+e({label:"Secondary action",variant:"secondary"})+e({label:"Ghost action",variant:"ghost"})}),`stack({ gap: 'sm', align: 'start', content:
3
- button({ label: 'Primary action' }) +
4
- button({ label: 'Secondary action', variant: 'secondary' }) +
5
- button({ label: 'Ghost', variant: 'ghost' })
6
- })`)}
7
-
8
- ${r(["Prop","Type","Default",""],[["<code>content</code>","string (HTML)","\u2014","Raw HTML slot"],["<code>gap</code>","string","'md'","'xs' \xB7 'sm' \xB7 'md' \xB7 'lg' \xB7 'xl'"],["<code>align</code>","string","'stretch'","'stretch' \xB7 'start' \xB7 'center' \xB7 'end'"]])}
9
- `})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",o(n,t,window.__PULSE_SERVER__||{},{ssr:!0}),s(t,o));var k=n;export{k as default};
@@ -1,9 +0,0 @@
1
- import{a as o,b as d}from"./runtime-ZJ4FXT5O.js";import{Ca as e}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as n,h as l}from"./runtime-L2HNXIHW.js";import{a,b as s}from"./runtime-B73WLANC.js";var{prev:c,next:u}=n("/components/stat"),r={route:"/components/stat",meta:{title:"Stat \u2014 Pulse Docs",description:"Stat component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/stat",prev:c,next:u,name:"stat",description:"Numeric metric display with optional trend indicator. Use inside a <code>card()</code> or a flex/grid container for dashboard layouts.",content:`
2
- ${o('<div style="display:flex;gap:2rem;flex-wrap:wrap">'+e({label:"Total users",value:"12,483",change:"+8.2%",trend:"up"})+e({label:"Bounce rate",value:"24%",change:"\u22123.1%",trend:"down"})+e({label:"Avg. session",value:"4m 12s"})+"</div>",`stat({ label: 'Total users', value: '12,483', change: '+8.2%', trend: 'up' })
3
- stat({ label: 'Bounce rate', value: '24%', change: '\u22123.1%', trend: 'down' })
4
- stat({ label: 'Avg. session', value: '4m 12s' })`)}
5
- <p>The <code>center</code> prop centre-aligns the value, label, and change \u2014 useful in grids or dashboard cards.</p>
6
- ${o('<div style="display:flex;gap:2rem;flex-wrap:wrap">'+e({label:"Total users",value:"12,483",change:"+8.2%",trend:"up",center:!0})+e({label:"Bounce rate",value:"24%",change:"\u22123.1%",trend:"down",center:!0})+e({label:"Avg. session",value:"4m 12s",center:!0})+"</div>","stat({ label: 'Total users', value: '12,483', change: '+8.2%', trend: 'up', center: true })")}
7
-
8
- ${l(["Prop","Type","Default",""],[["<code>label</code>","string","\u2014",""],["<code>value</code>","string","\u2014",'Formatted value string \u2014 e.g. "2.4k", "98%"'],["<code>change</code>","string","\u2014",'Change label \u2014 e.g. "+12%", "\u22123"'],["<code>trend</code>","string","neutral","up \xB7 down \xB7 neutral"],["<code>center</code>","boolean","false","Centre-aligns value, label, and change"]])}
9
- `})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",a(r,t,window.__PULSE_SERVER__||{},{ssr:!0}),s(t,a));var w=r;export{w as default};
@@ -1,22 +0,0 @@
1
- import{a as t,b as i}from"./runtime-ZJ4FXT5O.js";import{qb as s}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as c,h as n}from"./runtime-L2HNXIHW.js";import{a as r,b as a}from"./runtime-B73WLANC.js";var{prev:l,next:m}=c("/components/stepper"),o=["Account","Details","Payment","Review"],p={route:"/components/stepper",meta:{title:"Stepper \u2014 Pulse Docs",description:"Horizontal step progress indicator component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>i({currentHref:"/components/stepper",prev:l,next:m,name:"stepper",description:"Horizontal step progress indicator. Completed steps show a check icon; the active step has an accent border; upcoming steps are muted. A connector line between steps fills with accent colour as progress advances.",content:`
2
-
3
- <h2 class="doc-h2" id="step1">Step 1 active</h2>
4
- ${t(s({steps:o,current:0}),`stepper({
5
- steps: ['Account', 'Details', 'Payment', 'Review'],
6
- current: 0,
7
- })`,{col:!0})}
8
-
9
- <h2 class="doc-h2" id="step2">Step 2 active</h2>
10
- ${t(s({steps:o,current:1}),`stepper({
11
- steps: ['Account', 'Details', 'Payment', 'Review'],
12
- current: 1,
13
- })`,{col:!0})}
14
-
15
- <h2 class="doc-h2" id="complete">All complete</h2>
16
- ${t(s({steps:o,current:o.length}),`stepper({
17
- steps: ['Account', 'Details', 'Payment', 'Review'],
18
- current: steps.length, // past the last index = all complete
19
- })`,{col:!0})}
20
-
21
- ${n(["Prop","Type","Default",""],[["<code>steps</code>","string[]","[]","Array of step label strings"],["<code>current</code>","number","0","0-based index of the active step. Pass <code>steps.length</code> to mark all steps complete."],["<code>class</code>","string","\u2014",""]])}
22
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",r(p,e,window.__PULSE_SERVER__||{},{ssr:!0}),a(e,r));var y=p;export{y as default};
@@ -1,11 +0,0 @@
1
- import{a as n,b as i}from"./runtime-ZJ4FXT5O.js";import{Fa as c,b as e}from"./runtime-UVPXO4IR.js";import{a}from"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as s}from"./runtime-L2HNXIHW.js";import{a as o,b as l}from"./runtime-B73WLANC.js";var{prev:m,next:u}=s("/components/table"),r={route:"/components/table",meta:{title:"Table \u2014 Pulse Docs",description:"Table component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>i({currentHref:"/components/table",prev:m,next:u,name:"table",description:'The scroll wrapper has <code>role="region"</code> and <code>tabindex="0"</code> so keyboard users can scroll horizontally on narrow screens. Row cells are raw HTML slots \u2014 wrap user-supplied values in <code>escHtml()</code> when building them.',content:`
2
- ${n(c({caption:"Team members",headers:["Name","Role","Status"],rows:[[a("Alice Smith"),e({label:"Admin",variant:"info"}),e({label:"Active",variant:"success"})],[a("Bob Jones"),e({label:"Editor",variant:"default"}),e({label:"Active",variant:"success"})],[a("Carol White"),e({label:"Viewer",variant:"default"}),e({label:"Inactive",variant:"default"})]]}),`table({
3
- caption: 'Team members',
4
- headers: ['Name', 'Role', 'Status'],
5
- rows: server.users.map(u => [
6
- escHtml(u.name),
7
- badge({ label: u.role, variant: u.role === 'admin' ? 'info' : 'default' }),
8
- badge({ label: u.status, variant: u.active ? 'success' : 'default' }),
9
- ]),
10
- })`)}
11
- `})};var t=document.getElementById("pulse-root");t&&!t.dataset.pulseMounted&&(t.dataset.pulseMounted="1",o(r,t,window.__PULSE_SERVER__||{},{ssr:!0}),l(t,o));var T=r;export{T as default};
@@ -1,11 +0,0 @@
1
- import{a as n,b as d}from"./runtime-ZJ4FXT5O.js";import{Ha as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a as r,h as a}from"./runtime-L2HNXIHW.js";import{a as t,b as s}from"./runtime-B73WLANC.js";var{prev:m,next:c}=r("/components/testimonial"),i={route:"/components/testimonial",meta:{title:"Testimonial \u2014 Pulse Docs",description:"Testimonial component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>d({currentHref:"/components/testimonial",prev:m,next:c,name:"testimonial",description:"Customer quote card with star rating, avatar, and attribution. When <code>src</code> is omitted the avatar shows initials derived from <code>name</code>.",content:`
2
- ${n('<div style="display:grid;grid-template-columns:1fr 1fr;gap:1.5rem">'+o({quote:"This is the fastest app I have ever used. It replaced three tools I was paying for.",name:"Alice Marsh",role:"Head of Product, Stride",rating:5})+o({quote:"Switched from the competition six months ago and have not looked back once.",name:"Ben Carter",role:"Founder, Loopback",rating:5})+"</div>",`testimonial({
3
- quote: 'This is the fastest app I have ever used.',
4
- name: 'Alice Marsh',
5
- role: 'Head of Product, Stride',
6
- rating: 5,
7
- src: user.avatarUrl, // optional \u2014 falls back to initials
8
- })`)}
9
-
10
- ${a(["Prop","Type","Default",""],[["<code>quote</code>","string","\u2014",""],["<code>name</code>","string","\u2014","Author name \u2014 also used for avatar initials"],["<code>role</code>","string","\u2014",""],["<code>src</code>","string","\u2014","Avatar image URL; omit to show initials"],["<code>rating</code>","number","0","1\u20135 stars; omit or set 0 to hide"]])}
11
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(i,e,window.__PULSE_SERVER__||{},{ssr:!0}),s(e,t));var P=i;export{P as default};
@@ -1,4 +0,0 @@
1
- import{a as l,b as s}from"./runtime-ZJ4FXT5O.js";import{Aa as o}from"./runtime-UVPXO4IR.js";import"./runtime-VMJA3Z4N.js";import"./runtime-QFURDKA2.js";import{a}from"./runtime-L2HNXIHW.js";import{a as t,b as n}from"./runtime-B73WLANC.js";var{prev:i,next:d}=a("/components/textarea"),r={route:"/components/textarea",meta:{title:"Textarea \u2014 Pulse Docs",description:"Textarea component for Pulse UI.",styles:["/pulse-ui.css","/docs.css"]},state:{},view:()=>s({currentHref:"/components/textarea",prev:i,next:d,name:"textarea",description:"Multi-line text input with label, hint, and error support. Wired up identically to <code>input</code> \u2014 <code>for</code>/<code>id</code> and <code>aria-describedby</code> are derived from <code>name</code>.",content:`
2
- ${l(o({name:"bio",label:"Bio",placeholder:"Tell us about yourself\u2026",hint:"Max 500 characters",rows:3})+o({name:"note",label:"Note",value:"hello world",error:"Note is too long",rows:3}),`textarea({ name: 'bio', label: 'Bio', placeholder: 'Tell us about yourself\u2026', hint: 'Max 500 characters' })
3
- textarea({ name: 'note', label: 'Note', value: state.note, error: server.errors.note, rows: 6 })`,{col:!0})}
4
- `})};var e=document.getElementById("pulse-root");e&&!e.dataset.pulseMounted&&(e.dataset.pulseMounted="1",t(r,e,window.__PULSE_SERVER__||{},{ssr:!0}),n(e,t));var h=r;export{h as default};