peachsim 0.1.2471 → 0.1.2472

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 (130) hide show
  1. package/cli/catalog/meta.ts +5 -0
  2. package/cli/internal-child-contract.ts +6 -0
  3. package/cli/internal-child.ts +38 -6
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +2 -2
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +5 -5
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +3 -3
  16. package/dist-lib/bundle-channel.cjs +21 -28
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +3 -3
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +3 -3
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +2 -2
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +7 -7
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +5 -5
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/esm-chunks/{acorn-SPB3XIZL.mjs → acorn-QIMLXJTI.mjs} +3 -3
  30. package/dist-lib/esm-chunks/{chunk-FD2YXUSF.mjs → chunk-45VKM7N5.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-GH5CVSUV.mjs → chunk-4TLFZLBT.mjs} +3 -3
  32. package/dist-lib/esm-chunks/{chunk-FBMOHCA6.mjs → chunk-4YR6CPOD.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-AQOQVXJ6.mjs → chunk-57KHHRE4.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-NPWFUWK7.mjs → chunk-BERSJG2N.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-GAIO63UI.mjs → chunk-BLJMIS4D.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-36XXBAOZ.mjs → chunk-BQ7AFT33.mjs} +4 -4
  37. package/dist-lib/esm-chunks/{chunk-PYJSA7I6.mjs → chunk-CIRUDWWA.mjs} +2 -2
  38. package/dist-lib/esm-chunks/{chunk-LBYHNL4Y.mjs → chunk-DBL2SPLB.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-LYDOPEBO.mjs → chunk-GJI5PS7F.mjs} +11 -11
  40. package/dist-lib/esm-chunks/{chunk-IHURNHG6.mjs → chunk-I4NQBHWT.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-QPYS2KN6.mjs → chunk-KY5MCRDQ.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-UFL4EVBK.mjs → chunk-LODJ5JY3.mjs} +3 -3
  43. package/dist-lib/esm-chunks/{chunk-M2RQMFY6.mjs → chunk-MER2MOVT.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-DPIPUFHI.mjs → chunk-NOIPV2UU.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-MQFECF27.mjs → chunk-NQ4WLOZ2.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-2MCZICO7.mjs → chunk-STZKGNIY.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-CJ32VJRI.mjs → chunk-TBT2N4IT.mjs} +4 -4
  48. package/dist-lib/esm-chunks/{chunk-JR3HW7JO.mjs → chunk-WLK6TCKI.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-LNKA7KWU.mjs → chunk-ZSITGCQ4.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{metro-layout-parser-AFD6SXWJ.mjs → metro-layout-parser-3LHDZADO.mjs} +3 -3
  51. package/dist-lib/esm-chunks/{swift-package-prebuilt-SD73WIK2.mjs → swift-package-prebuilt-3L57A5BV.mjs} +9 -9
  52. package/dist-lib/esm-chunks/{swift-sdk-app-module-RMAM2IZO.mjs → swift-sdk-app-module-IOLCLSPU.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-image-6LMFQKBB.mjs → swift-sdk-image-BDVQHA62.mjs} +12 -12
  54. package/dist-lib/expo-swift-bundle.cjs +19 -26
  55. package/dist-lib/expo-swift-metadata.cjs +1 -1
  56. package/dist-lib/expo-swift-metadata.mjs +7 -7
  57. package/dist-lib/home-paths.cjs +1 -1
  58. package/dist-lib/host/bridge-host.cjs +21 -28
  59. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  60. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  61. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  62. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  63. package/dist-lib/host/websocket-proxy.cjs +1 -1
  64. package/dist-lib/index.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +3 -3
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +4 -4
  72. package/dist-lib/native-app-identity-project.cjs +1 -1
  73. package/dist-lib/native-app-identity-project.mjs +14 -14
  74. package/dist-lib/native-app-identity.cjs +1 -1
  75. package/dist-lib/native-app-identity.mjs +6 -6
  76. package/dist-lib/native-firebase-metadata.cjs +1 -1
  77. package/dist-lib/native-firebase-metadata.mjs +3 -3
  78. package/dist-lib/pdfium-raster.cjs +33 -25
  79. package/dist-lib/pdfium-raster.mjs +32 -25
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +3 -3
  82. package/dist-lib/profiles.cjs +1 -1
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +75 -75
  85. package/dist-lib/public-origins-lib.json +69 -69
  86. package/dist-lib/react-native-host-modules.cjs +1 -1
  87. package/dist-lib/react-native-host-modules.mjs +2 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +1 -1
  91. package/dist-lib/sdk.mjs +7 -7
  92. package/dist-lib/skills.cjs +26 -28
  93. package/dist-lib/swift-compile.cjs +1 -1
  94. package/dist-lib/swift-compile.mjs +9 -9
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +3 -3
  97. package/dist-lib/swift-submit.cjs +1 -1
  98. package/dist-lib/swift-submit.mjs +5 -5
  99. package/dist-lib/swift-svg-raster.cjs +1 -1
  100. package/dist-lib/swift-svg-raster.mjs +2 -2
  101. package/dist-lib/swift-toolchain.cjs +1 -1
  102. package/dist-lib/swift.cjs +1 -1
  103. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  104. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  105. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  106. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  107. package/dist-lib/vendor/acorn.cjs +1 -1
  108. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  109. package/dist-lib/vendor/ignore.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/plist.cjs +1 -1
  112. package/dist-lib/vendor/smol-toml.cjs +1 -1
  113. package/dist-lib/vendor/stream-json.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase.cjs +1 -1
  119. package/dist-lib/vendor/terser.cjs +1 -1
  120. package/dist-lib/vendor/valibot.cjs +1 -1
  121. package/dist-lib/vendor/ws.cjs +1 -1
  122. package/dist-lib/vendor/zod.cjs +1 -1
  123. package/dist-lib/worklet-executable.cjs +1 -1
  124. package/dist-lib/worklet-executable.mjs +3 -3
  125. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +1 -0
  126. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +1 -0
  127. package/package.json +1 -1
  128. package/runtime-companion.json +1 -1
  129. package/src/pdfium-raster.ts +37 -24
  130. package/src/swift-pdf-raster.ts +17 -23
@@ -1,8 +1,8 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  isRecord
4
- } from "./esm-chunks/chunk-LNKA7KWU.mjs";
5
- import "./esm-chunks/chunk-2MCZICO7.mjs";
4
+ } from "./esm-chunks/chunk-ZSITGCQ4.mjs";
5
+ import "./esm-chunks/chunk-STZKGNIY.mjs";
6
6
 
7
7
  // src/metro-fingerprint-registry.ts
8
8
  var RNX_METRO_FINGERPRINT_SCHEMA_VERSION = 2;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,8 +1,8 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  findBundleFooter
4
- } from "./esm-chunks/chunk-AQOQVXJ6.mjs";
5
- import "./esm-chunks/chunk-2MCZICO7.mjs";
4
+ } from "./esm-chunks/chunk-57KHHRE4.mjs";
5
+ import "./esm-chunks/chunk-STZKGNIY.mjs";
6
6
 
7
7
  // src/metro-production-bundle.ts
8
8
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -131,7 +131,7 @@ function metroCalls(expression) {
131
131
  return [];
132
132
  }
133
133
  async function readRNXMetroBundleLayout(source) {
134
- const { loadMetroLayoutParser } = await import("./esm-chunks/metro-layout-parser-AFD6SXWJ.mjs");
134
+ const { loadMetroLayoutParser } = await import("./esm-chunks/metro-layout-parser-3LHDZADO.mjs");
135
135
  const MetroLayoutParser = await loadMetroLayoutParser();
136
136
  const program = MetroLayoutParser.parse(source, {
137
137
  ecmaVersion: "latest",
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,21 +1,21 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  swiftNativePin
4
- } from "./esm-chunks/chunk-36XXBAOZ.mjs";
5
- import "./esm-chunks/chunk-NPWFUWK7.mjs";
4
+ } from "./esm-chunks/chunk-BQ7AFT33.mjs";
5
+ import "./esm-chunks/chunk-BERSJG2N.mjs";
6
6
  import {
7
7
  NATIVE_GRAPH_SDK_VERSION,
8
8
  cacheDir,
9
9
  privateSwiftRelease,
10
10
  swiftEnvironment,
11
11
  swiftToolchainBin
12
- } from "./esm-chunks/chunk-LYDOPEBO.mjs";
13
- import "./esm-chunks/chunk-MQFECF27.mjs";
12
+ } from "./esm-chunks/chunk-GJI5PS7F.mjs";
13
+ import "./esm-chunks/chunk-NQ4WLOZ2.mjs";
14
14
  import {
15
15
  SWIFT_OBJCXX_LANGUAGE_FLAG,
16
16
  isSwiftNativeTranslationUnit,
17
17
  moduleMapName
18
- } from "./esm-chunks/chunk-GAIO63UI.mjs";
18
+ } from "./esm-chunks/chunk-BLJMIS4D.mjs";
19
19
  import {
20
20
  androidMergedResourceValuesDirectory,
21
21
  extractNativeAppIdentityFromFiles,
@@ -33,25 +33,25 @@ import {
33
33
  xcodeBuildFileBuildsForIos,
34
34
  xcodePathResolver,
35
35
  xcodeTargetMemberVisitor
36
- } from "./esm-chunks/chunk-CJ32VJRI.mjs";
37
- import "./esm-chunks/chunk-FBMOHCA6.mjs";
36
+ } from "./esm-chunks/chunk-TBT2N4IT.mjs";
37
+ import "./esm-chunks/chunk-4YR6CPOD.mjs";
38
38
  import {
39
39
  parsePlistSource,
40
40
  require_lib,
41
41
  require_plist
42
- } from "./esm-chunks/chunk-PYJSA7I6.mjs";
43
- import "./esm-chunks/chunk-LBYHNL4Y.mjs";
44
- import "./esm-chunks/chunk-M2RQMFY6.mjs";
45
- import "./esm-chunks/chunk-AQOQVXJ6.mjs";
42
+ } from "./esm-chunks/chunk-CIRUDWWA.mjs";
43
+ import "./esm-chunks/chunk-DBL2SPLB.mjs";
44
+ import "./esm-chunks/chunk-MER2MOVT.mjs";
45
+ import "./esm-chunks/chunk-57KHHRE4.mjs";
46
46
  import {
47
47
  isRecord
48
- } from "./esm-chunks/chunk-LNKA7KWU.mjs";
48
+ } from "./esm-chunks/chunk-ZSITGCQ4.mjs";
49
49
  import {
50
50
  __commonJS,
51
51
  __publicField,
52
52
  __require,
53
53
  __toESM
54
- } from "./esm-chunks/chunk-2MCZICO7.mjs";
54
+ } from "./esm-chunks/chunk-STZKGNIY.mjs";
55
55
 
56
56
  // ../../node_modules/big-integer/BigInteger.js
57
57
  var require_BigInteger = __commonJS({
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  NATIVE_APP_IDENTITY_HEADER,
4
4
  applyNativeAppIdentity,
@@ -21,11 +21,11 @@ import {
21
21
  readRootModuleName,
22
22
  readSiriEntitlement,
23
23
  selectNativeAppIdentityReader
24
- } from "./esm-chunks/chunk-CJ32VJRI.mjs";
25
- import "./esm-chunks/chunk-FBMOHCA6.mjs";
26
- import "./esm-chunks/chunk-AQOQVXJ6.mjs";
27
- import "./esm-chunks/chunk-LNKA7KWU.mjs";
28
- import "./esm-chunks/chunk-2MCZICO7.mjs";
24
+ } from "./esm-chunks/chunk-TBT2N4IT.mjs";
25
+ import "./esm-chunks/chunk-4YR6CPOD.mjs";
26
+ import "./esm-chunks/chunk-57KHHRE4.mjs";
27
+ import "./esm-chunks/chunk-ZSITGCQ4.mjs";
28
+ import "./esm-chunks/chunk-STZKGNIY.mjs";
29
29
  export {
30
30
  NATIVE_APP_IDENTITY_HEADER,
31
31
  applyNativeAppIdentity,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,8 +1,8 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  findBundleFooter
4
- } from "./esm-chunks/chunk-AQOQVXJ6.mjs";
5
- import "./esm-chunks/chunk-2MCZICO7.mjs";
4
+ } from "./esm-chunks/chunk-57KHHRE4.mjs";
5
+ import "./esm-chunks/chunk-STZKGNIY.mjs";
6
6
 
7
7
  // src/native-firebase-metadata.ts
8
8
  var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -22,7 +22,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  // src/pdfium-raster.ts
23
23
  var pdfium_raster_exports = {};
24
24
  __export(pdfium_raster_exports, {
25
- rasterizePdfBytes: () => rasterizePdfBytes
25
+ rasterizePdfBytes: () => rasterizePdfBytes,
26
+ withPdfiumRasterizer: () => withPdfiumRasterizer
26
27
  });
27
28
  module.exports = __toCommonJS(pdfium_raster_exports);
28
29
  var import_inline = require("@hyzyla/pdfium/inline");
@@ -72,35 +73,42 @@ async function encodeRgbaPng(width, height, rgba) {
72
73
  }
73
74
  return png;
74
75
  }
75
- async function rasterizePdfBytes(pdf, scale) {
76
- const library = await import_inline.PDFiumLibrary.init({ disableBase64Warning: true });
76
+ async function rasterizePage(library, pdf, scale) {
77
+ const document = await library.loadDocument(pdf);
77
78
  try {
78
- const document = await library.loadDocument(pdf);
79
- try {
80
- const size = document.getPage(0).getOriginalSize();
81
- const width = Math.ceil(size.originalWidth * scale);
82
- const height = Math.ceil(size.originalHeight * scale);
83
- if (width <= 0 || height <= 0 || width > 12e3 || height > 12e3) {
84
- throw new Error(
85
- `pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
86
- );
87
- }
88
- const bitmap = await document.getPage(0).render({
89
- scale: 1,
90
- width,
91
- height,
92
- render: "bitmap",
93
- transparent: true
94
- });
95
- return await encodeRgbaPng(width, height, bitmap.data);
96
- } finally {
97
- document.destroy();
79
+ const size = document.getPage(0).getOriginalSize();
80
+ const width = Math.ceil(size.originalWidth * scale);
81
+ const height = Math.ceil(size.originalHeight * scale);
82
+ if (width <= 0 || height <= 0 || width > 12e3 || height > 12e3) {
83
+ throw new Error(
84
+ `pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
85
+ );
98
86
  }
87
+ const bitmap = await document.getPage(0).render({
88
+ scale: 1,
89
+ width,
90
+ height,
91
+ render: "bitmap",
92
+ transparent: true
93
+ });
94
+ return await encodeRgbaPng(width, height, bitmap.data);
95
+ } finally {
96
+ document.destroy();
97
+ }
98
+ }
99
+ async function withPdfiumRasterizer(render) {
100
+ const library = await import_inline.PDFiumLibrary.init({ disableBase64Warning: true });
101
+ try {
102
+ return await render((pdf, scale) => rasterizePage(library, pdf, scale));
99
103
  } finally {
100
104
  library.destroy();
101
105
  }
102
106
  }
107
+ function rasterizePdfBytes(pdf, scale) {
108
+ return withPdfiumRasterizer((rasterize) => rasterize(pdf, scale));
109
+ }
103
110
  // Annotate the CommonJS export names for ESM import in node:
104
111
  0 && (module.exports = {
105
- rasterizePdfBytes
112
+ rasterizePdfBytes,
113
+ withPdfiumRasterizer
106
114
  });
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./esm-chunks/chunk-2MCZICO7.mjs";
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./esm-chunks/chunk-STZKGNIY.mjs";
3
3
 
4
4
  // src/pdfium-raster.ts
5
5
  import { PDFiumLibrary } from "@hyzyla/pdfium/inline";
@@ -49,34 +49,41 @@ async function encodeRgbaPng(width, height, rgba) {
49
49
  }
50
50
  return png;
51
51
  }
52
- async function rasterizePdfBytes(pdf, scale) {
53
- const library = await PDFiumLibrary.init({ disableBase64Warning: true });
52
+ async function rasterizePage(library, pdf, scale) {
53
+ const document = await library.loadDocument(pdf);
54
54
  try {
55
- const document = await library.loadDocument(pdf);
56
- try {
57
- const size = document.getPage(0).getOriginalSize();
58
- const width = Math.ceil(size.originalWidth * scale);
59
- const height = Math.ceil(size.originalHeight * scale);
60
- if (width <= 0 || height <= 0 || width > 12e3 || height > 12e3) {
61
- throw new Error(
62
- `pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
63
- );
64
- }
65
- const bitmap = await document.getPage(0).render({
66
- scale: 1,
67
- width,
68
- height,
69
- render: "bitmap",
70
- transparent: true
71
- });
72
- return await encodeRgbaPng(width, height, bitmap.data);
73
- } finally {
74
- document.destroy();
55
+ const size = document.getPage(0).getOriginalSize();
56
+ const width = Math.ceil(size.originalWidth * scale);
57
+ const height = Math.ceil(size.originalHeight * scale);
58
+ if (width <= 0 || height <= 0 || width > 12e3 || height > 12e3) {
59
+ throw new Error(
60
+ `pdf page ${size.originalWidth}x${size.originalHeight} is out of range`
61
+ );
75
62
  }
63
+ const bitmap = await document.getPage(0).render({
64
+ scale: 1,
65
+ width,
66
+ height,
67
+ render: "bitmap",
68
+ transparent: true
69
+ });
70
+ return await encodeRgbaPng(width, height, bitmap.data);
71
+ } finally {
72
+ document.destroy();
73
+ }
74
+ }
75
+ async function withPdfiumRasterizer(render) {
76
+ const library = await PDFiumLibrary.init({ disableBase64Warning: true });
77
+ try {
78
+ return await render((pdf, scale) => rasterizePage(library, pdf, scale));
76
79
  } finally {
77
80
  library.destroy();
78
81
  }
79
82
  }
83
+ function rasterizePdfBytes(pdf, scale) {
84
+ return withPdfiumRasterizer((rasterize) => rasterize(pdf, scale));
85
+ }
80
86
  export {
81
- rasterizePdfBytes
87
+ rasterizePdfBytes,
88
+ withPdfiumRasterizer
82
89
  };
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,8 +1,8 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  parsePlistSource
4
- } from "./esm-chunks/chunk-PYJSA7I6.mjs";
5
- import "./esm-chunks/chunk-2MCZICO7.mjs";
4
+ } from "./esm-chunks/chunk-CIRUDWWA.mjs";
5
+ import "./esm-chunks/chunk-STZKGNIY.mjs";
6
6
  export {
7
7
  parsePlistSource
8
8
  };
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2471 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2472 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;