Skip to content

Commit

Permalink
v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 21, 2024
1 parent 3e9b6d0 commit d00f43a
Show file tree
Hide file tree
Showing 29 changed files with 321 additions and 45 deletions.
6 changes: 3 additions & 3 deletions docs/api-report/uix-host-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export type ExtensibilityContext = {
};

// @public
export function Extensible({ appName, children, extensionsProvider, guestOptions, runtimeContainer, debug, sharedContext, }: PropsWithChildren<ExtensibleProps>): JSX.Element;
export function Extensible({ appName, children, extensionsProvider, guestOptions, runtimeContainer, debug, sharedContext, }: PropsWithChildren<ExtensibleProps>): React_2.JSX.Element;

// @public
export const ExtensibleComponentBoundary: ({ extensionPoints, children, }: ExtensibleComponentProps) => JSX.Element;
export const ExtensibleComponentBoundary: ({ extensionPoints, children, }: ExtensibleComponentProps) => React_2.JSX.Element;

// @internal (undocumented)
export const ExtensibleComponentBoundaryContext: React_2.Context<ExtensionRegistryEndpointRegistration[]>;
Expand Down Expand Up @@ -63,7 +63,7 @@ export interface ExtensibleProps extends Omit<HostConfig, "hostName"> {
export const ExtensionContext: Context<ExtensibilityContext>;

// @public
export const GuestUIFrame: ({ guestId, src, onConnect, onDisconnect, onConnectionError, onResize, methods, privateMethods, sandbox, style, ...customIFrameProps }: GuestUIProps) => JSX.Element;
export const GuestUIFrame: ({ guestId, src, onConnect, onDisconnect, onConnectionError, onResize, methods, privateMethods, sandbox, style, ...customIFrameProps }: GuestUIProps) => React_2.JSX.Element;

// Warning: (ae-forgotten-export) The symbol "FrameProps" needs to be exported by the entry point index.d.ts
//
Expand Down
29 changes: 29 additions & 0 deletions docs/markdown/uix-core.connectiframe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [connectIframe](./uix-core.connectiframe.md)

## connectIframe() function

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Create a CrossRealmObject simulating objects from the provided iframe runtime.

**Signature:**

```typescript
export declare function connectIframe<Expected>(frame: HTMLIFrameElement, tunnelOptions: Partial<TunnelConfig>, apiToSend: unknown): Promise<CrossRealmObject<Expected>>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| frame | HTMLIFrameElement | |
| tunnelOptions | Partial&lt;[TunnelConfig](./uix-core.tunnelconfig.md)<!-- -->&gt; | |
| apiToSend | unknown | |

**Returns:**

Promise&lt;[CrossRealmObject](./uix-core.crossrealmobject.md)<!-- -->&lt;Expected&gt;&gt;

28 changes: 28 additions & 0 deletions docs/markdown/uix-core.connectparentwindow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [connectParentWindow](./uix-core.connectparentwindow.md)

## connectParentWindow() function

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Create a CrossRealmObject in an iframe, simulating objects from the parent window.

**Signature:**

```typescript
export declare function connectParentWindow<Expected>(tunnelOptions: Partial<TunnelConfig>, apiToSend: unknown): Promise<CrossRealmObject<Expected>>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| tunnelOptions | Partial&lt;[TunnelConfig](./uix-core.tunnelconfig.md)<!-- -->&gt; | |
| apiToSend | unknown | |

**Returns:**

Promise&lt;[CrossRealmObject](./uix-core.crossrealmobject.md)<!-- -->&lt;Expected&gt;&gt;

23 changes: 23 additions & 0 deletions docs/markdown/uix-core.crossrealmobject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [CrossRealmObject](./uix-core.crossrealmobject.md)

## CrossRealmObject interface

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Representation of an object on the other side of an iframe/window divide between JS runtimes.

**Signature:**

```typescript
export interface CrossRealmObject<ExpectedApi>
```

## Remarks

At first, xrobject simply returned the proxy to the remote object and did not expose any of the underlying event handling. However, there was no way for a consumer to handle the case where the remote iframe reloaded, which would invalidate all of the simulated objects.

This new manager object exposes the [Tunnel](./uix-core.tunnel.md) object so that consumers can subscribe to the "api" event.

10 changes: 10 additions & 0 deletions docs/markdown/uix-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,22 @@ Core utilities, types and contracts for the Adobe UIX SDK.
| Class | Description |
| --- | --- |
| [Emitter](./uix-core.emitter.md) | <p>Browser-native [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) whose [Emitter.addEventListener()](./uix-core.emitter.addeventlistener.md) method returns an anonymous function which unsubscribes the original handler.</p><p>Also provides typed events via generics. You can create or extend this class to define custom emitters with known event names and signatures.</p> |
| [Tunnel](./uix-core.tunnel.md) | **_(ALPHA)_** An EventEmitter across two documents. It emits events on the remote document and takes subscribers from the local document. |

## Functions

| Function | Description |
| --- | --- |
| [connectIframe(frame, tunnelOptions, apiToSend)](./uix-core.connectiframe.md) | **_(ALPHA)_** Create a CrossRealmObject simulating objects from the provided iframe runtime. |
| [connectParentWindow(tunnelOptions, apiToSend)](./uix-core.connectparentwindow.md) | **_(ALPHA)_** Create a CrossRealmObject in an iframe, simulating objects from the parent window. |

## Interfaces

| Interface | Description |
| --- | --- |
| [CrossRealmObject](./uix-core.crossrealmobject.md) | **_(ALPHA)_** Representation of an object on the other side of an iframe/window divide between JS runtimes. |
| [Extension](./uix-core.extension.md) | /\*\* An individual UI extension retrieved from the registry. |
| [TunnelConfig](./uix-core.tunnelconfig.md) | **_(ALPHA)_** |

## Type Aliases

Expand Down
23 changes: 23 additions & 0 deletions docs/markdown/uix-core.tunnel._constructor_.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [Tunnel](./uix-core.tunnel.md) &gt; [(constructor)](./uix-core.tunnel._constructor_.md)

## Tunnel.(constructor)

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Constructs a new instance of the `Tunnel` class

**Signature:**

```typescript
constructor(config: TunnelConfig);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| config | [TunnelConfig](./uix-core.tunnelconfig.md) | |

14 changes: 14 additions & 0 deletions docs/markdown/uix-core.tunnel.config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [Tunnel](./uix-core.tunnel.md) &gt; [config](./uix-core.tunnel.config.md)

## Tunnel.config property

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
**Signature:**

```typescript
config: TunnelConfig;
```
14 changes: 14 additions & 0 deletions docs/markdown/uix-core.tunnel.emitlocal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [Tunnel](./uix-core.tunnel.md) &gt; [emitLocal](./uix-core.tunnel.emitlocal.md)

## Tunnel.emitLocal property

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
**Signature:**

```typescript
emitLocal: (type: string | symbol, payload?: unknown) => any;
```
14 changes: 14 additions & 0 deletions docs/markdown/uix-core.tunnel.isconnected.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [Tunnel](./uix-core.tunnel.md) &gt; [isConnected](./uix-core.tunnel.isconnected.md)

## Tunnel.isConnected property

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
**Signature:**

```typescript
isConnected: boolean;
```
32 changes: 32 additions & 0 deletions docs/markdown/uix-core.tunnel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [Tunnel](./uix-core.tunnel.md)

## Tunnel class

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
An EventEmitter across two documents. It emits events on the remote document and takes subscribers from the local document.

**Signature:**

```typescript
export declare class Tunnel extends EventEmitter
```
**Extends:** EventEmitter
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(config)](./uix-core.tunnel._constructor_.md) | | **_(ALPHA)_** Constructs a new instance of the <code>Tunnel</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [config](./uix-core.tunnel.config.md) | | [TunnelConfig](./uix-core.tunnelconfig.md) | **_(ALPHA)_** |
| [emitLocal](./uix-core.tunnel.emitlocal.md) | | (type: string \| symbol, payload?: unknown) =&gt; any | **_(ALPHA)_** |
| [isConnected](./uix-core.tunnel.isconnected.md) | | boolean | **_(ALPHA)_** |
16 changes: 16 additions & 0 deletions docs/markdown/uix-core.tunnelconfig.logger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [TunnelConfig](./uix-core.tunnelconfig.md) &gt; [logger](./uix-core.tunnelconfig.logger.md)

## TunnelConfig.logger property

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Logger instance to use for debugging tunnel connection.

**Signature:**

```typescript
logger: Console;
```
24 changes: 24 additions & 0 deletions docs/markdown/uix-core.tunnelconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [TunnelConfig](./uix-core.tunnelconfig.md)

## TunnelConfig interface

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

**Signature:**

```typescript
export interface TunnelConfig
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [logger](./uix-core.tunnelconfig.logger.md) | | Console | **_(ALPHA)_** Logger instance to use for debugging tunnel connection. |
| [targetOrigin](./uix-core.tunnelconfig.targetorigin.md) | | string | **_(ALPHA)_** To ensure secure communication, target origin must be specified, so the tunnel can't connect to an unauthorized domain. Can be '\*' to disable origin checks, but this is discouraged! |
| [timeout](./uix-core.tunnelconfig.timeout.md) | | number | **_(ALPHA)_** A Promise for a tunnel will reject if not connected within timeout (ms). |

16 changes: 16 additions & 0 deletions docs/markdown/uix-core.tunnelconfig.targetorigin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [TunnelConfig](./uix-core.tunnelconfig.md) &gt; [targetOrigin](./uix-core.tunnelconfig.targetorigin.md)

## TunnelConfig.targetOrigin property

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
To ensure secure communication, target origin must be specified, so the tunnel can't connect to an unauthorized domain. Can be '\*' to disable origin checks, but this is discouraged!

**Signature:**

```typescript
targetOrigin: string;
```
16 changes: 16 additions & 0 deletions docs/markdown/uix-core.tunnelconfig.timeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@adobe/uix-core](./uix-core.md) &gt; [TunnelConfig](./uix-core.tunnelconfig.md) &gt; [timeout](./uix-core.tunnelconfig.timeout.md)

## TunnelConfig.timeout property

> This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
A Promise for a tunnel will reject if not connected within timeout (ms).

**Signature:**

```typescript
timeout: number;
```
4 changes: 2 additions & 2 deletions docs/markdown/uix-guest.guestui.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is the object returned when calling [attach()](./uix-guest.attach.md)<!-- -
Unlike the [GuestServer](./uix-guest.guestserver.md)<!-- -->, it cannot register methods or update the , but it remains in sync with the GuestServer and can access the of the control frame, as well as any of the published methods on the host.
Extensible host apps using the React bindings will likely render GuestUI frames using the [GuestUIFrame](./uix-host-react.guestuiframe.md) component.
Extensible host apps using the React bindings will likely render GuestUI frames using the [GuestUIFrame()](./uix-host-react.guestuiframe.md) component.
## Example
Expand Down Expand Up @@ -86,5 +86,5 @@ export default function PopupOverlay(props) {
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [host](./uix-guest.guestui.host.md) | | RemoteHostApis&lt;IHost&gt; | Proxy object for calling methods on the host. |
| [hostConnection](./uix-guest.guestui.hostconnection.md) | <code>protected</code> | CrossRealmObject&lt;UIHostConnection&gt; | |
| [hostConnection](./uix-guest.guestui.hostconnection.md) | <code>protected</code> | [CrossRealmObject](./uix-core.crossrealmobject.md)<!-- -->&lt;UIHostConnection&gt; | |

4 changes: 2 additions & 2 deletions docs/markdown/uix-host-react.extensible.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Declares an extensible area in an app, and provides host and extension objects t
**Signature:**

```typescript
export declare function Extensible({ appName, children, extensionsProvider, guestOptions, runtimeContainer, debug, sharedContext, }: PropsWithChildren<ExtensibleProps>): JSX.Element;
export declare function Extensible({ appName, children, extensionsProvider, guestOptions, runtimeContainer, debug, sharedContext, }: PropsWithChildren<ExtensibleProps>): React.JSX.Element;
```

## Parameters
Expand All @@ -20,7 +20,7 @@ export declare function Extensible({ appName, children, extensionsProvider, gues

**Returns:**

JSX.Element
React.JSX.Element

## Remarks

Expand Down
15 changes: 13 additions & 2 deletions docs/markdown/uix-host-react.extensiblecomponentboundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@

[Home](./index.md) &gt; [@adobe/uix-host-react](./uix-host-react.md) &gt; [ExtensibleComponentBoundary](./uix-host-react.extensiblecomponentboundary.md)

## ExtensibleComponentBoundary variable
## ExtensibleComponentBoundary() function

Wrapper that adds an extension point context to subcomponent tree.

**Signature:**

```typescript
ExtensibleComponentBoundary: ({ extensionPoints, children, }: ExtensibleComponentProps) => JSX.Element
ExtensibleComponentBoundary: ({ extensionPoints, children, }: ExtensibleComponentProps) => React.JSX.Element
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { extensionPoints, children, } | [ExtensibleComponentProps](./uix-host-react.extensiblecomponentprops.md) | |

**Returns:**

React.JSX.Element

15 changes: 13 additions & 2 deletions docs/markdown/uix-host-react.guestuiframe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@

[Home](./index.md) &gt; [@adobe/uix-host-react](./uix-host-react.md) &gt; [GuestUIFrame](./uix-host-react.guestuiframe.md)

## GuestUIFrame variable
## GuestUIFrame() function

An iframe that attaches to a running GuestServer, to display visible UI pages delivered by the Extension server.

**Signature:**

```typescript
GuestUIFrame: ({ guestId, src, onConnect, onDisconnect, onConnectionError, onResize, methods, privateMethods, sandbox, style, ...customIFrameProps }: GuestUIProps) => JSX.Element
GuestUIFrame: ({ guestId, src, onConnect, onDisconnect, onConnectionError, onResize, methods, privateMethods, sandbox, style, ...customIFrameProps }: GuestUIProps) => React.JSX.Element
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { guestId, src, onConnect, onDisconnect, onConnectionError, onResize, methods, privateMethods, sandbox, style, ...customIFrameProps } | [GuestUIProps](./uix-host-react.guestuiprops.md) | |

**Returns:**

React.JSX.Element

Loading

0 comments on commit d00f43a

Please sign in to comment.