@arcanewizards/sigil
v0.1.4
Published
Application framework for A/V applications, built on-top of arcanejs
Readme
@arcanewizards/sigil
Application framework for Arcane-based A/V applications.
@arcanewizards/sigil provides the runtime glue for standing up an Arcane application, wiring backend and frontend component namespaces, and reusing shared frontend controls, dialogs, toolbars, styling helpers, and CSS assets.
Installation
pnpm add @arcanewizards/sigilMain Entry Points
@arcanewizards/sigilBackend/runtime exports such asrunSigilApp,AppShell,AppRoot,AppListenerManager, logging contexts, and shared runtime types.@arcanewizards/sigil/frontendFrontend bootstrap exports such asstartSigilFrontend,createSigilFrontendRenderer,Debugger, browser-context helpers, and shared frontend types.@arcanewizards/sigil/frontend/controlsShared control primitives.@arcanewizards/sigil/frontend/dialogsShared dialog primitives.@arcanewizards/sigil/frontend/toolbarsShared toolbar primitives.@arcanewizards/sigil/frontend/tooltipShared tooltip helpers and boundaries.@arcanewizards/sigil/frontend/stylingShared styling helpers such ascssVariables,cnd,sigilColorUsage, and root hint-color helpers.@arcanewizards/sigil/frontend/preferencesFrontend preference helpers.@arcanewizards/sigil/frontend/appearanceAppearance-switching UI.@arcanewizards/sigil/frontend/styles/base.css@arcanewizards/sigil/frontend/styles/theme.css@arcanewizards/sigil/frontend/styles/sigil.css
Backend Usage
import { CoreComponents } from '@arcanejs/react-toolkit';
import { runSigilApp, SIGIL_COMPONENTS } from '@arcanewizards/sigil';
import pino from 'pino';
type AppApi = {
ping: () => string;
};
const logger = pino();
const app = runSigilApp<AppApi, { greeting: string }>({
logger,
title: 'Example App',
version: '0.1.0',
appProps: { greeting: 'hello' },
createApp: ({ setAppApi }) => {
setAppApi({
ping: () => 'pong',
});
return null;
},
componentNamespaces: [CoreComponents, SIGIL_COMPONENTS],
});
app.addEventListener('apiChange', (api) => {
console.log(api?.ping());
});Frontend Usage
import { startSigilFrontend } from '@arcanewizards/sigil/frontend';
startSigilFrontend({
appRenderers: [],
});In a real app you normally pass your own frontend component renderers through appRenderers.
CSS Assets
For frontend applications, import the exported styles from your app stylesheet:
@import '@arcanewizards/sigil/frontend/styles/sigil.css';
@import '@arcanewizards/sigil/frontend/styles/theme.css';
@import '@arcanewizards/sigil/frontend/styles/base.css';Notes
- The package is designed for React-based Arcane applications.
- The frontend and backend APIs are intentionally split into subpath exports so consumers only import the surface they need.
