@malv/runtime-web
v1.2.0
Published
Browser runtime for hydrating MALV objects.
Maintainers
Readme
@malv/runtime-web
Browser runtime for hydrating MALV objects.
Note: Component generation has been moved to
@malv/rendering-objects. Use theObjectsRenderingplugin from that package for build-time component generation.
Package Structure
src/
├── frontware/
│ └── index.ts # Main entry - browser hydration runtime
└── middleware/
├── types/ # TypeScript interfaces
│ ├── AppInfo.ts
│ ├── MalvConfig.ts
│ ├── ObjectDefinition.ts
│ ├── ObjectInfo.ts
│ └── PrefixMode.ts
└── utility/ # Shared helper functions
├── discoverApps.ts
├── disableInteractiveElements.ts
├── findMalvJson.ts
├── findObjects.ts
├── findWorkspaceApp.ts
├── injectDataObject.ts
├── resolveAppPath.ts
├── toKebabCase.ts
└── transformHtml.tsUsage
// In your main JavaScript file
import '@malv/runtime-web';
// Or import specific functions
import { hydrateAll, hydrateObject } from '@malv/runtime-web';What It Does
- Finds all
[data-object]elements in the DOM - Loads
web.jsand method files for each object - Hydrates elements with live behavior
- Attaches methods to elements for Alpine
$refsaccess
Related Packages
@malv/rendering- HTML component rendering (Vite plugin)@malv/rendering-objects- Build-time component generation from MALV objects
