@k-studio-pro/engine
v0.7.108
Published
Kajabi Studio engine — block library, renderer, theme exporter, and app shell shared between master and thin clients.
Downloads
1,813
Readme
@k-studio-pro/engine
The block library, renderer, and Kajabi theme exporter that powers Kajabi Studio (the master app) and every thin-client remix.
This package is consumed by:
- Master (
kajabi-studio-max) — the Lovable project where this engine is authored. It re-exports the package as@/blocksand@/enginesvia Vite aliases, so existing imports keep working. - Thin clients — per-expert remix projects that build sites for one client. They install this package and import the same surface.
Install
bun add @k-studio-pro/engineReact and React DOM are declared as peerDependencies, so the consumer's
React copy is used. Do not pre-bundle this package with Vite — see
Vite setup below.
Usage
import {
exportFromTree,
triggerDownload,
HeaderSection,
ContentSection,
FooterSection,
Text,
CallToAction,
// ...etc
} from '@k-studio-pro/engine';
const tree = (
<>
<HeaderSection>{/* logo + menu + cta */}</HeaderSection>
<ContentSection name="Hero">{/* blocks */}</ContentSection>
<FooterSection>{/* logo + links + copyright */}</FooterSection>
</>
);
const blob = await exportFromTree(tree, { baseTheme: 'streamlined-home' });
triggerDownload(blob, 'site.zip');For multi-page sites, pass a map keyed by Kajabi template name:
const blob = await exportFromTree(
{ index: homeTree, about: aboutTree, contact: contactTree },
{ baseTheme: 'streamlined-home-pro' },
);Vite setup
This package ships raw TypeScript source (no build step) and consumes
React. If Vite pre-bundles it via optimizeDeps, you'll end up with two
copies of React — hooks resolve to null and the app blanks out with
Cannot read properties of null (reading 'useEffect').
Add to your vite.config.ts:
export default defineConfig({
// ...
optimizeDeps: {
exclude: ['@k-studio-pro/engine'],
},
});This forces Vite to process the package through the same React instance as the rest of your app. Hard refresh the preview after the change to clear the cached optimized deps.
Future: once the package ships pre-built ESM with proper externals, this step will go away.
Releases
Versions are published automatically by the GitHub Action in
.github/workflows/publish-engine.yml whenever
packages/engine/package.json's version field changes on the default
branch. To cut a release: bump the version, save, and the bidirectional
GitHub sync pushes the commit. The Action then publishes to npm.
License
UNLICENSED — internal Kajabi Studio package.
