@webjskit/core
v0.3.0
Published
webjs core runtime — html/css tags, WebComponent base, isomorphic renderers
Maintainers
Readme
@webjskit/core
Isomorphic core runtime for webjs — an AI-first, web-components-first, no-build web framework.
This package ships the tagged-template html / css helpers, the
WebComponent base class, the client and server renderers (with Declarative
Shadow DOM support), directives, context protocol, the Task controller, and
the client-side navigation router.
Not intended for direct install — you'll usually get it as a transitive dep
when you scaffold an app with @webjskit/cli.
Install
npm install @webjskit/coreUse
import { html, css, WebComponent } from '@webjskit/core';
class Counter extends WebComponent {
static properties = { count: { type: Number } };
static styles = css`button { padding: 8px 12px; }`;
render() {
return html`<button @click=${() => this.count++}>${this.count}</button>`;
}
}
customElements.define('x-counter', Counter);Side-channel imports for optional features:
import '@webjskit/core/client-router'; // SPA-style link interception
import { unsafeHTML } from '@webjskit/core/directives';
import { createContext } from '@webjskit/core/context';
import { Task } from '@webjskit/core/task';See the full framework docs at https://github.com/vivek7405/webjs.
License
MIT
