@junejs/pdf 0.2.2 → 0.2.3

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,4 +1,2 @@
1
- //#region src/bidi-classes.d.ts
2
1
  export declare const UNICODE_VERSION = "17.0.0";
3
- export declare const STRONG: readonly number[];
4
- //#endregion
2
+ export declare const STRONG: readonly number[];
@@ -1,4 +1,4 @@
1
- //#region src/bidi-classes.ts
1
+ // src/bidi-classes.ts
2
2
  const UNICODE_VERSION = "17.0.0";
3
3
  const STRONG = [
4
4
  65,
@@ -1694,5 +1694,4 @@ const STRONG = [
1694
1694
  1114109,
1695
1695
  0
1696
1696
  ];
1697
- //#endregion
1698
1697
  export { STRONG, UNICODE_VERSION };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PdfDocument, PdfPaper, PdfRenderError, PdfRenderer } from "./renderer.js";
2
1
  import { PdfToolsOptions, RenderPdfInput, RenderPdfResult, pdfFilename, pdfTools } from "./tools.js";
2
+ import { PdfDocument, PdfPaper, PdfRenderError, PdfRenderer } from "./renderer.js";
3
3
  import { TypstSourceOptions, markdownToTypst, typstSource } from "./markdown-typst.js";
4
4
  export { type PdfDocument, type PdfPaper, PdfRenderError, type PdfRenderer, type PdfToolsOptions, type RenderPdfInput, type RenderPdfResult, type TypstSourceOptions, markdownToTypst, pdfFilename, pdfTools, typstSource };
@@ -1,8 +1,6 @@
1
1
  import { PdfDocument } from "./renderer.js";
2
- //#region src/markdown-typst.d.ts
3
2
  export type TypstSourceOptions = {
4
3
  fonts?: string[];
5
4
  };
6
5
  export declare function markdownToTypst(markdown: string): string;
7
- export declare function typstSource(doc: PdfDocument, opts?: TypstSourceOptions): string;
8
- //#endregion
6
+ export declare function typstSource(doc: PdfDocument, opts?: TypstSourceOptions): string;
@@ -1,6 +1,6 @@
1
1
  import { STRONG } from "./bidi-classes.js";
2
2
  import { Lexer } from "marked";
3
- //#region src/markdown-typst.ts
3
+ // src/markdown-typst.ts
4
4
  function markdownToTypst(markdown) {
5
5
  return body(lex(markdown));
6
6
  }
@@ -275,5 +275,4 @@ function decodeEntities(s) {
275
275
  return NAMED[e.toLowerCase()] ?? m;
276
276
  });
277
277
  }
278
- //#endregion
279
278
  export { markdownToTypst, typstSource };
@@ -1,4 +1,3 @@
1
- //#region src/renderer.d.ts
2
1
  export type PdfDocument = {
3
2
  markdown: string;
4
3
  title?: string;
@@ -15,5 +14,4 @@ export declare class PdfRenderError extends Error {
15
14
  constructor(message: string, options?: {
16
15
  cause?: unknown;
17
16
  });
18
- }
19
- //#endregion
17
+ }
package/dist/renderer.js CHANGED
@@ -1,9 +1,8 @@
1
- //#region src/renderer.ts
1
+ // src/renderer.ts
2
2
  var PdfRenderError = class extends Error {
3
3
  constructor(message, options) {
4
4
  super(message, options);
5
5
  this.name = "PdfRenderError";
6
6
  }
7
7
  };
8
- //#endregion
9
8
  export { PdfRenderError };
package/dist/tools.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { PdfDocument, PdfPaper, PdfRenderer } from "./renderer.js";
2
2
  import { FileRef } from "@junejs/core/agent-files";
3
3
  import { Tool } from "@junejs/core/agent-runtime";
4
- //#region src/tools.d.ts
5
4
  export type PdfToolsOptions = {
6
5
  renderer: PdfRenderer;
7
6
  name?: string;
@@ -21,5 +20,4 @@ export type RenderPdfResult = {
21
20
  note: string;
22
21
  };
23
22
  export declare function pdfTools(opts: PdfToolsOptions): Tool[];
24
- export declare function pdfFilename(raw: string): string;
25
- //#endregion
23
+ export declare function pdfFilename(raw: string): string;
package/dist/tools.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/tools.ts
1
+ // src/tools.ts
2
2
  const PDF_MEDIA_TYPE = "application/pdf";
3
3
  const MAX_MARKDOWN = 2e5;
4
4
  function pdfTools(opts) {
@@ -115,5 +115,4 @@ function formatSize(bytes) {
115
115
  if (bytes < 1048576) return `${(bytes / 1024).toFixed(0)} KB`;
116
116
  return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
117
117
  }
118
- //#endregion
119
118
  export { pdfFilename, pdfTools };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junejs/pdf",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "June — PDF output as an agent capability: a render_pdf tool over a replaceable PdfRenderer (@junejs/pdf-typst-wasm is June's).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "build": "tsdown"
25
25
  },
26
26
  "dependencies": {
27
- "@junejs/core": "^0.2.2",
27
+ "@junejs/core": "^0.2.3",
28
28
  "marked": "^18.0.14"
29
29
  },
30
30
  "keywords": [