Skip to content
brix.v2.15.0+b120c49

Search documentation

Loading search…

    Documentation menu
    Docs / ReferenceRead Markdown
    On this page

    Public API reference

    This page lists every public import path in brix and @brix/react. Use it to look up a value or type and find the guide that owns it. It is a reference, not a tutorial: for a first implementation, follow the linked task guides. public-api.json is the executable snapshot of the same exports, checked against the built packages.

    How to read each entry:

    • Runtime says where an import may run. Browser-safe modules work in browser and server bundles. Server-only modules declare "use server", so a browser bundle that reaches them fails the build. Node-only modules are for scripts, CI, and tooling, not request runtimes. Tooling entries are read by configuration files and the CLI.
    • Values are runtime exports, each with a one-line description. Types are type-only exports.
    • Framework-internal exports are published only because generated code or official Brix adapters import them across a package boundary (@frameworkInternal in source). Application code must not use them.
    • Applications import project-bound factories through #brix bindings (src/brix.ts, src/brix.server.ts), not by calling the root factories again. Approved third-party APIs come from dependency facades.

    Configuration and builds

    #

    brix/config

    #

    Runtime: tooling.

    Values:

    • defineBrixOxlintConfig — extends the managed Oxlint baseline, appending project rules, overrides, plugins, and ignore patterns.
    • defineBrixOxfmtConfig — extends the managed Oxfmt baseline, appending project ignore patterns and overrides.
    • defineBrixLibraryBuildConfig — returns the managed tsdown library build (src/index.ts entry, declarations, and native Panda publishing when panda.config.ts exists).
    • defineBrixOpenApiConfig — types a brix openapi generate --config file.

    Type: BrixOpenApiConfig (name, out, definitions, optional groupBy: "tag" | "none" and strict).

    For libraries with panda.config.ts, defineBrixLibraryBuildConfig runs native Panda codegen and source transforms and emits dist/panda/{lib.json,preset.mjs,buildinfo.json} with native package exports. Native ./types is a type-only package export for declarations such as SystemStyleObject; consume it with import type, not at runtime. Rebuild producers after compiler upgrades. See styled libraries for generated utility packaging and explicit designSystem inheritance.

    JSON TypeScript baselines (extend them from tsconfig.json): brix/config/tsconfig/application, brix/config/tsconfig/react-application, brix/config/tsconfig/library, and brix/config/tsconfig/ui-library. The application presets include Vite client types; the library preset includes Node types, and ui-library uses DOM types without Node's.

    Owner: managing projects.

    brix/vite

    #

    Runtime: tooling.

    Values:

    • defineBrixConfig — the Vite configuration for full-stack Hono + Preact-islands applications and custom Lambda entries.
    • createBrixBrowserAdapterConfig — framework-internal. The managed base that official browser-only adapters such as @brix/react/vite build on, so managed test projects resolve brix/test and framework tooling from the installed brix. Applications do not call it.

    Types: DefineBrixConfigOptions, BrixViteConfig, BrixPlatform ("node" | "lambda" | "cloudflare" | "fastly"), BrixServiceSignatureOptions.

    DefineBrixConfigOptions accepts platform, server, handler, assetPrefix, assetOutDir, contentfulPreview, serviceSignatures, and vite. The vite escape hatch (BrixViteConfig, or a function of Vite's ConfigEnv) is an allowlist: define, plugins, publicDir, resolve (except jsxImportSource), server, ssr.external, ssr.noExternal, ssr.optimizeDeps, ssr.resolve, environments.ssr.resolve, build.minify, build.sourcemap, and oxc: false; the build and ssr types admit only those keys, so build.target or ssr.target fail type checking as well as validation. Other options, authored base (use assetPrefix), and brix:-named plugins are rejected. Panda is built into full-stack application tooling and cannot be disabled. Worker platforms are fully bundled for a Web Worker graph and cannot depend on Node APIs. React SPAs use @brix/react/vite instead.

    platform: "lambda" without handler builds the generated HTTP application as dist/app.mjs, exporting handler (app.handler). Adding handler: "src/handler.ts" replaces HTTP assembly with a fully bundled Node dist/handler.mjs (handler.handler), without route, island, or Panda builds. The entry must be inside src and export exactly one runtime value named handler; type-only exports are allowed. Custom-handler brix dev is unsupported.

    serviceSignatures: true | { purposes?, maxAge?, require? } makes the generated HTTP Lambda handler verify service signatures before the BRIX_PUBLIC_ORIGIN rewrite. Defaults are the accepted purposes ["brix/edge-origin"], a 30-second maximum age, no required headers, and keys from the JSON object of purpose to keys in the standard application environment key BRIX_SERVICE_VERIFY_KEYS. Rejected requests, and requests whose routed path would be neither the verified raw path nor its decodeURI form (with %25 kept encoded), receive 401; it requires platform: "lambda" without handler.

    Owner: framework.

    brix/panda

    #

    Runtime: tooling (imported by panda.config.ts and recipe modules).

    Values:

    • definePandaConfig — native Panda configuration with Brix defaults: Preact JSX, src/** includes, generated styled-system output behind the #brix/panda import map, preflight, and the base presets unless designSystem is set.
    • definePreset — Panda's preset helper.
    • defineTokens — Panda's token helper.
    • defineSemanticTokens — Panda's semantic-token helper.
    • defineRecipe — Panda's recipe helper.
    • defineSlotRecipe — Panda's slot-recipe helper.

    Types: PandaConfig (the full native configuration type), AnimationStyles, CompositionStyles, CssKeyframes, GlobalStyleObject, LayerStyles, RecipeConfig, RecipeVariantRecord, SemanticTokens, SlotRecipeConfig, SlotRecipeVariantRecord, SystemStyleObject, TextStyles, Tokens.

    Register colocated recipes under theme.extend; components import the generated recipe functions. Statically extracted producer recipe CSS remains compiled. Inherited recipe staticCss is evaluated against the consumer's merged config recipe and can reflect its overrides; producer runtime functions retain their published class names and variant keys.

    Generated #brix/panda/jsx provides createSlotRecipeContext; its returned PropsProvider and usePropsContext supply compound-group variant defaults. These are generated Panda APIs, not brix/panda exports. See compound groups.

    Owner: styling.

    Contracts and requests

    #

    brix/contracts

    #

    Runtime: browser-safe. Independent of brix/server, Hono, route discovery, and application setup.

    Values:

    • defineBrix — declares locales, default locale, and translations in src/brix.ts, and returns the project-bound contract factories, createApiClient, executeApi, getPath, and getMarkdownIndexPath.
    • createApiContract — declares an API route's method, path, and request/response schemas.
    • createPageContract — declares a page's path (or per-locale paths), params, query, and representations.
    • createResponseContract — declares a response route (redirects, downloads, streams, raw bodies).
    • createMarkdownIndexContract — declares a Markdown index path (or per-locale paths).
    • createApiClient — creates an immutable ApiClient with shared base URL, headers, timeout, retry, cache, and validation defaults.
    • executeApi — executes an API contract over Fetch and returns a ResultPromise.
    • buildApiUrl — builds an encoded URL from a path pattern, params, and query.
    • getPath — builds a page, API, or response-contract URL.
    • getMarkdownIndexPath — returns a Markdown index contract's path, selecting a locale for localized indexes.
    • createPathPrefix — returns a typed prefixer for string or per-locale path prefixes.
    • ApiRequestError — the tagged error class for every failed request; kind is an ApiRequestErrorKind.

    Contract types: ApiDefinitionBase, ApiWithBody, ApiWithoutBody, PageContract, PageRepresentation, ResponseContract, ResponseMethod, ResponseType, MarkdownIndexContract, BrixDefinition, CreatePageContract, CreateMarkdownIndexContract, WithParams, WithoutParams.

    Inference types: InferBody, InferBodyInput, InferParams, InferQuery, InferQueryInput, InferResponse, InferResponseInput, InferPageParams, InferPageQuery, InferPageQueryInput, InferPageRepresentations, InferResponseParams, InferResponseQuery, InferResponseQueryInput, PathParams, PathParamsFromPaths, AssertConsistentParams, QueryParam.

    Execution types: ApiClient, ApiClientOptions, ExecuteApiOptions, ExecuteResult, ResultPromise (a type-only re-export of the brix/result type that executors return), ApiRequestErrorKind, RetryConfig, BrixTimings, BrixTimingSummary, BrixDependencyTimingSummary, and the runtime-neutral cache capability types ApiCache, ApiCacheRequest, ApiCacheValue.

    API contracts are universal runtime values and do not require a Brix application or route. Generated contract libraries may call executeApi from browsers, Node services, workers, libraries, and external applications that provide the standard Fetch API. getPath accepts locale maps and Markdown representations only for pages. Response contracts are URL and route contracts, not executeApi or useApi inputs.

    Query schemas on API, page, and response contracts must accept URL-string input, because every query value arrives as a string or repeated strings. Use z.string(), z.enum(), z.stringbool(), z.coerce.number(), or arrays of those, and .optional() rather than .nullable(). z.number(), z.boolean(), z.date(), z.coerce.boolean(), nullable fields, nested objects, and nested arrays are rejected by the types and at contract creation; a coerced boolean inside a field-level union without a string branch, or behind z.lazy(), is rejected only at creation, and a field-level union with a string branch is accepted. Requests always carry a query object, so a whole-schema .optional(), .default(), or .prefault() whose object has required fields is rejected too. Coercing fields receive the String(value) wire form: pass ISO strings to z.coerce.date(). JSON body and response schemas on createApiContract must accept JSON input: z.date(), z.instanceof(Date) (or any class other than Object and Array), z.bigint(), z.map(), z.set(), z.symbol(), and z.nan() are rejected at contract creation with an error naming the field (a union needs one JSON-compatible branch; the types do not check this, so generic contract factories keep compiling); use z.iso.datetime() with a transform or z.coerce.date() instead. Empty required path parameters and non-primitive query values are rejected while building URLs (request-encoding from executeApi), and serialized query keys sort by code unit.

    createApiContract accepts bodyEncoding: "form-urlencoded" with a flat string-input body schema; JSON remains the default, and ApiDefinitionBase.bodyEncoding is normalized to "json" or "form-urlencoded". Encoding applies across clients, mounted and direct routes, tests, mocks, and OpenAPI; responses remain JSON. An optional body schema makes the body optional for callers. ApiRequestErrorKind includes "request-encoding" for local serialization failures (status 0, data null, no fetch, retry, or body-value diagnostics), invalid timeout or retry settings, and URLs the runtime cannot parse, such as a root-relative URL on Node without baseUrl (one fetch attempt, never retried).

    JSON response mode sends Accept: application/json independently of request-body encoding; explicit Accept headers override it case-insensitively. Text and stream modes add no default Accept. Bodyless JSON requests do not add Content-Type.

    A response schema owns its wire-input and parsed-output types. .returns<R>() is available only without a response schema and does not replace runtime validation. Schema-backed JSON calls cannot disable response parsing with validateResponse: false, including through configured-client defaults. Explicit text and stream response modes keep their own result types. HTTP 204 responses parse undefined through a declared response schema in clients, direct execution, and the harness.

    Required query schemas require options across executeApi, configured clients, hooks, and route tests, including required query unions. All-optional paths allow omitted params; wildcard-only paths require params["*"]. Direct execution normalizes request input through HTTP serialization. Unknown root preprocessing inputs accept flat query-wire records; explicitly typed inputs keep their narrower fields.

    createApiClient(options) (also on defineBrix()) returns an immutable ApiClient whose execute preserves executeApi response and ResultPromise inference, with call requirements reflecting its validation default. A client default of validateResponse: false requires an explicit validateResponse: true override for schema-backed JSON calls. ApiClientOptions binds base URL, headers, timeout, retry, cache, redirect, Fetch credentials, validation, and fetch-wrapper defaults. Headers may be a record or a synchronous or asynchronous resolver evaluated once per execution. Call headers merge case-insensitively and win; other call options replace defaults, including cache: false. Response type and cancellation signals stay per call. Keep privileged credentials and configured server cache capabilities in server-only modules, and use request-scoped closures for user credentials. Prefer explicit cache policies per request or hook query; reserve client-level cache defaults for clients whose eligible reads deliberately share one strategy. Omitting credentials keeps Fetch's same-origin default; data-cache identity normalizes that default and partitions other credential modes.

    retry.maxDelay also caps Retry-After waits: a longer server-requested wait returns the HTTP error instead of retrying. retry.maxAttempts must be a positive integer, baseDelay and maxDelay non-negative integer milliseconds, and on an array of integer status codes; other values return request-encoding without fetching.

    ApiClientOptions and ExecuteApiOptions accept timings: BrixTimings and a stable dependency label. Every native attempt includes response-body consumption; cache hits exclude upstream HTTP spans. Retry backoff, schema validation, and application CPU work are excluded, and stream responses stop timing at headers. Do not attach a request timing scope to a shared client. Remote cache I/O is measured separately as cache.dynamodb (including S3 overflow) or cache.fastly; process-memory operations add no span. On a shared cache flight, the initiating request owns upstream and cache-write spans, while every caller owns its own cache-read spans.

    ExecuteApiOptions.cache accepts an explicitly created data-cache policy or false; no cache implementation enters the universal contract bundle.

    Owners: API routes and page routes.

    brix/edge

    #

    Runtime: browser-safe and runtime-neutral, for edge workers and CDN logic. It does not import contracts, Hono, or application setup.

    Values:

    • mergeBrixManifests — validates the generated brixManifest of each service and merges them into one BrixEdgeManifest.
    • matchBrixEdgeRoute — finds the manifest route for a Request, URL, or absolute URL string. A bare pathname throws a TypeError, as it does for both cache decisions, whose keys include the request origin.
    • decidePageCache — decides whether a page request (and optionally its response) may use the edge cache, and returns its cache key.
    • decideFragmentCache — the same decision for fragment requests and responses.
    • stripBrixPageRepresentationMarker — removes Brix's internal representation marker header from a page response before it is stored or returned.

    Types: BrixApplicationManifest, BrixApplicationManifestV2, BrixApplicationManifestRoute, BrixApiManifestRoute, BrixFragmentManifestRoute, BrixMarkdownIndexManifestRoute, BrixPageManifestRoute, BrixPageAlias, BrixManifestRouteBase, BrixManifestRouteKind, BrixManifestMethod, BrixCacheHint, BrixLocalePartition, BrixEdgeManifest, BrixEdgeManifestRoute, BrixPageCacheDecision, BrixFragmentCacheDecision.

    mergeBrixManifests still accepts schema-1 manifests from older application releases, but versioned schema-1 types are not exported.

    decidePageCache(manifest, request, response?) rejects private or no-store responses, cookies, nonce CSP, and unsupported Vary fields. Besides Accept, HTML admission permits x-brix-fragments only when the original Request selects exact defer mode. Use the same request for lookup, origin fetch, and response admission: a lookup decision alone is not permission to store the response. Page keys use brix:3:{html:inline|html:defer|markdown}:<origin><path?query>. Markdown keys include shellIndependent query values, and so do HTML pages with Markdown support, because their alternate URLs vary; HTML-only deferred shells still exclude them. Locale partitioning applies even without dictionary translations.

    decideFragmentCache(manifest, request, response?) uses brix:3:fragment:<origin><path?query> keys and admits only 2xx public text/html responses without Set-Cookie or Vary. Both decisions bypass auth routes and requests carrying Authorization. composeFragments preserves fragment cookies and variation but marks assembled HTML private, no-store; cache its inputs independently.

    Owners: composing fragments and managing servers.

    brix/markdown

    #

    Runtime: browser-safe. The structured authoring and serialization surface for explicit page and index Markdown representations.

    Values:

    • md — builders for safe Markdown blocks and inline content, plus md.serializedDocument and md.serializedIndexDocument, which wrap previously serialized output so routes return it without serializing again.
    • serializeMarkdownDocument — serializes a MarkdownDocument to Markdown text.
    • serializeMarkdownIndexDocument — serializes a MarkdownIndexDocument to Markdown text.
    • isMarkdownContent — guards MarkdownContent.
    • isMarkdownDocument — guards MarkdownDocument.
    • isMarkdownDocumentContent — guards MarkdownDocumentContent.
    • isMarkdownIndexDocument — guards MarkdownIndexDocument.
    • MarkdownUrlError — the error class thrown when md.link, md.image, or md.indexDocument rejects a URL; catch it to fall back to text for untrusted links.

    Types: MarkdownBlock, MarkdownContent, MarkdownDocument, MarkdownDocumentContent, MarkdownFragment, MarkdownIndexDocument, MarkdownInline, MarkdownListItem, MarkdownTableAlignment.

    Translation-enabled callbacks use the project-bound server getTranslator; they do not run the Preact translation provider.

    Owner: rendering agent-friendly pages.

    UI bindings

    #

    brix/hooks

    #

    Runtime: browser-safe. The Brix Preact binding and the single application import path for Preact hooks; there is no brix/preact/hooks facade.

    Brix values:

    • useApi — executes an API contract from a component, exposing reactive status, data, and error signals.
    • useSignal — creates a component-local signal.
    • useComputed — creates a component-local computed signal.
    • useRenderData — reads the nearest Brix page or fragment render data.
    • useStorage — reactively reads and writes a schema-validated StorageKey in a given Storage.
    • useLocalStorage — useStorage bound to localStorage.
    • useSessionStorage — useStorage bound to sessionStorage.
    • TranslationProvider — supplies a locale dictionary to components. locale and dictionary are required, as in @brix/react; rendering without either throws.
    • createTranslationHooks — creates typed translation hooks for an application's message keys.
    • HydratedTranslationProvider — framework-internal. Generated island and Contentful preview mounts use it to read the server-projected translation payload. Applications use TranslationProvider.

    Preact hooks: useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState (re-exported from Preact).

    Types: UseApiOptions, and Preact's Dispatch, Reducer, and StateUpdater.

    useApi failures are ApiRequestError values from brix/contracts. React components use the separately installed @brix/react adapter instead.

    useRenderData<TRenderData extends BaseRenderData = BaseRenderData>(): Readonly<TRenderData> reads the nearest Brix render-data provider during SSR and page or fragment island hydration. It throws when the provider is missing; isolated tests and stories wrap components in RenderDataWrapper from brix/islands with its renderData prop. The type parameter describes existing serialized data; it does not validate or add fields at runtime, and Readonly is shallow and compile-time only. Render data is browser-visible, is not an authorization source or mutable store, and must be partitioned appropriately when personalized responses are cached. Provider updates and remounts read their own scope rather than a browser-global snapshot. Browser path and query values come from the live location at render, not a navigation subscription.

    useApi(contract, { client }) optionally uses a native ApiClient in either binding. Defined hook options override client defaults, including the same ApiCache | false policy as imperative calls, and the hook forwards credentials. Exceptions or rejected promises from onSuccess and onError are logged and do not replace the execution Result or alter request state. Uncloneable GET input reports request-encoding.

    Hooks are uncached by default. Configured cache-first calls share data and pending loads; each caller keeps its own cancellation and validation. Resolved headers and URLs enter hashed identity; cookie-only sessions require explicit private session scopes and rotation or invalidation on identity changes. After manual execution, cached JSON GET hooks observe successful local writes and refresh after matching invalidation. Awaiting invalidation confirms storage completion, not the background refresh; old data stays visible during loading and errors. Reset, unmount, or a new execution releases the old query. Mounting does not fetch, and cache: false bypasses observation. Notifications stay within one DataCache coordinator, never across tabs, replicas, or browser and server instances. Reset or remount old-user UI on logout.

    React Activity hiding also releases requests and observation, keeping data and completed errors. Interrupted loading settles to idle without data or success with data, with fetching flags false. Reveal does not fetch or reconnect observation; an explicit execute() resumes cache updates.

    Owners: API routes, storage, and managing translations.

    brix/hooks/adapter

    #

    Runtime: browser-safe. The binding-author boundary used by the separately distributed @brix/react package. Application components use brix/hooks or @brix/react instead.

    Values:

    • createUseApi — builds a useApi hook from a binding's hook and signal primitives.
    • createStorageHooks — builds useStorage, useLocalStorage, and useSessionStorage from a binding's hooks.
    • createTranslationBindings — builds TranslationProvider and createTranslationHooks from a binding's { useMemo, provide, read } context primitives.

    Types: HooksRuntime, StorageHookResult, StorageHooks, StorageHooksRuntime, TranslationBindings, TranslationBindingsRuntime, TranslationContextValue, TranslationProviderProps, UseApiHook, UseApiOptions, UseBrowserStorageHook, UseStorageHook.

    createStorageHooks returns StorageHooks; its named hook types let binding declarations resolve storage schemas through brix instead of requiring each binding to declare zod.

    The shared builders give the Preact and React bindings the same translator construction, development missing-key warnings, and provider errors.

    @brix/react

    #

    Runtime: browser-only React applications and integrated external React clients. Brix SSR and islands remain Preact-only; React applications do not use Hono routes, islands, Panda, or managed Storybook.

    Brix values:

    • useApi — the useApi hook for React.
    • useSignal — creates a component-local signal that survives Fast Refresh.
    • useComputed — creates a component-local computed signal.
    • useSignals — subscribes a component to signal .value reads during render.
    • useStorage — reactively reads and writes a schema-validated StorageKey in a given Storage.
    • useLocalStorage — useStorage bound to localStorage.
    • useSessionStorage — useStorage bound to sessionStorage.
    • TranslationProvider — supplies a locale dictionary to components; warns once per missing key in development when onMissing is not set.
    • createTranslationHooks — creates typed translation hooks for an application's message keys.

    Type: UseApiOptions.

    Signal primitives (re-exported from the pinned @preact/signals-react, the React counterpart of brix/signals): action, batch, computed, createModel, effect, signal, Signal, untracked, useSignalEffect, and the types Model, ModelConstructor, ModelFactory, and ReadonlySignal. Create module-level shared state with signal/computed; components that read .value during render still call useSignals(). useSignalEffect runs a signal effect for the component's lifetime.

    React re-exports (the pinned React API, imported from @brix/react instead of react):

    • Components and elements: Activity, Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, lazy, memo.
    • Hooks: use, useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useEffectEvent, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useOptimistic, useReducer, useRef, useState, useSyncExternalStore, useTransition.
    • Other values: act, cache, cacheSignal, captureOwnerStack, startTransition, version.
    • Types: ActionDispatch, ActivityProps, AllHTMLAttributes, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AriaAttributes, AriaRole, Attributes, AudioHTMLAttributes, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ChangeEvent, ChangeEventHandler, ClassAttributes, ClipboardEvent, ClipboardEventHandler, ColgroupHTMLAttributes, ColHTMLAttributes, ComponentClass, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentRef, ComponentType, CompositionEvent, CompositionEventHandler, Consumer, ConsumerProps, Context, ContextType, CSSProperties, DataHTMLAttributes, DelHTMLAttributes, DependencyList, DetailedHTMLProps, DetailsHTMLAttributes, DialogHTMLAttributes, Dispatch, DispatchWithoutAction, DOMAttributes, DragEvent, DragEventHandler, EffectCallback, ElementRef, ElementType, EmbedHTMLAttributes, ErrorInfo, EventHandler, ExoticComponent, FC, FieldsetHTMLAttributes, FocusEvent, FocusEventHandler, FormEvent, FormEventHandler, FormHTMLAttributes, ForwardedRef, ForwardRefExoticComponent, ForwardRefRenderFunction, FunctionComponent, HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy, HTMLAttributes, HtmlHTMLAttributes, HTMLInputAutoCompleteAttribute, HTMLInputTypeAttribute, HTMLProps, IframeHTMLAttributes, ImgHTMLAttributes, InputEvent, InputEventHandler, InputHTMLAttributes, InsHTMLAttributes, InvalidEvent, JSX, JSXElementConstructor, Key, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LazyExoticComponent, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MemoExoticComponent, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, MouseEvent, MouseEventHandler, MutableRefObject, NamedExoticComponent, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, PointerEvent, PointerEventHandler, ProfilerOnRenderCallback, ProfilerProps, ProgressHTMLAttributes, PropsWithChildren, PropsWithoutRef, Provider, ProviderExoticComponent, ProviderProps, QuoteHTMLAttributes, ReactElement, ReactEventHandler, ReactNode, ReactPortal, Reducer, Ref, RefAttributes, RefCallback, RefObject, ScriptHTMLAttributes, SelectHTMLAttributes, SetStateAction, SlotHTMLAttributes, SourceHTMLAttributes, StyleHTMLAttributes, SubmitEvent, SubmitEventHandler, SuspenseProps, SVGAttributes, SVGProps, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, ToggleEvent, ToggleEventHandler, TouchEvent, TouchEventHandler, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, TransitionFunction, UIEvent, UIEventHandler, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler.

    Call useSignals() in React components that read signal .value during rendering; direct signal children subscribe without it. useSignal and useApi state survive React Fast Refresh.

    The type re-exports include every React element attribute (*HTMLAttributes), synthetic event (*Event), and event handler (*EventHandler) type. Managed React applications cannot import framework-owned react or react-dom directly, including type-only imports; for any other React type, derive it from an exported one, such as ComponentProps<"input"> or JSX.IntrinsicElements["dialog"].

    @brix/react/client, @brix/react/dom, @brix/react/jsx-runtime, @brix/react/jsx-dev-runtime

    #

    Runtime: browser.

    • @brix/react/client re-exports the pinned react-dom/client API, including createRoot and hydrateRoot.
    • @brix/react/dom re-exports the browser-relevant pinned react-dom root API: createPortal, flushSync, useFormStatus, requestFormReset, the resource hints preconnect, prefetchDNS, preinit, preinitModule, preload, and preloadModule, version, and the types FormStatus, FormStatusNotPending, FormStatusPending, PreconnectOptions, PreinitAs, PreinitModuleAs, PreinitModuleOptions, PreinitOptions, PreloadAs, PreloadModuleAs, PreloadModuleOptions, and PreloadOptions. Deprecated and internal react-dom exports such as useFormState and unstable_batchedUpdates are not part of the contract.
    • @brix/react/jsx-runtime exports Fragment, jsx, jsxs, and the JSX type for React TSX.
    • @brix/react/jsx-dev-runtime exports Fragment, jsxDEV, and the JSX type for development builds.

    The managed configuration sets @brix/react as the JSX import source; application code does not import the runtime subpaths directly.

    @brix/react/test

    #

    Runtime: managed React browser tests (*.client.test.* / *.client.spec.*).

    Values:

    • render — mounts a React tree in an act environment and returns container, baseElement, locator, rerender, unmount, and Vitest locator selectors such as getByRole. Options: container, baseElement, and a wrapper provider component.
    • cleanup — unmounts every tree rendered by render and removes the containers it created; it runs automatically before each test.
    • page and userEvent — Vitest's browser page and interaction helpers.

    Types: RenderOptions, RenderResult.

    React applications cannot import brix/test/browser, whose renderer is Preact-only. Managed Node tests cannot import @brix/react/test.

    @brix/react/contentful and @brix/react/contentful/icons

    #

    Runtime: browser. Re-export the pinned Forma 36 component library (@contentful/f36-components) and icon set (@contentful/f36-icons) for applications generated by brix create contentful-app.

    @brix/react/vite

    #

    Runtime: tooling.

    Value:

    • defineBrixReactConfig — the Vite and Vitest configuration for a browser-only React application: the root index.html entry, React Fast Refresh, the @brix/react JSX runtime, managed test projects, and one production build to dist.

    Type: DefineBrixReactConfigOptions ({ vite?: BrixViteConfig | ((env) => BrixViteConfig) }).

    The vite option uses the same allowlist as brix/vite but also accepts base; Contentful apps set vite.base to "./". Root dotenv discovery is disabled (envDir: false). React applications have no Brix environment integration: brix env and lifecycle --stage/--env options require a full-stack application. Pass public per-mode values through vite.define, for example from the mode argument of the functional vite option; every defined value is embedded in the public bundle.

    Data reuse

    #

    brix/cache, brix/cache/dynamodb, and brix/cache/fastly

    #

    Runtime: brix/cache is browser-safe and hashes with Web Crypto, not Node or provider imports. Where crypto.subtle is unavailable, such as browsers on plain-HTTP origins other than localhost, it uses a bundled SHA-256 with identical results. brix/cache/dynamodb is server-only and supported only for platform: "lambda". brix/cache/fastly is server-only, uses native Fastly KV inside a Fastly request, and runs under Viceroy when Fastly development is selected.

    Values:

    • createDataCache — creates a data cache coordinator with policies, invalidation, and an optional shared store and namespace.
    • createMemoryDataCacheStore — creates a bounded in-process store (maxEntries defaults to 1,000; maxBytes is unbounded unless set).
    • createDynamoDataCacheStore (brix/cache/dynamodb) — creates a DynamoDB-backed store with optional S3 overflow.
    • createFastlyKvDataCacheStore (brix/cache/fastly) — creates a Fastly KV-backed store.

    Types: CacheDuration, DataCache, DataCacheConfig, DataCachePolicy, DataCacheEvent, DataCacheStore, DataCacheEntry, DataCacheOperationOptions, DynamoDataCacheStoreOptions (brix/cache/dynamodb), FastlyKvDataCacheStoreOptions (brix/cache/fastly).

    A store reads DataCacheEntry | undefined, writes void, and receives DataCacheOperationOptions with an operation AbortSignal and optional request-local BrixTimings for read, write, and invalidation.

    Calling createDataCache() creates an isolated bounded memory store. createMemoryDataCacheStore({ maxEntries?, maxBytes? }) configures one explicitly, evicting least-recently-used entries and rejecting single entries larger than maxBytes. The optional namespace (default default) and store explicitly share persistent data across instances; keep shared namespaces stable per application and stage. Browser and server storage are distinct instances and security scopes, not a global cache.

    createDynamoDataCacheStore accepts tagTokenCacheMs (integer 0–60,000; default 1,000, or 0 with strong: true), the time each process reuses an invalidation-marker token before reading the marker item again; local invalidations apply immediately. It also accepts opt-in overflow: { bucketName, keyPrefix?, client?, region?, endpoint? } to store values over its conservative 380 KiB estimated item threshold in separately provisioned S3. keyPrefix defaults to brix-data-cache/ and is limited to 512 UTF-8 bytes; the S3 region inherits the top-level region, but the DynamoDB endpoint does not. The caching guide covers provisioning, rollout, access control, lifecycle, and timeouts.

    Configure defineBrixServer(brix, { dataCache }) to obtain the project-bound dataCache, or call createDataCache directly. dataCache may be a request callback; then call brixServer.dataCache(c) to obtain its request-memoized cache. Pass dataCache.public("1h") or dataCache.private(sessionScope, "1m") to native Contentful clients, JSON GET executeApi calls, configured API clients, and useApi. Await dataCache.invalidate(contract) for every variant of a contract in the namespace, use string tags for narrower grouping, or invalidateAll() for the namespace. This does not purge a different browser or server store or invalidate edge responses. Matching mounted hooks in the same coordinator refresh in the background; awaiting invalidation does not await their refresh.

    Policies accept either { ttl, staleIfError? } (cache-first) or { fallbackFor: "1h" } (network-first), plus optional tags and version; mixed and empty policies are invalid. Network-first attempts origin on every call and falls back only after eligible transient failures exhaust retries, within the lifetime since successful storage; fallback never extends that lifetime. Both modes read the bounded store before starting origin, which adds lookup latency; store read failures fail open, and a later successful origin response may still be written. Invalidation is eventual in shared stores: in-flight work may repopulate an entry. Within one coordinator, a local generation prevents stale observer publication and stops new callers from joining work started before local invalidation; it is not a cross-coordinator guarantee.

    onEvent is a best-effort observer whose failures cannot fail cache operations. DataCacheEvent reports read/load before each origin loader invocation (not each retry) and read/join when a caller joins an existing local cache-first flight. The leader emits only load; network-first and pending-tracking overflow loads are independent, and fresh hits emit neither. These are decisions, not terminal outcomes: cancellation or failure does not retract them, and an unshareable result makes surviving joiners emit load when they start their own origin work. durationMs is the caller's elapsed cache-execution time through the decision, including lookup, not origin or shared-wait duration. These events carry only operation, outcome, and duration; existing store-error details still require application redaction.

    Owner: caching data.

    Server

    #

    brix/server

    #

    Runtime: server-only.

    Values:

    • defineBrixServer — binds server options to the defineBrix() definition in src/brix.server.ts and returns the project-bound route and context factories.
    • createBrixApp — assembles the Hono application from defineBrixServer's result in src/app.ts.
    • defineBrixAuth — declares authentication middleware for auth route options.
    • composeFragments — streams fragment HTML into a page response that uses deferred fragment placeholders.
    • getPlatformBindings — returns the platform bindings object passed to app.fetch (for example Cloudflare KV, D1, R2, Queue, or service bindings), which c.env replaces with the validated environment. Its type parameter is unchecked; it throws for contexts not created by createBrixApp.
    • getServiceSignature — returns the frozen VerifiedServiceSignature the generated Lambda handler checked for this request when serviceSignatures is enabled, or undefined when the request was not verified. Application code cannot set it.
    • requireServicePurpose — route middleware that makes a route accept exactly the requests verified with one of the given owner/name purposes, throwing where it is called for any other purpose. A route without a guard accepts only the first purpose in serviceSignatures.purposes. The purpose is decided for the route that answers, before its body is read: a guard counts anywhere in a Brix route's middleware, and for a Hono route only as the first matching handler after Brix's own middleware and defineBrixServer middleware, also in a sub-application added with app.route(). A guard in an app.mount()ed application or inside hono/combine's every or some does not count and refuses every request in a production build. It lets every request through where requests are not verified (development, the route harness); a production build that registers it on a route without serviceSignatures fails, and any guard such a build reaches elsewhere refuses the request.
    • BRIX_REQUEST_ID — the context key ("brixRequestId") for the current request ID, read with c.get(BRIX_REQUEST_ID).
    • BRIX_FRAGMENT_MODE_HEADER — the fragment-mode request header name ("x-brix-fragments").
    • BRIX_FRAGMENT_MODE_DEFER — the header value ("defer") that selects deferred fragment rendering.

    Server and context types: BrixServerDefinition, DefineBrixServerOptions, BrixServerIntegration, BrixContext, BrixServiceMetadata, BrixSecurityOptions, BrixContentSecurityPolicy, BrixCrossOriginOptions, BrixAuth, RoutingConfig, ValidatedData.

    Route types: ApiRoute, ApiRouteOptionsBase, ApiRouteOptionsWithAuth, ApiRouteOptionsWithoutAuth, ResponseRoute, ResponseRouteOptionsWithAuth, ResponseRouteOptionsWithoutAuth, PageRoute, PageRouteAuthOption, PageRouteLoadData, PageCacheConfig, PageCacheOption, PageCacheQueryConfig, CacheOption, MarkdownIndexRoute, MarkdownIndexRouteOptions, MarkdownIndexDocumentCallback.

    Fragment types: ComposeFragmentsOptions, FragmentDescriptor, FragmentEndpointConfig, FragmentParams, FragmentProps, FragmentPropValue, FragmentRoute.

    Logging types: BrixLogFields, BrixLogFormat, BrixLogger, BrixLoggingOptions, BrixLogLevel, BrixLogRecord, BrixLogSink.

    Translation types: BrixTranslationsServerOptions, TranslationFallbackInput, TranslationLoaderInput, TranslationMissingEvent.

    OpenAPI types: BrixOpenApiOptions, BrixOpenApiSecurityScheme, BrixSwaggerUi, ApiRouteOpenApiOptions, ApiSchemaDocumentation.

    Applications obtain createApiRoute, createFragment, createMarkdownIndexRoute, createPageRoute, createResponseRoute, typed getLocale, and request-memoized createService(c => value) from defineBrixServer; translated applications also receive getTranslator. Passing an inert BrixEnv<T> declaration as env gives handlers parsed c.env. Request callbacks may also configure dataCache, service metadata, and browser-visible renderData shared by SSR and page or fragment hydration. This server boundary does not expose universal contract, URL, or HTTP-client factories. Response routes return typed c.body, c.text, c.json, or c.redirect results (synchronous or asynchronous), not raw Response values; no lower-level response-route factory is public.

    createService factories and their returned accessors accept public or authenticated request contexts with render omitted, including page-loader contexts. Services do not imply authentication.

    Request safety defaults:

    • csrf — applications reject cross-origin browser requests with unsafe methods (403, Cache-Control: no-store) using Sec-Fetch-Site, falling back to Origin. Configure csrf: { trustedOrigins: [...] } with exact origins, csrf: { exemptPaths: [...] } with exact paths (compared with the raw request path; non-empty segments without ./.., also percent-encoded, *, query, or trailing slash) for cookie-free endpoints that accept any site, such as /token, or csrf: false.
    • maxBodyBytes — request bodies on body-schema API routes and response routes are limited to 1 MiB by default and return 413 beyond it. Set it on defineBrixServer or per route.
    • JSON-body API routes return 415 for non-JSON content types and for nonempty bodies without a content type.
    • The default error policy returns JSON { "error": message } for framework 400, 413, and 415 responses and for HTTPExceptions without a response.
    • Page and fragment routes with auth reject shared cache policies, and authenticated responses default to Cache-Control: private.

    DefineBrixServerOptions.integrations accepts an ordered array of opaque BrixServerIntegration values created by integration subpaths such as brix/contentful/server. Integration routes mount after the application middleware, in array order, before discovered routes, and integrations may add route-scoped security headers. An integration may also handle requests before the application middleware, in array order, after Brix's request logging, security headers, service-signature check, cross-origin guard, and static assets; the brix-auth integration answers its MCP and metadata paths there, path variants that would reach them included. They may also exempt their own routes from the csrf cross-origin mutation guard when they check those requests themselves (brix-auth's MCP and metadata paths), as applications can with csrf.exemptPaths. A value not created by an integration factory, or two integrations with the same id, throws at defineBrixServer. brix/server has no Contentful-specific options or imports. Request callbacks inside a factory call are not contextually typed by the server's environment, so they receive Hono's Context; annotate the callback parameter to type c.env.

    BrixContext.timings is an explicit request scope. measure(name, callback) accepts a PromiseLike<T> callback and returns Promise<T>; a throw while invoking the callback stays synchronous. Request logs summarize totalMs, unioned externalMs, unattributedMs, and per-name dependencies. Overlap is counted once and does not represent CPU time. Tracking is bounded to 1,000 retained spans, 100 distinct names, and 100 characters per name, so summaries may be partial: dependency entries expose their discarded-span truncated count, and the summary truncated includes every discarded span, including names rejected after the distinct-name limit. There is no implicit async-local scope.

    DefineBrixServerOptions.logging configures structured request logging and may be false. Request handlers use BrixContext.logger; see managing servers for record fields, sinks, enrichment, redaction, ordering, and flush behavior.

    Set DefineBrixServerOptions.openapi to { info: { title } } to serve OpenAPI 3.1 at /openapi.json, or omit it or set false to disable it. Options include path, middleware, strict, servers, securitySchemes, and security. Set ui: swaggerUi() from brix/server/swagger-ui for locally served Swagger UI at /docs, or ui: swaggerUi({ path }) for a custom path; any other truthy ui value throws at defineBrixServer with a migration error. The document, UI, and assets share middleware, whose presence is represented conservatively as a private boundary in the synthetic manifest. info.version defaults to the owning application package version captured during managed assembly; an explicit value wins. Unmanaged and harness applications fall back to static service.version, and mounting fails if OpenAPI is enabled without any available version. When a release version is available, responses include X-App-Version with the captured application release (or the unmanaged static service version), independent of an OpenAPI override; set versionHeader: false to disable it. Cached response version headers are preserved.

    Discovered API contracts supply wire-input schemas. Route options.openapi (ApiRouteOpenApiOptions<TContract>) owns operation descriptions, security requirements, and typed body, query, and response annotations (ApiSchemaDocumentation<TInput>). Nodes accept title, description, deprecated, examples, and typed object properties or homogeneous-array items. Examples use input shapes, not transformed output, and are not runtime-validated against constraints or refinements. Mount-time checks reject unknown fields and validation overrides. Unions and tuples support whole-value documentation, and recursive shapes support finite annotation trees. Shared Zod metadata remains a browser-visible fallback. See serving OpenAPI.

    Deferred fragment URLs reserve __brix_locale; fragment endpoint schemas cannot declare that key, and requests validate it against configured locales. Schema-2 fragment manifest entries may include their finite locale keys for explicit edge-cache partitioning.

    Owners: managing servers, managing translations, composing fragments, and service signatures for getServiceSignature and requireServicePurpose.

    brix/server/swagger-ui

    #

    Runtime: server-only.

    Values:

    • swaggerUi — creates the BrixSwaggerUi value for defineBrixServer(brix, { openapi: { ui: swaggerUi() } }), serving Swagger UI at /docs, or at a literal absolute path such as swaggerUi({ path: "/reference" }). Only this subpath carries Swagger UI's bundled JavaScript, CSS, and licenses (about 2 MB), so servers that never import it do not ship them.

    Types: BrixSwaggerUi, BrixSwaggerUiOptions.

    Owner: managing servers.

    brix/service-signatures

    #

    Runtime: server-only. Framework-free WebCrypto, so it also runs outside Brix servers.

    Values:

    • importServiceKey — imports a key of at least 43 base64url characters, used as its ASCII bytes, as a ServiceKey with its derived keyid; any other key rejects with a TypeError.
    • importServiceSigningKeys — imports BRIX_SERVICE_SIGNING_KEYS, a JSON string or object from purpose to one key, as a frozen record of ServiceKey by purpose.
    • importServiceVerifyKeys — imports BRIX_SERVICE_VERIFY_KEYS, a JSON string or object from purpose to a non-empty list of keys, as ServiceKeysByPurpose. Both refuse no purposes, a purpose repeated in the JSON, a purpose that is not owner/name (3–128 characters, exactly ^[a-z0-9][a-z0-9.-]*(/[a-z0-9][a-z0-9._-]*)+$), and invalid keys, naming entries by position without repeating values; an inverted configuration, with a key where a purpose belongs, is refused with an error saying so.
    • keyidOf — derives the 8-character key id of a key.
    • signServiceRequest — signs a Request (returning a new Request with redirect: "manual") or a SignableServiceRequest of method, URL, headers, and a string, ArrayBuffer, or ArrayBufferView body (returning the SignedServiceRequestInit to send with fetch(url, init): the method as fetch sends it, the signed headers, a copy of the signed body, and redirect: "manual"; it refuses other body types and methods fetch cannot send) with a key, an owner/name purpose, optional nonce, vouched headers (name to value, replacing any copy the request carried; never host, content-type, or content-encoding), created time, and maxBodyBytes (default 1 MiB). It refuses paths that are not in canonical percent-encoding.
    • verifyServiceRequest — verifies a ServiceRequestView against keys (purpose to keys), maxAge (default 30 seconds), and require (vouched headers that must be covered), returning a frozen ServiceSignatureVerification. It reads the view's body only after every header check passes.
    • serviceRequestViewFromLambdaEvent — builds the view from a Lambda Function URL or API Gateway HTTP API v2 event's method, raw path, raw query, Host header (never requestContext.domainName), cookies, and body.
    • serviceRequestViewFromRequest — builds the view from a Request, optionally with the raw request target as received, the HTTP/2 authority, and maxBodyBytes (default 1 MiB). It reads a clone of the body only when verification asks for it, and verification refuses a larger body as body_too_large.

    Types: ServiceKey, ServiceKeysByPurpose, ServiceSignatureOptions, SignServiceRequestOptions, SignableServiceRequest, SignedServiceRequestInit, ServiceRequestView, ServiceRequestBody (bytes, null, or a function that reads them), ServiceRequestHeaders, VerifyServiceRequestOptions, ServiceSignatureVerification, VerifiedServiceSignature, RejectedServiceSignature, ServiceSignatureErrorCode, LambdaHttpEvent, ServiceRequestViewOptions.

    ServiceSignatureErrorCode is malformed, missing, wrong_purpose, unknown_key, missing_header, bad_signature, from_the_future, expired, unsigned_body, or bad_digest, the first failed check of the profile in its order, or body_too_large, Brix's own code for a body over the view's maxBodyBytes, which callers can answer with 413. VerifiedServiceSignature carries purpose, keyid, created, nonce (or null), and the covered headers. Verification compares the HMAC in constant time and never reads a parsed URL.

    Owner: service signatures.

    brix/auth/server

    #

    Runtime: server-only.

    Values:

    • createBrixAuth — signs users in through the brix-auth authorization server as a Backend-for-Frontend (RFC 10017). It returns auth for defineBrixServer, an integration that mounts the login, callback, and logout routes (and the MCP resource metadata and MCP path handling when mcp is set), the page route option, requireRoles(c, ...roles) (all of), and requireAnyRole(c, ...roles) (any of).
    • createBrixAuthDelegation — mints delegated brix-auth access tokens with a service account's signing key: token(subject) returns a token for the service acting for the person subject (user:<id>), and forget(subject?) drops cached tokens.
    • BrixAuthDelegationError — thrown by token when brix-auth refuses or cannot answer, with code, status, description, and retryable.

    Types: BrixAuthServer, BrixAuthServerOptions, BrixAuthSetting, BrixAuthContext, BrixAuthIdentity, BrixAuthActor, BrixAuthDelegation, BrixAuthDelegationOptions.

    Behaviour follows brix-auth's normative docs/middleware.md and its shared conformance vectors, identically to brix-compute's brix-auth feature.

    BrixAuthServerOptions takes issuer, clientId, clientKey (a private EC P-256 JWK with kid), and cookieSecret (unpadded base64url decoding to at least 32 bytes), each a string or a request callback. Optional settings are requireRoles (all of, on every protected route), callbackPath (/auth/callback), logoutPath (/auth/logout), loginPath (/auth/login), logoutRedirect (a same-origin path; by default logout lands on brix-auth's <issuer>/signed-out?client_id=<clientId>&login=<public origin + loginPath> page, and a configured path must not require a session), mcp ({ path, resourceName, origin?, allowedOrigins? }, below), fetch, the Fastly backend, and timeoutMs (default and maximum 5000). Static values are validated when the factory runs; malformed callback values answer 500. The issuer must be an https origin without a path; http is accepted only for localhost and 127.0.0.1.

    Protected handlers read c.get("auth") as a BrixAuthIdentity with sub, kind, optional email and name, roles, sid, clientId, and an optional actor (BrixAuthActor, { sub }) taken from the RFC 8693 act claim of a delegated token; an act that is not an object with a non-empty string sub rejects the token. Authorization: Bearer headers are verified on their own and never refresh or redirect, and a rejected one answers 401 {"error":"invalid_token"} with WWW-Authenticate: Bearer error="invalid_token"; Authorization: DPoP never refreshes or redirects either and, because DPoP-bound tokens are not supported, always answers 401 {"error":"unauthorized"} with WWW-Authenticate: Bearer; other schemes fall through to the encrypted __Host-brix_at and __Host-brix_rt cookies, and an expired access token is refreshed. Routes and fragments with auth: brixAuth.page (or { redirectUrl }) start a login only for anonymous document navigations (GET with Sec-Fetch-Mode absent or navigate and no Sec-Purpose) and answer every other request, including subresources, fetch() calls, prefetches, and HEAD, with a 401 that sets no login cookie; other protected routes answer 401 with WWW-Authenticate: Bearer. GET <loginPath> starts a sign-in for "Sign in" links: returnTo (default /) follows the return path rules, prompt=select_account is the only accepted prompt and is forwarded to PAR, a signed-in visitor without prompt gets 303 to returnTo, non-navigations get the page-mode 401, invalid or repeated parameters answer 400, and other methods 405. A missing role answers 403. An unreachable, timed-out, 5xx, 408, or 429 authorization server answers 503 with Retry-After: 5 without clearing cookies; other 4xx answers on PAR, refresh, or the code exchange answer 500. Cookie-authenticated requests with methods other than GET, HEAD, and OPTIONS need Sec-Fetch-Site: same-origin or, without that header, a same-origin Origin. With backend set, the JWKS is cached by Fastly's HTTP cache; elsewhere it is cached in memory.

    mcp: { path, resourceName, origin?, allowedOrigins? } serves a Model Context Protocol endpoint whose clients sign people in through brix-auth (RFC 9728, MCP authorization). path is one or more /-separated segments, each non-empty, not . or .., and made only of A–Z a–z 0–9 - . _ ~ ! $ & ' ( ) + , ; = : @ %, that URL parsing leaves unchanged (so no percent-encoded dot segment such as %2e), and differs from the login, callback, and logout paths; resourceName (required) may not contain \p{Cc}, \p{Zl}, \p{Zp}, or \p{Cf} characters other than U+200D and U+E0020–U+E007F, and after trimming is 1 to 100 grapheme clusters (Intl.Segmenter), the trimmed value being served; origin (a string or request callback) is the public origin, an exact https origin or http for localhost/127.0.0.1 (such as http://localhost:3000 for development); allowedOrigins holds exact http/https origins without path, trailing slash, or wildcard; static values are checked at creation. The public origin is origin, else BRIX_PUBLIC_ORIGIN reduced to its https origin; never Host or the request URL, under brix dev too. Without one, every request to the MCP path or its metadata path answers 500 {"error":"server_error"} with Cache-Control: no-store (and Vary: Origin on the MCP path) and logs brix.auth.mcp_origin_missing; a value that is invalid when a request reads it (a callback that throws or returns anything but an exact origin, or a BRIX_PUBLIC_ORIGIN that is not an https origin) answers the same and logs brix.auth.mcp_origin_invalid with source. The integration handles both paths before application middleware. It answers GET and HEAD on /.well-known/oauth-protected-resource<path> with compact JSON {"resource":"<public origin><path>","authorization_servers":["<issuer>"],"bearer_methods_supported":["header"],"resource_name":"<resourceName>"}, Cache-Control: public, max-age=300, and Access-Control-Allow-Origin: *, answers OPTIONS as a CORS preflight (204, Access-Control-Allow-Origin: *, Access-Control-Allow-Methods: GET, HEAD, Access-Control-Allow-Headers: *, Access-Control-Max-Age: 600), and other methods, from any site, with 405 Allow: GET, HEAD, OPTIONS. Both paths match only exactly as received; a request the router hands to either under another spelling (a trailing slash, percent-encoding, or a route pattern in path) answers 404. Requests to the exact MCP path, with any method, are checked in order. An Origin that is absent or the public origin continues, one in allowedOrigins continues as cross-origin, and any other, null included, answers 403 {"error":"forbidden"} without CORS headers before any credential is read. OPTIONS answers 204 without authentication. Every other method, with or without a route, then needs a credential, which the integration checks before the route is chosen, whatever the route's auth (route auth is a no-op there; defineBrixServer throws when its auth is this auth without this integration, and a route with auth: true reached without the integration, through a wrapping auth, answers 500 and logs brix.auth.mcp_integration_missing). Only header credentials count: cookies are never opened, refreshed, or expired, no sign-in starts, and the cookie same-origin check does not apply; no Bearer credential (none, DPoP, or another scheme) answers 401 {"error":"unauthorized"} with WWW-Authenticate: Bearer resource_metadata="<metadata URL>", and a rejected Bearer, any token whose aud is not exactly <public origin><path> (including the service's own and delegated tokens, an aud array, and case or trailing-slash variants), or whose service claim is not a string equal to clientId, answers 401 {"error":"invalid_token"} with WWW-Authenticate: Bearer error="invalid_token", resource_metadata="<metadata URL>". Valid tokens continue as elsewhere, with the MCP client's id as clientId; every 401, 403, 500, and 503 there has Cache-Control: no-store, and a route response without Cache-Control gets private. Every other route still expects aud to equal clientId and ignores service, so MCP tokens answer 401 WWW-Authenticate: Bearer error="invalid_token" there. Every MCP-path response gets Origin appended to Vary (unless it already lists Origin or is *) and loses Access-Control-* headers set by the route or other middleware. For an allowed cross-origin request the preflight carries Access-Control-Allow-Origin: <Origin>, Access-Control-Allow-Methods: GET, POST, DELETE, Access-Control-Allow-Headers: Authorization, Content-Type, Accept, MCP-Protocol-Version, Mcp-Method, Mcp-Name, Mcp-Session-Id, Last-Event-ID followed by each requested Mcp-Param-<token> name (lowercased, once each, in request order), and Access-Control-Max-Age: 600, and every response, 401s, 403s, 500s, and 503s included, carries Access-Control-Allow-Origin and Access-Control-Expose-Headers: WWW-Authenticate, Mcp-Session-Id; Access-Control-Allow-Credentials is never sent. Mcp-Session-Id and Last-Event-ID stay allowed for clients speaking MCP 2025-11-25. The integration exempts exactly the MCP and metadata paths from the application's cross-origin mutation guard; every other route keeps it.

    BrixAuthDelegationOptions takes issuer (validated as above), service (a brix-auth service id, ^[a-z][a-z0-9-]{2,62}$), signingKey (the private EC P-256 JWK, in JSON, of a signing key of a service account of that service that brix-auth allows to act for people; brix-auth refuses API keys for this), and optional keyId (the 20-hex brix-auth key id, defaulting to the JWK's kid), plus fetch, backend, and timeoutMs as above; malformed options throw at creation without echoing the key. token(subject) rejects a subject other than user:<id> before any call, then sends an RFC 8693 token exchange to <issuer>/token authenticated by a fresh private_key_jwt client assertion (iss and sub the key id, kid the key id, aud the issuer, 60 seconds, unique jti), subject_token_type urn:brix-auth:token-type:user-id, and resource urn:brix-auth:service:<service>. Tokens are cached per person until 60 seconds before expires_in, concurrent calls for one person share a request, failures are not cached, and at most 1000 people are cached (oldest evicted). BrixAuthDelegationError.code is brix-auth's OAuth error code (unauthorized_client, invalid_request, invalid_client, …), temporarily_unavailable with retryable: true when brix-auth is unreachable, times out, or answers 5xx, 408, or 429, or invalid_response for a malformed 200; description is brix-auth's error_description, at most 200 characters.

    Owner: managing servers.

    Translations

    #

    brix/translations

    #

    Runtime: browser-safe and UI-neutral.

    Values:

    • defineTranslations — declares an application's message-key type and fallbackLocale for defineBrix.
    • createTranslator — creates a Translate lookup function from active and fallback dictionaries.

    Types: Translate, TranslationDefinition, TranslationDictionary, TranslationKeyOf, TranslationLookupOptions.

    This surface defines strict message-key identity and opaque string lookup. The hydration payload format is framework-internal. Providers and typed hooks come from the matching brix/hooks or @brix/react binding, and applications provide server loading through defineBrixServer.

    Owner: managing translations.

    Islands

    #

    brix/islands

    #

    Runtime: browser-safe.

    Values:

    • createStore — creates a store's [XStoreProvider, useXStore] tuple; the build injects its hydration key in *.store.ts files.
    • sharedSignal — returns the signal registered under a key, shared by every island on the page (a fresh signal during SSR).
    • RenderDataWrapper — provides render data to components; tests and stories use it to supply useRenderData values.
    • getWindow — returns window in the browser and null during SSR.

    Types: BaseRenderData (the render data every page receives), Island (an island descriptor), IslandManifest (the generated island manifest), IslandModule (a generated island module).

    RenderDataWrapper is exported only here, not from brix/islands/server. BaseRenderData.nonce is available during SSR only: Brix never serializes it, and browser renders observe an empty string. BaseRenderData.locale is the finalized request locale. The hydration payload codec is framework-internal.

    IslandManifest.staticImports optionally maps absolute asset URLs to their static JavaScript imports for dependency-aware preloads. Generated mounts pass RenderDataWrapper's payloadContext (the hydration root and script suffix) so optional renderers read the correct fragment's data. Ordinary applications do not supply these fields.

    Owner: framework; stores belong to stores.

    brix/islands/client

    #

    Runtime: browser.

    Value:

    • init — hydrates the listed islands in a document or fragment root with priority scheduling.

    Types: InitConfig, InitIsland.

    init(islands, config, root?) fetches immediate island modules concurrently and hydrates them in order before resolving, then schedules idle and lazy work. A failing island instance is reported without stopping the others. Hydration scheduling is page-lifetime infrastructure with no disposal guarantee. Passing a fragment root applies the same immediate, idle, and lazy scheduling only to islands inside that root, without publishing document-level hydration completion. init trusts the island URLs its caller passes.

    Fragment initialization and island revival are framework-internal and run from the generated bootstrap. It starts independent fragment roots concurrently, waits for initializing ancestors, retries rejected roots on a later pass, and hydrates fragments before page islands. Fragment metadata is read only from a direct-child JSON script, and fragment island modules must resolve under the application's asset prefix; other fragment islands are logged and left unhydrated.

    InitConfig.onIslandHydrated, onIslandError, and onHydrationComplete are synchronous diagnostic observers. Exceptions they throw are logged separately, never forwarded to onIslandError, and do not interrupt other islands or turn successful hydration into a failure. Actual import and render failures still log and reach onIslandError. Observers are not awaited; handle rejections from asynchronous work inside them. Document completion follows immediate and idle work without waiting for lazy islands, and does not guarantee that every island succeeded.

    brix/islands/server

    #

    Runtime: server-only. The supported server rendering extension points; ordinary applications configure rendering through defineBrixServer(brix, { renderData, renderer }).

    Values:

    • Head — adds its children to the document <head> of the current Brix server render.
    • Styling — adds an external stylesheet to the current Brix server render.
    • createHtmlTemplate — renders the document HTML shell from HtmlTemplateConfig.
    • createIslandRenderer — creates Hono rendering middleware for a custom, non-managed application.

    Types: HtmlTemplateConfig, IslandRendererConfig.

    Head and Styling render nothing outside a Brix server render, such as in the browser or a direct render-to-string call. IslandRendererConfig takes resolveRenderData and optional serializeRenderData (any nonce field in its result is removed), assetPrefix, htmlTemplate, and fragment. The serialization hook is a customization boundary, not a claim that all server data is serialized. Contexts, asset middleware, interception, and serializer construction remain framework internals composed by createBrixApp.

    Owners: framework; server assembly belongs to managing servers.

    Typed results

    #

    brix/result

    #

    Runtime: browser-safe.

    Values:

    • Result — constructors and combinators for Ok/Err results.
    • TaggedError — creates error classes with a _tag discriminant.
    • resultPromise — wraps a Promise<Result> as a chainable ResultPromise.

    Types: ResultPromise, Ok, Err.

    Terminal match, unwrap, and unwrapOr resolve awaited values, including promise-valued callbacks and fallbacks. ResultPromise lives here; brix/contracts re-exports the type because its executors return it.

    Owner: handling results.

    Environment and deployment

    #

    brix/env

    #

    Runtime: server-only.

    Value:

    • createEnv — creates an inert BrixEnv<T> declaration for defineBrixServer(brix, { env }).

    Type: BrixEnv.

    createEnv<T>() returns a declaration with parse(snapshot). Declare it in a "use server" module (src/env.server.ts) and pass it to defineBrixServer(brix, { env }); the deployment adapter supplies the snapshot, and Brix populates each request's parsed, deeply frozen c.env. Use the generated CoercedEnvSchema type from the application's env/.env.schema. Varlock owns application validation and coercion; there is no separately authored Zod schema.

    parse(snapshot) validates the snapshot format, JSON value structure, and key safety, then deeply freezes the values. It does not run the application schema or validate against the erased generic T. Validate and coerce application values with Varlock before publication, and pair the resulting snapshot with the matching schema and generated types.

    Commands refresh types automatically without resolving providers; checks and CI detect stale types without writes. Explicit CLI paths layer schema, base, stage, local, and overrides under env/, without root or bare dotenv discovery. brix env types generates types explicitly. brix env upload <stage> --account <id> --region <region> validates schema, base, and stage before upload and rejects unconsented ambient application overrides; upload is AWS-only, and Cloudflare and Fastly snapshot publication is not implemented. brix env export <stage> --target github validates schema, base, and stage, then exports only STAGE and brix.env.ciExports allowlisted values to later GitHub Actions steps through GITHUB_ENV, masking sensitive values (each line of multiline values). It needs no AWS credentials; local overrides and internal inputs are excluded, and ambient application overrides require --allow-override KEY. Use brix env run for local commands. Provider-free type generation does not imply provider-free execution: managed E2E loads the test-run stage automatically, and test-run cannot be built, exported, uploaded, or promoted.

    brix/env/script

    #

    Runtime: server-only (scripts).

    Value:

    • loadEnv — loads and deeply freezes application values for a script.

    loadEnv<T>() reads Varlock's resolved payload or the exact AWS Secrets Manager SECRETS_ARN/SECRETS_VERSION snapshot. It loads each payload or exact version once per process (retrying after a failure) and takes the Secrets Manager region from the ARN. Applications bind it in src/env.script.ts, and scripts import #brix/env/script; request-runtime modules use c.env instead.

    Owner: environment and secrets.

    brix/env/upload

    #

    Runtime: Node-only.

    Values:

    • prepareEnvUpload — resolves and validates one application's environment into an opaque, process-local upload handle.
    • uploadAwsEnvSnapshot — writes a prepared handle to AWS Secrets Manager under an idempotency token and returns a receipt.

    Types: PrepareEnvUploadOptions, PreparedEnvUpload, UploadAwsEnvSnapshotOptions, EnvUploadReceipt.

    prepareEnvUpload({ root, stage, bindings?, overrides? }) returns Promise<PreparedEnvUpload>. It resolves schema, base, and stage once, excludes local files, rejects snapshot context and unconsented ambient application keys, validates declared non-sensitive bindings, and never mutates process.env. Internal provider authentication remains allowed. Prepare every application before any write, and never serialize the values.

    uploadAwsEnvSnapshot(handle, { accountId, region, requestToken, endpointUrl? }) returns Promise<EnvUploadReceipt> with { format: "brix-env-upload-v1", accountId, region, stage, name, arn, versionId }. It shares one credential resolution across STS and the write, checks the target account before mutation, ignores ambient service endpoint overrides such as AWS_ENDPOINT_URL, and checks exact response identity. endpointUrl targets a local AWS emulator such as LocalStack or Floci instead: it accepts only a loopback http(s) origin (localhost, 127.0.0.1, or [::1]) with account 000000000000, and serves both STS and Secrets Manager; the secret is then created without a value and written with PutSecretValue, because some emulators ignore CreateSecret's request token. Persist the token before mutation: retries with the same token and bytes are idempotent, and a failure may represent a successful write. Inside GitHub Actions it masks every sensitive value, and each line of multiline values, on stderr before writing. There are no CI exports, mandatory readback, retention, or promotion. The CLI adapter brix env upload <stage> --account <id> --region <region> adds GITHUB_ENV exports of the allowlisted CI values, SECRETS_ARN, and SECRETS_VERSION; repeatable --allow-override KEY consents to ambient application keys, --request-token supplies a persisted token, --endpoint-url sets endpointUrl, and --json prints the receipt on stdout (progress and a generated token go to stderr).

    brix/artifacts

    #

    Runtime: Node-only.

    Value:

    • verifyDeploymentArtifact — verifies a Lambda or Fastly deployment handoff directory offline.

    Types: DeploymentArtifactManifest, VerifyDeploymentArtifactOptions, VerifiedDeploymentArtifact.

    verifyDeploymentArtifact(directory, { target?: "aws-lambda" | "fastly-compute", source?: { revision, project, clean? } }) returns Promise<{ manifest, manifestSha256 }>. It verifies the manifest schema, canonical package hashes, asset inventory, and Lambda safe ZIP limits; Fastly tarball integrity is checked without extraction. Expected source.project is the application's workspace path, not build.application (an entry filename). source.clean: true requires a build from a clean checkout; false or omission accepts clean and dirty builds. It needs neither credentials nor a checkout. manifestSha256 hashes the exact deployment.json bytes, not the nested build manifest. Integrity is not attestation; this API does not validate arbitrary repackaged ZIPs.

    Owner: Terraform-first deployment.

    brix/lambda

    #

    Runtime: server-only (custom Lambda entries).

    Value:

    • defineLambdaHandler — binds an inert BrixEnv declaration to a custom Lambda handler factory.

    defineLambdaHandler({ env, create: resolvedEnv => async (event, context) => result }) takes the declaration imported from #brix/env. The generic factory preserves the raw event, context, and result types; it does not synthesize HTTP requests. Only the declared custom entry may import this wrapper. HTTP routes continue to use c.env, and brix/env/script remains script-only.

    Imports and builds do not resolve providers. The first invocation lazily loads the exact AWS Secrets Manager SECRETS_ARN/SECRETS_VERSION snapshot and initializes the factory. Concurrent invocations share initialization; success is cached, and an initialization rejection permits a later retry. Both selectors are required: there is no AWSCURRENT, ambient application-value override, or Varlock fallback. Test application factories with injected configuration; wrapper tests and deployed invocations use an exact snapshot. For a custom Hono app, use create: env => handle(createCustomApp(env)), importing handle from brix/hono/aws-lambda.

    Owner: managing servers.

    brix/plugin

    #

    Runtime: tooling. A side-effect-only Varlock plugin entry selected by @plugin(brix) in env/.env.schema; it has no exports. It registers Brix's pinned official 1Password plugin without a consumer plugin dependency or hoisting. Initialize it with @initOp(token=$OP_SERVICE_ACCOUNT_TOKEN, allowAppAuth=true). This is not an application runtime import.

    Storage

    #

    brix/storage

    #

    Runtime: browser-safe. Reactive hooks come from brix/hooks or @brix/react.

    Values:

    • createStorageKey — pairs a storage key with its Zod schema as a StorageKey.
    • getStorageItem — reads and parses a value from a given Storage, or null.
    • setStorageItem — validates and writes a value to a given Storage.
    • removeStorageItem — removes a key from a given Storage.
    • getLocalStorageItem, setLocalStorageItem, removeLocalStorageItem — the same operations bound to localStorage.
    • getSessionStorageItem, setSessionStorageItem, removeSessionStorageItem — the same operations bound to sessionStorage.

    Type: StorageKey.

    StorageKey<Output, Input = Output> preserves both sides of a Zod schema. Setters validate and persist schema input; reads and hook values expose parsed output. Transforms therefore run on the original stored input rather than compounding on previously transformed output. Values must survive JSON serialization in the schema's input representation.

    Writes validate the JSON-normalized snapshot before replacing storage. For rich output values, use a JSON input schema with a transform, such as an ISO string parsed into a Date; a z.date() input cannot round-trip through JSON. Rejected writes leave existing persisted and hook state intact.

    Owner: storage.

    Contentful

    #

    brix/contentful

    #

    Runtime: browser-safe. Contentful data types, guards, link resolution, and the direct API contracts. Clients, credentials, webhooks, and server integrations live in brix/contentful/server.

    Values:

    • isEntry, isAsset, isLink, isDeletedEntry, isDeletedAsset — guards for Contentful resources and sync tombstones.
    • resolveLinks — resolves Link references in an entry against a response's includes.
    • getEntriesContract, getAssetContract, getContentTypesContract, getAllContentTypesContract, syncContract — API contracts for the Contentful Delivery API endpoints.

    Types: Entry, Asset, AssetFields, AssetFile, Link, Sys, ContentfulMetadata, ContentfulCollection, ContentType, ContentTypeField, ContentTypeValidation, DeletedAsset, DeletedEntry, RichTextDocument, RichTextMark, RichTextNode, SyncAsset, SyncResponse.

    ContentTypeValidation.in supports string or numeric enumerations. Generated resolved-link types include null, including array elements, because unavailable links resolve to null. Collection link resolution considers both root items and includes; client reads bound each root to its requested include depth, and links past it or back to an entry on the current path resolve to null. An entry reached at the same depth by several paths is resolved once per root, so it carries the cycle cuts of the first path that reached it. ContentType.displayField and description are optional and nullable, as are ContentTypeValidation size bounds and regular-expression flags. Sync assets use locale-mapped SyncAsset fields; the ordinary isAsset guard does not narrow them. Direct consumers of wildcard-locale reads pass resolveLinks(entry, includes, { locale: "*" }); omitting options preserves single-locale behavior. ContentfulCollection.includes.Asset accepts Asset | SyncAsset resources.

    Owners: Contentful and its focused references.

    brix/contentful/server

    #

    Runtime: server-only.

    Values:

    • createContentfulClient — creates a native Content Delivery API client (Preview through host) with typed reads, caching, retries, and sync.
    • createContentfulCmaClient — creates a Content Management API client; host selects api.contentful.com (default), api.eu.contentful.com, or a loopback mock under the Delivery client's token host policy.
    • createContentfulPreviewIntegration — a defineBrixServer integration that serves Contentful Live Preview.
    • createContentfulClientLoadingIntegration — a defineBrixServer integration that serves signed client adapter loading.
    • getContentfulLoadingContext — returns the verified loading identity and scope during loader endpoint and real-loader Preview work.
    • createContentfulWebhookMiddleware — Hono middleware that verifies Contentful webhooks and optionally invalidates registered delivery caches.
    • verifyContentfulWebhook — verifies a webhook request signature (async, native Web Crypto).
    • ContentfulRequestError — the error for failed Contentful HTTP requests.
    • ContentfulEntryNotFoundError — the error when a single-entry read finds nothing.
    • ContentfulSyncError — the error for invalid sync tokens or continuation.

    Types: ContentfulClient, ContentfulClientConfig, ContentfulCmaClientConfig, GetEntriesOptions, FieldFilters, SyncOptions, SyncPageResult, SyncResult, ContentfulWebhookMiddlewareOptions, BrixContentfulPreviewOptions, ContentfulClientLoadingOptions, ContentfulLoadingIdentity, ContentfulLoadingScope.

    Pass createContentfulPreviewIntegration(options) and createContentfulClientLoadingIntegration(options) to defineBrixServer(brix, { integrations: [...] }). Each accepts static options or a request callback; static options are validated when the integration is created. Annotate a callback parameter (for example (c: Context<{ Bindings: Readonly<CoercedEnvSchema> }>) => ...) when it reads c.env. Building with defineBrixConfig({ contentfulPreview: true }) is still required for Preview.

    createContentfulClientLoadingIntegration requires explicit signing keys, scope, authorization, canonical resolution, and route middleware. getContentfulLoadingContext(c) returns undefined outside loading work. Loading endpoint middleware and the scope callback can read this context after token verification (on the real-loader Preview page route, both middleware and scope run before the root resolves, so they see undefined; select policy from the /_/contentful/preview/ path there); the claims select policy, and applications must still derive the current principal or tenant from the authenticated session. BrixContentfulPreviewOptions.loaders opts into saved-draft loaders; its resolver owns credentials instead of the fixture-mode accessToken, and it requires the client loading integration, in either array order. accessToken is required in the default (loaders: false) fixture mode, which accepts an optional timeout for its native read and forwards the incoming request's abort signal. See the security and lifecycle contract.

    ContentfulClientConfig.timeout supplies an optional native request deadline in milliseconds. Entry, collection, lookup, asset, sync-page, and whole-sync calls accept per-call timeout and signal; passing timeout: undefined clears the configured deadline. Whole sync shares one deadline across pages and retries. Cancellation stays per call, including for callers sharing a cached read. ContentfulRequestError.kind is a required ApiRequestErrorKind, and status is a number (0 for non-HTTP failures). retry.maxDelay also caps X-Contentful-RateLimit-Reset waits.

    ContentfulClientConfig.request accepts { signal, onAttempt? } for native read cancellation and per-HTTP-attempt accounting, including retries. Cache flights isolate request objects while stored values keep their normal identity. Signed loading endpoints expose the shared object through getContentfulLoadingContext(c)?.request during resolution and loading, not authentication middleware. Forward it to every native client participating in the operation; ordinary SSR can use { signal }. Request-level and per-call signals both apply; a per-call override cannot bypass request cancellation.

    getEntry, getEntries, and findEntry accept a typed readonly select path array, not a string. Fixed arrays narrow root fields; variable-length arrays return optional fields. Arrays validate field names against the model, and the client requests full sys metadata alongside selected fields for validation and link resolution. Selected fields keep locale mapping and linked-entry types. Generic wrappers can forward GetEntriesOptions<T[K]> or optional options without casts while preserving locale-dependent types.

    GetEntriesOptions adds typed sys.id, sys.createdAt/sys.updatedAt, metadata.tags, and links_to_entry/links_to_asset filters; deep reference filters accept generated many-reference fields (Array<IX | null>). getAsset accepts locale and returns SyncAsset for literal "*".

    Entry reads with locale: "*" resolve links inside locale maps without additional requests. ContentfulClient<T> infers recursive locale-mapped entry and asset fields for literal wildcard reads, including undefined for missing translations. Specific or omitted locales keep single-locale types; dynamic strings and optional wildcards return both shapes as a union. JSON and location values stay opaque inside their outer locale map. Existing generated models work without regeneration.

    sync("") and syncPage({ syncToken: "" }) return ContentfulSyncError rather than restarting an initial sync. Intermediate SyncPageResult pages report nextSyncToken: null, and the result type narrows on nextPageToken === null.

    createContentfulWebhookMiddleware(secret, { clients: [contentful] }) composes signature verification with validated Entry and Asset publish, unpublish, and delete metadata, exact registered space and environment matching, and awaited native delivery-cache invalidation. Tombstones are required for unpublish and delete. Unknown or malformed events return 400, invalid or unsigned signatures or topics 401, and unmatched sources 403; provider invalidation failures remain retryable errors. Duplicate delivery repeats broad environment invalidation, not entry dependency inference. Only explicitly registered cached standard delivery clients are accepted, never Preview, CMA, or custom-host clients, and no implicit edge or browser purge occurs. Omitting clients keeps verification-only middleware. The tested onboarding recipe supplies editable setup and route files.

    brix/contentful/rendering

    #

    Runtime: browser-safe. Adapter authoring and the rendering runtime used by Brix's generated server and browser projections.

    Values:

    • createContentfulAdapterFactory — creates the typed factory that conventional adapter modules use to declare components, loaders, Markdown, and Preview fixtures.
    • propsOf — declares the extra props an adapter accepts, for type inference.
    • isContentfulAdapter — guards a value created by an adapter factory.
    • createContentfulRegistry — builds a registry mapping content types to adapters.
    • renderContentfulEntry — renders an entry, including nested renderEntry calls, through a registry; null or undefined renders nothing.
    • contentfulEntryKey — returns the stable loading key of an entry (* for entries without sys.locale).
    • ContentfulRenderingProvider — supplies registry, loaded data, and client loading to rendered entries; stories use it for fixture data.
    • createContentfulLoadingResource — creates a browser loading resource with read, subscribe, reset, and Preview-only refreshPreview.

    Adapter types: ContentfulAdapter, ContentfulRegistry, ContentfulRenderEntry, ContentfulExtraProps, ContentfulAttributes, DataAttributeSlots, Loaded, UnknownEntry.

    Markdown types: ContentfulMarkdownEntry, ContentfulMarkdownEntryOptions, ContentfulMarkdownProjection, ContentfulMarkdownRenderEntry.

    Preview types: ContentfulPreviewApi, ContentfulPreviewControl, ContentfulPreviewControls, ContentfulPreviewOptions.

    Client loading types: ContentfulLoadingResource, ContentfulLoadingTransport. The resource's dataVersion member is framework-internal.

    Application code normally defines conventional adapters with createContentfulAdapterFactory and passes entries opaquely to adapters or the generated dispatcher. createContentfulLoadingResource({ scope, permissions, loadedData?, transport?, permissionTransport? }) lets a provider's clientLoading take explicit resource ownership and server-free transports; generated hydration creates fragment-scoped resources automatically.

    Adapter loader is { response, handler }. The handler and Preview fixtures supply schema input; components and Markdown receive parsed output. Brix validates JSON-normalized input and transports it unchanged, so use nested strict object schemas to reject unwanted fields rather than relying on output stripping or transforms as redaction. ContentfulAdapter<TEntry, TProps, TData, TWire = TData, TContext = unknown> distinguishes parsed data from wire input; its loader handler receives the TContext declared by createContentfulAdapterFactory<TMap, TContext>(). Invalid responses become failed loaded results. Browser builds keep the schema but remove the handler; remote execution requires the explicit server loading policy. See the owning rendering-adapter reference for fixture, synchronous-schema, authorization, and caching requirements.

    Loader-backed visual components receive { status: "pending" } | Loaded<T> through one component; there is no separate pending callback. Loaded<T>, Markdown, transports, and fixtures remain settled-only. Missing grants fail explicitly; loaderless components receive null.

    Explicit provider values win per key, with preparation and resource fallback for missing entries, and never mutate shared resource values. Resetting a resource or failing session discovery invalidates old dictionaries, including across provider remounts. Browser mounts defer absent-grant diagnostics until committed subscription discovery settles. Normalization bounds expanded JSON to 16 MiB per result and checks loader deadlines without serializing late completions. Endpoint client-loading maxResponseBytes defaults to 1 MiB (up to 16 MiB), and maxUpstreamAttempts defaults to 64; the attempt budget requires forwarding the request controls described under brix/contentful/server and counts retries but not cache hits. Limits fail rather than truncate. Arbitrary synchronous callbacks and noncooperative I/O still require host limits.

    Hydration keeps client-consumed results, including explicit provider values, and a bounded closure of already-prepared client-reachable results; server-only slot results are not emitted automatically. Permission issuance is separate and never starts loaders. Conflicting effective values for one key within an SSR hydration payload fail explicitly.

    ContentfulMarkdownRenderEntry(entry, props?) returns Promise<MarkdownDocumentContent | null>. Projection callbacks accept synchronous content or a promise; await children before using synchronous md builders. ContentfulMarkdownEntryOptions contains props, signal, timeoutMs, concurrency, maxProjectionDepth, and maxProjectionNodes. Only requested projections load; unsupported or omitted entries do not. HTML and Markdown share private and Preview cache classification. Arbitrary callback promises require host request bounds.

    brix/contentful/rendering/markdown

    #

    Runtime: server rendering (Markdown projections).

    Value:

    • projectContentfulRichText — projects a Rich Text document to Brix Markdown content, awaiting embedded entries.

    Type: ContentfulRichTextProjectionOptions.

    It returns Promise<MarkdownDocumentContent> without exposing Contentful to the synchronous generic Markdown package. Hyperlinks that Brix Markdown rejects keep their labels as text, embedded targets that resolved to null are omitted, and unsupported marks such as underline render as plain text.

    brix/contentful/rendering/registry

    #

    Runtime: both; replaced at build time. The application's generated adapter registry: the Brix Vite plugin supplies the implementation, and calling these without it throws.

    Values:

    • renderEntry — renders an entry with the application's discovered adapters.
    • markdownEntry — projects an entry to Markdown with the application's discovered adapters.

    Owner: Contentful rendering adapters.

    brix/contentful/app

    #

    Runtime: browser. A facade for the managed Contentful App SDK. Use it from the React entry generated by brix create contentful-app rather than depending on the SDK directly.

    Values:

    • init — initializes the App SDK and passes the location SDK to a callback.
    • locations — the App SDK location identifiers.

    Types: ConfigAppSDK, DialogAppSDK, EditorAppSDK, FieldAppSDK, HomeAppSDK, PageAppSDK, SidebarAppSDK, KnownAppSDK.

    Owner: Contentful Apps.

    Storybook

    #

    brix/storybook

    #

    Runtime: tooling (Node).

    Values:

    • defineBrixStorybookCatalog — declares a catalog's root, selected workspace projects, and pandaConfig, shared by Storybook's main and test configuration.
    • withBrixStorybook — merges Brix's managed Vite configuration into Storybook's Vite config (call it from viteFinal).
    • defineBrixStorybookTestConfig — creates the Vitest browser project that runs stories as tests.
    • workspaceStoryGlobs — returns story globs for the selected workspace members.
    • workspaceStorySources — returns source globs for the selected workspace members.

    Types: BrixStorybookCatalog, BrixStorybookCatalogOptions, BrixStorybookOptions.

    Selected workspace roots get distinct member-qualified store identities. Application catalogs may select libraries only when a dependency or devDependency resolves to that local member; a same-named incompatible registry version or npm alias is not a local link. Source stories demonstrate authoring behavior; verify published recipe behavior in a consumer story that imports the built package.

    The managed browser configuration generates the Contentful rendering registry from directly relevant story sources and removes server loaders and Markdown projections. Contentful stories supply fixture data through ContentfulRenderingProvider. Ordinary stories need no Contentful setup; content types used by the catalog must map unambiguously to one adapter.

    brix/storybook/test

    #

    Runtime: browser (stories and preview).

    Values:

    • createBrixTranslationPreview — creates Storybook preview decorators and a locale toolbar for translated components.
    • expect, fn, userEvent, within — Storybook's interaction-testing helpers.

    Types: Meta, Preview, StoryObj.

    Owner: managing Storybook.

    Testing

    #

    brix/test

    #

    Runtime: Node tests. The entry also re-exports the project-pinned Vitest authoring API (describe, it, expect, vi, and the rest of vitest).

    Values:

    • createTestHarness — runs requests against a production-configured route in-process.
    • mockContract — creates an MSW handler that serves a contract's typed success response.
    • mockContractError — creates an MSW handler that serves a contract error response.
    • mockFragment — creates a typed replacement for a fragment in testPage({ fragments }).
    • testDataCacheStore — registers the shared data-cache store conformance suite.

    Types: TestHarness, TestHarnessConfig, TestRequestDefaults, TestResponseOptions, ApiTestResponse, PageTestResponse, HtmlPageTestResponse, MarkdownPageTestResponse, FragmentMock, MockContractRequest, MockContractResolver, MockData, TranslationTestDictionaries.

    Routes retain their contracts, so the harness infers request bodies, params, queries, fragment endpoint params and page query, localized page paths, and responses from the route alone. testPage({ fragments }) intercepts ordinary registered components and composes real fragment routes or typed mockFragment replacements in-process through the production protocol. Successful API responses expose expectSuccess() for a typed non-optional payload. A createApp factory runs each request through fresh application infrastructure; returning an app that a harness request already used, a pre-mounted app without the tested route, or a pre-mounted app combined with harness middleware throws. Harness responses use development render semantics (development CSP and hydration scripts, no build manifest). withOptions binds reusable setup, header, cookie, and fragment scenarios, and setupContext supports synchronous or asynchronous fixture setup.

    Contract mocks match URLs with the Brix path grammar, accept static fixtures or typed request-aware resolvers (params, query, body, MSW-resolved cookies, and request), and validate schema-backed requests, including JSON request media types, and responses. { status: 204 } mocks also validate the request and run resolvers. Mocks are only for HTTP-consuming client code; route and server behavior use the harness.

    brix/test/browser

    #

    Runtime: browser tests.

    Values:

    • render — renders a Preact component in the browser test page (vitest-browser-preact). It returns a promise of the screen; await it, and await the screen's rerender and unmount.
    • renderWithTranslations — renders a component inside a TranslationProvider with a locale and dictionary, and returns the same promise as render.
    • page — Vitest's browser page locator API.
    • userEvent — Vitest's browser user-interaction API.

    Owner: testing.

    brix/test/adapter

    #

    Runtime: browser tests. The binding-author boundary used by the separately distributed @brix/react package, so its test helpers share the Vitest instance that brix/test exports and receive the same browser matchers, including expect.element. Application tests use brix/test/browser or @brix/react/test instead.

    Values:

    • page — Vitest's browser page locator API.
    • userEvent — Vitest's browser user-interaction API.
    • utils — Vitest's browser locator utilities.

    Types: Locator, LocatorSelectors.

    brix/test/e2e

    #

    Runtime: Node (Playwright tests).

    Values:

    • test — the Playwright test fixture, which prepares managed browsers lazily.
    • expect — Playwright's assertions.
    • defineBrixE2EConfig — creates the managed Playwright configuration, accepting native Playwright options for optional brix.e2e.ts overrides.

    Conventional e2e/ tests run through brix test against a managed development server with failure artifacts. The server listens on a free loopback port shared with Playwright workers (or BRIX_E2E_PORT); use the configured baseURL rather than a fixed port. See managed E2E.

    brix/test/benchmark

    #

    Runtime: Node-only.

    Values:

    • runHydrationBenchmark — compares Brix/Preact islands against full-page hydration on production URLs and returns a report.
    • hydrationBenchmarkProfiles — the built-in cold and warm CPU/network profiles.
    • expect — Playwright's assertions for scenario verification.

    Types: HydrationBenchmarkOptions, HydrationBenchmarkProfile, HydrationBenchmarkReport, HydrationBenchmarkSample, HydrationBenchmarkScenario, HydrationBenchmarkSnapshot, and Playwright's Page.

    Named SSR controls provide per-boundary mount readiness, with separate deferred activation, shared functional verification, and JSON and Markdown reports. The harness does not build, start, or rewrite applications; readiness is not paint or INP. See consumer hydration benchmarks.

    Dependency facades

    #

    Brix exposes approved dependency APIs so consumers do not add independently versioned framework packages. Brix owns the version and the supported import path; do not add the underlying package directly. Each facade re-exports its upstream package unless noted:

    • Zod: brix/zod. Import the namespace as import { z } from "brix/zod"; the facade has no default export.
    • Preact: brix/preact, brix/preact/jsx-runtime, brix/preact/jsx-dev-runtime. Hooks come from brix/hooks.
    • Preact compat (curated): brix/preact/compat exports only createElement, forwardRef, ComponentProps, ComponentType, and JSX.
    • Signals (curated): brix/signals exports signal, computed, effect, batch, untracked, action, createModel, Signal, and the types ReadonlySignal, Model, ModelConstructor, and ModelFactory. It omits component hooks so useSignal and useComputed have one Prefresh-safe home in brix/hooks.
    • Hono: brix/hono, brix/hono/aws-lambda, brix/hono/cookie, brix/hono/cors, brix/hono/factory, brix/hono/http-exception.
    • MSW: brix/msw, brix/msw/browser, brix/msw/node.

    The Preact facade uses Preact 11: DOM types are direct exports rather than members of JSX, refs require explicit initial values, and core exports createPortal. MSW facades use MSW 3: configure onUnhandledFrame, await browser worker shutdown, and use resolver cookies rather than reading a mocked cookie header. MSW's root no longer exports GraphQL or handleRequest.

    Complete export inventory

    #

    This index is generated from the public API snapshot verified against the built packages and lists every export name by entry point; the sections above describe them. Runtime values and type-only exports are listed separately. Dependency facades delegate member-level behavior to their pinned upstream packages.

    brix/artifacts

    Values: verifyDeploymentArtifact.

    Types: DeploymentArtifactManifest, VerifiedDeploymentArtifact, VerifyDeploymentArtifactOptions.

    brix/auth/server

    Values: BrixAuthDelegationError, createBrixAuth, createBrixAuthDelegation.

    Types: BrixAuthActor, BrixAuthContext, BrixAuthDelegation, BrixAuthDelegationOptions, BrixAuthIdentity, BrixAuthServer, BrixAuthServerOptions, BrixAuthSetting.

    brix/cache

    Values: createDataCache, createMemoryDataCacheStore.

    Types: CacheDuration, DataCache, DataCacheConfig, DataCacheEntry, DataCacheEvent, DataCacheOperationOptions, DataCachePolicy, DataCacheStore.

    brix/cache/dynamodb

    Values: createDynamoDataCacheStore.

    Types: DynamoDataCacheStoreOptions.

    brix/cache/fastly

    Values: createFastlyKvDataCacheStore.

    Types: FastlyKvDataCacheStoreOptions.

    brix/config

    Values: defineBrixLibraryBuildConfig, defineBrixOpenApiConfig, defineBrixOxfmtConfig, defineBrixOxlintConfig.

    Types: BrixOpenApiConfig.

    brix/config/tsconfig/application

    JSON TypeScript configuration baseline.

    brix/config/tsconfig/library

    JSON TypeScript configuration baseline.

    brix/config/tsconfig/react-application

    JSON TypeScript configuration baseline.

    brix/config/tsconfig/ui-library

    JSON TypeScript configuration baseline.

    brix/contentful

    Values: getAllContentTypesContract, getAssetContract, getContentTypesContract, getEntriesContract, isAsset, isDeletedAsset, isDeletedEntry, isEntry, isLink, resolveLinks, syncContract.

    Types: Asset, AssetFields, AssetFile, ContentfulCollection, ContentfulMetadata, ContentType, ContentTypeField, ContentTypeValidation, DeletedAsset, DeletedEntry, Entry, Link, RichTextDocument, RichTextMark, RichTextNode, SyncAsset, SyncResponse, Sys.

    brix/contentful/app

    Values: init, locations.

    Types: ConfigAppSDK, DialogAppSDK, EditorAppSDK, FieldAppSDK, HomeAppSDK, KnownAppSDK, PageAppSDK, SidebarAppSDK.

    brix/contentful/rendering

    Values: contentfulEntryKey, ContentfulRenderingProvider, createContentfulAdapterFactory, createContentfulLoadingResource, createContentfulRegistry, isContentfulAdapter, propsOf, renderContentfulEntry.

    Types: ContentfulAdapter, ContentfulAttributes, ContentfulExtraProps, ContentfulLoadingResource, ContentfulLoadingTransport, ContentfulMarkdownEntry, ContentfulMarkdownEntryOptions, ContentfulMarkdownProjection, ContentfulMarkdownRenderEntry, ContentfulPreviewApi, ContentfulPreviewControl, ContentfulPreviewControls, ContentfulPreviewOptions, ContentfulRegistry, ContentfulRenderEntry, DataAttributeSlots, Loaded, UnknownEntry.

    brix/contentful/rendering/markdown

    Values: projectContentfulRichText.

    Types: ContentfulRichTextProjectionOptions.

    brix/contentful/rendering/registry

    Values: markdownEntry, renderEntry.

    brix/contentful/server

    Values: ContentfulEntryNotFoundError, ContentfulRequestError, ContentfulSyncError, createContentfulClient, createContentfulClientLoadingIntegration, createContentfulCmaClient, createContentfulPreviewIntegration, createContentfulWebhookMiddleware, getContentfulLoadingContext, verifyContentfulWebhook.

    Types: BrixContentfulPreviewOptions, ContentfulClient, ContentfulClientConfig, ContentfulClientLoadingOptions, ContentfulCmaClientConfig, ContentfulLoadingIdentity, ContentfulLoadingScope, ContentfulWebhookMiddlewareOptions, FieldFilters, GetEntriesOptions, SyncOptions, SyncPageResult, SyncResult.

    brix/contracts

    Values: ApiRequestError, buildApiUrl, createApiClient, createApiContract, createMarkdownIndexContract, createPageContract, createPathPrefix, createResponseContract, defineBrix, executeApi, getMarkdownIndexPath, getPath.

    Types: ApiCache, ApiCacheRequest, ApiCacheValue, ApiClient, ApiClientOptions, ApiDefinitionBase, ApiRequestErrorKind, ApiWithBody, ApiWithoutBody, AssertConsistentParams, BrixDefinition, BrixDependencyTimingSummary, BrixTimings, BrixTimingSummary, CreateMarkdownIndexContract, CreatePageContract, ExecuteApiOptions, ExecuteResult, InferBody, InferBodyInput, InferPageParams, InferPageQuery, InferPageQueryInput, InferPageRepresentations, InferParams, InferQuery, InferQueryInput, InferResponse, InferResponseInput, InferResponseParams, InferResponseQuery, InferResponseQueryInput, MarkdownIndexContract, PageContract, PageRepresentation, PathParams, PathParamsFromPaths, QueryParam, ResponseContract, ResponseMethod, ResponseType, ResultPromise, RetryConfig, WithoutParams, WithParams.

    brix/edge

    Values: decideFragmentCache, decidePageCache, matchBrixEdgeRoute, mergeBrixManifests, stripBrixPageRepresentationMarker.

    Types: BrixApiManifestRoute, BrixApplicationManifest, BrixApplicationManifestRoute, BrixApplicationManifestV2, BrixCacheHint, BrixEdgeManifest, BrixEdgeManifestRoute, BrixFragmentCacheDecision, BrixFragmentManifestRoute, BrixLocalePartition, BrixManifestMethod, BrixManifestRouteBase, BrixManifestRouteKind, BrixMarkdownIndexManifestRoute, BrixPageAlias, BrixPageCacheDecision, BrixPageManifestRoute.

    brix/env

    Values: createEnv.

    Types: BrixEnv.

    brix/env/script

    Values: loadEnv.

    brix/env/upload

    Values: prepareEnvUpload, uploadAwsEnvSnapshot.

    Types: EnvUploadReceipt, PreparedEnvUpload, PrepareEnvUploadOptions, UploadAwsEnvSnapshotOptions.

    brix/hono

    Re-exports the project-pinned API from hono.

    brix/hono/aws-lambda

    Re-exports the project-pinned API from hono/aws-lambda.

    brix/hono/cookie

    Re-exports the project-pinned API from hono/cookie.

    brix/hono/cors

    Re-exports the project-pinned API from hono/cors.

    brix/hono/factory

    Re-exports the project-pinned API from hono/factory.

    brix/hono/http-exception

    Re-exports the project-pinned API from hono/http-exception.

    brix/hooks

    Values: createTranslationHooks, HydratedTranslationProvider, TranslationProvider, useApi, useCallback, useComputed, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useLocalStorage, useMemo, useReducer, useRef, useRenderData, useSessionStorage, useSignal, useState, useStorage.

    Types: Dispatch, Reducer, StateUpdater, UseApiOptions.

    brix/hooks/adapter

    Values: createStorageHooks, createTranslationBindings, createUseApi.

    Types: HooksRuntime, StorageHookResult, StorageHooks, StorageHooksRuntime, TranslationBindings, TranslationBindingsRuntime, TranslationContextValue, TranslationProviderProps, UseApiHook, UseApiOptions, UseBrowserStorageHook, UseStorageHook.

    brix/islands

    Values: createStore, getWindow, RenderDataWrapper, sharedSignal.

    Types: BaseRenderData, Island, IslandManifest, IslandModule.

    brix/islands/client

    Values: init.

    Types: InitConfig, InitIsland.

    brix/islands/server

    Values: createHtmlTemplate, createIslandRenderer, Head, Styling.

    Types: HtmlTemplateConfig, IslandRendererConfig.

    brix/lambda

    Values: defineLambdaHandler.

    brix/markdown

    Values: isMarkdownContent, isMarkdownDocument, isMarkdownDocumentContent, isMarkdownIndexDocument, MarkdownUrlError, md, serializeMarkdownDocument, serializeMarkdownIndexDocument.

    Types: MarkdownBlock, MarkdownContent, MarkdownDocument, MarkdownDocumentContent, MarkdownFragment, MarkdownIndexDocument, MarkdownInline, MarkdownListItem, MarkdownTableAlignment.

    brix/msw

    Re-exports the project-pinned API from msw.

    brix/msw/browser

    Re-exports the project-pinned API from msw/browser.

    brix/msw/node

    Re-exports the project-pinned API from msw/node.

    brix/panda

    Values: definePandaConfig, definePreset, defineRecipe, defineSemanticTokens, defineSlotRecipe, defineTokens.

    Types: AnimationStyles, CompositionStyles, CssKeyframes, GlobalStyleObject, LayerStyles, PandaConfig, RecipeConfig, RecipeVariantRecord, SemanticTokens, SlotRecipeConfig, SlotRecipeVariantRecord, SystemStyleObject, TextStyles, Tokens.

    brix/plugin

    brix/preact

    Re-exports the project-pinned API from preact.

    brix/preact/compat

    Values: createElement, forwardRef.

    Types: ComponentProps, ComponentType, JSX.

    brix/preact/jsx-dev-runtime

    Re-exports the project-pinned API from preact/jsx-dev-runtime.

    brix/preact/jsx-runtime

    Re-exports the project-pinned API from preact/jsx-runtime.

    brix/result

    Values: Result, resultPromise, TaggedError.

    Types: Err, Ok, ResultPromise.

    brix/server

    Values: BRIX_FRAGMENT_MODE_DEFER, BRIX_FRAGMENT_MODE_HEADER, BRIX_REQUEST_ID, composeFragments, createBrixApp, defineBrixAuth, defineBrixServer, getPlatformBindings, getServiceSignature, requireServicePurpose.

    Types: ApiRoute, ApiRouteOpenApiOptions, ApiRouteOptionsBase, ApiRouteOptionsWithAuth, ApiRouteOptionsWithoutAuth, ApiSchemaDocumentation, BrixAuth, BrixContentSecurityPolicy, BrixContext, BrixCrossOriginOptions, BrixLogFields, BrixLogFormat, BrixLogger, BrixLoggingOptions, BrixLogLevel, BrixLogRecord, BrixLogSink, BrixOpenApiOptions, BrixOpenApiSecurityScheme, BrixSecurityOptions, BrixServerDefinition, BrixServerIntegration, BrixServiceMetadata, BrixSwaggerUi, BrixTranslationsServerOptions, CacheOption, ComposeFragmentsOptions, DefineBrixServerOptions, FragmentDescriptor, FragmentEndpointConfig, FragmentParams, FragmentProps, FragmentPropValue, FragmentRoute, MarkdownIndexDocumentCallback, MarkdownIndexRoute, MarkdownIndexRouteOptions, PageCacheConfig, PageCacheOption, PageCacheQueryConfig, PageRoute, PageRouteAuthOption, PageRouteLoadData, ResponseRoute, ResponseRouteOptionsWithAuth, ResponseRouteOptionsWithoutAuth, RoutingConfig, TranslationFallbackInput, TranslationLoaderInput, TranslationMissingEvent, ValidatedData.

    brix/server/swagger-ui

    Values: swaggerUi.

    Types: BrixSwaggerUi, BrixSwaggerUiOptions.

    brix/service-signatures

    Values: importServiceKey, importServiceSigningKeys, importServiceVerifyKeys, keyidOf, serviceRequestViewFromLambdaEvent, serviceRequestViewFromRequest, signServiceRequest, verifyServiceRequest.

    Types: LambdaHttpEvent, RejectedServiceSignature, ServiceKey, ServiceKeysByPurpose, ServiceRequestBody, ServiceRequestHeaders, ServiceRequestView, ServiceRequestViewOptions, ServiceSignatureErrorCode, ServiceSignatureOptions, ServiceSignatureVerification, SignableServiceRequest, SignedServiceRequestInit, SignServiceRequestOptions, VerifiedServiceSignature, VerifyServiceRequestOptions.

    brix/signals

    Values: action, batch, computed, createModel, effect, signal, Signal, untracked.

    Types: Model, ModelConstructor, ModelFactory, ReadonlySignal.

    brix/storage

    Values: createStorageKey, getLocalStorageItem, getSessionStorageItem, getStorageItem, removeLocalStorageItem, removeSessionStorageItem, removeStorageItem, setLocalStorageItem, setSessionStorageItem, setStorageItem.

    Types: StorageKey.

    brix/storybook

    Values: defineBrixStorybookCatalog, defineBrixStorybookTestConfig, withBrixStorybook, workspaceStoryGlobs, workspaceStorySources.

    Types: BrixStorybookCatalog, BrixStorybookCatalogOptions, BrixStorybookOptions.

    brix/storybook/test

    Values: createBrixTranslationPreview, expect, fn, userEvent, within.

    Types: Meta, Preview, StoryObj.

    brix/test

    Values: createTestHarness, mockContract, mockContractError, mockFragment, testDataCacheStore.

    Types: ApiTestResponse, FragmentMock, HtmlPageTestResponse, MarkdownPageTestResponse, MockContractRequest, MockContractResolver, MockData, PageTestResponse, TestHarness, TestHarnessConfig, TestRequestDefaults, TestResponseOptions, TranslationTestDictionaries.

    Re-exports the project-pinned API from vitest.

    brix/test/adapter

    Values: page, userEvent, utils.

    Types: Locator, LocatorSelectors.

    brix/test/benchmark

    Values: expect, hydrationBenchmarkProfiles, runHydrationBenchmark.

    Types: HydrationBenchmarkOptions, HydrationBenchmarkProfile, HydrationBenchmarkReport, HydrationBenchmarkSample, HydrationBenchmarkScenario, HydrationBenchmarkSnapshot, Page.

    brix/test/browser

    Values: page, render, renderWithTranslations, userEvent.

    brix/test/e2e

    Values: defineBrixE2EConfig, expect, test.

    brix/translations

    Values: createTranslator, defineTranslations.

    Types: Translate, TranslationDefinition, TranslationDictionary, TranslationKeyOf, TranslationLookupOptions.

    brix/vite

    Values: createBrixBrowserAdapterConfig, defineBrixConfig.

    Types: BrixPlatform, BrixServiceSignatureOptions, BrixViteConfig, DefineBrixConfigOptions.

    brix/zod

    Re-exports the project-pinned API from zod.

    @brix/react

    Values: act, action, Activity, batch, cache, cacheSignal, captureOwnerStack, Children, cloneElement, Component, computed, createContext, createElement, createModel, createRef, createTranslationHooks, effect, forwardRef, Fragment, isValidElement, lazy, memo, Profiler, PureComponent, signal, Signal, startTransition, StrictMode, Suspense, TranslationProvider, untracked, use, useActionState, useApi, useCallback, useComputed, useContext, useDebugValue, useDeferredValue, useEffect, useEffectEvent, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useLocalStorage, useMemo, useOptimistic, useReducer, useRef, useSessionStorage, useSignal, useSignalEffect, useSignals, useState, useStorage, useSyncExternalStore, useTransition, version.

    Types: ActionDispatch, ActivityProps, AllHTMLAttributes, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AriaAttributes, AriaRole, Attributes, AudioHTMLAttributes, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ChangeEvent, ChangeEventHandler, ClassAttributes, ClipboardEvent, ClipboardEventHandler, ColgroupHTMLAttributes, ColHTMLAttributes, ComponentClass, ComponentProps, ComponentPropsWithoutRef, ComponentPropsWithRef, ComponentRef, ComponentType, CompositionEvent, CompositionEventHandler, Consumer, ConsumerProps, Context, ContextType, CSSProperties, DataHTMLAttributes, DelHTMLAttributes, DependencyList, DetailedHTMLProps, DetailsHTMLAttributes, DialogHTMLAttributes, Dispatch, DispatchWithoutAction, DOMAttributes, DragEvent, DragEventHandler, EffectCallback, ElementRef, ElementType, EmbedHTMLAttributes, ErrorInfo, EventHandler, ExoticComponent, FC, FieldsetHTMLAttributes, FocusEvent, FocusEventHandler, FormEvent, FormEventHandler, FormHTMLAttributes, ForwardedRef, ForwardRefExoticComponent, ForwardRefRenderFunction, FunctionComponent, HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy, HTMLAttributes, HtmlHTMLAttributes, HTMLInputAutoCompleteAttribute, HTMLInputTypeAttribute, HTMLProps, IframeHTMLAttributes, ImgHTMLAttributes, InputEvent, InputEventHandler, InputHTMLAttributes, InsHTMLAttributes, InvalidEvent, JSX, JSXElementConstructor, Key, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LazyExoticComponent, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MemoExoticComponent, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, Model, ModelConstructor, ModelFactory, MouseEvent, MouseEventHandler, MutableRefObject, NamedExoticComponent, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, PointerEvent, PointerEventHandler, ProfilerOnRenderCallback, ProfilerProps, ProgressHTMLAttributes, PropsWithChildren, PropsWithoutRef, Provider, ProviderExoticComponent, ProviderProps, QuoteHTMLAttributes, ReactElement, ReactEventHandler, ReactNode, ReactPortal, ReadonlySignal, Reducer, Ref, RefAttributes, RefCallback, RefObject, ScriptHTMLAttributes, SelectHTMLAttributes, SetStateAction, SlotHTMLAttributes, SourceHTMLAttributes, StyleHTMLAttributes, SubmitEvent, SubmitEventHandler, SuspenseProps, SVGAttributes, SVGProps, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, ToggleEvent, ToggleEventHandler, TouchEvent, TouchEventHandler, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, TransitionFunction, UIEvent, UIEventHandler, UseApiOptions, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler.

    @brix/react/client

    Re-exports the project-pinned API from react-dom/client.

    @brix/react/contentful

    Re-exports the project-pinned API from @contentful/f36-components.

    @brix/react/contentful/icons

    Re-exports the project-pinned API from @contentful/f36-icons.

    @brix/react/dom

    Values: createPortal, flushSync, preconnect, prefetchDNS, preinit, preinitModule, preload, preloadModule, requestFormReset, useFormStatus, version.

    Types: FormStatus, FormStatusNotPending, FormStatusPending, PreconnectOptions, PreinitAs, PreinitModuleAs, PreinitModuleOptions, PreinitOptions, PreloadAs, PreloadModuleAs, PreloadModuleOptions, PreloadOptions.

    @brix/react/jsx-dev-runtime

    Values: Fragment, jsxDEV.

    Types: JSX.

    @brix/react/jsx-runtime

    Values: Fragment, jsx, jsxs.

    Types: JSX.

    @brix/react/test

    Values: cleanup, page, render, userEvent.

    Types: RenderOptions, RenderResult.

    @brix/react/vite

    Values: defineBrixReactConfig.

    Types: DefineBrixReactConfigOptions.