This package contains type definitions for VONQ HAPI Elements project.

To get started using the types, install the package as a dev dependency (package is published on the npm registry):

```
yarn add -D @vonq/hapi-elements-types
```

All the types have been exported in a single file so you can get started using the types as such:

```
import {CampaignCreateForm} from "@vonq/hapi-elements-types";

const campaignObject: CampaignCreateForm = {} //Typescript will warn about missing properties
```

## Browser vs Node

The package exposes **two entry shapes** from the same scope:

- **Browser and bundlers (Vite, webpack, Next.js client, etc.)** — import from the package root **`@vonq/hapi-elements-types`**. Resolution uses the **`browser`** export condition when the tool sets it; otherwise the generic **`import`** / **`default`** entry points at **`dist/index.js`**, which includes the full barrel (including **`_window`** / `window.hapi` runtime typings).

- **Node (scripts, tooling, CLIs)** — still import from **`@vonq/hapi-elements-types`**. Node applies the **`node`** export condition and loads **`dist/index.node.js`**, a bundled ESM file that matches the full barrel **except** that **`_window` is only re-exported as types** (`export type *`) at the entry, not as runtime values. Types from **`_window`** remain available to TypeScript; other modules may still pull **`_window`** code transitively when needed.

- **Explicit Node subpath** — you can also write **`@vonq/hapi-elements-types/node`**, which resolves to the same **`dist/index.node.js`** / **`dist/index.node.d.ts`** as the **`node`** condition on `"."`.

After regenerating the root barrel with **`yarn generate:index`**, keep **`index.node.ts`** in sync with **`index.ts`** (same module list; keep **`export type *`** for **`./_window`** only in **`index.node.ts`**).
