# Fluid portal authoring API

## Interfaces

### PortalConfig

Configuration accepted by [createPortal](#createportal).

#### Properties

##### customPages?

> `readonly` `optional` **customPages?**: `Record`\<`string`, `ComponentType`\<[`PortalCustomPageProps`](#portalcustompageprops)\>\>

Custom React pages keyed by their portal slug.

##### disableStrictMode?

> `readonly` `optional` **disableStrictMode?**: `boolean`

Disables React Strict Mode when an integration cannot tolerate development double invocation.

##### errorReporter?

> `readonly` `optional` **errorReporter?**: `PortalErrorReporter`

Receives uncaught root and shell errors with portal context.

##### fluid?

> `readonly` `optional` **fluid?**: `Partial`\<`FluidSDKConfig`\>

Partial SDK configuration merged with the SDK defaults.

##### memberTypeCustomPages?

> `readonly` `optional` **memberTypeCustomPages?**: `MemberTypeCustomPages`

Per-member-type page overrides: memberTypeSlug -> (pageSlug -> component).
Serves different screens to different member types (e.g. an `affiliate`
dashboard) at the same slug. Wins over `customPages` for that member type.

##### providers?

> `readonly` `optional` **providers?**: `ComponentType`\<[`PortalProviderProps`](#portalproviderprops)\>

Optional component that wraps the complete portal tree with app providers.

##### remoteWidgets?

> `readonly` `optional` **remoteWidgets?**: [`RemoteWidgetOptions`](#remotewidgetoptions)

Remote DOM packages, host functions, and package-loading options.

##### rootId?

> `readonly` `optional` **rootId?**: `string`

DOM element id where the portal mounts.

###### Default Value

`"root"`

##### shell?

> `readonly` `optional` **shell?**: `Omit`\<`AppShellProps`, `"customPages"` \| `"memberTypeCustomPages"` \| `"errorReporter"`\>

App shell options; page and error hooks come from the top-level config.

---

### PortalCustomPageProps

Route values supplied to a custom portal page component.

#### Properties

##### params?

> `readonly` `optional` **params?**: `string`

Remaining route path after the matched slug.

##### slug?

> `readonly` `optional` **slug?**: `string`

Matched portal route slug.

---

### PortalProviderProps

Children supplied to a portal-wide provider component.

#### Properties

##### children

> `readonly` **children**: `ReactNode`

Complete portal tree wrapped by the provider.

---

### RemoteDomWidgetPackageDescriptor

Canonical package contract shared by the CLI, catalog APIs, and portal hosts.
Catalog producers resolve every artifact to its public URL before returning
this descriptor; consumers do not translate legacy manifest shapes.

#### Properties

##### assetUrls

> `readonly` **assetUrls**: readonly `string`[]

##### cssUrls

> `readonly` **cssUrls**: readonly `string`[]

##### manifestVersion

> `readonly` **manifestVersion**: `1`

##### packageId

> `readonly` **packageId**: `string`

##### runtime

> `readonly` **runtime**: `"remote-dom"`

##### source

> `readonly` **source**: `"company"` \| `"droplet"`

##### version

> `readonly` **version**: `string`

##### widgets

> `readonly` **widgets**: readonly `RemoteDomWidgetDefinition`[]

##### workerEntryUrl

> `readonly` **workerEntryUrl**: `string`

---

### RemoteWidgetOptions

Host configuration for Remote DOM package loading and capabilities.

#### Properties

##### capabilityMode?

> `readonly` `optional` **capabilityMode?**: `RemoteDomCapabilityMode`

Controls whether Remote DOM widgets may invoke any capability, including
SDK built-ins, custom functions, and fullscreen. In `unavailable` mode
every capability call fails with `UNAVAILABLE`; use it for non-interactive
builder and preview environments.

###### Default

```ts
"live";
```

##### catalog?

> `readonly` `optional` **catalog?**: `boolean`

Load packages from the authenticated portal catalog.

###### Default

```ts
true;
```

##### functions?

> `readonly` `optional` **functions?**: readonly `PortalFunctionImplementation`[]

Implements declared custom portal functions not owned by the Portal SDK.

##### onFullscreen?

> `readonly` `optional` **onFullscreen?**: `RemoteWidgetFullscreenHandler`

Optional preflight hook for fullscreen requests. The Portal SDK remains
the canonical owner of screen-area state, layout, focus, and exit UI.

##### packages?

> `readonly` `optional` **packages?**: readonly [`RemoteDomWidgetPackageDescriptor`](#remotedomwidgetpackagedescriptor)[]

Trusted canonical packages appended after catalog packages.

## Functions

### createPortal()

> **createPortal**(`config?`): `void`

Mounts a portal with the shared SDK provider and canonical widget catalog.

#### Parameters

##### config?

[`PortalConfig`](#portalconfig) = `{}`

Portal pages, SDK settings, Remote DOM packages, and host integration hooks.

#### Returns

`void`

#### Throws

If the configured root element does not exist.
