Capxul Docs
Reference

React package exports

The installable entry point and the difference between workspace and packed exports.

The packed npm package has two entries:

import { CapxulProvider, useCapxulIdentity } from "@capxul/sdk-react";
import { createCapxulReactTestHarness } from "@capxul/sdk-react/testing";

const harness = createCapxulReactTestHarness();
const tree = harness.provider(harness.authentication(slots));
await harness.testing.close();

The testing entry composes the same public provider and controllers over the Core SDK testing factory. It owns no DOM, renderer, route, form state, copy, analytics, or second identity model.

The repository workspace also resolves @capxul/sdk-react/headless, but that subpath is absent from publishConfig.exports and from the pack entry list. It is not an installable public subpath.

The root also exports the compound components and the query-key catalog:

import { capxulKeys, CapxulActivity } from "@capxul/sdk-react";

<CapxulActivity pageSize={25}>
  <CapxulActivity.Rows>{({ rows }) => <Table rows={rows} />}</CapxulActivity.Rows>
</CapxulActivity>;

queryClient.invalidateQueries({ queryKey: capxulKeys.activity });

CapxulActivity is one root plus seven named parts — .Summary, .Filters, .Search, .Rows, .LoadMore, .Detail and .Export. The root owns the behaviour and draws nothing; each part hands one finished slice to the render function the screen passes it, so a screen places only the parts it needs. The engine hook beneath the component is module-scoped and is not exported, so the component is the one way in. capxulKeys is the typed query-key catalog, so an application invalidates SDK lanes without a parallel namespace of its own.

The root currently exports provider/bootstrap APIs, all hook families, return types, scope helpers, and selected headless slot components. Use the hook catalog for hook-level reference. Treat a symbol in source as publishable only after it appears in the packed root declaration.

Identity selectors

The root re-exports the two Core SDK identity selectors, so a React consumer asks a question instead of spelling state names inline:

import { isClaimed, isRestoring, useCapxulIdentity } from "@capxul/sdk-react";

const identity = useCapxulIdentity();
if (isRestoring(identity)) return <Waiting />; // hold, never redirect
const ready = isClaimed(identity);

isRestoring classifies negatively: a phase added in a later release waits rather than redirecting a person who is in fact signed in.

Compound components

Two compound components ship from the root — a root that owns a judgment and draws nothing, plus named parts your screen places itself: CapxulOrgMember and CapxulDashboardAccess. The engine hook under each stays module-scoped on purpose: the component is the one public way in, so no second surface can drift from it.

On this page