New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

kuebox

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kuebox

Lightweight frontend framework for multipage SPA

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Event-driven typescript frontend framework created for multipage SPA

Application

KUBApplication class - A SPA client app instance.

API

Controllers

  • Create new App createApp(): KUBApplication

  • Start App launchApp(): void

  • Render elements on top static layer renderOnDesktop(...views: HTMLElement[]): void

Configuration

  • Configure new route on a client side configurePage(route: string, pageToRender: new (props?: any) => IKUBPage): void

  • Configure 404/not-found page on a client side setPage404(page404: KUBPageType): void

  • Callback for decorating how pages will swap decorateSwapPages: (previosPage: IKUBPage, nextPage: IKUBPage) => Promise<void>

Events

  • Fired when path changes onRouteChange: (newRoute: string) => void = () => undefined

  • Fired when new page renders onPageRender: (event: IPageRenderEvent) => void = () => undefined

  • Fired when page for requested path on client side was not found onPageNotFound: (event: IPageNotFoundEvent) => void = () => undefined

  • @depracated onLaunch: VoidFunction = () => undefined

  • @depricated onFirstRender: VoidFunction = () => undefined

System

  • Get application view static GET_APP_WINDOW(): HTMLElement

  • Get desktop layer view static GET_DESKTOP_LAYER(): HTMLElement

Pages

KUBPage abstract class - client app page

API

  • Render page to the App async RenderPage(callback = () => undefined): Promise<void>

  • Remove page from the App async RemovePage(callback = () => undefined): Promise<void>

  • Get page root element getViewRoot(): HTMLElement

Events

  • Do before being mounted to the screen protected onBeforeRender: () => Promise<void>

  • Do when page is rendered to the screen protected onAfterRender: () => void

  • Do before page being removed from the screen protected onBeforeRemove: () => Promise<void>

Plugins

@under-rewrite

Helpers

@under-rewrite

Keywords

frontend

FAQs

Package last updated on 01 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts