@analogjs/content 3.0.0-beta.9 → 3.0.1-beta.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"parse-raw-content-file.mjs","names":[],"sources":["../../src/lib/parse-raw-content-file.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@standard-schema/spec';\nimport fm from 'front-matter';\n\nimport { FrontmatterValidationError } from './frontmatter-validation-error';\n\nexport { FrontmatterValidationError };\n\nexport function parseRawContentFile<\n Attributes extends Record<string, any> = Record<string, any>,\n>(rawContentFile: string): { content: string; attributes: Attributes };\n\nexport function parseRawContentFile<TSchema extends StandardSchemaV1>(\n rawContentFile: string,\n schema: TSchema,\n filename?: string,\n): { content: string; attributes: StandardSchemaV1.InferOutput<TSchema> };\n\nexport function parseRawContentFile(\n rawContentFile: string,\n schema?: StandardSchemaV1,\n filename?: string,\n): { content: string; attributes: unknown } {\n const { body, attributes } = fm(rawContentFile);\n\n if (schema) {\n const result = schema['~standard'].validate(attributes);\n if (\n result != null &&\n typeof (result as PromiseLike<unknown>).then === 'function'\n ) {\n throw new Error(\n 'parseRawContentFile does not support async schema validation. ' +\n 'Use parseRawContentFileAsync() for async schemas.',\n );\n }\n const syncResult = result as StandardSchemaV1.Result<\n StandardSchemaV1.InferOutput<typeof schema>\n >;\n if (syncResult.issues) {\n throw new FrontmatterValidationError(syncResult.issues, filename);\n }\n return { content: body, attributes: syncResult.value };\n }\n\n return { content: body, attributes };\n}\n\nexport async function parseRawContentFileAsync<\n TSchema extends StandardSchemaV1,\n>(\n rawContentFile: string,\n schema: TSchema,\n filename?: string,\n): Promise<{\n content: string;\n attributes: StandardSchemaV1.InferOutput<TSchema>;\n}> {\n const { body, attributes } = fm(rawContentFile);\n const result = await schema['~standard'].validate(attributes);\n if (result.issues) {\n throw new FrontmatterValidationError(result.issues, filename);\n }\n return { content: body, attributes: result.value };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiBA,SAAgB,oBACd,gBACA,QACA,UAAiB;CAEjB,MAAM,EAAE,MAAM,eAAe,GAAG,cAAc;CAE9C,IAAI,QAAQ;EACV,MAAM,SAAS,OAAO,YAAY,CAAC,SAAS,UAAU;EACtD,IACE,UAAU,QACV,OAAQ,OAAgC,SAAS,YAEjD,MAAM,IAAI,MACR,iHACqD;EAGzD,MAAM,aAAa;EAGnB,IAAI,WAAW,QACb,MAAM,IAAI,2BAA2B,WAAW,QAAQ,QAAQ;EAElE,OAAO;GAAE,SAAS;GAAM,YAAY,WAAW;EAAK;CACtD;CAEA,OAAO;EAAE,SAAS;EAAM;CAAU;AACpC;AAEA,eAAsB,yBAGpB,gBACA,QACA,UAAiB;CAKjB,MAAM,EAAE,MAAM,eAAe,GAAG,cAAc;CAC9C,MAAM,SAAS,MAAM,OAAO,YAAY,CAAC,SAAS,UAAU;CAC5D,IAAI,OAAO,QACT,MAAM,IAAI,2BAA2B,OAAO,QAAQ,QAAQ;CAE9D,OAAO;EAAE,SAAS;EAAM,YAAY,OAAO;CAAK;AAClD"}
1
+ {"version":3,"file":"parse-raw-content-file.mjs","names":[],"sources":["../../src/lib/parse-raw-content-file.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@standard-schema/spec';\nimport fm from 'front-matter';\n\nimport { FrontmatterValidationError } from './frontmatter-validation-error';\n\nexport { FrontmatterValidationError };\n\nexport function parseRawContentFile<\n Attributes extends Record<string, any> = Record<string, any>,\n>(rawContentFile: string): { content: string; attributes: Attributes };\n\nexport function parseRawContentFile<TSchema extends StandardSchemaV1>(\n rawContentFile: string,\n schema: TSchema,\n filename?: string,\n): { content: string; attributes: StandardSchemaV1.InferOutput<TSchema> };\n\nexport function parseRawContentFile(\n rawContentFile: string,\n schema?: StandardSchemaV1,\n filename?: string,\n): { content: string; attributes: unknown } {\n const { body, attributes } = fm(rawContentFile);\n\n if (schema) {\n const result = schema['~standard'].validate(attributes);\n if (\n result != null &&\n typeof (result as PromiseLike<unknown>).then === 'function'\n ) {\n throw new Error(\n 'parseRawContentFile does not support async schema validation. ' +\n 'Use parseRawContentFileAsync() for async schemas.',\n );\n }\n const syncResult = result as StandardSchemaV1.Result<\n StandardSchemaV1.InferOutput<typeof schema>\n >;\n if (syncResult.issues) {\n throw new FrontmatterValidationError(syncResult.issues, filename);\n }\n return { content: body, attributes: syncResult.value };\n }\n\n return { content: body, attributes };\n}\n\nexport async function parseRawContentFileAsync<\n TSchema extends StandardSchemaV1,\n>(\n rawContentFile: string,\n schema: TSchema,\n filename?: string,\n): Promise<{\n content: string;\n attributes: StandardSchemaV1.InferOutput<TSchema>;\n}> {\n const { body, attributes } = fm(rawContentFile);\n const result = await schema['~standard'].validate(attributes);\n if (result.issues) {\n throw new FrontmatterValidationError(result.issues, filename);\n }\n return { content: body, attributes: result.value };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAgB,oBACd,gBACA,QACA,UAAiB;CAEjB,MAAM,EAAE,MAAM,eAAe,GAAG,cAAc;CAE9C,IAAI,QAAQ;EACV,MAAM,SAAS,OAAO,YAAY,CAAC,SAAS,UAAU;EACtD,IACE,UAAU,QACV,OAAQ,OAAgC,SAAS,YAEjD,MAAM,IAAI,MACR,iHACqD;EAGzD,MAAM,aAAa;EAGnB,IAAI,WAAW,QACb,MAAM,IAAI,2BAA2B,WAAW,QAAQ,QAAQ;EAElE,OAAO;GAAE,SAAS;GAAM,YAAY,WAAW;EAAK;CACtD;CAEA,OAAO;EAAE,SAAS;EAAM;CAAU;AACpC;AAEA,eAAsB,yBAGpB,gBACA,QACA,UAAiB;CAKjB,MAAM,EAAE,MAAM,eAAe,GAAG,cAAc;CAC9C,MAAM,SAAS,MAAM,OAAO,YAAY,CAAC,SAAS,UAAU;CAC5D,IAAI,OAAO,QACT,MAAM,IAAI,2BAA2B,OAAO,QAAQ,QAAQ;CAE9D,OAAO;EAAE,SAAS;EAAM,YAAY,OAAO;CAAK;AAClD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/content",
3
- "version": "3.0.0-beta.9",
3
+ "version": "3.0.1-beta.1",
4
4
  "description": "Content Rendering for Analog",
5
5
  "type": "module",
6
6
  "author": "Brandon Roberts <robertsbt@gmail.com>",
@@ -27,14 +27,14 @@
27
27
  "@angular/core": "^20.0.0 || ^21.0.0 || ^22.0.0",
28
28
  "@angular/platform-browser": "^20.0.0 || ^21.0.0 || ^22.0.0",
29
29
  "@angular/router": "^20.0.0 || ^21.0.0 || ^22.0.0",
30
- "@nx/devkit": "^23.2.0 || ^24.0.0",
30
+ "@nx/devkit": "^21.2.0 || ^22.0.0 || ^23.0.0 || ^24.0.0",
31
31
  "front-matter": "^4.0.2",
32
32
  "rxjs": "^6.5.0 || ^7.5.0",
33
33
  "@standard-schema/spec": "^1.1.0",
34
34
  "satori": "^0.10.14",
35
35
  "satori-html": "^0.3.2",
36
36
  "sharp": "^0.34.5",
37
- "md4x": ">=0.0.20"
37
+ "md4x": ">=0.0.29"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@nx/devkit": {
@@ -87,11 +87,13 @@
87
87
  }
88
88
  },
89
89
  "dependencies": {
90
+ "entities": "^8.0.0",
90
91
  "tslib": "^2.3.0"
91
92
  },
92
93
  "devDependencies": {
93
- "@analogjs/vite-plugin-angular": "3.0.0-beta.9",
94
- "@analogjs/vitest-angular": "3.0.0-beta.9"
94
+ "@analogjs/vite-plugin-angular": "3.0.1-beta.1",
95
+ "@analogjs/vitest-angular": "3.0.1-beta.1",
96
+ "@nx/devkit": "24.0.0"
95
97
  },
96
98
  "ng-update": {
97
99
  "packageGroup": [
@@ -0,0 +1,10 @@
1
+ interface ParsedNode {
2
+ type: string;
3
+ props: {
4
+ children?: ParsedChild | ParsedChild[];
5
+ [prop: string]: unknown;
6
+ };
7
+ }
8
+ type ParsedChild = string | ParsedNode;
9
+ export declare function parseHtml(element: string): ParsedNode;
10
+ export {};
@@ -1,9 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class AnchorNavigationDirective {
3
3
  private readonly document;
4
+ private readonly host;
4
5
  private readonly location;
5
6
  private readonly router;
6
- handleNavigation(element: EventTarget | null): boolean;
7
+ handleNavigation(target: EventTarget | null, event?: MouseEvent): boolean;
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<AnchorNavigationDirective, never>;
8
9
  static ɵdir: i0.ɵɵDirectiveDeclaration<AnchorNavigationDirective, "[analogAnchorNavigation]", never, {}, {}, never, never, true, never>;
9
10
  }
@@ -1,8 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class RenderTaskService {
3
3
  #private;
4
- addRenderTask(): number;
5
- clearRenderTask(clear: number | (() => void)): void;
4
+ addRenderTask(): () => void;
5
+ clearRenderTask(clear: () => void): void;
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<RenderTaskService, never>;
7
7
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
8
8
  }