Skip to content

Commit

Permalink
Auto generated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and dsurducan committed Jan 10, 2024
1 parent e905aaa commit 5cbbbb3
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/pages/docs/api/pages.md
Expand Up @@ -21,6 +21,10 @@
| [TemplateModule](./pages.templatemodule.md) | The type to include in any template file. It defines the available functions and fields that are available to the template. |
| [TemplateProps](./pages.templateprops.md) | The shape of the data passed directly to the different template functions with the exception of the render function (getPath, getHeadConfig, etc). |
| [TemplateRenderProps](./pages.templaterenderprops.md) | The shape of the data passed directly to the template's render function. Extends the [TemplateProps](./pages.templateprops.md) interface and has the additions of a path and a relativePrefixToRoot field. |
| [WidgetConfig](./pages.widgetconfig.md) | The exported <code>config</code> function's definition. |
| [WidgetModule](./pages.widgetmodule.md) | The type to include in any widget file. It defines the available functions and fields that are available to the template. |
| [WidgetProps](./pages.widgetprops.md) | The shape of the data passed directly to the different template functions |
| [WidgetRenderProps](./pages.widgetrenderprops.md) | The shape of the data passed directly to the template's render function. Extends the [TemplateProps](./pages.templateprops.md) interface and has the additions of a path and a relativePrefixToRoot field. |

## Variables

Expand All @@ -47,3 +51,4 @@
| [TagType](./pages.tagtype.md) | Type that enumerates the allowed types of HTML elements in the document header. |
| [Template](./pages.template.md) | The type definition for the template's default function. |
| [TransformProps](./pages.transformprops.md) | The type definition for the template's transformProps function. Can be used to alter and/or augement the props (which include the data document) passed into the template at render time. |
| [Widget](./pages.widget.md) | The type definition for the widget's default function. |
17 changes: 17 additions & 0 deletions packages/pages/docs/api/pages.widget.md
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [Widget](./pages.widget.md)

## Widget type

The type definition for the widget's default function.

**Signature:**

```typescript
export type Widget<T extends WidgetRenderProps> = (
props: T
) => React.JSX.Element;
```

**References:** [WidgetRenderProps](./pages.widgetrenderprops.md)
19 changes: 19 additions & 0 deletions packages/pages/docs/api/pages.widgetconfig.md
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetConfig](./pages.widgetconfig.md)

## WidgetConfig interface

The exported `config` function's definition.

**Signature:**

```typescript
export interface WidgetConfig
```

## Properties

| Property | Modifiers | Type | Description |
| ------------------------------------- | --------- | ------ | -------------------------------------------------------------------------------------------------------- |
| [name?](./pages.widgetconfig.name.md) | | string | _(Optional)_ The name of the widget feature. If not defined uses the widget filename (without extension) |
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.widgetconfig.name.md
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetConfig](./pages.widgetconfig.md) &gt; [name](./pages.widgetconfig.name.md)

## WidgetConfig.name property

The name of the widget feature. If not defined uses the widget filename (without extension)

**Signature:**

```typescript
name?: string;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.widgetmodule.config.md
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetModule](./pages.widgetmodule.md) &gt; [config](./pages.widgetmodule.config.md)

## WidgetModule.config property

The exported config function

**Signature:**

```typescript
config?: WidgetConfig;
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.widgetmodule.default.md
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetModule](./pages.widgetmodule.md) &gt; [default](./pages.widgetmodule.default.md)

## WidgetModule.default property

The exported default widget function. This is expected to be a React Component. If undefined then will be used to generate the HTML instead.

**Signature:**

```typescript
default?: Widget<U>;
```
20 changes: 20 additions & 0 deletions packages/pages/docs/api/pages.widgetmodule.md
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetModule](./pages.widgetmodule.md)

## WidgetModule interface

The type to include in any widget file. It defines the available functions and fields that are available to the template.

**Signature:**

```typescript
export interface WidgetModule<U extends WidgetRenderProps>
```

## Properties

| Property | Modifiers | Type | Description |
| ------------------------------------------- | --------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [config?](./pages.widgetmodule.config.md) | | [WidgetConfig](./pages.widgetconfig.md) | _(Optional)_ The exported config function |
| [default?](./pages.widgetmodule.default.md) | | [Widget](./pages.widget.md)<!-- -->&lt;U&gt; | _(Optional)_ The exported default widget function. This is expected to be a React Component. If undefined then will be used to generate the HTML instead. |
15 changes: 15 additions & 0 deletions packages/pages/docs/api/pages.widgetprops.__meta.md
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetProps](./pages.widgetprops.md) &gt; [\_\_meta](./pages.widgetprops.__meta.md)

## WidgetProps.\_\_meta property

Additional metadata added by the toolchain

**Signature:**

```typescript
__meta: {
mode: "development" | "production";
}
```
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.widgetprops.document.md
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetProps](./pages.widgetprops.md) &gt; [document](./pages.widgetprops.document.md)

## WidgetProps.document property

The entire document returned after applying the stream to a single entity

**Signature:**

```typescript
document: T;
```
20 changes: 20 additions & 0 deletions packages/pages/docs/api/pages.widgetprops.md
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetProps](./pages.widgetprops.md)

## WidgetProps interface

The shape of the data passed directly to the different template functions

**Signature:**

```typescript
export interface WidgetProps<T = Record<string, any>>
```

## Properties

| Property | Modifiers | Type | Description |
| ------------------------------------------- | --------- | ---------------------------------------- | ------------------------------------------------------------------------- |
| [\_\_meta](./pages.widgetprops.__meta.md) | | { mode: "development" \| "production"; } | Additional metadata added by the toolchain |
| [document](./pages.widgetprops.document.md) | | T | The entire document returned after applying the stream to a single entity |
22 changes: 22 additions & 0 deletions packages/pages/docs/api/pages.widgetrenderprops.md
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetRenderProps](./pages.widgetrenderprops.md)

## WidgetRenderProps interface

The shape of the data passed directly to the template's render function. Extends the [TemplateProps](./pages.templateprops.md) interface and has the additions of a path and a relativePrefixToRoot field.

**Signature:**

```typescript
export interface WidgetRenderProps<T = any> extends WidgetProps<T>
```
**Extends:** [WidgetProps](./pages.widgetprops.md)<!-- -->&lt;T&gt;
## Properties
| Property | Modifiers | Type | Description |
| ------------------------------------------------------------------------- | --------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [path](./pages.widgetrenderprops.path.md) | | string | The path that the generated file will live at on the site, as defined by the [GetPath](./pages.getpath.md) function. |
| [relativePrefixToRoot](./pages.widgetrenderprops.relativeprefixtoroot.md) | | string | The relative path from the generated page to the root of the site. i.e. The path example/path/foo would have the relativePrefixToRoot of '../../'. |
13 changes: 13 additions & 0 deletions packages/pages/docs/api/pages.widgetrenderprops.path.md
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetRenderProps](./pages.widgetrenderprops.md) &gt; [path](./pages.widgetrenderprops.path.md)

## WidgetRenderProps.path property

The path that the generated file will live at on the site, as defined by the [GetPath](./pages.getpath.md) function.

**Signature:**

```typescript
path: string;
```
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [WidgetRenderProps](./pages.widgetrenderprops.md) &gt; [relativePrefixToRoot](./pages.widgetrenderprops.relativeprefixtoroot.md)

## WidgetRenderProps.relativePrefixToRoot property

The relative path from the generated page to the root of the site. i.e. The path example/path/foo would have the relativePrefixToRoot of '../../'.

**Signature:**

```typescript
relativePrefixToRoot: string;
```
31 changes: 31 additions & 0 deletions packages/pages/etc/pages.api.md
Expand Up @@ -277,6 +277,37 @@ export interface TemplateRenderProps<T = any> extends TemplateProps<T> {
// @public
export type TransformProps<T extends TemplateProps> = (props: T) => Promise<T>;

// @public
export type Widget<T extends WidgetRenderProps> = (
props: T
) => React_2.JSX.Element;

// @public
export interface WidgetConfig {
name?: string;
}

// @public
export interface WidgetModule<U extends WidgetRenderProps> {
config?: WidgetConfig;
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@yext/pages" does not have an export "render"
default?: Widget<U>;
}

// @public
export interface WidgetProps<T = Record<string, any>> {
__meta: {
mode: "development" | "production";
};
document: T;
}

// @public
export interface WidgetRenderProps<T = any> extends WidgetProps<T> {
path: string;
relativePrefixToRoot: string;
}

// Warnings were encountered during analysis:
//
// dist/types/src/common/src/template/types.d.ts:165:5 - (ae-forgotten-export) The symbol "ProjectStructureConfig" needs to be exported by the entry point index.d.ts
Expand Down

0 comments on commit 5cbbbb3

Please sign in to comment.