Diagnostics
Diagnostic codes are exported from the package root as NativeStylesDiagnosticCode. Tooling should key on codes rather than full message text.
| Code | Meaning |
|---|---|
CRUMBS_CSS_UNSUPPORTED_MEDIA | A .css.ts file authored a CSS media rule. |
CRUMBS_CSS_UNSUPPORTED_AT_RULE | A .css.ts file authored another browser-only at-rule. |
CRUMBS_CSS_UNSUPPORTED_SELECTOR | A .css.ts file authored selectors, pseudo classes, globals, or nested selectors. |
CRUMBS_CSS_DROPPED_DECLARATION | A declaration could not be converted to a React Native style prop. |
CRUMBS_CSS_CSS_VARIABLE_DROPPED | A browser CSS variable was used instead of a native theme token or TypeScript value. |
CRUMBS_CSS_PARTIAL_RECIPE_PAYLOAD | Runtime received a partial transformed recipe and used the base fallback. |
CRUMBS_CSS_INVALID_RECIPE_VARIANT | Runtime 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. |
Message shape
Section titled “Message shape”Diagnostics are formatted like:
[crumbs-css:CRUMBS_CSS_UNSUPPORTED_MEDIA] ...Strict diagnostics
Section titled “Strict diagnostics”Enable strict diagnostics when you want dropped declarations to fail instead of being skipped:
Container conditions
Section titled “Container conditions”| Code | Meaning |
|---|---|
CRUMBS_CSS_INVALID_CONTAINER_DEFINITION | Invalid identity, axis, buckets, descriptor or handle data. |
CRUMBS_CSS_CONTAINER_UNSUPPORTED_VERSION | Unsupported descriptor/context/owner protocol version. |
CRUMBS_CSS_INVALID_CONTAINER_MEASUREMENT | Invalid selected dimension or malformed live layout event. |
CRUMBS_CSS_INVALID_CONTAINER_VALUES | Unknown bucket or incomplete/extra/accessor value-map entry. |
CRUMBS_CSS_CONTAINER_PROVIDER_REQUIRED | No matching named owner. |
CRUMBS_CSS_CONTAINER_CONTRACT_MISMATCH | Same identity with a different axis/bucket shape. |
CRUMBS_CSS_CONTAINER_OWNER_IN_USE | One handle claimed by multiple committed providers. |
CRUMBS_CSS_CONTAINER_REENTRANT_UPDATE | Different-bucket publication attempted during notification. |
Invalid data never becomes an unmeasured fallback. Diagnostics identify fields/owners without dumping selected application values.
Native motion diagnostics (M11.3)
Section titled “Native motion diagnostics (M11.3)”| Code | Cause |
|---|---|
CRUMBS_CSS_INVALID_MOTION_DEFINITION | Invalid closed state/transition descriptor or numeric domain |
CRUMBS_CSS_MOTION_UNSUPPORTED_VERSION | Unknown definition tag/version |
CRUMBS_CSS_INVALID_MOTION_OPTIONS | Unknown option, initial state, preference or duration |
CRUMBS_CSS_INVALID_MOTION_TARGET | Command names an unknown state |
CRUMBS_CSS_MOTION_UNSUPPORTED_PLATFORM | Native adapter platform is outside iOS/Android/web |
CRUMBS_CSS_MOTION_NOT_ACTIVE | Command occurs before first committed activation |
CRUMBS_CSS_MOTION_DRIVER_FAILED | Native 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.
Token algebra errors (M11.4)
Section titled “Token algebra errors (M11.4)”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.
Runtime extension diagnostics
Section titled “Runtime extension diagnostics”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.