UNPKG

@davidlj95/ngx-meta

Version:

Set your Angular site's metadata: standard meta tags, Open Graph, Twitter Cards, JSON-LD structured data and more. Supports SSR (and Angular Universal). Use a service. Use routes' data. Set it up in a flash! 🚀

592 lines (588 loc) 16.2 kB
// Generated by dts-bundle-generator v9.5.1 import * as i0 from '@angular/core'; import { Provider } from '@angular/core'; /** * Manages the {@link OpenGraph.description} metadata * @public */ export declare const provideOpenGraphDescription: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphDescription} * @deprecated Use {@link provideOpenGraphDescription} instead * @public */ export declare const OPEN_GRAPH_DESCRIPTION_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraph.image} metadata * @public */ export declare const provideOpenGraphImage: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphImage} * @deprecated Use {@link provideOpenGraphImage} instead * @public */ export declare const OPEN_GRAPH_IMAGE_METADATA_PROVIDER: import("@angular/core").Provider; /** * See {@link OpenGraph.image} * @public */ export interface OpenGraphImage { /** * An image URL which should represent your object within the graph. * * Can be set with {@link GlobalMetadataImage.url}. * * @remarks * * See also: * * - {@link https://ogp.me/#structured:~:text=og%3Aimage%3Aurl | Property specs} */ readonly url?: URL | string; /** * A description of what is in the image (not a caption). If the page * specifies an `og:image` it should specify `og:image:alt`. * * Can be set with {@link GlobalMetadataImage.alt}. * * @remarks * * See also: * * - {@link https://ogp.me/#structured:~:text=og%3Aimage%3Aalt | Property specs} */ readonly alt?: string; /** * An alternate url to use if the webpage requires HTTPS. * * @remarks * * See also: * * - {@link https://ogp.me/#structured:~:text=og%3Aimage%3Asecure_url | Property specs} */ readonly secureUrl?: URL | string | null; /** * A MIME type for this image. * * @remarks * * See also: * * - {@link https://ogp.me/#structured:~:text=og%3Aimage%3Atype | Property specs} */ readonly type?: string | null; /** * The number of pixels wide. * * @remarks * * See also: * * - {@link https://ogp.me/#structured:~:text=og%3Aimage%3Awidth | Property specs} */ readonly width?: number | null; /** * The number of pixels high. * * @remarks * * See also: * * - {@link https://ogp.me/#structured:~:text=og%3Aimage%3Aheight | Property specs} */ readonly height?: number | null; } /** * Manages the {@link OpenGraph.locale} metadata * @public */ export declare const provideOpenGraphLocale: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphLocale} * @deprecated Use {@link provideOpenGraphLocale} instead * @public */ export declare const OPEN_GRAPH_LOCALE_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraph.siteName} metadata * @public */ export declare const provideOpenGraphSiteName: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphSiteName} * @deprecated Use {@link provideOpenGraphSiteName} instead * @public */ export declare const OPEN_GRAPH_SITE_NAME_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraph.title} metadata * @public */ export declare const provideOpenGraphTitle: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphTitle} * @deprecated Use {@link provideOpenGraphTitle} instead * @public */ export declare const OPEN_GRAPH_TITLE_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraph."type"} metadata * @public */ export declare const provideOpenGraphType: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphType} * @deprecated Use {@link provideOpenGraphType} instead * @public */ export declare const OPEN_GRAPH_TYPE_METADATA_PROVIDER: import("@angular/core").Provider; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_MUSIC_SONG = "music.song"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_MUSIC_ALBUM = "music.album"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_MUSIC_PLAYLIST = "music.playlist"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_MUSIC_RADIO_STATION = "music.radio_station"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_VIDEO_MOVIE = "video.movie"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_VIDEO_EPISODE = "video.episode"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_VIDEO_TV_SHOW = "video.tv_show"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_VIDEO_OTHER = "video.other"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_ARTICLE = "article"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_BOOK = "book"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_PROFILE = "profile"; /** * See {@link OpenGraphType} * @public */ export declare const OPEN_GRAPH_TYPE_WEBSITE = "website"; /** * Types for {@link OpenGraph."type"} property * * @remarks * * Use one of the referenced constants to avoid typing them yourself :) * * @public */ export type OpenGraphType = typeof OPEN_GRAPH_TYPE_MUSIC_SONG | typeof OPEN_GRAPH_TYPE_MUSIC_ALBUM | typeof OPEN_GRAPH_TYPE_MUSIC_PLAYLIST | typeof OPEN_GRAPH_TYPE_MUSIC_RADIO_STATION | typeof OPEN_GRAPH_TYPE_VIDEO_MOVIE | typeof OPEN_GRAPH_TYPE_VIDEO_EPISODE | typeof OPEN_GRAPH_TYPE_VIDEO_TV_SHOW | typeof OPEN_GRAPH_TYPE_VIDEO_OTHER | typeof OPEN_GRAPH_TYPE_ARTICLE | typeof OPEN_GRAPH_TYPE_BOOK | typeof OPEN_GRAPH_TYPE_PROFILE | typeof OPEN_GRAPH_TYPE_WEBSITE; /** * Manages the {@link OpenGraph.url} metadata * @public */ export declare const provideOpenGraphUrl: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphUrl} * @deprecated Use {@link provideOpenGraphUrl} instead * @public */ export declare const OPEN_GRAPH_URL_METADATA_PROVIDER: import("@angular/core").Provider; /** * Provides {@link https://ngx-meta.dev/built-in-modules/open-graph/ | Open Graph module} * basic and optional metadata managers. * * Check out {@link provideNgxMetaOpenGraph} for the standalone, recommended API. * * @public */ export declare class NgxMetaOpenGraphModule { static ɵfac: i0.ɵɵFactoryDeclaration<NgxMetaOpenGraphModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMetaOpenGraphModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<NgxMetaOpenGraphModule>; } /** * Provides {@link https://ngx-meta.dev/built-in-modules/open-graph/ | Open Graph module} * basic and optional metadata managers. * * @remarks * * This is the standalone, recommended API. Using this API is preferred. * However, you may also use {@link NgxMetaOpenGraphModule} as the Angular module-based equivalent API. * * @public */ export declare const provideNgxMetaOpenGraph: () => Provider; /** * See {@link OpenGraphProfileGender} * @public */ export declare const OPEN_GRAPH_PROFILE_GENDER_FEMALE = "female"; /** * See {@link OpenGraphProfileGender} * @public */ export declare const OPEN_GRAPH_PROFILE_GENDER_MALE = "male"; /** * Genders for {@link OpenGraphProfile.gender} property * * @remarks * * Use one of the referenced constants to avoid typing them yourself :) * * @public */ export type OpenGraphProfileGender = typeof OPEN_GRAPH_PROFILE_GENDER_FEMALE | typeof OPEN_GRAPH_PROFILE_GENDER_MALE; /** * Open Graph profile metadata for this page. * * <b>Requires Open Graph profile metadata managers to work</b> * * @remarks * * Used in {@link OpenGraph.profile} with type {@link OpenGraphProfile} * * Provider: * * {@link provideNgxMetaOpenGraphProfile} or {@link NgxMetaOpenGraphProfileModule} * * See also: * * - {@link https://ogp.me/#type_profile | Open Graph profile specs} * * @public */ export interface OpenGraphProfile { /** * A name normally given to an individual by a parent or self-chosen. * * @remarks * * Provider: * * {@link provideOpenGraphProfileFirstName} * * See also: * * - {@link https://ogp.me/#type_profile:~:text=profile%3Afirst_name%20%2D%20string | Property specs} */ readonly firstName?: string | null; /** * A name inherited from a family or marriage and by which the individual is commonly known. * * @remarks * * Provider: * * {@link provideOpenGraphProfileLastName} * * See also: * * - {@link https://ogp.me/#type_profile:~:text=profile%3Alast_name%20%2D%20string | Property specs} */ readonly lastName?: string | null; /** * A short unique string to identify them. * * @remarks * * Provider: * * {@link provideOpenGraphProfileUsername} * * See also: * * - {@link https://ogp.me/#type_profile:~:text=profile%3Ausername%20%2D%20string | Property specs} */ readonly username?: string | null; /** * Their gender. * * Allowing a string here too, so you can specify another gender than the ones * specified by standard (male, female). * * Check out {@link OpenGraphProfileGender} type for constants you can use to * specify standard values for this field. * * @remarks * * Provider: * * {@link provideOpenGraphProfileGender} * * See also: * * - {@link https://ogp.me/#type_profile:~:text=profile%3Agender%20%2D%20enum | Property specs} */ readonly gender?: OpenGraphProfileGender | string | null; } /** * Manages the {@link OpenGraphProfile.firstName} metadata * @public */ export declare const provideOpenGraphProfileFirstName: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphProfileFirstName} * @deprecated Use {@link provideOpenGraphProfileFirstName} instead * @public */ export declare const OPEN_GRAPH_PROFILE_FIRST_NAME_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraphProfile.lastName} metadata * @public */ export declare const provideOpenGraphProfileLastName: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphProfileLastName} * @deprecated Use {@link provideOpenGraphProfileLastName} instead * @public */ export declare const OPEN_GRAPH_PROFILE_LAST_NAME_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraphProfile.gender} metadata * @public */ export declare const provideOpenGraphProfileGender: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphProfileGender} * @deprecated Use {@link provideOpenGraphProfileGender} instead * @public */ export declare const OPEN_GRAPH_PROFILE_GENDER_METADATA_PROVIDER: import("@angular/core").Provider; /** * Manages the {@link OpenGraphProfile.username} metadata * @public */ export declare const provideOpenGraphProfileUsername: () => import("@angular/core").Provider; /** * {@inheritDoc provideOpenGraphProfileUsername} * @deprecated Use {@link provideOpenGraphProfileUsername} instead * @public */ export declare const OPEN_GRAPH_PROFILE_USERNAME_METADATA_PROVIDER: import("@angular/core").Provider; /** * Provides {@link https://ngx-meta.dev/built-in-modules/open-graph/ | Open Graph module} * profile metadata managers. * * Check out {@link provideNgxMetaOpenGraphProfile} for the standalone, recommended API. * * @public */ export declare class NgxMetaOpenGraphProfileModule { static ɵfac: i0.ɵɵFactoryDeclaration<NgxMetaOpenGraphProfileModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMetaOpenGraphProfileModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<NgxMetaOpenGraphProfileModule>; } /** * Provides {@link https://ngx-meta.dev/built-in-modules/open-graph/ | Open Graph module} * profile metadata managers * * @remarks * * This is the standalone, recommended API. Using this API is preferred. * However, you may also use {@link NgxMetaOpenGraphProfileModule} as the Angular module-based equivalent API. * * @public */ export declare const provideNgxMetaOpenGraphProfile: () => Provider; declare const ANGULAR_ROUTER_URL: unique symbol; type AngularRouterUrl = typeof ANGULAR_ROUTER_URL; /** * {@link https://ngx-meta.dev/built-in-modules/open-graph/ | Open Graph module} * metadata values that can be set. * * @public */ export interface OpenGraph { /** * Basic metadata. * * The title of your object as it should appear within the graph, e.g., * "The Rock". * * Can be set with {@link GlobalMetadata.title}. * * Title will be formatted if {@link https://ngx-meta.dev/guides/title-formatting | title formatting} is set up. * * @remarks * * Provider: * * {@link provideOpenGraphTitle} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Atitle | Property specs} */ readonly title?: string | null; /** * Basic metadata. * * The type of your object, e.g., "`video.movie`". Depending on the type you * specify, other properties may also be required. * * See {@link OpenGraphType} for a list of `const`s you can use to specify * the type, so you don't have to write them yourself. * * @remarks * * Provider: * * {@link provideOpenGraphType} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Atypes | Property specs} * * - {@link https://ogp.me/#types | Available object types in spec} */ readonly type?: OpenGraphType | null; /** * Basic metadata. * * An image which should represent your object within the graph. * * Can be set (partially) with {@link GlobalMetadata.image}. * * @remarks * * Provider: * * {@link provideOpenGraphImage} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Aimage | Property specs} * * - {@link https://ogp.me/#structured:~:text=The%20og%3Aimage | Structured property specs} */ readonly image?: OpenGraphImage | null; /** * Basic metadata. * * The canonical URL of your object that will be used as its permanent ID in * the graph, e.g., "https://www.imdb.com/title/tt0117500/". * * Can be set with {@link GlobalMetadata.canonicalUrl}. * * An absolute URL is needed unless {@link https://ngx-meta.dev/guides/url-resolution/ | URL resolution} * feature is enabled, which allows you to provide a relative URL to be resolved by the library into an * absolute one. * * @remarks * * Provider: * * {@link provideOpenGraphUrl} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Aurl | Property specs} */ readonly url?: URL | AngularRouterUrl | string | null; /** * Optional metadata. * * A one to two sentence description of your object. * * Can be set with {@link GlobalMetadata.description}. * * @remarks * * Provider: * * {@link provideOpenGraphDescription} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Adescription | Property specs} */ readonly description?: string | null; /** * Optional metadata. * * The locale these tags are marked up in. Of the format `language_TERRITORY`. * If missing, assumed to be `en_US` as per Open Graph specs. * * Can be set with {@link GlobalMetadata.locale}. * * @remarks * * Provider: * * {@link provideOpenGraphLocale} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Alocale | Property specs} */ readonly locale?: string | null; /** * Optional metadata. * * If your object is part of a larger website, the name which should be * displayed for the overall site. e.g., "IMDb". * * Can be set with {@link GlobalMetadata.applicationName}. * * @remarks * * Provider: * * {@link provideOpenGraphSiteName} * * See also: * * - {@link https://ogp.me/#:~:text=og%3Asite_name | Property specs} */ readonly siteName?: string | null; /** * {@inheritDoc OpenGraphProfile} */ readonly profile?: OpenGraphProfile; } /** * Utility type to provide specific * {@link https://ngx-meta.dev/built-in-modules/open-graph/ | Open Graph module} * metadata. * * @public */ export interface OpenGraphMetadata { /** * {@inheritDoc OpenGraph} */ openGraph: OpenGraph; } export {};