@interdead/framework
v0.1.0
Published
InterDead UI framework runtime with modular feature loading and host-agnostic config adapters.
Maintainers
Readme
Introduction
@interdead/framework is the shared UI runtime package for InterDead hosts. It provides a modular feature registry and a stable API for enabling only the needed interactive effects.
Current shipped feature set:
membrane(interactive horizontal membrane lines with hover/click/touch/focus pulse reaction).
Installation
npm install @interdead/frameworkBuild targets
The package builds in three formats:
- ESM:
dist/esm - CJS:
dist/cjs - Browser global bundle:
dist/browser/interdead-framework.global.js(window.InterdeadFramework)
Usage (JavaScript host / InterDeadProto style)
import {
FrameworkRuntime,
JsObjectConfigSourceAdapter,
} from '@interdead/framework';
const runtime = new FrameworkRuntime(
new JsObjectConfigSourceAdapter({
enabledFeatures: { membrane: true },
featureOptions: {
membrane: {
interactionSelectors: ['button', '[data-action]'],
activeBodyClass: 'proto-membrane-active',
canvasClassName: 'proto-membrane-canvas',
reducedMotionMode: 'minimal',
},
},
}),
);
runtime.boot();Usage (Hugo host / InterDeadIT style)
import { FrameworkRuntime, HugoConfigSourceAdapter } from '@interdead/framework';
const runtime = new FrameworkRuntime(new HugoConfigSourceAdapter(document));
runtime.boot();Provide config marker in HTML (recommended on <body>):
<body
data-interdead-framework="true"
data-framework-membrane="true"
data-framework-membrane-selectors="[data-modal-trigger], [data-auth-button], .gm-slider__arrow"
data-framework-reduced-motion-mode="minimal"
></body>Reduced motion
disable: do not mount the feature whenprefers-reduced-motion: reduceis active.minimal: mount with reduced membrane profile (lower line count and amplitude).full: mount with unchanged profile.
API
createInterdeadFramework(config, options)FrameworkRuntime(boot,destroy)HugoConfigSourceAdapterJsObjectConfigSourceAdapter
Release
- Tag format:
framework-v0.1.0 - Build and tests:
npm run buildnpm test
