@razen-core/zenweb
Version:
A minimalist TypeScript framework for building reactive web applications with no virtual DOM
170 lines • 6.74 kB
TypeScript
/**
* ZenWeb Global Namespace
* Import everything with: import * as Zen from 'zenweb/runtime'
* Then use: Zen.vbox(), Zen.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;
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;
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;
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=zen.d.ts.map