Import surfaces
Choose the right React SDK package entry point without inventing unsupported deep imports.
Use this guide before picking an import path from @enadhq/enad-react-sdk.
Exact member exports belong to package reference. This guide explains the intentional public entry points and the few documented exceptions so app code does not drift into guessed deep paths.
Default rule
Start from the most documented public surface that fits the job:
- use the package root for setup-level imports and other intentionally top-level APIs
- prefer grouped domain entry points for feature work
- only drop to a narrower or deeper path when package docs explicitly call that path out
Safe setup imports docs can show directly
Do not invent sibling deep paths from naming patterns alone. These setup imports are the confirmed copy-paste-safe starting point for docs examples:
import "@enadhq/enad-react-sdk/styles.css";
import { EnadProvider } from "@enadhq/enad-react-sdk";
import { EnadThemeProvider } from "@enadhq/enad-react-sdk/client/theme";For other components, hooks, helpers, or types, use the grouped public surface that owns the job and verify the exact member export in package reference before writing code.
Start with these grouped public entry points
| Job | Start with | Why |
|---|---|---|
| App shell setup and intentionally top-level APIs | @enadhq/enad-react-sdk | The root package is a curated public contract for provider-level setup and a small set of true top-level exports. |
| Provider/runtime utilities | @enadhq/enad-react-sdk/client/global | Keeps provider and runtime support imports grouped instead of guessing internal provider files. |
| Storefront display components and storefront helpers | @enadhq/enad-react-sdk/client/storefront | Preferred public storefront barrel for application code. |
| Connected Search hooks and Search-backed product helpers | @enadhq/enad-react-sdk/client/search | Keeps Search-aware React surfaces together while leaving Search GraphQL schema truth elsewhere. |
| Cart components, hooks, normalized cart types | @enadhq/enad-react-sdk/client/cart | Public grouped cart barrel. |
| Brink cart adapter | @enadhq/enad-react-sdk/client/cart/brink-adapter | Documented tree-shakeable adapter entry point. |
| Mock cart adapter | @enadhq/enad-react-sdk/client/cart/mock-adapter | Documented development/testing adapter entry point. |
| Semantic icon slots and icon adapters | @enadhq/enad-react-sdk/client/icons | Public icon system surface. |
| Theme hashes, runtime theming, CSS generation | @enadhq/enad-react-sdk/client/theme | Public theme/runtime surface. |
| Storyblok-authored content rendering | @enadhq/enad-react-sdk/client/cms/storyblok | Storyblok-specific public surface. |
| Account forms, account hooks, user context | @enadhq/enad-react-sdk/client/user | Public grouped user/account barrel. |
| Wishlist state and wishlist UI | @enadhq/enad-react-sdk/client/wishlist | Public grouped wishlist barrel. |
| Resolver or interface-level system work | @enadhq/enad-react-sdk/client/ui-resolver and @enadhq/enad-react-sdk/client/ui-interfaces | Low-level public system seams for resolver-backed customization work. |
Narrower public storefront paths are refinements, not a free-for-all
The package also documents more focused storefront barrels such as:
@enadhq/enad-react-sdk/client/storefront/blocks@enadhq/enad-react-sdk/client/storefront/components@enadhq/enad-react-sdk/client/storefront/primitives@enadhq/enad-react-sdk/client/storefront/layout@enadhq/enad-react-sdk/client/storefront/filters@enadhq/enad-react-sdk/client/storefront/product@enadhq/enad-react-sdk/client/storefront/checkout@enadhq/enad-react-sdk/client/storefront/carousel
Treat these as documented refinements of the storefront surface, not as permission to infer arbitrary deeper paths.
A good default is to start at client/storefront.
Move to one of the documented storefront subpaths only when a guide, example, or low-level composition need makes that narrower barrel clearer. Keep exact member-export checks in package reference.
Documented deep exceptions
A few retained deep seams are intentional and limited. Current package docs call out these exceptions explicitly:
@enadhq/enad-react-sdk/client/storefront/blocks/product-card-parts@enadhq/enad-react-sdk/client/global/server-config@enadhq/enad-react-sdk/client/storefront/types@enadhq/enad-react-sdk/client/ui/utils@enadhq/enad-react-sdk/client/ui/mid-truncate
Use these only when the grouped public barrel does not cover the job. Do not assume nearby internal-looking paths are equally supported just because these exceptions exist.
How to choose when you are unsure
- If the code is app shell, provider, or stylesheet setup, start at the root package or React SDK setup.
- If the code is shopper-facing UI composition, start at
client/storefrontand the relevant component docs. - If the code is Search-backed React behavior, start at
client/searchand Product listing and search. - If the code is theme hash, component set, or runtime token work, start at
client/themeand Theming. - If the task is only about finding the right family, use React SDK agent discovery and imports.
Boundary to preserve
The package exports map currently exposes additional client/* subpaths. Use the grouped entry points and retained seams above unless package reference explicitly documents a narrower path.
When exact import truth matters:
- choose the documented surface first
- inspect package reference or source for the exact member export
- avoid promoting a one-off deep path into docs prose unless package docs intentionally document it