rynex
Version:
A minimalist TypeScript framework for building reactive web applications with no virtual DOM
238 lines • 9.51 kB
TypeScript
/**
* Rynex UI Namespace
* Import everything with: import * as UI from 'rynex/runtime/ui'
* Then use: UI.vbox(), UI.state(), etc.
*/
export * from './index.js';
import * as dom from './dom.js';
import * as renderer from './renderer.js';
import * as helpers from './helpers/index.js';
declare const _default: {
vbox: typeof helpers.vbox;
hbox: typeof helpers.hbox;
grid: typeof helpers.grid;
container: typeof helpers.container;
stack: typeof helpers.stack;
center: typeof helpers.center;
spacer: typeof helpers.spacer;
wrap: typeof helpers.wrap;
scroll: typeof helpers.scroll;
sticky: typeof helpers.sticky;
fixed: typeof helpers.fixed;
absolute: typeof helpers.absolute;
relative: typeof helpers.relative;
div: typeof helpers.div;
span: typeof helpers.span;
text: typeof helpers.text;
button: typeof helpers.button;
input: typeof helpers.input;
image: typeof helpers.image;
link: typeof helpers.link;
label: typeof helpers.label;
p: typeof helpers.p;
list: typeof helpers.list;
ul: typeof helpers.ul;
ol: typeof helpers.ol;
li: typeof helpers.li;
hr: typeof helpers.hr;
br: typeof helpers.br;
dl: typeof helpers.dl;
dt: typeof helpers.dt;
dd: typeof helpers.dd;
h1: typeof helpers.h1;
h2: typeof helpers.h2;
h3: typeof helpers.h3;
h4: typeof helpers.h4;
h5: typeof helpers.h5;
h6: typeof helpers.h6;
strong: typeof helpers.strong;
em: typeof helpers.em;
code: typeof helpers.code;
pre: typeof helpers.pre;
blockquote: typeof helpers.blockquote;
mark: typeof helpers.mark;
small: typeof helpers.small;
del: typeof helpers.del;
ins: typeof helpers.ins;
sub: typeof helpers.sub;
sup: typeof helpers.sup;
abbr: typeof helpers.abbr;
cite: typeof helpers.cite;
kbd: typeof helpers.kbd;
samp: typeof helpers.samp;
varElement: typeof helpers.varElement;
form: typeof helpers.form;
textarea: typeof helpers.textarea;
select: typeof helpers.select;
option: typeof helpers.option;
checkbox: typeof helpers.checkbox;
radio: typeof helpers.radio;
fieldset: typeof helpers.fieldset;
legend: typeof helpers.legend;
datalist: typeof helpers.datalist;
meter: typeof helpers.meter;
progress: typeof helpers.progress;
output: typeof helpers.output;
header: typeof helpers.header;
footer: typeof helpers.footer;
nav: typeof helpers.nav;
main: typeof helpers.main;
section: typeof helpers.section;
article: typeof helpers.article;
aside: typeof helpers.aside;
figure: typeof helpers.figure;
figcaption: typeof helpers.figcaption;
time: typeof helpers.time;
address: typeof helpers.address;
details: typeof helpers.details;
summary: typeof helpers.summary;
dialog: typeof helpers.dialog;
video: typeof helpers.video;
audio: typeof helpers.audio;
canvas: typeof helpers.canvas;
svg: typeof helpers.svg;
svgPath: typeof helpers.svgPath;
iframe: typeof helpers.iframe;
picture: typeof helpers.picture;
source: typeof helpers.source;
track: typeof helpers.track;
table: typeof helpers.table;
thead: typeof helpers.thead;
tbody: typeof helpers.tbody;
tfoot: typeof helpers.tfoot;
tr: typeof helpers.tr;
th: typeof helpers.th;
td: typeof helpers.td;
caption: typeof helpers.caption;
colgroup: typeof helpers.colgroup;
col: typeof helpers.col;
fragment: typeof helpers.fragment;
when: typeof helpers.when;
show: typeof helpers.show;
each: typeof helpers.each;
switchCase: typeof helpers.switchCase;
dynamic: typeof helpers.dynamic;
portal: typeof helpers.portal;
css: typeof helpers.css;
lazy: typeof helpers.lazy;
suspense: typeof helpers.suspense;
errorBoundary: typeof helpers.errorBoundary;
memo: typeof helpers.memo;
badge: typeof helpers.badge;
card: typeof helpers.card;
avatar: typeof helpers.avatar;
icon: typeof helpers.icon;
tooltip: typeof helpers.tooltip;
modal: typeof helpers.modal;
dropdown: typeof helpers.dropdown;
toggle: typeof helpers.toggle;
slider: typeof helpers.slider;
progressBar: typeof helpers.progressBar;
spinner: typeof helpers.spinner;
tabs: typeof helpers.tabs;
accordion: typeof helpers.accordion;
Link: typeof helpers.Link;
NavLink: typeof helpers.NavLink;
RouterOutlet: typeof helpers.RouterOutlet;
RouteGuard: typeof helpers.RouteGuard;
Breadcrumb: typeof helpers.Breadcrumb;
BackButton: typeof helpers.BackButton;
RouteParamsDebug: typeof helpers.RouteParamsDebug;
RouteLoading: typeof helpers.RouteLoading;
NotFound: typeof helpers.NotFound;
onMount: typeof helpers.onMount;
onUnmount: typeof helpers.onUnmount;
onUpdate: typeof helpers.onUpdate;
watch: typeof helpers.watch;
watchEffect: typeof helpers.watchEffect;
onError: typeof helpers.onError;
debounce: typeof helpers.debounce;
throttle: typeof helpers.throttle;
preload: typeof helpers.preload;
getPreloaded: typeof helpers.getPreloaded;
onIdle: typeof helpers.onIdle;
cancelIdle: typeof helpers.cancelIdle;
ref: typeof helpers.ref;
useRef: typeof helpers.useRef;
forwardRef: typeof helpers.forwardRef;
callbackRef: typeof helpers.callbackRef;
mergeRefs: typeof helpers.mergeRefs;
styled: typeof helpers.styled;
classNames: typeof helpers.classNames;
mergeStyles: typeof helpers.mergeStyles;
setTheme: typeof helpers.setTheme;
getTheme: typeof helpers.getTheme;
useTheme: typeof helpers.useTheme;
createCSSVariables: typeof helpers.createCSSVariables;
applyThemeVariables: typeof helpers.applyThemeVariables;
getCSSVariable: typeof helpers.getCSSVariable;
setCSSVariable: typeof helpers.setCSSVariable;
transition: typeof helpers.transition;
animate: typeof helpers.animate;
fade: typeof helpers.fade;
slide: typeof helpers.slide;
scale: typeof helpers.scale;
rotate: typeof helpers.rotate;
createStore: typeof helpers.createStore;
useStore: typeof helpers.useStore;
createContext: typeof helpers.createContext;
useContext: typeof helpers.useContext;
provider: typeof helpers.provider;
getStores: typeof helpers.getStores;
removeStore: typeof helpers.removeStore;
clearStores: typeof helpers.clearStores;
devtools: typeof helpers.devtools;
logger: typeof helpers.logger;
profiler: typeof helpers.profiler;
log: {
debug: (msg: string, data?: any) => void;
info: (msg: string, data?: any) => void;
warn: (msg: string, data?: any) => void;
error: (msg: string, data?: any) => void;
};
profile: {
start: (name: string, metadata?: any) => void;
end: (name: string) => number | undefined;
measure: (name: string, fn: () => any, metadata?: any) => any;
measureAsync: (name: string, fn: () => Promise<any>, metadata?: any) => Promise<any>;
report: () => {
active: import("./helpers/devtools.js").ProfileEntry[];
completed: import("./helpers/devtools.js").ProfileEntry[];
summary: Record<string, any>;
};
};
LogLevel: typeof helpers.LogLevel;
render(component: Function, container: HTMLElement, props?: any): renderer.ComponentInstance;
createComponent(component: Function, stateObj?: any, props?: any): HTMLElement;
mountComponent(component: Function, container: HTMLElement, props?: any): () => void;
createElement(tag: string, props?: dom.DOMProps | null, ...children: dom.DOMChildren[]): HTMLElement;
createTextNode(text: string | number): Text;
applyProps(element: HTMLElement, props: dom.DOMProps): void;
updateProps(element: HTMLElement, oldProps: dom.DOMProps, newProps: dom.DOMProps): void;
removeProp(element: HTMLElement, key: string, value: any): void;
appendChildren(parent: HTMLElement | SVGElement, children: dom.DOMChildren[]): void;
replaceChildren(parent: HTMLElement, children: dom.DOMChildren[]): void;
mount(element: HTMLElement, container: HTMLElement): void;
unmount(element: HTMLElement): void;
createRef<T extends HTMLElement = HTMLElement>(): {
current: T | null;
};
$(selector: string, parent?: HTMLElement | Document): HTMLElement | null;
$$(selector: string, parent?: HTMLElement | Document): HTMLElement[];
addClass(element: HTMLElement, ...classNames: string[]): void;
removeClass(element: HTMLElement, ...classNames: string[]): void;
toggleClass(element: HTMLElement, className: string, force?: boolean): void;
setStyle(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
setAttributes(element: HTMLElement, attrs: Record<string, string>): void;
on<K extends keyof HTMLElementEventMap>(element: HTMLElement, event: K, handler: (event: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions): () => void;
off<K extends keyof HTMLElementEventMap>(element: HTMLElement, event: K, handler: (event: HTMLElementEventMap[K]) => void): void;
state<T extends object>(initialState: T): T;
computed<T>(computeFn: () => T): {
value: T;
};
effect(effectFn: () => void): () => void;
subscribe(stateObj: any, listener: () => void): () => void;
batch(fn: () => void): void;
};
export default _default;
//# sourceMappingURL=ui.d.ts.map