import{_ as e,o as a,c as n,ae as l}from"./chunks/framework.C8AWLET_.js";const f=JSON.parse('{"title":"⚡ Quick API Reference","description":"","frontmatter":{},"headers":[],"relativePath":"api/quick.md","filePath":"api/quick.md"}'),d={name:"api/quick.md"};function o(i,t,s,r,c,g){return a(),n("div",null,[...t[0]||(t[0]=[l('
SigPro is a high-performance micro-framework that updates the Real DOM surgically. No Virtual DOM, no unnecessary re-renders.
| Function | Signature | Description |
|---|---|---|
$(val, key?) | (any, string?) => Signal | Creates a Signal. If key is provided, it persists in localStorage. |
$(fn) | (function) => Computed | Creates a Computed Signal that auto-updates when its dependencies change. |
$.effect(fn) | (function) => stopFn | Runs a side-effect that tracks signals. Returns a function to manually stop it. |
$.html(tag, props, children) | (string, object, any) => HTMLElement | The low-level DOM factory powering all tag constructors. |
$.router(routes) | (Array) => HTMLElement | Initializes the hash-based router for SPAs. |
$.go(path) | (string) => void | Programmatic navigation (e.g., $.go('/home')). |
$.mount(comp, target) | (any, string|Node) => Runtime | Mounts the application into the specified DOM element. |
$.ignore(fn) | (function) => any | Executes code without tracking any signals inside it. |
SigPro provides PascalCase wrappers for all standard HTML5 tags (e.g., Div, Span, Button).
Tag({ attributes }, [children])| Pattern | Code Example | Behavior |
|---|---|---|
| Static | class: "text-red" | Standard HTML attribute string. |
| Reactive | disabled: isLoading | Updates automatically when isLoading() changes. |
| Two-way | $value: username | Syncs input with signal both ways (Binding Operator). |
| Text | P({}, () => count()) | Updates text node whenever count changes. |
| Boolean | hidden: isHidden | Toggles the attribute based on signal truthiness. |