chore: run prettier --write .
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export type HeaderProps = {
|
||||
pathname: string;
|
||||
};
|
||||
pathname: string
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ export type HeroProps = {
|
||||
images: {
|
||||
node: Image
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { RTENode } from "../rte/node"
|
||||
|
||||
import type { Node } from "@/types/requests/utils/edges";
|
||||
import type { RenderOptions } from "../rte/option";
|
||||
import type { Embeds } from "@/types/requests/embeds";
|
||||
import type { Node } from "@/types/requests/utils/edges"
|
||||
import type { RenderOptions } from "../rte/option"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
|
||||
export type JsonToHtmlProps = {
|
||||
embeds: Node<Embeds>[]
|
||||
|
||||
2
types/graphql.d.ts
vendored
2
types/graphql.d.ts
vendored
@@ -1 +1 @@
|
||||
declare module '*.graphql'
|
||||
declare module "*.graphql"
|
||||
|
||||
@@ -5,6 +5,6 @@ export const langEnum = {
|
||||
fi: "fi",
|
||||
da: "da",
|
||||
de: "de",
|
||||
};
|
||||
}
|
||||
|
||||
export type Lang = keyof typeof langEnum;
|
||||
export type Lang = keyof typeof langEnum
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { Lang } from './lang';
|
||||
import { Lang } from "./lang"
|
||||
|
||||
export type SearchParams<S = {}> = {
|
||||
searchParams: S & { [key: string]: string };
|
||||
};
|
||||
searchParams: S & { [key: string]: string }
|
||||
}
|
||||
|
||||
export type Params<P = {}> = {
|
||||
params: P;
|
||||
};
|
||||
params: P
|
||||
}
|
||||
|
||||
export type LangParams = {
|
||||
lang: Lang;
|
||||
};
|
||||
lang: Lang
|
||||
}
|
||||
|
||||
export type UriParams = {
|
||||
uri?: string;
|
||||
};
|
||||
uri?: string
|
||||
}
|
||||
|
||||
export type PreviewParams = {
|
||||
uri?: string
|
||||
live_preview?: string
|
||||
}
|
||||
|
||||
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>;
|
||||
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>
|
||||
|
||||
export type PageArgs<P = undefined, S = undefined> = LayoutArgs<P> &
|
||||
(S extends undefined ? {} : SearchParams<S>);
|
||||
(S extends undefined ? {} : SearchParams<S>)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export type Data<T> = {
|
||||
data: T
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,5 +64,4 @@ export type List = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export type ListProps = List
|
||||
|
||||
@@ -20,4 +20,4 @@ export type Puff = {
|
||||
json: RTEDocument
|
||||
}
|
||||
title: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type AllRequestResponse<T> = {
|
||||
items: T[]
|
||||
total: number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface Attributes {
|
||||
}
|
||||
|
||||
export interface RTEAssetAttrs extends Attributes {
|
||||
"alt": string
|
||||
alt: string
|
||||
"asset-alt": string
|
||||
"asset-link": string
|
||||
"asset-name": string
|
||||
@@ -17,8 +17,8 @@ export interface RTEAssetAttrs extends Attributes {
|
||||
"asset-uid": string
|
||||
"display-type": EmbedTypesEnum.display
|
||||
"content-type-uid": "sys_assets"
|
||||
"inline": false
|
||||
"type": RTEItemTypeEnum.asset
|
||||
inline: false
|
||||
type: RTEItemTypeEnum.asset
|
||||
}
|
||||
|
||||
export interface RTEAnchorAttrs extends Attributes {
|
||||
@@ -27,10 +27,10 @@ export interface RTEAnchorAttrs extends Attributes {
|
||||
}
|
||||
|
||||
export interface RTELinkAttrs extends Attributes {
|
||||
'display-type': EmbedTypesEnum.link
|
||||
'class-name': string
|
||||
'content-type-uid': string
|
||||
'entry-uid': string
|
||||
"display-type": EmbedTypesEnum.link
|
||||
"class-name": string
|
||||
"content-type-uid": string
|
||||
"entry-uid": string
|
||||
locale: Lang
|
||||
href: string
|
||||
target: HTMLAnchorElement["target"]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
export enum EmbedTypesEnum {
|
||||
block = 'block',
|
||||
display = 'display',
|
||||
download = 'download',
|
||||
inline = 'inline',
|
||||
link = 'link',
|
||||
block = "block",
|
||||
display = "display",
|
||||
download = "download",
|
||||
inline = "inline",
|
||||
link = "link",
|
||||
}
|
||||
|
||||
export type EmbedTypes = keyof typeof EmbedTypesEnum
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { RTETypeEnum } from "./enums"
|
||||
import type { Attributes, RTEAnchorAttrs, RTEAssetAttrs, RTELinkAttrs } from "./attrs"
|
||||
import type {
|
||||
Attributes,
|
||||
RTEAnchorAttrs,
|
||||
RTEAssetAttrs,
|
||||
RTELinkAttrs,
|
||||
} from "./attrs"
|
||||
import type { EmbedByUid } from "../components/jsontohtml"
|
||||
import type { RenderOptions } from "./option"
|
||||
|
||||
@@ -58,14 +63,26 @@ export type RTEReferenceNode = RTEDefaultNode | RTEAnchorNode
|
||||
|
||||
export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
|
||||
|
||||
export type RTERenderMark = (children: React.ReactNode, classname?: string, id?: string) => JSX.Element
|
||||
export type RTERenderMark = (
|
||||
children: React.ReactNode,
|
||||
classname?: string,
|
||||
id?: string
|
||||
) => JSX.Element
|
||||
|
||||
export interface RTEDocument extends RTEDefaultNode {
|
||||
type: RTETypeEnum.doc
|
||||
_version: number
|
||||
}
|
||||
|
||||
export type RTERenderOptionComponent = (node: RTERegularNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => React.ReactNode
|
||||
|
||||
export type RTENext = (nodes: RTENode[], embeds: EmbedByUid, fullRenderOptions: RenderOptions) => string
|
||||
export type RTERenderOptionComponent = (
|
||||
node: RTERegularNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => React.ReactNode
|
||||
|
||||
export type RTENext = (
|
||||
nodes: RTENode[],
|
||||
embeds: EmbedByUid,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => string
|
||||
|
||||
Reference in New Issue
Block a user