@analogjs/content 2.0.0-alpha.9 → 2.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/fesm2022/analogjs-content-og.mjs.map +1 -1
  2. package/fesm2022/analogjs-content-prism-highlighter.mjs +4 -4
  3. package/fesm2022/analogjs-content-prism-highlighter.mjs.map +1 -1
  4. package/fesm2022/analogjs-content-resources.mjs +84 -0
  5. package/fesm2022/analogjs-content-resources.mjs.map +1 -0
  6. package/fesm2022/analogjs-content-shiki-highlighter.mjs +1 -1
  7. package/fesm2022/analogjs-content-shiki-highlighter.mjs.map +1 -1
  8. package/fesm2022/analogjs-content.mjs +80 -72
  9. package/fesm2022/analogjs-content.mjs.map +1 -1
  10. package/index.d.ts +160 -12
  11. package/og/index.d.ts +19 -2
  12. package/package.json +17 -6
  13. package/plugin/migrations.json +2 -24
  14. package/prism-highlighter/index.d.ts +14 -7
  15. package/resources/README.md +3 -0
  16. package/resources/index.d.ts +20 -0
  17. package/resources/package.json +3 -0
  18. package/shiki-highlighter/index.d.ts +8 -4
  19. package/lib/anchor-navigation.directive.d.ts +0 -9
  20. package/lib/content-file.d.ts +0 -6
  21. package/lib/content-files-list-token.d.ts +0 -3
  22. package/lib/content-files-token.d.ts +0 -2
  23. package/lib/content-renderer.d.ts +0 -25
  24. package/lib/content.d.ts +0 -14
  25. package/lib/get-content-files.d.ts +0 -15
  26. package/lib/inject-content-files.d.ts +0 -3
  27. package/lib/markdown-content-renderer.service.d.ts +0 -13
  28. package/lib/markdown-route.component.d.ts +0 -15
  29. package/lib/markdown.component.d.ts +0 -29
  30. package/lib/marked-content-highlighter.d.ts +0 -19
  31. package/lib/marked-setup.service.d.ts +0 -10
  32. package/lib/parse-raw-content-file.d.ts +0 -4
  33. package/lib/provide-content.d.ts +0 -7
  34. package/lib/render-task.service.d.ts +0 -8
  35. package/lib/utils/zone-wait-for.d.ts +0 -2
  36. package/og/lib/og.d.ts +0 -5
  37. package/og/lib/options.d.ts +0 -11
  38. package/prism-highlighter/lib/prism/angular.d.ts +0 -0
  39. package/prism-highlighter/lib/prism-highlighter.d.ts +0 -8
@@ -1,15 +0,0 @@
1
- /**
2
- * Returns the list of content files by filename with ?analog-content-list=true.
3
- * We use the query param to transform the return into an array of
4
- * just front matter attributes.
5
- *
6
- * @returns
7
- */
8
- export declare const getContentFilesList: () => Record<string, Record<string, any>>;
9
- /**
10
- * Returns the lazy loaded content files for lookups.
11
- *
12
- * @returns
13
- */
14
- export declare const getContentFiles: () => {};
15
- export declare const getAgxFiles: () => {};
@@ -1,3 +0,0 @@
1
- import { ContentFile } from './content-file';
2
- export declare function injectContentFiles<Attributes extends Record<string, any>>(filterFn?: InjectContentFilesFilterFunction<Attributes>): ContentFile<Attributes>[];
3
- export type InjectContentFilesFilterFunction<T extends Record<string, any>> = (value: ContentFile<T>, index: number, array: ContentFile<T>[]) => boolean;
@@ -1,13 +0,0 @@
1
- import { ContentRenderer, TableOfContentItem } from './content-renderer';
2
- import * as i0 from "@angular/core";
3
- export declare class MarkdownContentRendererService implements ContentRenderer {
4
- #private;
5
- render(content: string): Promise<string>;
6
- /**
7
- * The method is meant to be called after `render()`
8
- */
9
- getContentHeadings(): TableOfContentItem[];
10
- enhance(): void;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownContentRendererService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<MarkdownContentRendererService>;
13
- }
@@ -1,15 +0,0 @@
1
- import { AfterViewChecked } from '@angular/core';
2
- import { SafeHtml } from '@angular/platform-browser';
3
- import { ContentRenderer } from './content-renderer';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "./anchor-navigation.directive";
6
- export default class AnalogMarkdownRouteComponent implements AfterViewChecked {
7
- private sanitizer;
8
- private route;
9
- contentRenderer: ContentRenderer;
10
- protected content: SafeHtml;
11
- classes: string;
12
- ngAfterViewChecked(): void;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<AnalogMarkdownRouteComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<AnalogMarkdownRouteComponent, "analog-markdown-route", never, { "classes": { "alias": "classes"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.AnchorNavigationDirective; inputs: {}; outputs: {}; }]>;
15
- }
@@ -1,29 +0,0 @@
1
- import { AfterViewChecked, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
2
- import { SafeHtml } from '@angular/platform-browser';
3
- import { Observable } from 'rxjs';
4
- import { ContentRenderer } from './content-renderer';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "./anchor-navigation.directive";
7
- export default class AnalogMarkdownComponent implements OnInit, OnChanges, AfterViewChecked {
8
- private sanitizer;
9
- private route;
10
- private zone;
11
- private readonly platformId;
12
- private readonly mermaidImport;
13
- private mermaid;
14
- content$: Observable<SafeHtml>;
15
- content: string | object | undefined | null;
16
- classes: string;
17
- container: ViewContainerRef;
18
- contentRenderer: ContentRenderer;
19
- constructor();
20
- ngOnInit(): void;
21
- ngOnChanges(): void;
22
- updateContent(): void;
23
- getContentSource(): Observable<string | SafeHtml>;
24
- renderContent(content: string): Promise<string>;
25
- ngAfterViewChecked(): void;
26
- private loadMermaid;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<AnalogMarkdownComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<AnalogMarkdownComponent, "analog-markdown", never, { "content": { "alias": "content"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.AnchorNavigationDirective; inputs: {}; outputs: {}; }]>;
29
- }
@@ -1,19 +0,0 @@
1
- import { AbstractType, Provider, ProviderToken, Type } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export interface MarkedContentHighlighter {
4
- augmentCodeBlock?(code: string, lang: string): string;
5
- }
6
- export declare abstract class MarkedContentHighlighter {
7
- abstract getHighlightExtension(): import('marked').MarkedExtension;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<MarkedContentHighlighter, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<MarkedContentHighlighter>;
10
- }
11
- export declare function withHighlighter(provider: ({
12
- useValue: MarkedContentHighlighter;
13
- } | {
14
- useClass: Type<MarkedContentHighlighter> | AbstractType<MarkedContentHighlighter>;
15
- } | {
16
- useFactory: (...deps: any[]) => MarkedContentHighlighter;
17
- }) & {
18
- deps?: ProviderToken<any>[];
19
- }): Provider;
@@ -1,10 +0,0 @@
1
- import { marked } from 'marked';
2
- import * as i0 from "@angular/core";
3
- export declare class MarkedSetupService {
4
- private readonly marked;
5
- private readonly highlighter;
6
- constructor();
7
- getMarkedInstance(): typeof marked;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<MarkedSetupService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<MarkedSetupService>;
10
- }
@@ -1,4 +0,0 @@
1
- export declare function parseRawContentFile<Attributes extends Record<string, any>>(rawContentFile: string): {
2
- content: string;
3
- attributes: Attributes;
4
- };
@@ -1,7 +0,0 @@
1
- import { Provider, InjectionToken } from '@angular/core';
2
- export interface MarkdownRendererOptions {
3
- loadMermaid?: () => Promise<typeof import('mermaid')>;
4
- }
5
- export declare function withMarkdownRenderer(options?: MarkdownRendererOptions): Provider;
6
- export declare function provideContent(...features: Provider[]): Provider[];
7
- export declare const MERMAID_IMPORT_TOKEN: InjectionToken<Promise<typeof import("mermaid")>>;
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class RenderTaskService {
3
- #private;
4
- addRenderTask(): number;
5
- clearRenderTask(clear: number | Function): void;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<RenderTaskService, never>;
7
- static ɵprov: i0.ɵɵInjectableDeclaration<RenderTaskService>;
8
- }
@@ -1,2 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- export declare function waitFor<T>(prom: Promise<T> | Observable<T>): Promise<T>;
package/og/lib/og.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { ImageResponseOptions } from './options.js';
2
- export declare const generateImage: (element: string, options: ImageResponseOptions) => Promise<Buffer>;
3
- export declare class ImageResponse extends Response {
4
- constructor(element: string, options?: ImageResponseOptions);
5
- }
@@ -1,11 +0,0 @@
1
- import type { SatoriOptions } from 'satori/wasm';
2
- export interface ImageResponseOptions {
3
- width?: number;
4
- height?: number;
5
- fonts?: SatoriOptions['fonts'];
6
- debug?: boolean;
7
- status?: number;
8
- statusText?: string;
9
- headers?: Record<string, string>;
10
- tailwindConfig?: SatoriOptions['tailwindConfig'];
11
- }
File without changes
@@ -1,8 +0,0 @@
1
- import { MarkedContentHighlighter } from '@analogjs/content';
2
- import * as i0 from "@angular/core";
3
- export declare class PrismHighlighter extends MarkedContentHighlighter {
4
- augmentCodeBlock(code: string, lang: string): string;
5
- getHighlightExtension(): import("marked").MarkedExtension;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<PrismHighlighter, never>;
7
- static ɵprov: i0.ɵɵInjectableDeclaration<PrismHighlighter>;
8
- }