@kimoxstudio/registry
v0.2.1
Published
Template registry and authoring helpers (localized, kxField) for kimox-fw.
Readme
@kimoxstudio/registry
Template registry and authoring helpers.
Holds the registered templates and provides the helpers you use when authoring them.
import { createRegistry, localized, localizedList, resolveLocalized, kxField }
from "@kimoxstudio/registry";
const registry = createRegistry();
registry.register({ name: "hero", schema: heroSchema, component: Hero });localized(["es","en"])/localizedList(...)— per-language Zod fields the admin renders as a labelled group;resolveLocalized(value, locale)reads one.kxField("title")— spread onto the element that renders a text prop to make it click-to-edit in the admin preview. Inert on the live site.
Keep schemas inside the admin's auto-form subset: string/number/boolean/enum/
object/array with .optional(), .default() and .describe().
Part of kimox-fw
kimox-fw is a JSON-document + template site framework for Next.js (App Router): pages are declarative JSON documents rendered by Zod-typed templates, with content stored in git and edited through a visual admin using draft branches ("variations").
Scaffold a whole site with npx create-kx-app.
MIT © Kimox Studio
