API reference
Key exports across the packages.
@nexus-cms/core
defineConfig(config)/resolveConfig(config)— thenexus.config.tsshape.createEmptySchema(), types:CmsSchema,Region,RegionCapabilities.diffOverrides(base, next),mergeOverrides(base, patch),revertRegions(...).createSnapshot(doc, meta),restoreSnapshot(snapshot, base).resolveLicense(key),resolveFeatureFlags(partial),resolveCapabilities(...).StorageAdapterinterface.
@nexus-cms/compiler
transform(code, options)— inject attributes + return regions.analyze(code, options)— regions only (no codegen).buildSchema(analyses),diffSchemas(prev, next).nexusWebpack,nexusVite, … (unplugin factories).
@nexus-cms/react
<CmsProvider>,useCms().<CmsRuntime />,<NexusEditor />,<NexusLayer />.createMemoryAdapter(schema),createHttpAdapter(config).
@nexus-cms/nextjs
withNexus(config, options)— from@nexus-cms/nextjs/config.fetchPageContent(page, options),buildMetadata(schema, page, content).createRevalidateRoute({ secret }),createEnterEditRoute(),getEditSession().<NexusProvider>— from@nexus-cms/nextjs/client.
@nexus-cms/cli
nexus init·nexus generate·nexus watch·nexus check·nexus doctor.