@qrcommunication/gigapdf-lib 0.71.1 → 0.72.0

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-fs.cjs CHANGED
@@ -24,7 +24,7 @@ __export(node_fs_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(node_fs_exports);
26
26
 
27
- // node_modules/.pnpm/tsup@8.5.1_postcss@8.5.15_typescript@6.0.3/node_modules/tsup/assets/cjs_shims.js
27
+ // node_modules/.pnpm/tsup@8.5.1_postcss@8.5.15_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js
28
28
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
29
29
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
30
30
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/node-fs.ts","../node_modules/.pnpm/tsup@8.5.1_postcss@8.5.15_typescript@6.0.3/node_modules/tsup/assets/cjs_shims.js"],"sourcesContent":["/**\n * Node-only filesystem loaders for gigapdf-lib.\n *\n * This module is the ONLY place that touches Node's `fs`/`url` modules. It is\n * swapped out for `node-fs.browser.ts` via the package.json `\"browser\"` field\n * so that browser bundlers (Turbopack, webpack, Vite) never see a reference to\n * `node:fs/promises` / `node:url` and never try to resolve them.\n *\n * The relative paths below are resolved from the built module (`dist/node-fs.js`)\n * to the package root via the `import.meta.url` shim injected by tsup (`shims`),\n * exactly like the previous in-`index.ts` resolution did from `dist/index.js`.\n */\n\n/**\n * Indirect the specifier through a variable so any bundler that still evaluates\n * this module (it shouldn't in the browser, thanks to the `\"browser\"` mapping)\n * doesn't statically resolve these Node-only modules.\n */\nconst nodeImport = (m: string): Promise<Record<string, unknown>> =>\n import(/* webpackIgnore: true */ /* @vite-ignore */ m);\n\nasync function fsReadFile(): Promise<(p: string) => Promise<Uint8Array>> {\n const { readFile } = (await nodeImport(\"node:fs/promises\")) as {\n readFile: (p: string) => Promise<Uint8Array>;\n };\n return readFile;\n}\n\nasync function urlToPath(): Promise<(u: URL) => string> {\n const { fileURLToPath } = (await nodeImport(\"node:url\")) as {\n fileURLToPath: (u: URL) => string;\n };\n return fileURLToPath;\n}\n\n/** Read the bundled `gigapdf.wasm` shipped inside this package. */\nexport async function loadDefaultWasmBytes(): Promise<Uint8Array> {\n const [readFile, fileURLToPath] = await Promise.all([fsReadFile(), urlToPath()]);\n const wasmPath = fileURLToPath(new URL(\"../gigapdf.wasm\", import.meta.url));\n return readFile(wasmPath);\n}\n\n// OCR models are no longer bundled in this package — OCR runs host-side via the\n// `gigapdf-ocr-rten` crate (PaddleOCR + RTen). The `.gpocr` readers were removed.\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ADM9D,IAAM,aAAa,CAAC,MAClB;AAAA;AAAA;AAAA,EAAoD;AAAA;AAEtD,eAAe,aAA0D;AACvE,QAAM,EAAE,SAAS,IAAK,MAAM,WAAW,kBAAkB;AAGzD,SAAO;AACT;AAEA,eAAe,YAAyC;AACtD,QAAM,EAAE,cAAc,IAAK,MAAM,WAAW,UAAU;AAGtD,SAAO;AACT;AAGA,eAAsB,uBAA4C;AAChE,QAAM,CAAC,UAAU,aAAa,IAAI,MAAM,QAAQ,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;AAC/E,QAAM,WAAW,cAAc,IAAI,IAAI,mBAAmB,aAAe,CAAC;AAC1E,SAAO,SAAS,QAAQ;AAC1B;","names":[]}
1
+ {"version":3,"sources":["../src/node-fs.ts","../node_modules/.pnpm/tsup@8.5.1_postcss@8.5.15_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js"],"sourcesContent":["/**\n * Node-only filesystem loaders for gigapdf-lib.\n *\n * This module is the ONLY place that touches Node's `fs`/`url` modules. It is\n * swapped out for `node-fs.browser.ts` via the package.json `\"browser\"` field\n * so that browser bundlers (Turbopack, webpack, Vite) never see a reference to\n * `node:fs/promises` / `node:url` and never try to resolve them.\n *\n * The relative paths below are resolved from the built module (`dist/node-fs.js`)\n * to the package root via the `import.meta.url` shim injected by tsup (`shims`),\n * exactly like the previous in-`index.ts` resolution did from `dist/index.js`.\n */\n\n/**\n * Indirect the specifier through a variable so any bundler that still evaluates\n * this module (it shouldn't in the browser, thanks to the `\"browser\"` mapping)\n * doesn't statically resolve these Node-only modules.\n */\nconst nodeImport = (m: string): Promise<Record<string, unknown>> =>\n import(/* webpackIgnore: true */ /* @vite-ignore */ m);\n\nasync function fsReadFile(): Promise<(p: string) => Promise<Uint8Array>> {\n const { readFile } = (await nodeImport(\"node:fs/promises\")) as {\n readFile: (p: string) => Promise<Uint8Array>;\n };\n return readFile;\n}\n\nasync function urlToPath(): Promise<(u: URL) => string> {\n const { fileURLToPath } = (await nodeImport(\"node:url\")) as {\n fileURLToPath: (u: URL) => string;\n };\n return fileURLToPath;\n}\n\n/** Read the bundled `gigapdf.wasm` shipped inside this package. */\nexport async function loadDefaultWasmBytes(): Promise<Uint8Array> {\n const [readFile, fileURLToPath] = await Promise.all([fsReadFile(), urlToPath()]);\n const wasmPath = fileURLToPath(new URL(\"../gigapdf.wasm\", import.meta.url));\n return readFile(wasmPath);\n}\n\n// OCR models are no longer bundled in this package — OCR runs host-side via the\n// `gigapdf-ocr-rten` crate (PaddleOCR + RTen). The `.gpocr` readers were removed.\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ADM9D,IAAM,aAAa,CAAC,MAClB;AAAA;AAAA;AAAA,EAAoD;AAAA;AAEtD,eAAe,aAA0D;AACvE,QAAM,EAAE,SAAS,IAAK,MAAM,WAAW,kBAAkB;AAGzD,SAAO;AACT;AAEA,eAAe,YAAyC;AACtD,QAAM,EAAE,cAAc,IAAK,MAAM,WAAW,UAAU;AAGtD,SAAO;AACT;AAGA,eAAsB,uBAA4C;AAChE,QAAM,CAAC,UAAU,aAAa,IAAI,MAAM,QAAQ,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;AAC/E,QAAM,WAAW,cAAc,IAAI,IAAI,mBAAmB,aAAe,CAAC;AAC1E,SAAO,SAAS,QAAQ;AAC1B;","names":[]}
package/gigapdf.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrcommunication/gigapdf-lib",
3
- "version": "0.71.1",
3
+ "version": "0.72.0",
4
4
  "description": "TypeScript SDK for gigapdf-lib — a Rust→WASM document engine with no third-party PDF/Office/image library: read/edit/render, OCR, full-text search, AcroForm fields (read · fill · create), annotations, signing, encryption, PDF↔Office/HTML/RTF conversions, and a native HTML+CSS→PDF renderer with inline JavaScript (no headless browser). Cryptography uses audited RustCrypto; JavaScript uses the Boa engine; everything else is pure Rust. Single wasm-bindgen-free .wasm with one host import (entropy).",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "Rony Licha / QR Communication",
@@ -46,6 +46,7 @@
46
46
  "build": "tsup",
47
47
  "dev": "tsup --watch",
48
48
  "typecheck": "tsc --noEmit",
49
+ "docs:api": "typedoc",
49
50
  "test": "vitest run",
50
51
  "clean": "rm -rf dist gigapdf.wasm",
51
52
  "prepublishOnly": "pnpm run build:wasm && pnpm run build"
@@ -80,6 +81,7 @@
80
81
  "devDependencies": {
81
82
  "@types/node": "^25.9.3",
82
83
  "tsup": "^8.5.1",
84
+ "typedoc": "^0.28.0",
83
85
  "typescript": "^6.0.3",
84
86
  "vitest": "^3.2.4"
85
87
  },