UNPKG

@limitless-angular/sanity

Version:

A powerful Angular library for Sanity.io integration, featuring Portable Text rendering and optimized image loading.

37 lines (36 loc) 2.72 kB
import { TemplateRef, Type } from '@angular/core'; import { isPortableTextBlock, isPortableTextListItemBlock, isPortableTextToolkitList, isPortableTextToolkitSpan, isPortableTextToolkitTextNode } from '@portabletext/toolkit'; import { ArbitraryTypedObject, PortableTextBlock, TypedObject } from '@portabletext/types'; import { BlockComponent } from './block.component'; import { MissingComponentHandler, PortableTextComponents } from '../types'; import { TextComponent } from './text.component'; import { SpanComponent } from './span.component'; import { ListComponent } from './list.component'; import { ListItemComponent } from './list-item.component'; import { trackBy } from '../utils'; import * as i0 from "@angular/core"; export declare class PortableTextComponent<B extends TypedObject = PortableTextBlock | ArbitraryTypedObject> { #private; value: import("@angular/core").InputSignal<B | B[]>; components: import("@angular/core").InputSignal<Partial<PortableTextComponents>>; unknownBlockTmpl: import("@angular/core").Signal<TemplateRef<{ $implicit: TypedObject; }>>; onMissingComponent: import("@angular/core").InputSignal<false | MissingComponentHandler>; blockTemplate: import("@angular/core").Signal<BlockComponent>; listTemplate: import("@angular/core").Signal<ListComponent>; listItemTemplate: import("@angular/core").Signal<ListItemComponent>; spanTemplate: import("@angular/core").Signal<SpanComponent>; textTemplate: import("@angular/core").Signal<TextComponent>; nestedBlocks: import("@angular/core").Signal<(TypedObject | import("@portabletext/toolkit").ToolkitPortableTextHtmlList)[]>; hasCustomComponentForNode: (node: TypedObject) => boolean; getCustomComponentForNode: (node: TypedObject) => Type<unknown>; protected readonly isPortableTextToolkitList: typeof isPortableTextToolkitList; protected readonly isPortableTextListItemBlock: typeof isPortableTextListItemBlock; protected readonly isPortableTextBlock: typeof isPortableTextBlock; protected readonly isPortableTextToolkitSpan: typeof isPortableTextToolkitSpan; protected readonly isPortableTextToolkitTextNode: typeof isPortableTextToolkitTextNode; protected readonly trackBy: typeof trackBy; static ɵfac: i0.ɵɵFactoryDeclaration<PortableTextComponent<any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<PortableTextComponent<any>, "[portable-text]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "components": { "alias": "components"; "required": false; "isSignal": true; }; "onMissingComponent": { "alias": "onMissingComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; }