release: WRNexusJS 0.6.0

This commit is contained in:
2026-08-01 01:09:58 +05:30
parent 3e565e8d03
commit 687d345882
502 changed files with 33038 additions and 11358 deletions
@@ -45,7 +45,7 @@ page CardDetail {
<span class="showcase-eyebrow">Base component</span>
<h1>Card</h1>
<p>Group related content in a responsive themed surface with title, description, content, and supporting slots.</p>
<div class="detail-badges"><span>31 props</span><span>1 slots</span><span>6 events</span><span>Theme ready</span><span>Responsive</span></div>
<div class="detail-badges"><span>31 props</span><span>1 slots</span><span>6 outputs</span><span>Theme ready</span><span>Responsive</span></div>
</div>
<div class="detail-hero-icon"><span class="icon-[lucide--component] size-10" aria-hidden="true"></span></div>
</header>
@@ -396,11 +396,11 @@ page CardDetail {
/&gt;</code></pre>
</section>
<div class="playground-status" data-playground-status aria-live="polite"></div>
<div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect <code>event.detail</code>.</span></div>
<div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect the typed <code>payload</code>.</span></div>
</div>
<form class="playground-controls" data-playground-form>
<header><div><span>Component props</span><strong>31 controls</strong></div><button type="reset"><span class="icon-[lucide--rotate-ccw] size-4" aria-hidden="true"></span>Reset</button></header>
<div class="playground-fields"><label class="playground-field" for="playground-card-title"><span><strong>title</strong><small>string</small></span><input id="playground-card-title" name="pg_title" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-subtitle"><span><strong>subtitle</strong><small>string</small></span><input id="playground-card-subtitle" name="pg_subtitle" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-description"><span><strong>description</strong><small>string</small></span><input id="playground-card-description" name="pg_description" type="text" value="A polished default card for a modern application." /></label><label class="playground-field" for="playground-card-header"><span><strong>header</strong><small>string</small></span><input id="playground-card-header" name="pg_header" type="text" value="" /></label><label class="playground-field" for="playground-card-footer"><span><strong>footer</strong><small>string</small></span><input id="playground-card-footer" name="pg_footer" type="text" value="" /></label><label class="playground-field" for="playground-card-imageSrc"><span><strong>image Src</strong><small>string</small></span><input id="playground-card-imageSrc" name="pg_imageSrc" type="text" value="" /></label><label class="playground-field" for="playground-card-imageAlt"><span><strong>image Alt</strong><small>string</small></span><input id="playground-card-imageAlt" name="pg_imageAlt" type="text" value="" /></label><label class="playground-field" for="playground-card-imagePosition"><span><strong>image Position</strong><small>string</small></span><select id="playground-card-imagePosition" name="pg_imagePosition"><option value="top" selected>top</option><option value="left">left</option><option value="right">right</option></select></label><label class="playground-field" for="playground-card-actionLabel"><span><strong>action Label</strong><small>string</small></span><input id="playground-card-actionLabel" name="pg_actionLabel" type="text" value="Card" /></label><label class="playground-field" for="playground-card-actionHref"><span><strong>action Href</strong><small>string</small></span><input id="playground-card-actionHref" name="pg_actionHref" type="text" value="#card-demo" /></label><label class="playground-field" for="playground-card-headerActions"><span><strong>header Actions</strong><small>string</small></span><textarea id="playground-card-headerActions" name="pg_headerActions" rows="5" spellcheck="false" data-playground-json>[
<div class="playground-fields"><label class="playground-field" for="playground-card-title"><span><strong>title</strong><small>string</small></span><input id="playground-card-title" name="pg_title" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-subtitle"><span><strong>subtitle</strong><small>string</small></span><input id="playground-card-subtitle" name="pg_subtitle" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-description"><span><strong>description</strong><small>string</small></span><input id="playground-card-description" name="pg_description" type="text" value="A polished default card for a modern application." /></label><label class="playground-field" for="playground-card-header"><span><strong>header</strong><small>string</small></span><input id="playground-card-header" name="pg_header" type="text" value="" /></label><label class="playground-field" for="playground-card-footer"><span><strong>footer</strong><small>string</small></span><input id="playground-card-footer" name="pg_footer" type="text" value="" /></label><label class="playground-field" for="playground-card-imageSrc"><span><strong>image Src</strong><small>string</small></span><input id="playground-card-imageSrc" name="pg_imageSrc" type="text" value="" /></label><label class="playground-field" for="playground-card-imageAlt"><span><strong>image Alt</strong><small>string</small></span><input id="playground-card-imageAlt" name="pg_imageAlt" type="text" value="" /></label><label class="playground-field" for="playground-card-imagePosition"><span><strong>image Position</strong><small>string</small></span><select id="playground-card-imagePosition" name="pg_imagePosition"><option value="top" selected>top</option><option value="left">left</option><option value="right">right</option></select></label><label class="playground-field" for="playground-card-actionLabel"><span><strong>action Label</strong><small>string</small></span><input id="playground-card-actionLabel" name="pg_actionLabel" type="text" value="Card" /></label><label class="playground-field" for="playground-card-actionHref"><span><strong>action Href</strong><small>string</small></span><input id="playground-card-actionHref" name="pg_actionHref" type="text" value="#card-demo" /></label><label class="playground-field" for="playground-card-headerActions"><span><strong>header Actions</strong><small>unknown[]</small></span><textarea id="playground-card-headerActions" name="pg_headerActions" rows="5" spellcheck="false" data-playground-json>[
{
"id": "card-0-1",
"key": "card-0-1",
@@ -507,7 +507,7 @@ page CardDetail {
"Standard"
]
}
]</textarea><em data-playground-error></em></label><label class="playground-field" for="playground-card-navigation"><span><strong>navigation</strong><small>string</small></span><textarea id="playground-card-navigation" name="pg_navigation" rows="5" spellcheck="false" data-playground-json>[
]</textarea><em data-playground-error></em></label><label class="playground-field" for="playground-card-navigation"><span><strong>navigation</strong><small>unknown[]</small></span><textarea id="playground-card-navigation" name="pg_navigation" rows="5" spellcheck="false" data-playground-json>[
{
"id": "card-0-1",
"key": "card-0-1",
@@ -614,7 +614,7 @@ page CardDetail {
"Standard"
]
}
]</textarea><em data-playground-error></em></label><label class="playground-field" for="playground-card-activeNav"><span><strong>active Nav</strong><small>string</small></span><input id="playground-card-activeNav" name="pg_activeNav" type="text" value="" /></label><label class="playground-toggle" for="playground-card-mobileNavigation"><span><strong>mobile Navigation</strong><small>boolean</small></span><input id="playground-card-mobileNavigation" name="pg_mobileNavigation" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-card-alertTitle"><span><strong>alert Title</strong><small>string</small></span><input id="playground-card-alertTitle" name="pg_alertTitle" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-alertDescription"><span><strong>alert Description</strong><small>string</small></span><input id="playground-card-alertDescription" name="pg_alertDescription" type="text" value="A polished default card for a modern application." /></label><label class="playground-toggle" for="playground-card-empty"><span><strong>empty</strong><small>boolean</small></span><input id="playground-card-empty" name="pg_empty" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-card-emptyTitle"><span><strong>empty Title</strong><small>string</small></span><input id="playground-card-emptyTitle" name="pg_emptyTitle" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-emptyIcon"><span><strong>empty Icon</strong><small>string</small></span><input id="playground-card-emptyIcon" name="pg_emptyIcon" type="text" value="icon-[lucide--inbox]" /></label><label class="playground-field" for="playground-card-items"><span><strong>items</strong><small>string</small></span><textarea id="playground-card-items" name="pg_items" rows="5" spellcheck="false" data-playground-json>[
]</textarea><em data-playground-error></em></label><label class="playground-field" for="playground-card-activeNav"><span><strong>active Nav</strong><small>string</small></span><input id="playground-card-activeNav" name="pg_activeNav" type="text" value="" /></label><label class="playground-toggle" for="playground-card-mobileNavigation"><span><strong>mobile Navigation</strong><small>boolean</small></span><input id="playground-card-mobileNavigation" name="pg_mobileNavigation" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-card-alertTitle"><span><strong>alert Title</strong><small>string</small></span><input id="playground-card-alertTitle" name="pg_alertTitle" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-alertDescription"><span><strong>alert Description</strong><small>string</small></span><input id="playground-card-alertDescription" name="pg_alertDescription" type="text" value="A polished default card for a modern application." /></label><label class="playground-toggle" for="playground-card-empty"><span><strong>empty</strong><small>boolean</small></span><input id="playground-card-empty" name="pg_empty" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-card-emptyTitle"><span><strong>empty Title</strong><small>string</small></span><input id="playground-card-emptyTitle" name="pg_emptyTitle" type="text" value="Card example" /></label><label class="playground-field" for="playground-card-emptyIcon"><span><strong>empty Icon</strong><small>string</small></span><input id="playground-card-emptyIcon" name="pg_emptyIcon" type="text" value="icon-[lucide--inbox]" /></label><label class="playground-field" for="playground-card-items"><span><strong>items</strong><small>unknown[]</small></span><textarea id="playground-card-items" name="pg_items" rows="5" spellcheck="false" data-playground-json>[
{
"id": "card-0-1",
"key": "card-0-1",
@@ -1794,42 +1794,44 @@ page CardDetail {
</section>
</div>
</article></div></section>
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component events</span><h2>Respond to every public interaction</h2><p>Use declarative <code>@event</code> handlers in <code>.wrn</code> files or subscribe to the bubbling browser events from JavaScript.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@click</code><span>Fires when the interactive surface is activated.</span></div><div><code>@action</code><span>Fires when the component's primary or item action is activated.</span></div><div><code>@navigate</code><span>Fires when the component emits the navigate event.</span></div><div><code>@dismiss</code><span>Fires after the announcement or feedback surface is dismissed.</span></div><div><code>@load</code><span>Fires after remote or deferred content loads successfully.</span></div><div><code>@error</code><span>Fires when the component cannot complete an operation.</span></div></div><div class="detail-event-examples"><section class="demo-code"><header><span><span class="icon-[lucide--braces] size-4" aria-hidden="true"></span>Declarative handlers</span><small>.wrn</small></header><pre><code>&lt;Card
@click='console.log(event.detail)'
@action='console.log(event.detail)'
@navigate='console.log(event.detail)'
@dismiss='console.log(event.detail)'
@load='console.log(event.detail)'
@error='console.log(event.detail)'
/&gt;</code></pre></section><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Browser listeners</span><small>.js</small></header><pre><code>const component = document.querySelector("[data-ui-component=\"Card\"], [data-component=\"Card\"]")
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component outputs</span><h2>Receive every typed component output</h2><p>Use declarative output handlers in <code>.wrn</code> files or register a direct output handler from JavaScript. The canonical API exposes <code>payload</code> and does not require <code>event.detail</code>.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@click</code><span>Fires when the interactive surface is activated.</span></div><div><code>@action</code><span>Fires when the component's primary or item action is activated.</span></div><div><code>@navigate</code><span>Fires when the component emits the navigate event.</span></div><div><code>@dismiss</code><span>Fires after the announcement or feedback surface is dismissed.</span></div><div><code>@load</code><span>Fires after remote or deferred content loads successfully.</span></div><div><code>@error</code><span>Fires when the component cannot complete an operation.</span></div></div><div class="detail-event-examples"><section class="demo-code"><header><span><span class="icon-[lucide--braces] size-4" aria-hidden="true"></span>Declarative handlers</span><small>.wrn</small></header><pre><code>&lt;Card
@click='console.log(payload)'
@action='console.log(payload)'
@navigate='console.log(payload)'
@dismiss='console.log(payload)'
@load='console.log(payload)'
@error='console.log(payload)'
/&gt;</code></pre></section><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Direct output handlers</span><small>.js</small></header><pre><code>import &#123; registerOutputHandler &#125; from "@wrnexus/csr/outputs"
component?.addEventListener("click", (event) =&gt; &#123;
console.log("click", event.detail)
const component = document.querySelector("[data-ui-component=\"Card\"], [data-component=\"Card\"]")
if (component) registerOutputHandler(component, "click", (payload) =&gt; &#123;
console.log("click", payload)
&#125;)
component?.addEventListener("action", (event) =&gt; &#123;
console.log("action", event.detail)
if (component) registerOutputHandler(component, "action", (payload) =&gt; &#123;
console.log("action", payload)
&#125;)
component?.addEventListener("navigate", (event) =&gt; &#123;
console.log("navigate", event.detail)
if (component) registerOutputHandler(component, "navigate", (payload) =&gt; &#123;
console.log("navigate", payload)
&#125;)
component?.addEventListener("dismiss", (event) =&gt; &#123;
console.log("dismiss", event.detail)
if (component) registerOutputHandler(component, "dismiss", (payload) =&gt; &#123;
console.log("dismiss", payload)
&#125;)
component?.addEventListener("load", (event) =&gt; &#123;
console.log("load", event.detail)
if (component) registerOutputHandler(component, "load", (payload) =&gt; &#123;
console.log("load", payload)
&#125;)
component?.addEventListener("error", (event) =&gt; &#123;
console.log("error", event.detail)
if (component) registerOutputHandler(component, "error", (payload) =&gt; &#123;
console.log("error", payload)
&#125;)</code></pre></section></div></div></section>
<section id="api" class="detail-section"><div class="detail-section-heading"><span>Component API</span><h2>Props and configuration</h2><p>All content and behavior shown above is supplied through these props and slots.</p></div><div class="docs-table-wrap"><table class="docs-table"><thead><tr><th>Prop</th><th>Type</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>title</code></td><td>string</td><td><code>"Card title"</code></td><td>No</td></tr><tr><td><code>subtitle</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>description</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>header</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>footer</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>imageSrc</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>imageAlt</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>imagePosition</code></td><td>string</td><td><code>"top"</code></td><td>No</td></tr><tr><td><code>actionLabel</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>actionHref</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>headerActions</code></td><td>string</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>navigation</code></td><td>string</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>activeNav</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>mobileNavigation</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>alertTitle</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>alertDescription</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>empty</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>emptyTitle</code></td><td>string</td><td><code>"No data to show"</code></td><td>No</td></tr><tr><td><code>emptyIcon</code></td><td>string</td><td><code>"icon-[lucide--inbox]"</code></td><td>No</td></tr><tr><td><code>items</code></td><td>string</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>size</code></td><td>string</td><td><code>"md"</code></td><td>No</td></tr><tr><td><code>color</code></td><td>string</td><td><code>"primary"</code></td><td>No</td></tr><tr><td><code>variant</code></td><td>string</td><td><code>"default"</code></td><td>No</td></tr><tr><td><code>layout</code></td><td>string</td><td><code>"vertical"</code></td><td>No</td></tr><tr><td><code>align</code></td><td>string</td><td><code>"left"</code></td><td>No</td></tr><tr><td><code>hover</code></td><td>string</td><td><code>"none"</code></td><td>No</td></tr><tr><td><code>scrollable</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>maxHeight</code></td><td>string</td><td><code>"18rem"</code></td><td>No</td></tr><tr><td><code>dismissible</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>ariaLabel</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr></tbody></table></div></section>
<section id="api" class="detail-section"><div class="detail-section-heading"><span>Component API</span><h2>Props and configuration</h2><p>All content and behavior shown above is supplied through these props and slots.</p></div><div class="docs-table-wrap"><table class="docs-table"><thead><tr><th>Prop</th><th>Type</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>title</code></td><td>string</td><td><code>"Card title"</code></td><td>No</td></tr><tr><td><code>subtitle</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>description</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>header</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>footer</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>imageSrc</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>imageAlt</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>imagePosition</code></td><td>string</td><td><code>"top"</code></td><td>No</td></tr><tr><td><code>actionLabel</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>actionHref</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>headerActions</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>navigation</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>activeNav</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>mobileNavigation</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>alertTitle</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>alertDescription</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>empty</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>emptyTitle</code></td><td>string</td><td><code>"No data to show"</code></td><td>No</td></tr><tr><td><code>emptyIcon</code></td><td>string</td><td><code>"icon-[lucide--inbox]"</code></td><td>No</td></tr><tr><td><code>items</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>size</code></td><td>string</td><td><code>"md"</code></td><td>No</td></tr><tr><td><code>color</code></td><td>string</td><td><code>"primary"</code></td><td>No</td></tr><tr><td><code>variant</code></td><td>string</td><td><code>"default"</code></td><td>No</td></tr><tr><td><code>layout</code></td><td>string</td><td><code>"vertical"</code></td><td>No</td></tr><tr><td><code>align</code></td><td>string</td><td><code>"left"</code></td><td>No</td></tr><tr><td><code>hover</code></td><td>string</td><td><code>"none"</code></td><td>No</td></tr><tr><td><code>scrollable</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>maxHeight</code></td><td>string</td><td><code>"18rem"</code></td><td>No</td></tr><tr><td><code>dismissible</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>ariaLabel</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr></tbody></table></div></section>
</main>
<aside class="detail-aside">
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#card-demo-1">Structured content card</a><a href="#card-demo-2">Compact dashboard card</a><a href="#card-demo-3">Raised interactive card</a><a href="#events">Events</a><a href="#api">Props API</a></div>
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#card-demo-1">Structured content card</a><a href="#card-demo-2">Compact dashboard card</a><a href="#card-demo-3">Raised interactive card</a><a href="#events">Outputs</a><a href="#api">Props API</a></div>
</aside>
</div>
<nav class="detail-pagination">