@junejs/pdf-font-noto-sans-kr 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.
package/dist/node.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { n as NotoSansKROptions, r as NotoSansKRWeight } from "./provider-BiqtA6ZU.js";
2
- //#region src/node.d.ts
1
+ import { n as NotoSansKROptions, r as NotoSansKRWeight } from "./provider-BiQ9K5mm.js";
3
2
  export declare function notoSansKR(opts?: NotoSansKROptions): import("@junejs/pdf-typst-wasm").FontProvider;
4
- //#endregion
5
3
  export type { NotoSansKROptions, NotoSansKRWeight };
package/dist/node.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as createNotoSansKR, n as MISSING, t as FILES } from "./provider-BhoN_t0i.js";
1
+ import { i as createNotoSansKR, n as MISSING, t as FILES } from "./provider-BKzLgZkt.js";
2
2
  import { readFile } from "node:fs/promises";
3
- //#region src/node.ts
3
+ // src/node.ts
4
4
  function notoSansKR(opts = {}) {
5
5
  return createNotoSansKR(async (weight) => {
6
6
  try {
@@ -10,5 +10,4 @@ function notoSansKR(opts = {}) {
10
10
  }
11
11
  }, opts);
12
12
  }
13
- //#endregion
14
13
  export { notoSansKR };
@@ -1,4 +1,4 @@
1
- //#region src/provider.ts
1
+ // src/provider.ts
2
2
  function createNotoSansKR(load, opts = {}, egress = []) {
3
3
  const weights = [...new Set(opts.weights ?? [400, 700])];
4
4
  for (const w of weights) if (w !== 400 && w !== 700) throw new Error(`notoSansKR: no weight ${w} (this package ships 400 and 700)`);
@@ -24,5 +24,4 @@ const FILES = {
24
24
  700: NOTO_SANS_KR[700].name
25
25
  };
26
26
  const MISSING = "@junejs/pdf-font-noto-sans-kr: its font files are missing — in the June repo, run `bun scripts/fetch-fonts.ts` in packages/pdf-font-noto-sans-kr";
27
- //#endregion
28
27
  export { createNotoSansKR as i, MISSING as n, NOTO_SANS_KR as r, FILES as t };
@@ -1,5 +1,4 @@
1
1
  import { FontEgress } from "@junejs/pdf-typst-wasm";
2
- //#region src/assets.d.ts
3
2
  type AssetRef = {
4
3
  name: string;
5
4
  sha256: string;
@@ -8,12 +7,9 @@ type AssetRef = {
8
7
  };
9
8
  type AssetLoader = (ref: AssetRef) => Promise<Uint8Array | ArrayBuffer>;
10
9
  declare function loadVerified(ref: AssetRef, load: AssetLoader): Promise<Uint8Array>;
11
- //#endregion
12
- //#region src/provider.d.ts
13
10
  type NotoSansKRWeight = 400 | 700;
14
11
  type NotoSansKROptions = {
15
12
  weights?: NotoSansKRWeight[];
16
13
  };
17
14
  declare const NOTO_SANS_KR: Record<NotoSansKRWeight, AssetRef>;
18
- //#endregion
19
15
  export { AssetRef as a, AssetLoader as i, NotoSansKROptions as n, loadVerified as o, NotoSansKRWeight as r, NOTO_SANS_KR as t };
@@ -1,10 +1,8 @@
1
- import { a as AssetRef, i as AssetLoader, n as NotoSansKROptions, o as loadVerified, r as NotoSansKRWeight, t as NOTO_SANS_KR } from "./provider-BiqtA6ZU.js";
1
+ import { a as AssetRef, i as AssetLoader, n as NotoSansKROptions, o as loadVerified, r as NotoSansKRWeight, t as NOTO_SANS_KR } from "./provider-BiQ9K5mm.js";
2
2
  import { FontEgress } from "@junejs/pdf-typst-wasm";
3
- //#region src/unbundled.d.ts
4
3
  export type UnbundledNotoSansKROptions = NotoSansKROptions & {
5
4
  load: AssetLoader;
6
5
  egress?: FontEgress[];
7
6
  };
8
7
  export declare function notoSansKR(opts: UnbundledNotoSansKROptions): import("@junejs/pdf-typst-wasm").FontProvider;
9
- //#endregion
10
8
  export { type AssetLoader, type AssetRef, NOTO_SANS_KR, type NotoSansKROptions, type NotoSansKRWeight, loadVerified };
package/dist/unbundled.js CHANGED
@@ -1,5 +1,5 @@
1
- import { i as createNotoSansKR, r as NOTO_SANS_KR } from "./provider-BhoN_t0i.js";
2
- //#region src/assets.ts
1
+ import { i as createNotoSansKR, r as NOTO_SANS_KR } from "./provider-BKzLgZkt.js";
2
+ // src/assets.ts
3
3
  async function loadVerified(ref, load) {
4
4
  const got = await load(ref);
5
5
  const bytes = got instanceof Uint8Array ? got.buffer instanceof SharedArrayBuffer ? got.slice() : got : new Uint8Array(got);
@@ -9,8 +9,7 @@ async function loadVerified(ref, load) {
9
9
  if (hex !== ref.sha256) throw new Error(`${ref.name}: the loader returned bytes with sha256 ${hex}, expected ${ref.sha256}`);
10
10
  return bytes;
11
11
  }
12
- //#endregion
13
- //#region src/unbundled.ts
12
+ // src/unbundled.ts
14
13
  const HOSTS = [...new Set(Object.values(NOTO_SANS_KR).flatMap((r) => r.urls.map((u) => new URL(u).host)))].map((host) => ({
15
14
  host,
16
15
  sends: "nothing"
@@ -19,5 +18,4 @@ function notoSansKR(opts) {
19
18
  const { load, egress, ...rest } = opts;
20
19
  return createNotoSansKR((weight) => loadVerified(NOTO_SANS_KR[weight], load), rest, egress ?? HOSTS);
21
20
  }
22
- //#endregion
23
21
  export { NOTO_SANS_KR, loadVerified, notoSansKR };
package/dist/workerd.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { n as NotoSansKROptions, r as NotoSansKRWeight } from "./provider-BiqtA6ZU.js";
2
- //#region src/workerd.d.ts
1
+ import { n as NotoSansKROptions, r as NotoSansKRWeight } from "./provider-BiQ9K5mm.js";
3
2
  export declare function notoSansKR(opts?: NotoSansKROptions): import("@junejs/pdf-typst-wasm").FontProvider;
4
- //#endregion
5
3
  export type { NotoSansKROptions, NotoSansKRWeight };
package/dist/workerd.js CHANGED
@@ -1,9 +1,8 @@
1
- import { i as createNotoSansKR } from "./provider-BhoN_t0i.js";
1
+ import { i as createNotoSansKR } from "./provider-BKzLgZkt.js";
2
2
  import bold from "../fonts/NotoSansKR-Bold.otf";
3
3
  import regular from "../fonts/NotoSansKR-Regular.otf";
4
- //#region src/workerd.ts
4
+ // src/workerd.ts
5
5
  function notoSansKR(opts = {}) {
6
6
  return createNotoSansKR(async (weight) => new Uint8Array(weight === 700 ? bold : regular), opts);
7
7
  }
8
- //#endregion
9
8
  export { notoSansKR };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junejs/pdf-font-noto-sans-kr",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "June — Noto Sans KR (Korean, regular and bold) as an offline font provider for @junejs/pdf-typst-wasm: no network call, on Node, Bun, Deno and Cloudflare Workers.",
5
5
  "type": "module",
6
6
  "license": "MIT AND OFL-1.1",
@@ -44,12 +44,12 @@
44
44
  "test": "bun test"
45
45
  },
46
46
  "peerDependencies": {
47
- "@junejs/pdf-typst-wasm": "^0.2.2"
47
+ "@junejs/pdf-typst-wasm": "^0.2.3"
48
48
  },
49
49
  "devDependencies": {
50
- "@junejs/pdf": "^0.2.2",
51
- "@junejs/pdf-typst-wasm": "^0.2.2",
52
- "@junejs/server": "^0.2.2"
50
+ "@junejs/pdf": "^0.2.3",
51
+ "@junejs/pdf-typst-wasm": "^0.2.3",
52
+ "@junejs/server": "^0.2.3"
53
53
  },
54
54
  "keywords": [
55
55
  "june",