Skip to content

Diagnostics

Diagnostic codes are exported from the package root as NativeStylesDiagnosticCode. Tooling should key on codes rather than full message text.

CodeMeaning
CRUMBS_CSS_UNSUPPORTED_MEDIAA .css.ts file authored a CSS media rule.
CRUMBS_CSS_UNSUPPORTED_AT_RULEA .css.ts file authored another browser-only at-rule.
CRUMBS_CSS_UNSUPPORTED_SELECTORA .css.ts file authored selectors, pseudo classes, globals, or nested selectors.
CRUMBS_CSS_DROPPED_DECLARATIONA declaration could not be converted to a React Native style prop.
CRUMBS_CSS_CSS_VARIABLE_DROPPEDA browser CSS variable was used instead of a native theme token or TypeScript value.
CRUMBS_CSS_PARTIAL_RECIPE_PAYLOADRuntime received a partial transformed recipe and used the base fallback.
CRUMBS_CSS_INVALID_RECIPE_VARIANTRuntime received a selected recipe variant value that is not declared.

| CRUMBS_CSS_INVALID_LOCAL_VAR | Invalid handle, fallback, plan or reached public token identity. | | CRUMBS_CSS_INVALID_LOCAL_ASSIGNMENTS | Invalid complete assignment shape or domain literal. | | CRUMBS_CSS_LOCAL_VAR_CONFLICT | The same identity has conflicting domains or duplicate values. | | CRUMBS_CSS_LOCAL_VAR_DOMAIN_MISMATCH | An operand, fallback or reached theme has an incompatible domain. | | CRUMBS_CSS_LOCAL_VAR_REQUIRED | An effective required handle is absent. | | CRUMBS_CSS_LOCAL_VAR_UNSUPPORTED_VERSION | A local payload version is unsupported. | | CRUMBS_CSS_LOCAL_STYLE_PLAN_REQUIRED | Use the local-variable resolver instead of a generic theme resolver. | | CRUMBS_CSS_LOCAL_VAR_INVALID_PROPERTY_VALUE | The resolved literal violates a native property or primitive restriction. |

Diagnostics are formatted like:

[crumbs-css:CRUMBS_CSS_UNSUPPORTED_MEDIA] ...

Enable strict diagnostics when you want dropped declarations to fail instead of being skipped:

CodeMeaning
CRUMBS_CSS_INVALID_CONTAINER_DEFINITIONInvalid identity, axis, buckets, descriptor or handle data.
CRUMBS_CSS_CONTAINER_UNSUPPORTED_VERSIONUnsupported descriptor/context/owner protocol version.
CRUMBS_CSS_INVALID_CONTAINER_MEASUREMENTInvalid selected dimension or malformed live layout event.
CRUMBS_CSS_INVALID_CONTAINER_VALUESUnknown bucket or incomplete/extra/accessor value-map entry.
CRUMBS_CSS_CONTAINER_PROVIDER_REQUIREDNo matching named owner.
CRUMBS_CSS_CONTAINER_CONTRACT_MISMATCHSame identity with a different axis/bucket shape.
CRUMBS_CSS_CONTAINER_OWNER_IN_USEOne handle claimed by multiple committed providers.
CRUMBS_CSS_CONTAINER_REENTRANT_UPDATEDifferent-bucket publication attempted during notification.

Invalid data never becomes an unmeasured fallback. Diagnostics identify fields/owners without dumping selected application values.

CodeCause
CRUMBS_CSS_INVALID_MOTION_DEFINITIONInvalid closed state/transition descriptor or numeric domain
CRUMBS_CSS_MOTION_UNSUPPORTED_VERSIONUnknown definition tag/version
CRUMBS_CSS_INVALID_MOTION_OPTIONSUnknown option, initial state, preference or duration
CRUMBS_CSS_INVALID_MOTION_TARGETCommand names an unknown state
CRUMBS_CSS_MOTION_UNSUPPORTED_PLATFORMNative adapter platform is outside iOS/Android/web
CRUMBS_CSS_MOTION_NOT_ACTIVECommand occurs before first committed activation
CRUMBS_CSS_MOTION_DRIVER_FAILEDNative stop/read/set/start/completion failed

Run Promises resolve a failed terminal result rather than rejecting. Imperative set failures throw the bounded driver diagnostic; Hook cleanup never throws. Invalid arguments do not stop valid current work.

The optional /tokens/algebra entry throws synchronous TokenAlgebraError values extending TypeError. Stable codes are algebra.invalid-color, algebra.invalid-typography, algebra.invalid-option, algebra.invalid-descriptor, algebra.out-of-range. Constructor shape, operand descriptor, option shape and admitted numeric bounds are distinct. Messages never echo arbitrary inputs or execute accessors. Native callers from another installed copy should identify errors by code.

ExtensionError exposes bounded path and a closed code: invalid-config, invalid-argument, resource-limit, build-only-call, unsupported-version, unresolved-import, invalid-factory or invalid-result, each prefixed extension.. Compiler ingress/link failures include the stylesheet path. Accessors are rejected without invocation. Generated factory/result guards throw TypeErrors with the same code/path fields; exceptions thrown by a valid runtime factory propagate unchanged. An untransformed placeholder must never be rendered.